diff --git a/.env b/.env index 26671af64916a..9affb93f5321e 100644 --- a/.env +++ b/.env @@ -3,6 +3,9 @@ # # All of these options can be overridden by setting them as environment variables before starting # the environment. You will need to restart your environment when changing any of these. +# +# Below, the following substitutions can be made: +# - '{version}': any major.minor PHP version from 5.2 onwards. ## # The site will be available at http://localhost:LOCAL_PORT @@ -11,8 +14,7 @@ LOCAL_PORT=8889 # Where to run WordPress from. Valid options are 'src' and 'build'. LOCAL_DIR=src -# The PHP version to use. Valid options are 'latest', and '{version}-fpm', where '{version}' is any -# x.y PHP version from 5.2 onwards. +# The PHP version to use. Valid options are 'latest', and '{version}-fpm'. LOCAL_PHP=latest # Whether or not to enable XDebug. @@ -21,14 +23,29 @@ LOCAL_PHP_XDEBUG=false # Whether or not to enable Memcached. LOCAL_PHP_MEMCACHED=false -# The MySQL version to use. See https://hub.docker.com/_/mysql/ for valid versions. -LOCAL_MYSQL=5.7 +## +# The database software to use. +# +# Supported values are `mysql` and `mariadb`. +## +LOCAL_DB_TYPE=mysql + +## +# The database version to use. +# +# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above. +# +# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions. +# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions. +## +LOCAL_DB_VERSION=5.7 # The debug settings to add to `wp-config.php`. LOCAL_WP_DEBUG=true LOCAL_WP_DEBUG_LOG=true LOCAL_WP_DEBUG_DISPLAY=true LOCAL_SCRIPT_DEBUG=true +LOCAL_WP_ENVIRONMENT_TYPE=local # The URL to use when running e2e tests. WP_BASE_URL=http://localhost:${LOCAL_PORT} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000000..07f72581a9f4c --- /dev/null +++ b/.eslintignore @@ -0,0 +1,15 @@ +# Files and folders related to build/test tools +/build +/node_modules +/tests +/vendor +/tools + +# Excluded files and folders based on `jsdoc.conf.json` exclusions +/src/js/_enqueues/vendor + +# Webpack built files +/src/wp-includes/js/media-* + +# Themes +src/wp-content/themes/ diff --git a/.eslintrc-jsdoc.js b/.eslintrc-jsdoc.js new file mode 100644 index 0000000000000..6f7351ec08945 --- /dev/null +++ b/.eslintrc-jsdoc.js @@ -0,0 +1,29 @@ +module.exports = { + rules: { + 'require-jsdoc': 'off', + 'valid-jsdoc': [ 'error', { + prefer: { + arg: 'param', + argument: 'param', + extends: 'augments', + returns: 'return', + }, + preferType: { + array: 'Array', + bool: 'boolean', + Boolean: 'boolean', + float: 'number', + Float: 'number', + int: 'number', + integer: 'number', + Integer: 'number', + Number: 'number', + object: 'Object', + String: 'string', + Void: 'void', + }, + requireParamDescription: false, + requireReturn: false, + } ], + }, +}; diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000000000..69cb76019a474 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml new file mode 100644 index 0000000000000..41faf379ee1c8 --- /dev/null +++ b/.github/workflows/coding-standards.yml @@ -0,0 +1,161 @@ +name: Coding Standards + +on: + # JSHint was introduced in WordPress 3.8. + # PHPCS checking was introduced in WordPress 5.1. + push: + branches: + - master + - trunk + - '3.[89]' + - '[4-9].[0-9]' + tags: + - '3.[89]*' + - '[4-9].[0-9]*' + pull_request: + branches: + - master + - trunk + - '3.[89]' + - '[4-9].[0-9]' + paths: + # Any change to a PHP or JavaScript file should run checks. + - '**.js' + - '**.php' + # These files configure NPM. Changes could affect the outcome. + - 'package*.json' + # These files configure Composer. Changes could affect the outcome. + - 'composer.*' + # This file configures JSHint. Changes could affect the outcome. + - '.jshintrc' + # This file configures PHPCS. Changes could affect the outcome. + - 'phpcs.xml.dist' + # Changes to workflow files should always verify all workflows are successful. + - '.github/workflows/*.yml' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + # Runs PHP coding standards checks. + # + # Violations are reported inline with annotations. + # + # Performs the following steps: + # - Checks out the repository. + # - Sets up PHP. + # - Logs debug information. + # - Installs Composer dependencies (use cache if possible). + # - Make Composer packages available globally. + # - Logs PHP_CodeSniffer debug information. + # - Runs PHPCS on the full codebase with warnings suppressed. + # - Runs PHPCS on the `tests` directory without warnings suppressed. + # - Ensures version-controlled files are not modified or deleted. + phpcs: + name: PHP coding standards + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Set up PHP + uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + + - name: Log debug information + run: | + php --version + composer --version + + - name: Install Composer dependencies + uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0 + with: + composer-options: "--no-progress --no-ansi --no-interaction" + + - name: Make Composer packages available globally + run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH + + - name: Log PHPCS debug information + run: phpcs -i + + - name: Run PHPCS on all Core files + run: phpcs -q -n --report=checkstyle | cs2pr + + - name: Check test suite files for warnings + run: phpcs tests -q --report=checkstyle | cs2pr + + - name: Ensure version-controlled files are not modified during the tests + run: git diff --exit-code + + # Runs the JavaScript coding standards checks. + # + # JSHint violations are not currently reported inline with annotations. + # + # Performs the following steps: + # - Checks out the repository. + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # - Logs updated debug information. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Run the WordPress JSHint checks. + # - Ensures version-controlled files are not modified or deleted. + jshint: + name: JavaScript coding standards + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + env: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} + + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + npm --version + node --version + git --version + svn --version + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Log debug information + run: | + npm --version + node --version + + - name: Install Dependencies + run: npm ci + + - name: Run JSHint + run: npm run grunt jshint + + - name: Ensure version-controlled files are not modified or deleted + run: git diff --exit-code + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ phpcs, jshint ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.result == 'cancelled' ) && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml new file mode 100644 index 0000000000000..6bcaa9a3ff712 --- /dev/null +++ b/.github/workflows/end-to-end-tests.yml @@ -0,0 +1,131 @@ +name: End-to-end Tests + +on: + # The end to end test suite was introduced in WordPress 5.3. + push: + branches: + - master + - trunk + - '5.[3-9]' + - '[6-9].[0-9]' + tags: + - '5.[3-9]*' + - '[6-9].[0-9]*' + pull_request: + branches: + - master + - trunk + - '5.[3-9]' + - '[6-9].[0-9]' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + LOCAL_DIR: build + +jobs: + # Runs the end-to-end test suite. + # + # Performs the following steps: + # - Set environment variables. + # - Checks out the repository. + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Builds WordPress to run from the `build` directory. + # - Starts the WordPress Docker container. + # - Logs general debug information. + # - Logs the running Docker containers. + # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container). + # - Install WordPress within the Docker container. + # - Run the E2E tests. + # - Ensures version-controlled files are not modified or deleted. + e2e-tests: + name: E2E Tests + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + + steps: + - name: Configure environment variables + run: | + echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV + echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV + + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + php --version + php -i + locale -a + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Build WordPress + run: npm run build + + - name: Start Docker environment + run: | + npm run env:start + + - name: General debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Log running Docker containers + run: docker ps -a + + - name: Docker debug information + run: | + docker -v + docker-compose -v + docker-compose run --rm mysql mysql --version + docker-compose run --rm php php --version + docker-compose run --rm php php -m + docker-compose run --rm php php -i + docker-compose run --rm php locale -a + + - name: Install WordPress + run: npm run env:install + + - name: Run E2E tests + run: npm run test:e2e + + - name: Ensure version-controlled files are not modified or deleted + run: git diff --exit-code + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ e2e-tests ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml new file mode 100644 index 0000000000000..4c0c6e17e14ef --- /dev/null +++ b/.github/workflows/javascript-tests.yml @@ -0,0 +1,100 @@ +name: JavaScript Tests + +on: + # JavaScript testing was introduced in WordPress 3.8. + push: + branches: + - master + - trunk + - '3.[89]' + - '[4-9].[0-9]' + tags: + - '3.[89]*' + - '[4-9].[0-9]*' + pull_request: + branches: + - master + - trunk + - '3.[89]' + - '[4-9].[0-9]' + paths: + # Any change to a JavaScript file should run tests. + - '**.js' + # These files configure NPM. Changes could affect the outcome. + - 'package*.json' + # This file configures ESLint. Changes could affect the outcome. + - '.eslintignore' + # This file configures JSHint. Changes could affect the outcome. + - '.jshintrc' + # Any change to the QUnit directory should run tests. + - 'tests/qunit/**' + # Changes to workflow files should always verify all workflows are successful. + - '.github/workflows/*.yml' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + # Runs the QUnit tests for WordPress. + # + # Performs the following steps: + # - Checks out the repository. + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # - Logs updated debug information. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Run the WordPress QUnit tests. + # - Ensures version-controlled files are not modified or deleted. + test-js: + name: QUnit Tests + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + npm --version + node --version + git --version + svn --version + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Log debug information + run: | + npm --version + node --version + + - name: Install Dependencies + run: npm ci + + - name: Run QUnit tests + run: npm run grunt qunit:compiled + + - name: Ensure version-controlled files are not modified or deleted + run: git diff --exit-code + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ test-js ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.test-js.result == 'success' && 'success' || needs.test-js.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml new file mode 100644 index 0000000000000..de89b79a3de6c --- /dev/null +++ b/.github/workflows/php-compatibility.yml @@ -0,0 +1,102 @@ +name: PHP Compatibility + +on: + # PHP compatibility testing was introduced in WordPress 5.5. + push: + branches: + - master + - trunk + - '5.[5-9]' + - '[6-9].[0-9]' + tags: + - '5.[5-9]*' + - '[6-9].[0-9]*' + pull_request: + branches: + - master + - trunk + - '5.[5-9]' + - '[6-9].[0-9]' + paths: + # This workflow only scans PHP files. + - '**.php' + # These files configure Composer. Changes could affect the outcome. + - 'composer.*' + # This file configures PHP Compatibility scanning. Changes could affect the outcome. + - 'phpcompat.xml.dist' + # Changes to workflow files should always verify all workflows are successful. + - '.github/workflows/*.yml' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + + # Runs PHP compatibility testing. + # + # Violations are reported inline with annotations. + # + # Performs the following steps: + # - Checks out the repository. + # - Sets up PHP. + # - Logs debug information about the runner container. + # - Installs Composer dependencies (use cache if possible). + # - Make Composer packages available globally. + # - Logs PHP_CodeSniffer debug information. + # - Runs the PHP compatibility tests. + # - Ensures version-controlled files are not modified or deleted. + php-compatibility: + name: Check PHP compatibility + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Set up PHP + uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0 + with: + php-version: '7.4' + coverage: none + tools: composer, cs2pr + + - name: Log debug information + run: | + php --version + composer --version + + - name: Install Composer dependencies + uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0 + with: + composer-options: "--no-progress --no-ansi --no-interaction" + + - name: Make Composer packages available globally + run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH + + - name: Log PHPCS debug information + run: phpcs -i + + - name: Run PHP compatibility tests + run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr + + - name: Ensure version-controlled files are not modified or deleted + run: git diff --exit-code + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ php-compatibility ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.php-compatibility.result == 'success' && 'success' || needs.php-compatibility.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml new file mode 100644 index 0000000000000..b6ce31b99bba6 --- /dev/null +++ b/.github/workflows/phpunit-tests.yml @@ -0,0 +1,257 @@ +name: PHPUnit Tests + +on: + push: + branches: + - master + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + tags: + - '3.[7-9]*' + - '[4-9].[0-9]*' + pull_request: + branches: + - master + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + workflow_dispatch: + # Once weekly On Sundays at 00:00 UTC. + schedule: + - cron: '0 0 * * 0' + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} + LOCAL_PHP_MEMCACHED: ${{ false }} + SLOW_TESTS: 'external-http,media,restapi' + +jobs: + # Runs the PHPUnit tests for WordPress. + # + # Note: Steps running tests for PHP 8.1 jobs are allowed to "continue-on-error". + # This prevents workflow runs from being marked as "failed" when only PHP 8.1 fails. + # + # Performs the following steps: + # - Set environment variables. + # - Sets up the environment variables needed for testing with memcached (if desired). + # - Installs NodeJS 14. + # - Installs NPM dependencies + # - Configures caching for Composer. + # - Installs Composer dependencies (if desired). + # - Logs Docker debug information (about both the Docker installation within the runner). + # - Starts the WordPress Docker container. + # - Starts the memcached server after the Docker network has been created (if desired). + # - Logs WordPress Docker container debug information. + # - Logs debug general information. + # - Logs the running Docker containers. + # - Logs debug information about what's installed within the WordPress Docker containers. + # - Install WordPress within the Docker container. + # - Run the PHPUnit tests. + # - Ensures version-controlled files are not modified or deleted. + # - Checks out the WordPress Test reporter repository. + # - Reconnect the directory to the Git repository. + # - Submit the test results to the WordPress.org host test results. + test-php: + name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] + os: [ ubuntu-latest ] + memcached: [ false ] + split_slow: [ false ] + multisite: [ false, true ] + include: + # Additional "slow" jobs for PHP 5.6. + - php: '5.6' + os: ubuntu-latest + memcached: false + multisite: false + split_slow: true + - php: '5.6' + os: ubuntu-latest + memcached: false + multisite: true + split_slow: true + # Include jobs for PHP 7.4 with memcached. + - php: '7.4' + os: ubuntu-latest + memcached: true + multisite: false + - php: '7.4' + os: ubuntu-latest + memcached: true + multisite: true + # Report the results of the PHP 7.4 without memcached job. + - php: '7.4' + os: ubuntu-latest + memcached: false + multisite: false + report: true + + env: + LOCAL_PHP: ${{ matrix.php }}-fpm + LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} + PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} + + steps: + - name: Configure environment variables + run: | + echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV + echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV + + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Install Dependencies + run: npm ci + + # This date is used to ensure that the Composer cache is refreshed at least once every week. + # http://man7.org/linux/man-pages/man1/date.1.html + - name: "Get last Monday's date" + id: get-date + run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")" + + - name: Get Composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer dependencies + uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 + env: + cache-name: cache-composer-dependencies + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} + + - name: Install Composer dependencies + run: | + docker-compose run --rm php composer --version + + # Install using `composer update` as there is no `composer.lock` file. + if [ ${{ env.LOCAL_PHP }} == '8.1-fpm' ]; then + docker-compose run --rm php composer update --ignore-platform-reqs + else + docker-compose run --rm php composer update + fi + + - name: Docker debug information + run: | + docker -v + docker-compose -v + + - name: Start Docker environment + run: | + npm run env:start + + # The memcached server needs to start after the Docker network has been set up with `npm run env:start`. + - name: Start the Memcached server. + if: ${{ matrix.memcached }} + run: | + cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php + docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached + + - name: General debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Log running Docker containers + run: docker ps -a + + - name: WordPress Docker container debug information + run: | + docker-compose run --rm mysql mysql --version + docker-compose run --rm php php --version + docker-compose run --rm php php -m + docker-compose run --rm php php -i + docker-compose run --rm php locale -a + + - name: Install WordPress + run: npm run env:install + + - name: Run slow PHPUnit tests + if: ${{ matrix.split_slow }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} + + - name: Run PHPUnit tests for single site excluding slow tests + if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required + + - name: Run PHPUnit tests for Multisite excluding slow tests + if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers + + - name: Run PHPUnit tests + if: ${{ matrix.php >= '7.0' }} + continue-on-error: ${{ matrix.php == '8.1' }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} + + - name: Run AJAX tests + if: ${{ ! matrix.split_slow }} + continue-on-error: ${{ matrix.php == '8.1' }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax + + - name: Run ms-files tests as a multisite install + if: ${{ matrix.multisite && ! matrix.split_slow }} + continue-on-error: ${{ matrix.php == '8.1' }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files + + - name: Run external HTTP tests + if: ${{ ! matrix.multisite && ! matrix.split_slow }} + continue-on-error: ${{ matrix.php == '8.1' }} + run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http + + # __fakegroup__ is excluded to force PHPUnit to ignore the settings in phpunit.xml.dist. + - name: Run (xDebug) tests + if: ${{ ! matrix.split_slow }} + continue-on-error: ${{ matrix.php == '8.1' }} + run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__ + + - name: Ensure version-controlled files are not modified or deleted + run: git diff --exit-code + + - name: Checkout the WordPress Test Reporter + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + with: + repository: 'WordPress/phpunit-test-runner' + path: 'test-runner' + + - name: Submit test results to the WordPress.org host test results + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} + env: + WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" + run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ test-php ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/slack-notifications.yml b/.github/workflows/slack-notifications.yml new file mode 100644 index 0000000000000..ceb06c5fd4165 --- /dev/null +++ b/.github/workflows/slack-notifications.yml @@ -0,0 +1,186 @@ +## +# A reusable workflow for posting messages to the Making WordPress +# Core Slack Instance by submitting data to Slack webhook URLs +# received by Slack Workflows. +## +name: Slack Notifications + +on: + workflow_run: + workflows: + - Code Coverage Report + - Coding Standards + - End-to-end Tests + - JavaScript Tests + - PHP Compatibility + - PHPUnit Tests + - Test NPM + - Test old branches + types: + - completed + branches: + - '[3-4].[0-9]' + - '5.[0-8]' + + workflow_call: + inputs: + calling_status: + description: 'The status of the calling workflow' + type: string + required: true + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: + description: 'The Slack webhook URL for a successful build.' + required: true + SLACK_GHA_CANCELLED_WEBHOOK: + description: 'The Slack webhook URL for a cancelled build.' + required: true + SLACK_GHA_FIXED_WEBHOOK: + description: 'The Slack webhook URL for a fixed build.' + required: true + SLACK_GHA_FAILURE_WEBHOOK: + description: 'The Slack webhook URL for a failed build.' + required: true + +env: + CURRENT_BRANCH: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_branch || github.ref_name }} + +jobs: + # Gathers the details needed for Slack notifications. + # + # These details are passed as outputs to the subsequent, dependant jobs that + # submit data to Slack webhook URLs configured to post messages. + # + # Performs the following steps: + # - Retrieves the workflow ID (if necessary). + # - Retrieves the workflow URL (if necessary). + # - Retrieves the previous workflow run and stores its conclusion. + # - Sets the previous conclusion as an output. + # - Prepares the commit message. + # - Constructs and stores a message payload as an output. + prepare: + name: Prepare notifications + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.event != 'pull_request' }} + outputs: + previous_conclusion: ${{ steps.previous-conclusion.outputs.previous_conclusion }} + payload: ${{ steps.create-payload.outputs.payload }} + + steps: + - name: Get the workflow ID + id: current-workflow-id + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + uses: actions/github-script@441359b1a30438de65712c2fbca0abe4816fa667 # v5.0.0 + with: + script: | + const workflow_run = await github.rest.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{ github.run_id }}, + }); + return workflow_run.data.workflow_id; + + - name: Get details about the previous workflow run + id: previous-result + uses: actions/github-script@441359b1a30438de65712c2fbca0abe4816fa667 # v5.0.0 + with: + script: | + const previous_runs = await github.rest.actions.listWorkflowRuns({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.workflow_id || steps.current-workflow-id.outputs.result }}, + branch: '${{ env.CURRENT_BRANCH }}', + per_page: 1, + page: 2, + }); + return previous_runs.data.workflow_runs[0].conclusion; + + - name: Store previous conclusion as an output + id: previous-conclusion + run: echo "::set-output name=previous_conclusion::${{ steps.previous-result.outputs.result }}" + + - name: Get the commit message + id: current-commit-message + uses: actions/github-script@441359b1a30438de65712c2fbca0abe4816fa667 # v5.0.0 + if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} + with: + script: | + const commit_details = await github.rest.repos.getCommit({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: '${{ github.sha }}' + }); + return commit_details.data.commit.message; + + - name: Prepare commit message. + id: commit-message + run: | + COMMIT_MESSAGE=$(cat <<'EOF' | awk 'NR==1' | sed 's/`/\\`/g' | sed 's/\"/\\\\\\"/g' | sed 's/\$/\\$/g' + ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_commit.message || ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) && fromJson( steps.current-commit-message.outputs.result ) || github.event.head_commit.message }} + EOF + ) + echo "::set-output name=commit_message_escaped::${COMMIT_MESSAGE}" + + - name: Construct payload and store as an output + id: create-payload + run: echo "::set-output name=payload::{\"workflow_name\":\"${{ github.event_name == 'workflow_run' && github.event.workflow_run.name || github.workflow }}\",\"ref_name\":\"${{ env.CURRENT_BRANCH }}\",\"run_url\":\"https://github.com/WordPress/wordpress-develop/actions/runs/${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}\",\"commit_message\":\"${{ steps.commit-message.outputs.commit_message_escaped }}\"}" + + # Posts notifications when a workflow fails. + failure: + name: Failure notifications + runs-on: ubuntu-latest + needs: [ prepare ] + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure' || inputs.calling_status == 'failure' || failure() }} + + steps: + - name: Post failure notifications to Slack + uses: slackapi/slack-github-action@d5d276d7ae0f38f29322b80da9baf985cc80f8b1 # v1.15.0 + with: + payload: ${{ needs.prepare.outputs.payload }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} + + # Posts notifications the first time a workflow run succeeds after previously failing. + fixed: + name: Fixed notifications + runs-on: ubuntu-latest + needs: [ prepare ] + if: ${{ needs.prepare.outputs.previous_conclusion == 'failure' && ( github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' || inputs.calling_status == 'success' ) && success() }} + + steps: + - name: Post failure notifications to Slack + uses: slackapi/slack-github-action@d5d276d7ae0f38f29322b80da9baf985cc80f8b1 # v1.15.0 + with: + payload: ${{ needs.prepare.outputs.payload }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + + # Posts notifications when a workflow is successful. + success: + name: Success notifications + runs-on: ubuntu-latest + needs: [ prepare ] + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' || inputs.calling_status == 'success' && success() }} + + steps: + - name: Post success notifications to Slack + uses: slackapi/slack-github-action@d5d276d7ae0f38f29322b80da9baf985cc80f8b1 # v1.15.0 + with: + payload: ${{ needs.prepare.outputs.payload }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + + # Posts notifications when a workflow is cancelled. + cancelled: + name: Cancelled notifications + runs-on: ubuntu-latest + needs: [ prepare ] + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'cancelled' || inputs.calling_status == 'cancelled' || cancelled() }} + + steps: + - name: Post cancelled notifications to Slack + uses: slackapi/slack-github-action@d5d276d7ae0f38f29322b80da9baf985cc80f8b1 # v1.15.0 + with: + payload: ${{ needs.prepare.outputs.payload }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml new file mode 100644 index 0000000000000..b11ae0348eb66 --- /dev/null +++ b/.github/workflows/test-coverage.yml @@ -0,0 +1,183 @@ +name: Code Coverage Report + +on: + # Verify + push: + branches: + - master + - trunk + paths: + - '.github/workflows/test-coverage.yml' + - 'phpunit.xml.dist' + - 'tests/phpunit/multisite.xml' + # Once daily at 00:00 UTC. + schedule: + - cron: '0 0 * * *' + # Allow manually triggering the workflow. + workflow_dispatch: + +env: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} + LOCAL_PHP: '7.4-fpm' + LOCAL_PHP_XDEBUG: true + LOCAL_PHP_MEMCACHED: ${{ false }} + +jobs: + # Sets up WordPress for testing or development use. + # + # Performs the following steps: + # - Set environment variables. + # - Checks out the repository. + # - Checks out the WordPress Importer plugin (needed for the Core PHPUnit tests). + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Logs Docker debug information (about the Docker installation within the runner). + # - Starts the WordPress Docker container. + # - Logs debug general information. + # - Logs the running Docker containers. + # - Logs WordPress Docker container debug information. + # - Logs debug information about what's installed within the WordPress Docker containers. + # - Install WordPress within the Docker container. + # - Run the PHPUnit tests as a single site. + # - Ensures version-controlled files are not modified or deleted. + # - Upload the single site code coverage report to Codecov.io. + # - Run the PHPUnit tests as a multisite. + # - Ensures version-controlled files are not modified or deleted. + # - Upload the multisite code coverage report to Codecov.io. + test-coverage-report: + name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + strategy: + fail-fast: false + matrix: + multisite: [ false, true ] + + steps: + - name: Configure environment variables + run: | + echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV + echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV + + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + echo "$GITHUB_REF" + echo "$GITHUB_EVENT_NAME" + npm --version + node --version + curl --version + git --version + svn --version + php --version + php -i + locale -a + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Install Dependencies + run: npm ci + + # This date is used to ensure that the Composer cache is refreshed at least once every week. + # http://man7.org/linux/man-pages/man1/date.1.html + - name: "Get last Monday's date" + id: get-date + run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")" + + - name: Get Composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer dependencies + uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 + env: + cache-name: cache-composer-dependencies + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} + + - name: Install Composer dependencies + run: | + docker-compose run --rm php composer --version + + # Install using `composer update` as there is no `composer.lock` file. + docker-compose run --rm php composer update + + - name: Docker debug information + run: | + docker -v + docker-compose -v + + - name: Start Docker environment + run: | + npm run env:start + + - name: General debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Log running Docker containers + run: docker ps -a + + - name: WordPress Docker container debug information + run: | + docker-compose run --rm mysql mysql --version + docker-compose run --rm php php --version + docker-compose run --rm php php -m + docker-compose run --rm php php -i + docker-compose run --rm php locale -a + + - name: Install WordPress + run: npm run env:install + + - name: Run tests as a single site + if: ${{ ! matrix.multisite }} + run: npm run test:php -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml + + - name: Ensure version-controlled files are not modified during the tests + run: git diff --exit-code + + - name: Upload single site report to Codecov + if: ${{ ! matrix.multisite }} + uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1 + with: + file: wp-code-coverage-single-clover-${{ github.sha }}.xml + flags: single,php + + - name: Run tests as a multisite install + if: ${{ matrix.multisite }} + run: npm run test:php -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml + + - name: Ensure version-controlled files are not modified during the tests + run: git diff --exit-code + + - name: Upload multisite report to Codecov + if: ${{ matrix.multisite }} + uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1 + with: + file: wp-code-coverage-multisite-clover-${{ github.sha }}.xml + flags: multisite,php + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ test-coverage-report ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.test-coverage-report.result == 'success' && 'success' || needs.test-coverage-report.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml new file mode 100644 index 0000000000000..0b49e9ab7cb83 --- /dev/null +++ b/.github/workflows/test-npm.yml @@ -0,0 +1,169 @@ +name: Test NPM + +on: + push: + branches: + - master + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + pull_request: + branches: + - master + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + paths: + # These files configure NPM. Changes could affect the outcome. + - 'package*.json' + # JavaScript files are built using NPM. + - '**.js' + # CSS and SCSS files are built using NPM. + - '**.scss' + - '**.css' + # Changes to workflow files should always verify all workflows are successful. + - '.github/workflows/**.yml' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} + +jobs: + # Verifies that installing NPM dependencies and building WordPress works as expected. + # + # Performs the following steps: + # - Checks out the repository. + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Builds WordPress to run from the `build` directory. + # - Cleans up after building WordPress to the `build` directory. + # - Ensures version-controlled files are not modified or deleted. + # - Builds WordPress to run from the `src` directory. + # - Cleans up after building WordPress to the `src` directory. + # - Ensures version-controlled files are not modified or deleted. + test-npm: + name: Test NPM on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Build WordPress + run: npm run build + + - name: Clean after building + run: npm run grunt clean + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + + - name: Build WordPress in /src + run: npm run build:dev + + - name: Clean after building in /src + run: npm run grunt clean -- --dev + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + + # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS. + # + # This is a separate job in order to that more strict conditions can be used. + # + # Performs the following steps: + # - Checks out the repository. + # - Logs debug information about the runner container. + # - Installs NodeJS 14. + # _ Installs NPM dependencies using install-changed to hash the `package.json` file. + # - Builds WordPress to run from the `build` directory. + # - Cleans up after building WordPress to the `build` directory. + # - Ensures version-controlled files are not modified or deleted. + # - Builds WordPress to run from the `src` directory. + # - Cleans up after building WordPress to the `src` directory. + # - Ensures version-controlled files are not modified or deleted. + test-npm-macos: + name: Test NPM on MacOS + runs-on: macos-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + steps: + - name: Checkout repository + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - name: Log debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Install NodeJS + uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + with: + node-version: 14 + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Build WordPress + run: npm run build + + - name: Clean after building + run: npm run grunt clean + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + + - name: Build WordPress in /src + run: npm run build:dev + + - name: Clean after building in /src + run: npm run grunt clean -- --dev + + - name: Ensure version-controlled files are not modified or deleted during building and cleaning + run: git diff --exit-code + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ test-npm, test-npm-macos ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml new file mode 100644 index 0000000000000..1d0bc59a7eaa5 --- /dev/null +++ b/.github/workflows/test-old-branches.yml @@ -0,0 +1,84 @@ +name: Test old branches + +on: + # Verify the workflow is successful when this file is updated. + push: + branches: + - master + - trunk + paths: + - '.github/workflows/test-old-branches.yml' + # Run twice a month on the 1st and 15th at 00:00 UTC. + schedule: + - cron: '0 0 1 * *' + - cron: '0 0 15 * *' + +jobs: + dispatch-workflows-for-old-branches: + name: ${{ matrix.workflow }} for ${{ matrix.branch }} + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + strategy: + fail-fast: false + matrix: + workflow: [ + 'coding-standards.yml', + 'javascript-tests.yml', + 'phpunit-tests.yml', + 'test-npm.yml' + ] + branch: [ + '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', + '4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1', '4.0', + '3.9', '3.8', '3.7' + ] + include: + # PHP Compatibility testing was introduced in 5.5. + - branch: '5.8' + workflow: 'php-compatibility.yml' + - branch: '5.7' + workflow: 'php-compatibility.yml' + - branch: '5.6' + workflow: 'php-compatibility.yml' + - branch: '5.5' + workflow: 'php-compatibility.yml' + + # End to End testing was introduced in 5.3 but later removed as there were no meaningful assertions. + # Only the officially supported major branch runs E2E tests so that more assertions can be added, and the + # workflow does not continue to run needlessly on old branches. + - branch: '5.8' + workflow: 'end-to-end-tests.yml' + exclude: + # Coding standards and JavaScript testing did not take place in 3.7. + - branch: '3.7' + workflow: 'coding-standards.yml' + - branch: '3.7' + workflow: 'javascript-tests.yml' + + # Run all branches monthly, but only the currently supported one twice per month. + steps: + - name: Dispatch workflow run + uses: actions/github-script@47f7cf65b5ced0830a325f705cad64f2f58dddf7 # v3.1.0 + if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == '5.7' }} + with: + github-token: ${{ secrets.GHA_OLD_BRANCH_DISPATCH }} + script: | + github.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: '${{ matrix.workflow }}', + ref: '${{ matrix.branch }}' + }); + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@master + needs: [ dispatch-workflows-for-old-branches ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ needs.dispatch-workflows-for-old-branches.result == 'success' && 'success' || needs.dispatch-workflows-for-old-branches.result == 'cancelled' && 'cancelled' || 'failure' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} diff --git a/.github/workflows/welcome-new-contributors.yml b/.github/workflows/welcome-new-contributors.yml new file mode 100644 index 0000000000000..f475a432a0b86 --- /dev/null +++ b/.github/workflows/welcome-new-contributors.yml @@ -0,0 +1,59 @@ +name: Welcome New Contributors + +on: + pull_request_target: + types: [ opened ] + +jobs: + # Comments on a pull request when the author is a new contributor. + post-welcome-message: + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + + steps: + - uses: bubkoo/welcome-action@8dbbac2540d155744c90e4e37da6b05ffc9c5e2c # v1.0.3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FIRST_PR_COMMENT: > + Hi @{{ author }}! šŸ‘‹ + + + Thank you for your contribution to WordPress! šŸ’– + + + It looks like this is your first pull request to `wordpress-develop`. Here are a few things to be aware of that may help you out! + + + **No one monitors this repository for new pull requests.** Pull requests **must** be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. + + + **Pull requests are never merged on GitHub.** The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. + + + More information about how GitHub pull requests can be used to contribute to WordPress can be found in [this blog post](https://make.wordpress.org/core/2020/02/21/working-on-trac-tickets-using-github-pull-requests/). + + + **Please include automated tests.** Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the [Automated Testing](https://make.wordpress.org/core/handbook/testing/automated-testing/) page in the handbook. + + + If you have not had a chance, please review the [Contribute with Code page](https://make.wordpress.org/core/handbook/contribute/) in the [WordPress Core Handbook](https://make.wordpress.org/core/handbook/). + + + The [Developer Hub](https://developer.wordpress.org/) also documents the various [coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/) that are followed: + + - [PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/) + + - [CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/) + + - [HTML Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/) + + - [JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/) + + - [Accessibility Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/) + + - [Inline Documentation Standards](https://developer.wordpress.org/coding-standards/inline-documentation-standards/) + + + Thank you, + + The WordPress Project diff --git a/.gitignore b/.gitignore index 01757f7a0b707..fbae7cad2715d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ wp-tests-config.php .htaccess # Files and folders related to build/test tools +.phpunit.result.cache /phpunit.xml /.phpcs.xml /phpcs.xml @@ -19,6 +20,7 @@ wp-tests-config.php /tests/phpunit/build /wp-cli.local.yml /jsdoc +/composer.lock /vendor /src/wp-admin/css/*.min.css /src/wp-admin/css/*-rtl.css @@ -28,7 +30,11 @@ wp-tests-config.php /src/wp-includes/css/dist /src/wp-includes/css/*.min.css /src/wp-includes/css/*-rtl.css +/src/wp-includes/blocks/**/*.css +/src/wp-includes/blocks/**/*.js +/src/wp-includes/blocks/**/*.js.map /packagehash.txt +/artifacts # Files and folders that get created in wp-content /src/wp-content/blogs.dir @@ -45,6 +51,8 @@ wp-tests-config.php !/src/wp-content/themes/twentysixteen !/src/wp-content/themes/twentyseventeen !/src/wp-content/themes/twentynineteen +!/src/wp-content/themes/twentytwenty +!/src/wp-content/themes/twentytwentyone /src/wp-content/upgrade /src/wp-content/uploads /src/wp-content/advanced-cache.php @@ -61,6 +69,11 @@ wp-tests-config.php /src/wp-content/php-error.php /src/wp-content/sunrise.php +# Files and folders relating to wp-content build tools. +/src/wp-content/themes/twentynineteen/node_modules +/src/wp-content/themes/twentytwentyone/node_modules +/src/wp-content/themes/twentytwenty/node_modules + # Operating system specific files .DS_Store @@ -77,3 +90,6 @@ wp-tests-config.php # Files for local environment config /docker-compose.override.yml + +# Visual regression test diffs +tests/visual-regression/specs/__image_snapshots__ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b6139ac55e682..0000000000000 --- a/.travis.yml +++ /dev/null @@ -1,147 +0,0 @@ -language: generic - -services: - - docker - -addons: - apt: - packages: - - docker-ce - -cache: - apt: true - directories: - - $HOME/.npm - - vendor - -env: - global: - - LOCAL_DIR: build - - COMPOSER_INSTALL: false - - NPM_INSTALL: true - - WP_INSTALL: true - - PHP_FPM_UID: "`id -u`" - - PHP_FPM_GID: "`id -g`" - - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true - -matrix: - include: - - env: WP_TRAVISCI=test:e2e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD= - name: E2E Tests - - env: WP_TRAVISCI=lint:php COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false - name: PHP Linting - - env: WP_TRAVISCI=travis:js WP_INSTALL=false - name: JS Tests - - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false - name: "PHP Compatibility Check" - - env: LOCAL_PHP=7.4-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.4" - - env: LOCAL_PHP=7.3-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.3" - - env: LOCAL_PHP=7.3-fpm LOCAL_PHP_MEMCACHED=true WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.3 with Memcached" - - env: LOCAL_PHP=7.2-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.2" - - env: LOCAL_PHP=7.1-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.1" - - env: LOCAL_PHP=7.0-fpm WP_TEST_REPORTER=true WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 7.0" - - env: LOCAL_PHP=5.6-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 5.6" - - env: LOCAL_PHP=8.0-fpm WP_TRAVISCI=test:php - name: "PHPUnit Tests: PHP 8.0" - allow_failures: - - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false - - env: LOCAL_PHP=8.0-fpm WP_TRAVISCI=test:php - fast_finish: true - -before_install: -- | - if [[ "$WP_TRAVISCI" == "test:php" ]]; then - travis_retry svn checkout -r 2170172 https://plugins.svn.wordpress.org/wordpress-importer/trunk/ tests/phpunit/data/plugins/wordpress-importer - fi -- | - sudo rm /usr/local/bin/docker-compose - curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - -before_script: -- | - if [[ "$COMPOSER_INSTALL" == "true" ]]; then - docker-compose run --rm php composer --version - docker-compose run --rm php composer install - fi -- npm --version -- node --version -- nvm install 10.13.0 -- | - if [[ "$NPM_INSTALL" == "true" ]]; then - npm ci - fi -- | - if [[ "$WP_TRAVISCI" == "test:e2e" ]] || [[ "$WP_TRAVISCI" == "test:php" ]]; then - npm run env:start - npm run build - docker-compose run --rm mysql mysql --version - docker-compose run --rm php php --version - docker-compose run --rm php php -m - docker-compose run --rm phpunit phpunit --version - fi -- | - if [[ "$LOCAL_PHP_MEMCACHED" == "true" ]]; then - cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php - # The memcached server needs to start after `npm run env:start`, which sets up the Docker network. - docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached - fi -- | - if [[ "$WP_INSTALL" == "true" ]]; then - # Run the install process after memcached has started. - npm run env:install - fi -- npm --version -- node --version -- curl --version -- git --version -- svn --version -- php --version -- php -i -- locale -a - -script: - - | - if [[ "$WP_TRAVISCI" == "test:e2e" ]]; then - npm run test:e2e - elif [[ "$WP_TRAVISCI" == "test:php" ]]; then - npm run test:php -- --verbose -c phpunit.xml.dist && - npm run test:php -- --verbose -c phpunit.xml.dist --group ajax && - npm run test:php -- --verbose -c tests/phpunit/multisite.xml && - npm run test:php -- --verbose -c tests/phpunit/multisite.xml --group ms-files && - npm run test:php -- --verbose -c phpunit.xml.dist --group external-http && - npm run test:php -- --verbose -c phpunit.xml.dist --group restapi-jsclient && - # __fakegroup__ is excluded to force PHPUnit to ignore the settings in phpunit.xml.dist. - LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__ - elif [[ "$WP_TRAVISCI" == "lint:php" ]]; then - docker-compose run --rm php composer lint:errors && - docker-compose run --rm php composer lint tests - elif [[ "$WP_TRAVISCI" == "test:compat" ]]; then - docker-compose run --rm php composer compat - else - npm run grunt $WP_TRAVISCI - fi - -after_script: -- | - if [[ "$WP_TEST_REPORTER" == "true" ]]; then - git clone https://github.com/WordPress/phpunit-test-runner.git test-runner - docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php - fi - -notifications: - slack: - rooms: - secure: PO3x/bhYXNFqAMtzDzpOAnHcg2KzG2gGbBDft1HlqN4O8hRJqrRs7hqsEe9wKZUs6qf9Jv0ZleJ5AmcSd0DbDAFsfqeWtnWpsj8NqOIWgLX0C2idvfNRzCX1mUd6E1hlAjjTGnKn4MV3m1dRurwcDqacSBVtbXKQ+yPSgM3eXYkDz8EFbTsMcda8pFskcXr98E7/YomU0QtgOcjXndxGZ53zUQ1rfaDwUJzGY3bn5nLoweVZsSIeEFSiNcip7Kt22zVlU0SAb6QlBf3F0h9IWoRD59BQ7pkl53FWzpXoHzUYOFmn0jB5y1vHMlHvTDVEmDuumpCEqnxVvLh33AwGtqYRWH36PEfTn/u1YTFr7FS7KbwrKw9Nn+jUZe3KFrVzgQNUt0El33mO0FbSoNEWJhxRarp0D1z3/HVsbon3Fwzt/3jBHGf9nI+tHH4u7KQ70+M7pzBsV7F7Lc60YnuKrcy/hkwObGB0Za9tMHPUw3c7b4ep6nSa4ts9S++IijLWDaNAq7K/j7fAfI1JrkPIw4T6PcGpNAADkmlCrvToKE4axExaJke/lkUb+3Pwdj0h7ePzPSrHT8aASlKFM1PuI1KRMn/J4wRLtGeLlfYXvVlaQYmJobJtYgoiNWJWMIybLGVBSVPohdGO3qIJbl8WNPN1cW2ZZTcEBprLe8y7MSo= - on_start: never - on_failure: always - on_success: change - on_pull_requests: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000..767471fa1769c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# Welcome to WordPress Development! + +For the in-depth documentation, please visit the [Contributor Handbook](https://make.wordpress.org/core/handbook/contribute/). + +**Core WordPress Development does not occur on GitHub; however, pull requests are accepted as long as there is a corresponding [Trac](https://core.trac.wordpress.org) ticket.** + +For WordPress Block Editor development, please see the [Gutenberg GitHub repository](https://github.com/wordpress/gutenberg/). + +## First Time? +If this is your first time contributing, you may also find reviewing these guides first to be helpful: +- FAQs for New Contributors: https://make.wordpress.org/core/handbook/tutorials/faq-for-new-contributors/ +- Contributing with Code Guide: https://make.wordpress.org/core/handbook/contribute/ +- WordPress Coding Standards: https://make.wordpress.org/core/handbook/best-practices/coding-standards/ +- Inline Documentation Standards: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/ +- Browser Support Policies: https://make.wordpress.org/core/handbook/best-practices/browser-support/ +- Proper spelling and grammar related best practices: https://make.wordpress.org/core/handbook/best-practices/spelling/ + +## Contributions using GitHub + +*If you're looking to report bugs or submit patches to the Block Editor, the [Gutenberg GitHub repository](https://github.com/wordpress/gutenberg/) is the canonical source.* + +The [WordPress.org Trac](https://core.trac.wordpress.org) is the official bug tracker for the WordPress Core. + +Patches can be submitted within Trac or via [GitHub](https://github.com/wordpress/wordpress-develop). + +Please read the [GitHub Pull Requests for Code Review](https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/) page for details on how to submit a pull request in GitHub to fix a Trac ticket. + +In particular, note that the full Trac URL of a ticket is required within the PR body and we request that you check the "Allow edits and access to secrets by maintainers" to allow Core contributors easier work with your submission. + +## Questions about Contributing? + +The [WordPress Slack instance](https://make.wordpress.org/chat/) is the real-time communication platform. You can also join the conversation via the [Make Network of blogs](https://make.wordpress.org). + +For support using WordPress, please visit the [WordPress.org Support Forums](https://wordpress.org/support/) + +Thanks for contributing to the WordPress project! We're happy you're here. diff --git a/Gruntfile.js b/Gruntfile.js index cb263c8bd8ccd..369079dc1db22 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,13 +7,15 @@ var installChanged = require( 'install-changed' ); module.exports = function(grunt) { var path = require('path'), fs = require( 'fs' ), + glob = require( 'glob' ), + assert = require( 'assert' ).strict, spawn = require( 'child_process' ).spawnSync, SOURCE_DIR = 'src/', BUILD_DIR = 'build/', WORKING_DIR = grunt.option( 'dev' ) ? SOURCE_DIR : BUILD_DIR, BANNER_TEXT = '/*! This file is auto-generated */', autoprefixer = require( 'autoprefixer' ), - nodesass = require( 'node-sass' ), + sass = require( 'sass' ), phpUnitWatchGroup = grunt.option( 'group' ), buildFiles = [ '*.php', @@ -120,7 +122,9 @@ module.exports = function(grunt) { WORKING_DIR + 'wp-includes/js/' ], 'webpack-assets': [ - WORKING_DIR + 'wp-includes/assets/' + WORKING_DIR + 'wp-includes/assets/*', + WORKING_DIR + 'wp-includes/css/dist/', + '!' + WORKING_DIR + 'wp-includes/assets/script-loader-packages.php' ], dynamic: { dot: true, @@ -131,12 +135,18 @@ module.exports = function(grunt) { qunit: ['tests/qunit/compiled.html'] }, file_append: { + // grunt-file-append supports only strings for input and output. default_options: { files: [ { append: 'jQuery.noConflict();', input: WORKING_DIR + 'wp-includes/js/jquery/jquery.js', output: WORKING_DIR + 'wp-includes/js/jquery/jquery.js' + }, + { + append: 'jQuery.noConflict();', + input: WORKING_DIR + 'wp-includes/js/jquery/jquery.min.js', + output: WORKING_DIR + 'wp-includes/js/jquery/jquery.min.js' } ] } @@ -179,18 +189,12 @@ module.exports = function(grunt) { // Renamed to avoid conflict with jQuery hoverIntent.min.js (after minifying). [ WORKING_DIR + 'wp-includes/js/hoverintent-js.min.js' ]: [ './node_modules/hoverintent/dist/hoverintent.min.js' ], [ WORKING_DIR + 'wp-includes/js/imagesloaded.min.js' ]: [ './node_modules/imagesloaded/imagesloaded.pkgd.min.js' ], - [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.js' ], - [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.min.js' ], + [ WORKING_DIR + 'wp-includes/js/jquery/jquery.js' ]: [ './node_modules/jquery/dist/jquery.js' ], + [ WORKING_DIR + 'wp-includes/js/jquery/jquery.min.js' ]: [ './node_modules/jquery/dist/jquery.min.js' ], [ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js' ]: [ './node_modules/jquery-form/src/jquery.form.js' ], [ WORKING_DIR + 'wp-includes/js/masonry.min.js' ]: [ './node_modules/masonry-layout/dist/masonry.pkgd.min.js' ], [ WORKING_DIR + 'wp-includes/js/twemoji.js' ]: [ './node_modules/twemoji/dist/twemoji.js' ], [ WORKING_DIR + 'wp-includes/js/underscore.js' ]: [ './node_modules/underscore/underscore.js' ], - }, - { - expand: true, - cwd: './node_modules/jquery-ui/ui/', - src: '*.js', - dest: SOURCE_DIR + 'wp-includes/js/jquery/ui/' } ] }, @@ -240,6 +244,8 @@ module.exports = function(grunt) { 'admin-js': { files: { [ WORKING_DIR + 'wp-admin/js/accordion.js' ]: [ './src/js/_enqueues/lib/accordion.js' ], + [ WORKING_DIR + 'wp-admin/js/application-passwords.js' ]: [ './src/js/_enqueues/admin/application-passwords.js' ], + [ WORKING_DIR + 'wp-admin/js/auth-app.js' ]: [ './src/js/_enqueues/admin/auth-app.js' ], [ WORKING_DIR + 'wp-admin/js/code-editor.js' ]: [ './src/js/_enqueues/wp/code-editor.js' ], [ WORKING_DIR + 'wp-admin/js/color-picker.js' ]: [ './src/js/_enqueues/lib/color-picker.js' ], [ WORKING_DIR + 'wp-admin/js/comment.js' ]: [ './src/js/_enqueues/admin/comment.js' ], @@ -406,14 +412,13 @@ module.exports = function(grunt) { ext: '.css', src: ['wp-admin/css/colors/*/colors.scss'], options: { - implementation: nodesass, - outputStyle: 'expanded' + implementation: sass } } }, cssmin: { options: { - compatibility: 'ie7' + compatibility: 'ie11' }, core: { expand: true, @@ -542,7 +547,7 @@ module.exports = function(grunt) { } }, jshint: { - options: grunt.file.readJSON('.jshintrc'), + options: grunt.file.readJSON( '.jshintrc' ), grunt: { src: ['Gruntfile.js'] }, @@ -552,7 +557,7 @@ module.exports = function(grunt) { '!tests/qunit/vendor/*', '!tests/qunit/editor/**' ], - options: grunt.file.readJSON('tests/qunit/.jshintrc') + options: grunt.file.readJSON( 'tests/qunit/.jshintrc' ) }, themes: { expand: true, @@ -662,27 +667,24 @@ module.exports = function(grunt) { }, phpunit: { 'default': { - cmd: 'phpunit', args: ['--verbose', '-c', 'phpunit.xml.dist'] }, ajax: { - cmd: 'phpunit', args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'ajax'] }, multisite: { - cmd: 'phpunit', args: ['--verbose', '-c', 'tests/phpunit/multisite.xml'] }, + 'ms-ajax': { + args: ['--verbose', '-c', 'tests/phpunit/multisite.xml', '--group', 'ajax'] + }, 'ms-files': { - cmd: 'phpunit', args: ['--verbose', '-c', 'tests/phpunit/multisite.xml', '--group', 'ms-files'] }, 'external-http': { - cmd: 'phpunit', args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'external-http'] }, 'restapi-jsclient': { - cmd: 'phpunit', args: ['--verbose', '-c', 'phpunit.xml.dist', '--group', 'restapi-jsclient'] } }, @@ -727,7 +729,7 @@ module.exports = function(grunt) { ext: '.min.js', src: ['wp-includes/js/wp-embed.js'] }, - jqueryui: { + 'jquery-ui': { options: { // Preserve comments that start with a bang. output: { @@ -735,7 +737,7 @@ module.exports = function(grunt) { } }, expand: true, - cwd: 'node_modules/jquery-ui/ui/', + cwd: WORKING_DIR + 'wp-includes/js/jquery/ui/', dest: WORKING_DIR + 'wp-includes/js/jquery/ui/', ext: '.min.js', src: ['*.js'] @@ -748,6 +750,10 @@ module.exports = function(grunt) { src: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js', dest: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.min.js' }, + moment: { + src: WORKING_DIR + 'wp-includes/js/dist/vendor/moment.js', + dest: WORKING_DIR + 'wp-includes/js/dist/vendor/moment.min.js' + }, dynamic: { expand: true, cwd: WORKING_DIR, @@ -794,6 +800,8 @@ module.exports = function(grunt) { options: { file_mappings: { 'src/wp-admin/js/accordion.js': 'src/js/_enqueues/lib/accordion.js', + 'src/wp-admin/js/application-passwords.js': 'src/js/_enqueues/admin/application-passwords.js', + 'src/wp-admin/js/auth-app.js': 'src/js/_enqueues/admin/auth-app.js', 'src/wp-admin/js/code-editor.js': 'src/js/_enqueues/wp/code-editor.js', 'src/wp-admin/js/color-picker.js': 'src/js/_enqueues/lib/color-picker.js', 'src/wp-admin/js/comment.js': 'src/js/_enqueues/admin/comment.js', @@ -990,7 +998,8 @@ module.exports = function(grunt) { WORKING_DIR + 'wp-{admin,includes}/**/*.js', WORKING_DIR + 'wp-content/themes/twenty*/**/*.js', '!' + WORKING_DIR + 'wp-content/themes/twenty*/node_modules/**/*.js', - '!' + WORKING_DIR + 'wp-includes/js/dist/vendor/*.js', + '!' + WORKING_DIR + 'wp-includes/blocks/**/*.js', + '!' + WORKING_DIR + 'wp-includes/js/dist/**/*.js', ] } }, @@ -1022,12 +1031,12 @@ module.exports = function(grunt) { } }, replace: { - emojiRegex: { + 'emoji-regex': { options: { patterns: [ { match: /\/\/ START: emoji arrays[\S\s]*\/\/ END: emoji arrays/g, - replacement: function () { + replacement: function() { var regex, files, partials, partialsSet, entities, emojiArray; @@ -1053,7 +1062,7 @@ module.exports = function(grunt) { entities = entities.replace( /-/g, '' ); // Sort the entities list by length, so the longest emoji will be found first. - emojiArray = entities.split( '\n' ).sort( function ( a, b ) { + emojiArray = entities.split( '\n' ).sort( function( a, b ) { return b.length - a.length; } ); @@ -1093,6 +1102,46 @@ module.exports = function(grunt) { dest: SOURCE_DIR + 'wp-includes/' } ] + }, + 'emoji-banner-text': { + options: { + patterns: [ + { + match: new RegExp( '\\s*' + BANNER_TEXT.replace( /[\/\*\!]/g, '\\$&' ) ), + replacement: '' + } + ] + }, + files: [ + { + expand: true, + flatten: true, + src: [ + BUILD_DIR + 'wp-includes/formatting.php' + ], + dest: BUILD_DIR + 'wp-includes/' + } + ] + }, + 'source-maps': { + options: { + patterns: [ + { + match: new RegExp( '//# sourceMappingURL=.*\\s*' ), + replacement: '' + } + ] + }, + files: [ + { + expand: true, + flatten: true, + src: [ + BUILD_DIR + 'wp-includes/js/underscore.js' + ], + dest: BUILD_DIR + 'wp-includes/js/' + } + ] } }, _watch: { @@ -1222,6 +1271,7 @@ module.exports = function(grunt) { 'jshint:corejs', 'uglify:imgareaselect', 'uglify:jqueryform', + 'uglify:moment', 'qunit:compiled' ] ); @@ -1234,7 +1284,7 @@ module.exports = function(grunt) { ] ); grunt.registerTask( 'precommit:emoji', [ - 'replace:emojiRegex' + 'replace:emoji-regex' ] ); grunt.registerTask( 'precommit', 'Runs test and build tasks in preparation for a commit', function() { @@ -1360,9 +1410,10 @@ module.exports = function(grunt) { grunt.registerTask( 'uglify:all', [ 'uglify:core', 'uglify:embed', - 'uglify:jqueryui', + 'uglify:jquery-ui', 'uglify:imgareaselect', - 'uglify:jqueryform' + 'uglify:jqueryform', + 'uglify:moment' ] ); grunt.registerTask( 'build:webpack', [ @@ -1400,6 +1451,132 @@ module.exports = function(grunt) { 'copy:version', ] ); + /** + * Build verification tasks. + */ + grunt.registerTask( 'verify:build', [ + 'verify:wp-embed', + 'verify:old-files', + 'verify:source-maps', + ] ); + + /** + * Build assertions for wp-embed.min.js. + * + * @ticket 34698 + */ + grunt.registerTask( 'verify:wp-embed', function() { + const file = `${ BUILD_DIR }/wp-includes/js/wp-embed.min.js`; + + assert( + fs.existsSync( file ), + 'The build/wp-includes/js/wp-embed.min.js file does not exist.' + ); + + const contents = fs.readFileSync( file, { + encoding: 'utf8', + } ); + + assert( + contents.length > 0, + 'The build/wp-includes/js/wp-embed.min.js file must not be empty.' + ); + assert( + false === contents.includes( '&' ), + 'The build/wp-includes/js/wp-embed.min.js file must not contain ampersands.' + ); + } ); + + /** + * Build assertions to ensure no project files are inside `$_old_files` in the build directory. + * + * @ticket 36083 + */ + grunt.registerTask( 'verify:old-files', function() { + const file = `${ BUILD_DIR }wp-admin/includes/update-core.php`; + + assert( + fs.existsSync( file ), + 'The build/wp-admin/includes/update-core.php file does not exist.' + ); + + const contents = fs.readFileSync( file, { + encoding: 'utf8', + } ); + + assert( + contents.length > 0, + 'The build/wp-admin/includes/update-core.php file must not be empty.' + ); + + const match = contents.match( /\$_old_files = array\(([^\)]+)\);/ ); + + assert( + match.length > 0, + 'The build/wp-admin/includes/update-core.php file does not include an `$_old_files` array.' + ); + + const files = match[1].split( '\n\t' ).filter( function( file ) { + // Filter out empty lines + if ( '' === file ) { + return false; + } + + // Filter out commented out lines + if ( 0 === file.indexOf( '/' ) ) { + return false; + } + + return true; + } ).map( function( file ) { + // Strip leading and trailing single quotes and commas + return file.replace( /^\'|\',$/g, '' ); + } ); + + files.forEach(function( file ){ + const search = `${ BUILD_DIR }${ file }`; + assert( + false === fs.existsSync( search ), + `${ search } should not be present in the $_old_files array.` + ); + }); + } ); + + /** + * Build assertions for the lack of source maps in JavaScript files. + * + * @ticket 24994 + * @ticket 46218 + */ + grunt.registerTask( 'verify:source-maps', function() { + const files = buildFiles.reduce( ( acc, path ) => { + // Skip excluded paths and any path that isn't a file. + if ( '!' === path[0] || '**' !== path.substr( -2 ) ) { + return acc; + } + acc.push( ...glob.sync( `${ BUILD_DIR }/${ path }/*.js` ) ); + return acc; + }, [] ); + + assert( + files.length > 0, + 'No JavaScript files found in the build directory.' + ); + + files.forEach( function( file ) { + const contents = fs.readFileSync( file, { + encoding: 'utf8', + } ); + // `data:` URLs are allowed: + const match = contents.match( /sourceMappingURL=((?!data:).)/ ); + + assert( + match === null, + `The ${ file } file must not contain a sourceMappingURL.` + ); + } ); + } ); + grunt.registerTask( 'build', function() { if ( grunt.option( 'dev' ) ) { grunt.task.run( [ @@ -1413,6 +1590,9 @@ module.exports = function(grunt) { 'build:css', 'includes:emoji', 'includes:embed', + 'replace:emoji-banner-text', + 'replace:source-maps', + 'verify:build' ] ); } } ); @@ -1426,24 +1606,31 @@ module.exports = function(grunt) { ] ); // Testing tasks. - grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax, external-http, and multisite tests.', function() { + grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the ajax, external-http, and multisite tests.', function() { + var args = phpUnitWatchGroup ? this.data.args.concat( [ '--group', phpUnitWatchGroup ] ) : this.data.args; + + args.unshift( 'test', '--' ); + grunt.util.spawn({ - cmd: this.data.cmd, - args: phpUnitWatchGroup ? this.data.args.concat( [ '--group', phpUnitWatchGroup ] ) : this.data.args, - opts: {stdio: 'inherit'} + cmd: 'composer', + args: args, + opts: { stdio: 'inherit' } }, this.async()); }); - grunt.registerTask('qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.', - ['build', 'copy:qunit', 'qunit']); + grunt.registerTask( 'qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.', + ['build', 'copy:qunit', 'qunit'] + ); - grunt.registerTask('test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit']); + grunt.registerTask( 'test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit'] ); grunt.registerTask( 'format:php', 'Runs the code formatter on changed files.', function() { var done = this.async(); var flags = this.flags; var args = changedFiles.php; + args.unshift( 'format' ); + grunt.util.spawn( { cmd: 'composer', args: args, @@ -1461,15 +1648,9 @@ module.exports = function(grunt) { var done = this.async(); var flags = this.flags; var args = changedFiles.php; - if ( flags.travisErrors ) { - // We can check the entire codebase for coding standards errors. - args = [ 'lint:errors' ]; - } else if ( flags.travisWarnings ) { - // We can check the tests directory for errors and warnings. - args = [ 'lint', 'tests' ]; - } else { - args.unshift( 'lint' ); - } + + args.unshift( 'lint' ); + grunt.util.spawn( { cmd: 'composer', args: args, @@ -1483,11 +1664,6 @@ module.exports = function(grunt) { } ); } ); - // Travis CI tasks. - grunt.registerTask('travis:js', 'Runs Javascript Travis CI tasks.', [ 'jshint:corejs', 'qunit:compiled' ]); - grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', [ 'build', 'phpunit' ]); - grunt.registerTask('travis:phpcs', 'Runs PHP Coding Standards Travis CI tasks.', [ 'format:php:error', 'lint:php:travisErrors:error', 'lint:php:travisWarnings:error' ]); - // Patch task. grunt.renameTask('patch_wordpress', 'patch'); diff --git a/README.md b/README.md index 4373d2dff9b97..5f6fc5951bde7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # WordPress -[![Build Status](https://img.shields.io/travis/com/WordPress/wordpress-develop/master.svg)](https://travis-ci.com/WordPress/wordpress-develop) - Welcome to the WordPress development repository! Please check out the [contributor handbook](https://make.wordpress.org/core/handbook/) for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can. * [Getting Started](#getting-started) @@ -16,7 +14,7 @@ You will need a basic understanding of how to use the command line on your compu You will need Node and npm installed on your computer. Node is a JavaScript runtime used for developer tooling, and npm is the package manager included with Node. If you have a package manager installed for your operating system, setup can be as straightforward as: * macOS: `brew install node` -* Windows: `choco install node` +* Windows: `choco install nodejs` * Ubuntu: `apt install nodejs npm` If you are not using a package manager, see the [Node.js download page](https://nodejs.org/en/download/) for installers and binaries. @@ -29,6 +27,8 @@ Ensure [Docker](https://www.docker.com/products/docker-desktop) is running befor #### To start the development environment for the first time +Clone the current repository using `git clone https://github.com/WordPress/wordpress-develop.git`. Then in your terminal move to the repository folder `cd wordpress-develop` and run the following commands: + ``` npm install npm run build:dev @@ -43,7 +43,7 @@ Your WordPress site will accessible at http://localhost:8889. You can see or cha If you're making changes to WordPress core files, you should start the file watcher in order to build or copy the files as necessary: ``` -npm run watch +npm run dev ``` To stop the watcher, press `ctrl+c`. diff --git a/SECURITY.md b/SECURITY.md index ca75122b57048..fe8b683d6a816 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,6 +9,10 @@ currently being supported with security updates. | Version | Supported | | ------- | ------------------ | +| 5.8.x | :white_check_mark: | +| 5.7.x | :white_check_mark: | +| 5.6.x | :white_check_mark: | +| 5.5.x | :white_check_mark: | | 5.4.x | :white_check_mark: | | 5.3.x | :white_check_mark: | | 5.2.x | :white_check_mark: | diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f5d7edf00a595..0000000000000 --- a/appveyor.yml +++ /dev/null @@ -1,34 +0,0 @@ -environment: - matrix: - - nodejs_version: 10.13.0 - -clone_depth: 3 - -branches: - only: - - master - -install: - - ps: Install-Product node $env:nodejs_version - - npm install npm -g - - npm install - -before_build: - - node --version - - npm --version - -build_script: - - cmd: "npm run build" - -test: off - -deploy: off - -notifications: - - provider: Slack - incoming_webhook: - secure: CmhfxrWwgtwzO/kXoZWXRUB/Jh05AQ7DvOhToqtpm6dN1wBDp9+VnNqxldpv34uPd09vuUk4Nu/NQFkIswuZA5NYfIFJIFWqwnZExQFzTBA= - on_build_success: false - on_build_failure: true - on_build_status_changed: true - template: Build <{{buildUrl}}|#{{buildNumber}}> (<{{commitUrl}}|{{commitId}}>) of {{repositoryName}}@{{branch}} by {{commitAuthor}} {{status}} in {{duration}} diff --git a/composer.json b/composer.json index 4d365a3739d0f..7910a75687ce4 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,17 @@ "php": ">=5.6" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "~0.6.0", - "wp-coding-standards/wpcs": "~2.1.0", - "phpcompatibility/phpcompatibility-wp": "^2.1.0" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "squizlabs/php_codesniffer": "3.6.0", + "wp-coding-standards/wpcs": "~2.3.0", + "phpcompatibility/phpcompatibility-wp": "~2.1.2", + "yoast/phpunit-polyfills": "^1.0.1" }, "scripts": { "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source", "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source", - "lint:errors": "@lint -n" + "lint:errors": "@lint -n", + "test": "@php ./vendor/phpunit/phpunit/phpunit" } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index c725fb4e8c303..0000000000000 --- a/composer.lock +++ /dev/null @@ -1,342 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "ca8f46e0b3cba61c076c033cc7143d3a", - "packages": [], - "packages-dev": [ - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.5.0", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "e749410375ff6fb7a040a68878c656c2e610b132" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132", - "reference": "e749410375ff6fb7a040a68878c656c2e610b132", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": "^5.3|^7", - "squizlabs/php_codesniffer": "^2|^3" - }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "time": "2018-10-26T13:21:45+00:00" - }, - { - "name": "phpcompatibility/php-compatibility", - "version": "9.3.1", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" - }, - "conflict": { - "squizlabs/php_codesniffer": "2.6.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "homepage": "https://github.com/wimg", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "homepage": "https://github.com/jrfnl", - "role": "lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" - } - ], - "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", - "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", - "keywords": [ - "compatibility", - "phpcs", - "standards" - ], - "time": "2019-09-05T18:36:49+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", - "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5", - "paragonie/random_compat": "dev-master", - "paragonie/sodium_compat": "dev-master" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "paragonie", - "phpcs", - "polyfill", - "standards" - ], - "time": "2019-08-28T15:58:19+00:00" - }, - { - "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f", - "reference": "41bef18ba688af638b7310666db28e1ea9158b2f", - "shasum": "" - }, - "require": { - "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", - "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "lead" - } - ], - "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", - "homepage": "http://phpcompatibility.com/", - "keywords": [ - "compatibility", - "phpcs", - "standards", - "wordpress" - ], - "time": "2019-08-28T14:22:28+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "379deb987e26c7cd103a7b387aea178baec96e48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", - "reference": "379deb987e26c7cd103a7b387aea178baec96e48", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2018-12-19T23:57:18+00:00" - }, - { - "name": "wp-coding-standards/wpcs", - "version": "2.1.1", - "source": { - "type": "git", - "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "bd9c33152115e6741e3510ff7189605b35167908" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908", - "reference": "bd9c33152115e6741e3510ff7189605b35167908", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Contributors", - "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", - "keywords": [ - "phpcs", - "standards", - "wordpress" - ], - "time": "2019-05-21T02:50:00+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.6" - }, - "platform-dev": [] -} diff --git a/docker-compose.yml b/docker-compose.yml index e877798455c62..7fe9b524c7aab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template - ./:/var/www - # Load our config file, substituning environment variables into the config. + # Load our config file, substituting environment variables into the config. command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" depends_on: @@ -37,10 +37,10 @@ services: - wpdevnet environment: - LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false} - LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false} - PHP_FPM_UID: ${PHP_FPM_UID-1000} - PHP_FPM_GID: ${PHP_FPM_GID-1000} + - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} + - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} + - PHP_FPM_UID=${PHP_FPM_UID-1000} + - PHP_FPM_GID=${PHP_FPM_GID-1000} volumes: - ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini @@ -53,7 +53,7 @@ services: # The MySQL container. ## mysql: - image: mysql:${LOCAL_MYSQL-latest} + image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest} networks: - wpdevnet @@ -81,10 +81,10 @@ services: - wpdevnet environment: - LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false} - LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false} - PHP_FPM_UID: ${PHP_FPM_UID-1000} - PHP_FPM_GID: ${PHP_FPM_GID-1000} + - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} + - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} + - PHP_FPM_UID=${PHP_FPM_UID-1000} + - PHP_FPM_GID=${PHP_FPM_GID-1000} volumes: - ./:/var/www @@ -92,41 +92,9 @@ services: # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. init: true - ## - # The PHPUnit container. - ## - phpunit: - image: wordpressdevelop/phpunit:${LOCAL_PHP-latest} - - networks: - - wpdevnet - - environment: - LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false} - LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false} - LOCAL_DIR: ${LOCAL_DIR-src} - WP_MULTISITE: ${WP_MULTISITE-false} - PHP_FPM_UID: ${PHP_FPM_UID-1000} - PHP_FPM_GID: ${PHP_FPM_GID-1000} - TRAVIS_BRANCH: ${TRAVIS_BRANCH-false} - TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false} - - volumes: - - ./tools/local-env/phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini - - ./:/var/www - - phpunit-uploads:/var/www/${LOCAL_DIR-src}/wp-content/uploads - - # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly. - init: true - - depends_on: - - mysql - volumes: # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume. mysql: {} - # Using a volume for the uploads directory improves PHPUnit performance. - phpunit-uploads: {} networks: # Creating our own network allows us to connect between containers using their service name. diff --git a/package-lock.json b/package-lock.json index f9d407a75c9b8..68a5b5998827c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,433 +1,347 @@ { "name": "WordPress", - "version": "5.5.0", + "version": "5.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.14.5" } }, "@babel/compat-data": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", - "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", - "dev": true, - "requires": { - "browserslist": "^4.9.1", - "invariant": "^2.2.4", - "semver": "^5.5.0" - }, - "dependencies": { - "browserslist": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.11.0.tgz", - "integrity": "sha512-WqEC7Yr5wUH5sg6ruR++v2SGOQYpyUdYYd4tZoAq1F7y+QXoLoYGXVbxhtaIqWmAJjtNTRjVD3HuJc1OXTel2A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001035", - "electron-to-chromium": "^1.3.380", - "node-releases": "^1.1.52", - "pkg-up": "^3.1.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001038", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz", - "integrity": "sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.388", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.388.tgz", - "integrity": "sha512-/FNHDmNmI4IR/qY+uuAVq8OET5S9J7d5QfQUnAz0edkhl02BjtOflF2H0RXKapVtJfMgaFthKBzeYJAzOaW8PA==", - "dev": true - }, - "node-releases": { - "version": "1.1.52", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", - "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - } - } + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true }, "@babel/core": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", - "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.0", - "@babel/parser": "^7.9.0", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", + "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helpers": "^7.14.8", + "@babel/parser": "^7.15.0", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", + "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", + "semver": "^6.3.0", "source-map": "^0.5.0" }, "dependencies": { "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", "dev": true }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, "requires": { - "ms": "^2.1.1" + "minimist": "^1.2.5" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "@babel/generator": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", - "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", + "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", "dev": true, "requires": { - "@babel/types": "^7.9.0", + "@babel/types": "^7.15.0", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", + "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", - "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.8.3", - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-builder-react-jsx": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz", - "integrity": "sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", + "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/types": "^7.9.0" - } - }, - "@babel/helper-builder-react-jsx-experimental": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.0.tgz", - "integrity": "sha512-3xJEiyuYU4Q/Ar9BsHisgdxZsRlsShMe90URZ0e6przL26CCs8NJbDoxH94kKT17PcxlMhsCAwZd90evCo26VQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-module-imports": "^7.8.3", - "@babel/types": "^7.9.0" + "@babel/helper-explode-assignable-expression": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helper-compilation-targets": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", - "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", + "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.6", - "browserslist": "^4.9.1", - "invariant": "^2.2.4", - "levenary": "^1.1.1", - "semver": "^5.5.0" + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" }, "dependencies": { - "browserslist": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.11.0.tgz", - "integrity": "sha512-WqEC7Yr5wUH5sg6ruR++v2SGOQYpyUdYYd4tZoAq1F7y+QXoLoYGXVbxhtaIqWmAJjtNTRjVD3HuJc1OXTel2A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001035", - "electron-to-chromium": "^1.3.380", - "node-releases": "^1.1.52", - "pkg-up": "^3.1.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001038", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz", - "integrity": "sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.388", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.388.tgz", - "integrity": "sha512-/FNHDmNmI4IR/qY+uuAVq8OET5S9J7d5QfQUnAz0edkhl02BjtOflF2H0RXKapVtJfMgaFthKBzeYJAzOaW8PA==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true - }, - "node-releases": { - "version": "1.1.52", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", - "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } } } }, + "@babel/helper-create-class-features-plugin": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", + "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-split-export-declaration": "^7.14.5" + } + }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", - "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.7.0" + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" } }, - "@babel/helper-define-map": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", - "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", + "@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/types": "^7.8.3", - "lodash": "^4.17.13" + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@babel/helper-explode-assignable-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", - "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", + "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", "dev": true, "requires": { - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", + "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-get-function-arity": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", + "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-hoist-variables": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", - "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", + "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", + "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.15.0" } }, "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", + "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-module-transforms": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", - "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", + "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-simple-access": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.6", - "@babel/types": "^7.9.0", - "lodash": "^4.17.13" + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", + "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-plugin-utils": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", - "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", "dev": true }, - "@babel/helper-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", - "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "@babel/helper-remap-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", + "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", "dev": true, "requires": { - "lodash": "^4.17.13" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-wrap-function": "^7.14.5", + "@babel/types": "^7.14.5" } }, - "@babel/helper-remap-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", - "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", + "@babel/helper-replace-supers": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", + "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-wrap-function": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, - "@babel/helper-replace-supers": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", - "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", + "@babel/helper-simple-access": { + "version": "7.14.8", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", + "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.6", - "@babel/types": "^7.8.6" + "@babel/types": "^7.14.8" } }, - "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", + "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", + "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.14.5" } }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==" + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true }, "@babel/helper-wrap-function": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", - "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", + "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-function-name": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helpers": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", - "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", + "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0" + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", - "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "requires": { - "@babel/helper-validator-identifier": "^7.9.0", + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -437,112 +351,182 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } } } }, "@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz", + "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==", "dev": true }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + } + }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", - "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", + "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", + "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0" + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", - "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", - "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", - "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz", - "integrity": "sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==", + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", + "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + "@babel/compat-data": "^7.14.7", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.14.5" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", - "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", - "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.8", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-syntax-async-generators": { @@ -554,6 +538,33 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -563,6 +574,24 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -573,12 +602,21 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz", - "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", + "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-nullish-coalescing-operator": { @@ -591,12 +629,12 @@ } }, "@babel/plugin-syntax-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", - "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-object-rest-spread": { @@ -626,476 +664,521 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-top-level-await": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", - "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", + "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", - "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", - "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3" + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", - "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", - "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "lodash": "^4.17.13" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-classes": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz", - "integrity": "sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-split-export-declaration": "^7.8.3", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", + "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", - "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", - "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==", + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", - "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", - "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", - "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-for-of": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", - "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", + "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", - "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", - "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", - "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", - "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", - "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", + "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-simple-access": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.14.8", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", - "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", + "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", - "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", - "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.14.5" } }, "@babel/plugin-transform-new-target": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", - "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-object-super": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", - "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" } }, "@babel/plugin-transform-parameters": { - "version": "7.9.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz", - "integrity": "sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", + "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", - "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-react-jsx": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz", - "integrity": "sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw==", + "@babel/plugin-transform-react-constant-elements": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.14.5.tgz", + "integrity": "sha512-NBqLEx1GxllIOXJInJAQbrnwwYJsV3WaMHIcOwD8rhYS0AabTWn7kHdHgPgu5RmHLU0q4DMxhAMu8ue/KampgQ==", "dev": true, "requires": { - "@babel/helper-builder-react-jsx": "^7.9.0", - "@babel/helper-builder-react-jsx-experimental": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-regenerator": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", - "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", + "@babel/plugin-transform-react-display-name": { + "version": "7.15.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", + "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", "dev": true, "requires": { - "regenerator-transform": "^0.14.2" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", - "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", + "@babel/plugin-transform-react-jsx": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", + "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-jsx": "^7.14.5", + "@babel/types": "^7.14.9" } }, - "@babel/plugin-transform-runtime": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz", - "integrity": "sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw==", + "@babel/plugin-transform-react-jsx-development": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", + "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "resolve": "^1.8.1", - "semver": "^5.5.1" + "@babel/plugin-transform-react-jsx": "^7.14.5" } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", - "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", + "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", - "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", + "@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "regenerator-transform": "^0.14.2" } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", - "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", + "@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-regex": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-template-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", - "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", + "@babel/plugin-transform-runtime": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.15.0.tgz", + "integrity": "sha512-sfHYkLGjhzWTq6xsuQ01oEsUYjkHRux9fW1iUA68dC7Qd8BS1Unq4aZ8itmQp95zUzIcyR2EbNMTzAicFj+guw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", - "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.2", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", - "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", + "@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" } }, - "@babel/polyfill": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz", - "integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==", + "@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "core-js": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", - "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" - } + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz", + "integrity": "sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-typescript": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/preset-env": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz", - "integrity": "sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.9.0", - "@babel/helper-compilation-targets": "^7.8.7", - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-proposal-async-generator-functions": "^7.8.3", - "@babel/plugin-proposal-dynamic-import": "^7.8.3", - "@babel/plugin-proposal-json-strings": "^7.8.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-numeric-separator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.9.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.8.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.8.3", - "@babel/plugin-transform-arrow-functions": "^7.8.3", - "@babel/plugin-transform-async-to-generator": "^7.8.3", - "@babel/plugin-transform-block-scoped-functions": "^7.8.3", - "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.9.0", - "@babel/plugin-transform-computed-properties": "^7.8.3", - "@babel/plugin-transform-destructuring": "^7.8.3", - "@babel/plugin-transform-dotall-regex": "^7.8.3", - "@babel/plugin-transform-duplicate-keys": "^7.8.3", - "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.9.0", - "@babel/plugin-transform-function-name": "^7.8.3", - "@babel/plugin-transform-literals": "^7.8.3", - "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.9.0", - "@babel/plugin-transform-modules-commonjs": "^7.9.0", - "@babel/plugin-transform-modules-systemjs": "^7.9.0", - "@babel/plugin-transform-modules-umd": "^7.9.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", - "@babel/plugin-transform-new-target": "^7.8.3", - "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.8.7", - "@babel/plugin-transform-property-literals": "^7.8.3", - "@babel/plugin-transform-regenerator": "^7.8.7", - "@babel/plugin-transform-reserved-words": "^7.8.3", - "@babel/plugin-transform-shorthand-properties": "^7.8.3", - "@babel/plugin-transform-spread": "^7.8.3", - "@babel/plugin-transform-sticky-regex": "^7.8.3", - "@babel/plugin-transform-template-literals": "^7.8.3", - "@babel/plugin-transform-typeof-symbol": "^7.8.4", - "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.9.0", - "browserslist": "^4.9.1", - "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", - "semver": "^5.5.0" + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", + "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-async-generator-functions": "^7.14.9", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.14.5", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.14.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.14.5", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.14.5", + "@babel/plugin-transform-classes": "^7.14.9", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.14.5", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.0", + "@babel/plugin-transform-modules-systemjs": "^7.14.5", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.14.5", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.14.6", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.0", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.2", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" }, "dependencies": { - "browserslist": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.11.0.tgz", - "integrity": "sha512-WqEC7Yr5wUH5sg6ruR++v2SGOQYpyUdYYd4tZoAq1F7y+QXoLoYGXVbxhtaIqWmAJjtNTRjVD3HuJc1OXTel2A==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001035", - "electron-to-chromium": "^1.3.380", - "node-releases": "^1.1.52", - "pkg-up": "^3.1.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001038", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz", - "integrity": "sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.388", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.388.tgz", - "integrity": "sha512-/FNHDmNmI4IR/qY+uuAVq8OET5S9J7d5QfQUnAz0edkhl02BjtOflF2H0RXKapVtJfMgaFthKBzeYJAzOaW8PA==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true - }, - "node-releases": { - "version": "1.1.52", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", - "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } } } }, "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1105,108 +1188,117 @@ "esutils": "^2.0.2" } }, + "@babel/preset-react": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz", + "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-react-display-name": "^7.14.5", + "@babel/plugin-transform-react-jsx": "^7.14.5", + "@babel/plugin-transform-react-jsx-development": "^7.14.5", + "@babel/plugin-transform-react-pure-annotations": "^7.14.5" + } + }, + "@babel/preset-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.15.0.tgz", + "integrity": "sha512-lt0Y/8V3y06Wq/8H/u0WakrqciZ7Fz7mwPDHWUJAXlABL5hiUG42BNlRXiELNjeWjO5rWmnNKlx+yzJvxezHow==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-typescript": "^7.15.0" + } + }, "@babel/runtime": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz", + "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==", "requires": { "regenerator-runtime": "^0.13.4" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" - } } }, "@babel/runtime-corejs3": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz", - "integrity": "sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.15.3.tgz", + "integrity": "sha512-30A3lP+sRL6ml8uhoJSs+8jwpKzbw8CqBvDc1laeptxPm5FahumJxirigcbD2qTs71Sonvj1cyZB0OKGAmxQ+A==", "dev": true, "requires": { - "core-js-pure": "^3.0.0", + "core-js-pure": "^3.16.0", "regenerator-runtime": "^0.13.4" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - } } }, "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", + "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.14.5", + "@babel/types": "^7.14.5" }, "dependencies": { "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", "dev": true } } }, "@babel/traverse": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", - "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.0", - "@babel/types": "^7.9.0", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", + "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/parser": "^7.15.0", + "@babel/types": "^7.15.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "globals": "^11.1.0" }, "dependencies": { "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", "dev": true } } }, "@babel/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", - "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" } }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@choojs/findup": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@choojs/findup/-/findup-0.2.1.tgz", + "integrity": "sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw==", + "dev": true, + "requires": { + "commander": "^2.15.1" + } + }, "@cnakazawa/watch": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", @@ -1215,14 +1307,6 @@ "requires": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } } }, "@emotion/cache": { @@ -1237,9 +1321,9 @@ } }, "@emotion/core": { - "version": "10.0.28", - "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.28.tgz", - "integrity": "sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.1.1.tgz", + "integrity": "sha512-ZMLG6qpXR8x031NXD8HJqugy/AZSkAuMxxqB46pmAR7ze47MhNJ56cdoX243QPZdGctrdfo+s08yZTiwaUcRKA==", "requires": { "@babel/runtime": "^7.5.5", "@emotion/cache": "^10.0.27", @@ -1277,22 +1361,6 @@ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" }, - "@emotion/native": { - "version": "10.0.27", - "resolved": "https://registry.npmjs.org/@emotion/native/-/native-10.0.27.tgz", - "integrity": "sha512-3qxR2XFizGfABKKbX9kAYc0PHhKuCEuyxshoq3TaMEbi9asWHdQVChg32ULpblm4XAf9oxaitAU7J9SfdwFxtw==", - "requires": { - "@emotion/primitives-core": "10.0.27" - } - }, - "@emotion/primitives-core": { - "version": "10.0.27", - "resolved": "https://registry.npmjs.org/@emotion/primitives-core/-/primitives-core-10.0.27.tgz", - "integrity": "sha512-fRBEDNPSFFOrBJ0OcheuElayrNTNdLF9DzMxtL0sFgsCFvvadlzwJHhJMSwEJuxwARm9GhVLr1p8G8JGkK98lQ==", - "requires": { - "css-to-react-native": "^2.2.1" - } - }, "@emotion/serialize": { "version": "0.11.16", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-0.11.16.tgz", @@ -1303,6 +1371,13 @@ "@emotion/unitless": "0.7.5", "@emotion/utils": "0.11.3", "csstype": "^2.5.7" + }, + "dependencies": { + "csstype": { + "version": "2.6.17", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz", + "integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==" + } } }, "@emotion/sheet": { @@ -1350,318 +1425,582 @@ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" }, - "@financial-times/polyfill-useragent-normaliser": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@financial-times/polyfill-useragent-normaliser/-/polyfill-useragent-normaliser-1.6.3.tgz", - "integrity": "sha512-QNjxxVkZoQhjoGbMxpZffIiYIwUlT2/P4qgyEdF0CgflKg5xL0PE5YBlPozOj1Qozcfe6TJv5Pr9dliIdrcFEw==", + "@es-joy/jsdoccomment": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.6.0.tgz", + "integrity": "sha512-zT1EtysKMITJ7vE4RvOJqitxk/Str6It8hq+fykxkwLuTyzgak+TnVuVSIyovT/qrEz3i46ypCSXgNtIDYwNOg==", + "dev": true, "requires": { - "@financial-times/useragent_parser": "^1.2.1", - "semver": "^7.1.1" + "comment-parser": "^1.1.5", + "esquery": "^1.4.0", + "jsdoctypeparser": "^9.0.0" + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" }, "dependencies": { - "semver": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.2.tgz", - "integrity": "sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ==" + "globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true } } }, - "@financial-times/useragent_parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@financial-times/useragent_parser/-/useragent_parser-1.4.1.tgz", - "integrity": "sha512-f8C7QnUZSSpVzv98HB12TbQQY5oteKUOywmrVBHpJXZotdYg5cZ2nAfNISH4phPzVEsgqQRJWBdVknJNYYEC9w==" - }, - "@hapi/address": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.0.0.tgz", - "integrity": "sha512-mV6T0IYqb0xL1UALPFplXYQmR0twnXG0M6jUswpquqT2sD12BOiCiLy3EvMp/Fy7s3DZElC4/aPjEjo2jeZpvw==", - "dev": true + "@financial-times/polyfill-useragent-normaliser": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@financial-times/polyfill-useragent-normaliser/-/polyfill-useragent-normaliser-1.8.1.tgz", + "integrity": "sha512-VJFUMJyr1DZ++wiVFgk0GThJG8LUR94p/a73lc4d0a2YL6sfWSQAMF+1qg9gtCOzZWc+nx62E5IJExrUCetjEw==", + "requires": { + "@financial-times/useragent_parser": "^1.5.1", + "semver": "^7.1.1" + } }, - "@hapi/hoek": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-6.2.4.tgz", - "integrity": "sha512-HOJ20Kc93DkDVvjwHyHawPwPkX44sIrbXazAUDiUXaY2R9JwQGo2PhFfnQtdrsIe4igjG2fPgMra7NYw7qhy0A==", - "dev": true + "@financial-times/useragent_parser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@financial-times/useragent_parser/-/useragent_parser-1.6.0.tgz", + "integrity": "sha512-v6Ucl//xSVhpyTtHMVCA9uv9W7CVwj8vBAQFKFDkfGC1DquBobOMhnzH9Odc+Tunf+i4WRnNgt90fQ7CSAbU3g==" }, - "@hapi/joi": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.0.tgz", - "integrity": "sha512-n6kaRQO8S+kepUTbXL9O/UOL788Odqs38/VOfoCrATDtTvyfiO3fgjlSRaNkHabpTLgM7qru9ifqXlXbXk8SeQ==", - "dev": true, + "@formatjs/ecma402-abstract": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.4.tgz", + "integrity": "sha512-PyzVaiXHCp1WtXnR30P06BYqWHHY5YIkbwxfB2WE1yNa7XXvozmh6mSc099HgSoTY5ZmOAqwh78G2qOg0j5aPw==", "requires": { - "@hapi/address": "2.x.x", - "@hapi/hoek": "6.x.x", - "@hapi/marker": "1.x.x", - "@hapi/topo": "3.x.x" + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } } }, - "@hapi/marker": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@hapi/marker/-/marker-1.0.0.tgz", - "integrity": "sha512-JOfdekTXnJexfE8PyhZFyHvHjt81rBFSAbTIRAhF2vv/2Y1JzoKsGqxH/GpZJoF7aEfYok8JVcAHmSz1gkBieA==", - "dev": true + "@formatjs/intl-datetimeformat": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/@formatjs/intl-datetimeformat/-/intl-datetimeformat-3.2.9.tgz", + "integrity": "sha512-pwmnHHJNu96XmG9Zj1bhg6f/zYW8oJxOgKwtaTl9znl+RAH5Ud6Y9IuxPbNwDBQEfcs4+X7fopbF+if0bAOc7w==", + "requires": { + "@formatjs/ecma402-abstract": "1.5.4", + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } }, - "@hapi/topo": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.2.tgz", - "integrity": "sha512-r+aumOqJ5QbD6aLPJWqVjMAPsx5pZKz+F5yPqXZ/WWG9JTtHbQqlzrJoknJ0iJxLj9vlXtmpSdjlkszseeG8OA==", - "dev": true, + "@formatjs/intl-displaynames": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-4.0.7.tgz", + "integrity": "sha512-auQ8/akjhzeLPk4riG7JHulGXSoVNA5xk0IU+BzEymzFCBJyWvNoroIDCxX6RgRPumMmmIEgcc3w7BmKBo2Obw==", "requires": { - "@hapi/hoek": "8.x.x" + "@formatjs/ecma402-abstract": "1.5.4", + "tslib": "^2.0.1" }, "dependencies": { - "@hapi/hoek": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.0.2.tgz", - "integrity": "sha512-O6o6mrV4P65vVccxymuruucb+GhP2zl9NLCG8OdoFRS8BEGw3vwpPp20wpAtpbQQxz1CEUtmxJGgWhjq1XA3qw==", - "dev": true + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" } } }, - "@iarna/toml": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.3.tgz", - "integrity": "sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==" + "@formatjs/intl-getcanonicallocales": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@formatjs/intl-getcanonicallocales/-/intl-getcanonicallocales-1.5.3.tgz", + "integrity": "sha512-QVBnSPZ32Y80wkXbf36hP9VbyklbOb8edppxFcgO9Lbd47zagllw65Y81QOHEn/j11JcTn2OhW0vea95LHvQmA==", + "requires": { + "cldr-core": "38", + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } }, - "@jest/console": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", - "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", - "dev": true, + "@formatjs/intl-listformat": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-5.0.6.tgz", + "integrity": "sha512-9QM4elGPrSSMOsf4bKaDUYpFTgXtxNeTdtaxc4QBTreD68X3YMH7N/tve1MxxhbTMB2qsK08mYtSHp5r+y4pTw==", "requires": { - "@jest/source-map": "^24.9.0", - "chalk": "^2.0.1", - "slash": "^2.0.0" + "@formatjs/ecma402-abstract": "1.5.3", + "tslib": "^2.0.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, + "@formatjs/ecma402-abstract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.3.tgz", + "integrity": "sha512-PI+C4JhJV1WFINrTbX0jHlWPOQOAsg4jmGWp23cbIb+q7+nALBlpElcik4XhsIjbJstmUGR8r83j8vvgNjO90g==", "requires": { - "color-convert": "^1.9.0" + "tslib": "^2.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } + }, + "@formatjs/intl-locale": { + "version": "2.4.16", + "resolved": "https://registry.npmjs.org/@formatjs/intl-locale/-/intl-locale-2.4.16.tgz", + "integrity": "sha512-alOsuHSEritrWYnnA8ihiUZwNqLfCuFgDmDzJbVUOrcCKlUwrLj4uQMAN0RbIsfI5XiVZEqNshdj2sQNNtNL0A==", + "requires": { + "@formatjs/ecma402-abstract": "1.5.4", + "@formatjs/intl-getcanonicallocales": "1.5.3", + "cldr-core": "38", + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } + }, + "@formatjs/intl-numberformat": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/@formatjs/intl-numberformat/-/intl-numberformat-6.1.5.tgz", + "integrity": "sha512-T7qjALvZZDzTdszlFhsC9DyivUxA8yEOiwtsF8Q8/GWoYg+pEnLxSxyPd7x3EZG1eiStSkndqisEFdwBmIhblw==", + "requires": { + "@formatjs/ecma402-abstract": "1.5.3", + "tslib": "^2.0.1" + }, + "dependencies": { + "@formatjs/ecma402-abstract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.3.tgz", + "integrity": "sha512-PI+C4JhJV1WFINrTbX0jHlWPOQOAsg4jmGWp23cbIb+q7+nALBlpElcik4XhsIjbJstmUGR8r83j8vvgNjO90g==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "tslib": "^2.0.1" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } + }, + "@formatjs/intl-pluralrules": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@formatjs/intl-pluralrules/-/intl-pluralrules-4.0.7.tgz", + "integrity": "sha512-g/BSzr8bgMv3UywE2in3zcSeAzR2aSvHhNCfFYfTqi/6q91q0LSgRFnykY26Dzs2Ag2jFp27AvOSHyoZ7DQMRw==", + "requires": { + "@formatjs/ecma402-abstract": "1.5.3", + "tslib": "^2.0.1" + }, + "dependencies": { + "@formatjs/ecma402-abstract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.3.tgz", + "integrity": "sha512-PI+C4JhJV1WFINrTbX0jHlWPOQOAsg4jmGWp23cbIb+q7+nALBlpElcik4XhsIjbJstmUGR8r83j8vvgNjO90g==", "requires": { - "has-flag": "^3.0.0" + "tslib": "^2.0.1" } + }, + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" } } }, - "@jest/core": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", - "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", - "dev": true, + "@formatjs/intl-relativetimeformat": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-8.0.5.tgz", + "integrity": "sha512-061+cSR0/utsAf3fdcr787ck7KAgrtbeq06ENdR4A7x6aYq1CqchoJ8e7WOtqz0oSrj6Zmoaca1b/pDr+hM8/w==", "requires": { - "@jest/console": "^24.7.1", - "@jest/reporters": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.9.0", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-resolve-dependencies": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "jest-watcher": "^24.9.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", - "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "slash": "^2.0.0", - "strip-ansi": "^5.0.0" + "@formatjs/ecma402-abstract": "1.5.3", + "tslib": "^2.0.1" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, + "@formatjs/ecma402-abstract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.3.tgz", + "integrity": "sha512-PI+C4JhJV1WFINrTbX0jHlWPOQOAsg4jmGWp23cbIb+q7+nALBlpElcik4XhsIjbJstmUGR8r83j8vvgNjO90g==", "requires": { - "color-convert": "^1.9.0" + "tslib": "^2.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + } + } + }, + "@gar/promisify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", + "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==", + "dev": true + }, + "@hapi/address": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", + "dev": true + }, + "@hapi/bourne": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", + "dev": true + }, + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + }, + "@hapi/joi": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", + "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", + "dev": true, + "requires": { + "@hapi/address": "2.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/topo": "3.x.x" + } + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "p-locate": "^4.1.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "p-limit": "^2.2.0" } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true } } }, - "@jest/environment": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", - "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", - "dev": true, - "requires": { - "@jest/fake-timers": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0" - } + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true }, - "@jest/fake-timers": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", - "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", + "@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0" + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" } }, - "@jest/reporters": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", - "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", "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.2.6", - "jest-haste-map": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", - "node-notifier": "^5.4.2", - "slash": "^2.0.0", - "source-map": "^0.6.0", - "string-length": "^2.0.0" + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "to-regex-range": "^5.0.1" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "glob": "^7.1.3" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" } } } }, + "@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" + } + }, + "@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + } + }, + "@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "node-notifier": "^8.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "@jest/source-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", - "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", "dev": true, "requires": { "callsites": "^3.0.0", - "graceful-fs": "^4.1.15", + "graceful-fs": "^4.2.4", "source-map": "^0.6.0" }, "dependencies": { @@ -1674,76 +2013,91 @@ } }, "@jest/test-result": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", - "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", "dev": true, "requires": { - "@jest/console": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/istanbul-lib-coverage": "^2.0.0" + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", - "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0" + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" } }, "@jest/transform": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", - "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", - "micromatch": "^3.1.10", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", + "slash": "^3.0.0", "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" + "write-file-atomic": "^3.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "to-regex-range": "^5.0.1" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "source-map": { @@ -1752,28 +2106,35 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" } } } }, "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" } }, + "@juggle/resize-observer": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.3.1.tgz", + "integrity": "sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==" + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -1785,43 +2146,118 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" - }, - "dependencies": { - "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", - "dev": true - } } }, "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, + "@npmcli/fs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", + "integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "@polka/url": { + "version": "1.0.0-next.20", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.20.tgz", + "integrity": "sha512-88p7+M0QGxKpmnkfXjS4V26AnoC/eiqZutE8GLdaI5X12NY75bXSdTY9NkmYb2Xyk1O+MmkuO6Frmsj84V6I8Q==", + "dev": true + }, "@popperjs/core": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.1.1.tgz", - "integrity": "sha512-sLqWxCzC5/QHLhziXSCAksBxHfOnQlhPRVgPK0egEw+ktWvG75T2k+aYWVjVh9+WKeT3tlG3ZNbZQvZLmfuOIw==" + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz", + "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==" + }, + "@sideway/address": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.1.tgz", + "integrity": "sha512-+I5aaQr3m0OAmMr7RQ3fR9zx55sejEYR2BFJaxL+zT3VM2611X0SHvPWIbAUBZVTn/YzYKbV8gJ2oT/QELknfQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + }, + "dependencies": { + "@hapi/hoek": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz", + "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==", + "dev": true + } + } + }, + "@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true }, "@sindresorhus/is": { "version": "0.7.0", @@ -1831,37 +2267,27 @@ "optional": true }, "@sinonjs/commons": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", - "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", + "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.0.tgz", - "integrity": "sha512-atR1J/jRXvQAb47gfzSK8zavXy7BcpnYq21ALon0U99etu99vsir0trzIO3wpeLtW+LLVY6X7EkfVTbjGSH8Ww==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" } }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -1875,6 +2301,212 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@stylelint/postcss-css-in-js": { + "version": "0.37.2", + "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz", + "integrity": "sha512-nEhsFoJurt8oUmieT8qy4nk81WRHmJynmVwn/Vts08PL9fhgIsMhk1GId5yAN643OzqEEb5S/6At2TZW7pqPDA==", + "dev": true, + "requires": { + "@babel/core": ">=7.9.0" + } + }, + "@stylelint/postcss-markdown": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.2.tgz", + "integrity": "sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==", + "dev": true, + "requires": { + "remark": "^13.0.0", + "unist-util-find-all-after": "^3.0.2" + } + }, + "@svgr/babel-plugin-add-jsx-attribute": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz", + "integrity": "sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg==", + "dev": true + }, + "@svgr/babel-plugin-remove-jsx-attribute": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz", + "integrity": "sha512-yaS4o2PgUtwLFGTKbsiAy6D0o3ugcUhWK0Z45umJ66EPWunAz9fuFw2gJuje6wqQvQWOTJvIahUwndOXb7QCPg==", + "dev": true + }, + "@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz", + "integrity": "sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA==", + "dev": true + }, + "@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz", + "integrity": "sha512-PoiE6ZD2Eiy5mK+fjHqwGOS+IXX0wq/YDtNyIgOrc6ejFnxN4b13pRpiIPbtPwHEc+NT2KCjteAcq33/F1Y9KQ==", + "dev": true + }, + "@svgr/babel-plugin-svg-dynamic-title": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz", + "integrity": "sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg==", + "dev": true + }, + "@svgr/babel-plugin-svg-em-dimensions": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz", + "integrity": "sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw==", + "dev": true + }, + "@svgr/babel-plugin-transform-react-native-svg": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz", + "integrity": "sha512-3eYP/SaopZ41GHwXma7Rmxcv9uRslRDTY1estspeB1w1ueZWd/tPlMfEOoccYpEMZU3jD4OU7YitnXcF5hLW2Q==", + "dev": true + }, + "@svgr/babel-plugin-transform-svg-component": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz", + "integrity": "sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ==", + "dev": true + }, + "@svgr/babel-preset": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-5.5.0.tgz", + "integrity": "sha512-4FiXBjvQ+z2j7yASeGPEi8VD/5rrGQk4Xrq3EdJmoZgz/tpqChpo5hgXDvmEauwtvOc52q8ghhZK4Oy7qph4ig==", + "dev": true, + "requires": { + "@svgr/babel-plugin-add-jsx-attribute": "^5.4.0", + "@svgr/babel-plugin-remove-jsx-attribute": "^5.4.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "^5.0.1", + "@svgr/babel-plugin-replace-jsx-attribute-value": "^5.0.1", + "@svgr/babel-plugin-svg-dynamic-title": "^5.4.0", + "@svgr/babel-plugin-svg-em-dimensions": "^5.4.0", + "@svgr/babel-plugin-transform-react-native-svg": "^5.4.0", + "@svgr/babel-plugin-transform-svg-component": "^5.5.0" + } + }, + "@svgr/core": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-5.5.0.tgz", + "integrity": "sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ==", + "dev": true, + "requires": { + "@svgr/plugin-jsx": "^5.5.0", + "camelcase": "^6.2.0", + "cosmiconfig": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + } + } + }, + "@svgr/hast-util-to-babel-ast": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz", + "integrity": "sha512-cAaR/CAiZRB8GP32N+1jocovUtvlj0+e65TB50/6Lcime+EA49m/8l+P2ko+XPJ4dw3xaPS3jOL4F2X4KWxoeQ==", + "dev": true, + "requires": { + "@babel/types": "^7.12.6" + } + }, + "@svgr/plugin-jsx": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-5.5.0.tgz", + "integrity": "sha512-V/wVh33j12hGh05IDg8GpIUXbjAPnTdPTKuP4VNLggnwaHMPNQNae2pRnyTAILWCQdz5GyMqtO488g7CKM8CBA==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@svgr/babel-preset": "^5.5.0", + "@svgr/hast-util-to-babel-ast": "^5.5.0", + "svg-parser": "^2.0.2" + } + }, + "@svgr/plugin-svgo": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-5.5.0.tgz", + "integrity": "sha512-r5swKk46GuQl4RrVejVwpeeJaydoxkdwkM1mBKOgJLBUJPGaLci6ylg/IjhrRsREKDkr4kbMWdgOtbXEh0fyLQ==", + "dev": true, + "requires": { + "cosmiconfig": "^7.0.0", + "deepmerge": "^4.2.2", + "svgo": "^1.2.2" + }, + "dependencies": { + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + } + } + }, + "@svgr/webpack": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-5.5.0.tgz", + "integrity": "sha512-DOBOK255wfQxguUta2INKkzPj6AIS6iafZYiYmHn6W3pHlycSRRlvWKCfLDG10fXfLWqE3DJHgRUOyJYmARa7g==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/plugin-transform-react-constant-elements": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "@babel/preset-react": "^7.12.5", + "@svgr/core": "^5.5.0", + "@svgr/plugin-jsx": "^5.5.0", + "@svgr/plugin-svgo": "^5.5.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, "@tannin/compile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@tannin/compile/-/compile-1.1.0.tgz", @@ -1902,10 +2534,16 @@ "resolved": "https://registry.npmjs.org/@tannin/postfix/-/postfix-1.1.0.tgz", "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==" }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/babel__core": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.6.tgz", - "integrity": "sha512-tTnhWszAqvXnhW7m5jQU9PomXSiKXk2sFxpahXvI20SZKu9ylPi8WtIxueZ6ehDWikPT0jeFujMj3X4ZHuf3Tg==", + "version": "7.1.15", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.15.tgz", + "integrity": "sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1916,18 +2554,18 @@ } }, "@types/babel__generator": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.1.tgz", - "integrity": "sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", + "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz", - "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1935,41 +2573,61 @@ } }, "@types/babel__traverse": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.9.tgz", - "integrity": "sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", + "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true + "@types/cheerio": { + "version": "0.22.30", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz", + "integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==", + "dev": true, + "requires": { + "@types/node": "*" + } }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true + "@types/component-emitter": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz", + "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==" + }, + "@types/cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg==" + }, + "@types/cors": { + "version": "2.8.10", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.10.tgz", + "integrity": "sha512-C7srjHiVG3Ey1nR6d511dtDkCEjxuN9W1HWAEjGq8kpcwmNM6JJkpC0xvabM7BXTG2wDq8Eu33iH9aQKa7IvLQ==" }, "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "dev": true, "requires": { - "@types/events": "*", "@types/minimatch": "*", "@types/node": "*" } }, + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", "dev": true }, "@types/istanbul-lib-report": { @@ -1982,27 +2640,35 @@ } }, "@types/istanbul-reports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz", - "integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "*", "@types/istanbul-lib-report": "*" } }, "@types/json-schema": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", - "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", "dev": true }, - "@types/mime-types": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz", - "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM=", + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -2010,21 +2676,20 @@ "dev": true }, "@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, "@types/node": { - "version": "12.7.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.8.tgz", - "integrity": "sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A==", - "dev": true + "version": "14.14.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", + "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==" }, "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "@types/parse-json": { @@ -2032,781 +2697,1286 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, - "@types/q": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", - "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "@types/prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog==", "dev": true }, - "@types/stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", - "dev": true + "@types/prop-types": { + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, - "@types/unist": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", - "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==", + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", "dev": true }, - "@types/vfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz", - "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==", - "dev": true, + "@types/react": { + "version": "16.14.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.14.tgz", + "integrity": "sha512-uwIWDYW8LznHzEMJl7ag9St1RsK0gw/xaFZ5+uI1ZM1HndwUgmPH3/wQkSb87GkOVg7shUxnpNW8DcN0AzvG5Q==", "requires": { - "@types/node": "*", - "@types/unist": "*", - "@types/vfile-message": "*" + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" } }, - "@types/vfile-message": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz", - "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==", - "dev": true, + "@types/react-dom": { + "version": "16.9.14", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.14.tgz", + "integrity": "sha512-FIX2AVmPTGP30OUJ+0vadeIFJJ07Mh1m+U0rxfgyW34p3rTlXI+nlenvAxNn4BP36YyI9IJ/+UJ7Wu22N1pI7A==", "requires": { - "vfile-message": "*" + "@types/react": "^16" } }, - "@types/yargs": { - "version": "13.0.8", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz", - "integrity": "sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, - "@types/yargs-parser": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", - "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", "dev": true }, - "@typescript-eslint/experimental-utils": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz", - "integrity": "sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==", + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/tapable": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.8.tgz", + "integrity": "sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==", + "dev": true + }, + "@types/uglify-js": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.13.1.tgz", + "integrity": "sha512-O3MmRAk6ZuAKa9CHgg0Pr0+lUOqoMLpc9AS4R8ano2auvsg7IE8syF3Xh/NPr26TWklxYcqoEEFdzLLs1fV9PQ==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "1.13.0", - "eslint-scope": "^4.0.0" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "@typescript-eslint/typescript-estree": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz", - "integrity": "sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==", + "@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, + "@types/webpack": { + "version": "4.41.30", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.30.tgz", + "integrity": "sha512-GUHyY+pfuQ6haAfzu4S14F+R5iGRwN6b2FRNJY7U0NilmFAqbsOfK6j1HwuLBAqwRIT+pVdNDJGJ6e8rpp0KHA==", "dev": true, "requires": { - "lodash.unescape": "4.0.1", - "semver": "5.5.0" + "@types/node": "*", + "@types/tapable": "^1", + "@types/uglify-js": "*", + "@types/webpack-sources": "*", + "anymatch": "^3.0.0", + "source-map": "^0.6.0" }, "dependencies": { - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, - "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", - "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "@types/webpack-sources": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.0.tgz", + "integrity": "sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "@types/yargs": { + "version": "15.0.14", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.14.tgz", + "integrity": "sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true + }, + "@types/yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.30.0.tgz", + "integrity": "sha512-NgAnqk55RQ/SD+tZFD9aPwNSeHmDHHe5rtUyhIq0ZeCWZEvo4DK9rYz7v9HDuQZFvn320Ot+AikaCKMFKLlD0g==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.30.0", + "@typescript-eslint/scope-manager": "4.30.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.30.0.tgz", + "integrity": "sha512-K8RNIX9GnBsv5v4TjtwkKtqMSzYpjqAQg/oSphtxf3xxdt6T0owqnpojztjjTcatSteH3hLj3t/kklKx87NPqw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.30.0", + "@typescript-eslint/types": "4.30.0", + "@typescript-eslint/typescript-estree": "4.30.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.30.0.tgz", + "integrity": "sha512-HJ0XuluSZSxeboLU7Q2VQ6eLlCwXPBOGnA7CqgBnz2Db3JRQYyBDJgQnop6TZ+rsbSx5gEdWhw4rE4mDa1FnZg==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.30.0", + "@typescript-eslint/types": "4.30.0", + "@typescript-eslint/typescript-estree": "4.30.0", + "debug": "^4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.30.0.tgz", + "integrity": "sha512-VJ/jAXovxNh7rIXCQbYhkyV2Y3Ac/0cVHP/FruTJSAUUm4Oacmn/nkN5zfWmWFEanN4ggP0vJSHOeajtHq3f8A==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.30.0", + "@typescript-eslint/visitor-keys": "4.30.0" + } + }, + "@typescript-eslint/types": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.30.0.tgz", + "integrity": "sha512-YKldqbNU9K4WpTNwBqtAerQKLLW/X2A/j4yw92e3ZJYLx+BpKLeheyzoPfzIXHfM8BXfoleTdiYwpsvVPvHrDw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.30.0.tgz", + "integrity": "sha512-6WN7UFYvykr/U0Qgy4kz48iGPWILvYL34xXJxvDQeiRE018B7POspNRVtAZscWntEPZpFCx4hcz/XBT+erenfg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.30.0", + "@typescript-eslint/visitor-keys": "4.30.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.30.0.tgz", + "integrity": "sha512-pNaaxDt/Ol/+JZwzP7MqWc8PJQTUhZwoee/PVlQ+iYoYhagccvoHnC9e4l+C/krQYYkENxznhVSDwClIbZVxRw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.30.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", - "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.8.5" + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", - "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" + "@webassemblyjs/ast": "1.9.0" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", - "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", "dev": true, "requires": { - "@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/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" } }, "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", - "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", - "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", - "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", "dev": true, "requires": { - "@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/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" } }, "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", - "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", "dev": true, "requires": { - "@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/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", - "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" } }, "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", - "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", "dev": true, "requires": { - "@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/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" } }, "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", - "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", "dev": true, "requires": { - "@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", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", - "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", "@xtuc/long": "4.2.2" } }, "@webcomponents/template": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@webcomponents/template/-/template-1.4.1.tgz", - "integrity": "sha512-v7vwYZPKsAxczkWIjCOfCki9SpRdUcDjMZyweTGj3EPvVi+awQVHFPZ6X3jDW5nLSOs6Ls3h/AX8x8T+df2X0Q==" + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@webcomponents/template/-/template-1.4.4.tgz", + "integrity": "sha512-QqCmmywIKJTilkl6UIPLxEBBuqhDaOBpvQyKOnUEwl9lJuVHBrVlhMIhhnp9VSZJ6xEUnp+PiX8DST1k0q/v4Q==" + }, + "@wojtekmaj/enzyme-adapter-react-17": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@wojtekmaj/enzyme-adapter-react-17/-/enzyme-adapter-react-17-0.6.3.tgz", + "integrity": "sha512-Kp1ZJxtHkKEnUksaWrcMABNTOgL4wOt8VI6k2xOek2aH9PtZcWRXJNUEgnKrdJrqg5UqIjRslbVF9uUqwQJtFg==", + "dev": true, + "requires": { + "@wojtekmaj/enzyme-adapter-utils": "^0.1.1", + "enzyme-shallow-equal": "^1.0.0", + "has": "^1.0.0", + "object.assign": "^4.1.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.0", + "react-is": "^17.0.2", + "react-test-renderer": "^17.0.0" + }, + "dependencies": { + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + } + } + }, + "@wojtekmaj/enzyme-adapter-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@wojtekmaj/enzyme-adapter-utils/-/enzyme-adapter-utils-0.1.1.tgz", + "integrity": "sha512-bNPWtN/d8huKOkC6j1E3EkSamnRrHHT7YuR6f9JppAQqtoAm3v4/vERe4J14jQKmHLCyEBHXrlgb7H6l817hVg==", + "dev": true, + "requires": { + "function.prototype.name": "^1.1.0", + "has": "^1.0.0", + "object.assign": "^4.1.0", + "object.fromentries": "^2.0.0", + "prop-types": "^15.7.0" + } }, "@wordpress/a11y": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-2.7.0.tgz", - "integrity": "sha512-slmpj1Dyb8oGkDRkmfkvR/KOvRMTvRFuc/yMk7omuNspj4MsLimKhpQnu16NycelC6IGg+Rzp/6ziYIAMi/1sw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.1.2.tgz", + "integrity": "sha512-VUrJN4UcDdYLYVOjArMbSsHNrIPmoAfrSsJi09xpRFBJXUq67sLLPh5+yy01uptbV1aOqcIbRagyj0Zaq8I70g==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/dom-ready": "^2.7.0" + "@babel/runtime": "^7.13.10", + "@wordpress/dom-ready": "^3.1.2", + "@wordpress/i18n": "^4.1.2" } }, "@wordpress/annotations": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-1.12.3.tgz", - "integrity": "sha512-fMnderyeLBI7CII+QgYkK9hjHLoWq1tipuyFn2LOXum/ueXAZMKgxfqnrzbmVdPeFV4T2mr6nO5p2YpG0mdBHA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/data": "^4.14.2", - "@wordpress/hooks": "^2.7.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/rich-text": "^3.12.2", - "lodash": "^4.17.15", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.1.6.tgz", + "integrity": "sha512-z79UvFGm8GiwJZWEIgE9mzIEzoGVRPo31qwjnotFq3uHjAhKsRZk3ppmaLRNZUbJfobNOvDEyD8VT8V033Gp2A==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/data": "^5.1.6", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/rich-text": "^4.1.6", + "lodash": "^4.17.21", "rememo": "^3.0.0", - "uuid": "^3.3.2" + "uuid": "^8.3.0" } }, "@wordpress/api-fetch": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-3.11.0.tgz", - "integrity": "sha512-RfhGR0tI+g/b89qZmptsu5F5JfH2W0+koGfKzz4d07El5NqETX6SRocENCZd26b1CSRg7sSfMODLRt0bykO9yw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-5.1.2.tgz", + "integrity": "sha512-qdYENoku3IHfq9tHQismlOnCXerps3Vf9oHjoicUT7ukUBLawEfJWM8LeMJmuFoMRh4mc5ceuhUmTnmEfbcwIQ==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/i18n": "^3.9.0", - "@wordpress/url": "^2.11.0" + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.1.2", + "@wordpress/url": "^3.1.2" } }, "@wordpress/autop": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-2.6.0.tgz", - "integrity": "sha512-BxWMHyUJQNE5+omj2ul9J3O9/T4PKmSKR3mUw3zZ3JuYiPjHMWz9rLPP6uYWbXiElQp96qjwn8eyFJrdCqsAhA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.1.2.tgz", + "integrity": "sha512-EbQ/lJwK20GjMXa0pszW8RVdIWghrQcjM1GE/IjPhSWuReD8h0R+3LpB+noZpuy4ccqiz3/Enksq9LBlnFUMvg==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/babel-plugin-import-jsx-pragma": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-2.5.0.tgz", - "integrity": "sha512-fvb9+BBi5ns95pTKj2R/YoGbIbA2oBb2YNxRr0pSmeuURFqzeaQIzE+lFnkLCkWVp3DCkXQ1x92+5aWqOqfqzg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-3.1.0.tgz", + "integrity": "sha512-518mL3goaSeXtJCQcPK9OYHUUiA0sjXuoGWHBwRalkyTIQZZy5ZZzlwrlSc9ESZcOw9BZ+Uo8CJRjV2OWnx+Zw==", "dev": true }, "@wordpress/babel-preset-default": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-4.10.0.tgz", - "integrity": "sha512-fVwtjumi0iIvaD2iTw/X2zK7dQnl0bwUy3L7mBU0M5WkUQ6C4wd6ukA+HRGSH8QKqqxm4ZL1OQnpshJfgioxfw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-6.2.1.tgz", + "integrity": "sha512-io2HbPtmLdfu3WdZg6X6T1oRVCrOTVrTouqSeUxyAZ954fNh8xyB7Q8rfHfxUZHPgGypnbzZOKBiCpUlnBRs7A==", "dev": true, "requires": { - "@babel/core": "^7.8.3", - "@babel/plugin-proposal-async-generator-functions": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-react-jsx": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.8.3", - "@babel/preset-env": "^7.8.3", - "@babel/runtime": "^7.8.3", - "@wordpress/babel-plugin-import-jsx-pragma": "^2.5.0", - "@wordpress/browserslist-config": "^2.6.0", - "@wordpress/element": "^2.11.0", - "@wordpress/warning": "^1.0.0", - "core-js": "^3.1.4" - }, - "dependencies": { - "core-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", - "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==", - "dev": true - } + "@babel/core": "^7.13.10", + "@babel/plugin-transform-react-jsx": "^7.12.7", + "@babel/plugin-transform-runtime": "^7.13.10", + "@babel/preset-env": "^7.13.10", + "@babel/preset-typescript": "^7.13.0", + "@babel/runtime": "^7.13.10", + "@wordpress/babel-plugin-import-jsx-pragma": "^3.0.5", + "@wordpress/browserslist-config": "^4.0.1", + "@wordpress/element": "^3.1.2", + "@wordpress/warning": "^2.1.2", + "browserslist": "^4.16.6", + "core-js": "^3.12.1" } }, + "@wordpress/base-styles": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-3.6.0.tgz", + "integrity": "sha512-6/vXAmc9FSX7Y17UjKgUJoVU++Pv1U1G8uMx7iClRUaLetc7/jj2DD9PTyX/cdJjHr32e3yXuLVT9wfEbo6SEg==", + "dev": true + }, "@wordpress/blob": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-2.7.0.tgz", - "integrity": "sha512-5QQqODNgN/EYDphou2rnjaCR9oSUM8aYTb4kpoN4Do5ni02wbr7ft6ZyC3XKpMPM/8STMjyocCxFUCm1RAZYew==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.1.2.tgz", + "integrity": "sha512-xtuw2+fPok3Ep+fKJlNuatMzag19FUzLziDPa5XLtfncVo+WKg/Tnz+gj138EwYtrjVKnxGlGolps1zqFzH4Bg==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/block-directory": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-1.5.7.tgz", - "integrity": "sha512-HFPWXEQ0prSb/7P0AqHA1qCP5e6bddyQs/D0UWncjEMN5wKMQgSwd8RBZ0ujDamYv9w1bxljNkFTYYPM5n4ABw==", - "requires": { - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/block-editor": "^3.7.7", - "@wordpress/blocks": "^6.12.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/element": "^2.11.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/plugins": "^2.12.0", - "lodash": "^4.17.15" + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-2.1.21.tgz", + "integrity": "sha512-CCfQDyY7LpWkPxvmA7Dv9KAeSK1WiYIAZKt8FZNXJhnzZHuADsUcZy/7otopcMGHqCYycHcg+ygkpfzNyve5lA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/edit-post": "^4.1.21", + "@wordpress/editor": "^10.1.17", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/notices": "^3.1.6", + "@wordpress/plugins": "^3.1.6", + "@wordpress/url": "^3.1.2", + "lodash": "^4.17.21" } }, "@wordpress/block-editor": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-3.7.7.tgz", - "integrity": "sha512-Hcfj3CErousJzHOeZLq95qtB+wfhTiYvwI8pptIP2cgHNw79TcpRL6/MCz8b7jI5mkKVa22+ANdrzfGRcM0HTA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/a11y": "^2.7.0", - "@wordpress/blob": "^2.7.0", - "@wordpress/blocks": "^6.12.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/dom": "^2.8.0", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "@wordpress/html-entities": "^2.6.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/keyboard-shortcuts": "^1.1.2", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/rich-text": "^3.12.2", - "@wordpress/token-list": "^1.9.0", - "@wordpress/url": "^2.11.0", - "@wordpress/viewport": "^2.13.2", - "@wordpress/wordcount": "^2.7.0", + "version": "6.1.14", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-6.1.14.tgz", + "integrity": "sha512-4qiAPqrBSOIO6fanm+jG2nTaNuPc1vfqq+KLHnWWfEZtAA06tuKeW/C8XbHT5NdCBzdSL9sytVw+94gOJVeTww==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/blob": "^3.1.2", + "@wordpress/block-serialization-default-parser": "^4.1.2", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keyboard-shortcuts": "^2.1.7", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/notices": "^3.1.6", + "@wordpress/rich-text": "^4.1.6", + "@wordpress/shortcode": "^3.1.2", + "@wordpress/token-list": "^2.1.1", + "@wordpress/url": "^3.1.2", + "@wordpress/wordcount": "^3.1.2", "classnames": "^2.2.5", - "diff": "^3.5.0", + "css-mediaquery": "^0.1.2", + "diff": "^4.0.2", "dom-scroll-into-view": "^1.2.1", "inherits": "^2.0.3", - "lodash": "^4.17.15", - "memize": "^1.0.5", - "react-autosize-textarea": "^3.0.2", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "react-autosize-textarea": "^7.1.0", "react-spring": "^8.0.19", "redux-multi": "^0.1.12", - "refx": "^3.0.0", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", + "tinycolor2": "^1.4.2", "traverse": "^0.6.6" } }, "@wordpress/block-library": { - "version": "2.14.7", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-2.14.7.tgz", - "integrity": "sha512-xFUms9HbxVMECvhPSNmtk0R/x0YWsZX29hVn/66lU1uCF4BAUHM4j1XzxCC2N2Wpi1OnuxKTRlUh+fealvBP9w==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/a11y": "^2.7.0", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/autop": "^2.6.0", - "@wordpress/blob": "^2.7.0", - "@wordpress/block-editor": "^3.7.7", - "@wordpress/blocks": "^6.12.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/core-data": "^2.12.3", - "@wordpress/data": "^4.14.2", - "@wordpress/date": "^3.8.0", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/dom": "^2.8.0", - "@wordpress/editor": "^9.12.7", - "@wordpress/element": "^2.11.0", - "@wordpress/escape-html": "^1.7.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/primitives": "^1.1.0", - "@wordpress/rich-text": "^3.12.2", - "@wordpress/server-side-render": "^1.8.6", - "@wordpress/url": "^2.11.0", - "@wordpress/viewport": "^2.13.2", + "version": "3.2.19", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-3.2.19.tgz", + "integrity": "sha512-F/Dbg9YYmoQQ9LdtanA1Nn6Bi6z7a5mC9gUankzbl6657Aqw7EcBwvbKfuG3n1TOjbbJZpA2wCCYTge6XNXLWA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/autop": "^3.1.2", + "@wordpress/blob": "^3.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/date": "^4.1.2", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/escape-html": "^2.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/notices": "^3.1.6", + "@wordpress/primitives": "^2.1.2", + "@wordpress/reusable-blocks": "^2.1.17", + "@wordpress/rich-text": "^4.1.6", + "@wordpress/server-side-render": "^2.1.12", + "@wordpress/url": "^3.1.2", + "@wordpress/viewport": "^3.1.6", "classnames": "^2.2.5", "fast-average-color": "4.3.0", - "lodash": "^4.17.15", - "memize": "^1.0.5", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "micromodal": "^0.4.6", "moment": "^2.22.1", - "tinycolor2": "^1.4.1", - "url": "^0.11.0" + "react-easy-crop": "^3.0.0", + "tinycolor2": "^1.4.2" } }, "@wordpress/block-serialization-default-parser": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-3.5.0.tgz", - "integrity": "sha512-3nSDC8djKaC8lmn01c95aVcCKKFsvZ82t0DNXJnHOhmLrWHFrkEHETxIMZPOb3PoB8iwJ2qo/Fv1NCM0wOUOeQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.1.2.tgz", + "integrity": "sha512-jJoXfn6hYYReEl211alNoTFA5Hdgu9LMTkTQJF2g8cGJS5UpDw1lcpJP0hmpfhwzTmUUemy5RXM7noOa2c/RUw==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/blocks": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-6.12.3.tgz", - "integrity": "sha512-8DaItCnewPx1z+p/dVPiNTUBTiuC8l5KKUz32nNosLtX3CGy0OCUCqb37zuBaffuAcxENyV3n0Dnr2avMPak1A==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/autop": "^2.6.0", - "@wordpress/blob": "^2.7.0", - "@wordpress/block-serialization-default-parser": "^3.5.0", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/dom": "^2.8.0", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "@wordpress/html-entities": "^2.6.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/shortcode": "^2.6.0", + "version": "9.1.8", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-9.1.8.tgz", + "integrity": "sha512-RYemYN+q5/M0k5mESBkQbsB101p9hWSOTSlGLzEPBj7yXJp/OnyQVdc2hAr6CQgX16CxOyRRXx1CYQdiOtXGYg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/autop": "^3.1.2", + "@wordpress/blob": "^3.1.2", + "@wordpress/block-serialization-default-parser": "^4.1.2", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/shortcode": "^3.1.2", "hpq": "^1.3.0", - "lodash": "^4.17.15", + "lodash": "^4.17.21", "rememo": "^3.0.0", - "showdown": "^1.8.6", + "showdown": "^1.9.1", "simple-html-tokenizer": "^0.5.7", - "tinycolor2": "^1.4.1", - "uuid": "^3.3.2" + "tinycolor2": "^1.4.2", + "uuid": "^8.3.0" } }, "@wordpress/browserslist-config": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-2.6.0.tgz", - "integrity": "sha512-vRgzGoxhcNVChBP30XZlyK4w6r/9ZpO+Fi1dzmButp31lUEb1pT5WBxTIQl3HE0JZ9YTEJ00WWGO5sjGi5MHZA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-4.1.0.tgz", + "integrity": "sha512-RSJhgY2xmz6yAdDNhz/NvAO6JS+91vv9cVL7VDG2CftbyjTXBef05vWt3FzZhfeF0xUrYdpZL1PVpxmJiKvbEg==", "dev": true }, "@wordpress/components": { - "version": "9.2.6", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-9.2.6.tgz", - "integrity": "sha512-9gMr5Qr3aeiPG0Qk6F/4dpFyCYNv238jfd++VVGZtwutR+NTUD1mKdgAggVWAixirWP0MTObQDmrDrxnYO1Rmw==", + "version": "14.1.11", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-14.1.11.tgz", + "integrity": "sha512-umsDXCtH0eqOaAVXq/N3f5QO4u9ovo2F+RMg7c566Q+StOgCVw0jRnKuyKQtBb1CEv4IIYIDWp/pL3cId8Vz2w==", "requires": { - "@babel/runtime": "^7.8.3", - "@emotion/core": "^10.0.22", + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^10.0.27", + "@emotion/core": "^10.1.1", "@emotion/css": "^10.0.22", - "@emotion/native": "^10.0.22", "@emotion/styled": "^10.0.23", - "@wordpress/a11y": "^2.7.0", - "@wordpress/compose": "^3.11.0", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/dom": "^2.8.0", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/primitives": "^1.1.0", - "@wordpress/rich-text": "^3.12.2", - "@wordpress/warning": "^1.0.0", + "@wordpress/a11y": "^3.1.2", + "@wordpress/compose": "^4.1.6", + "@wordpress/date": "^4.1.2", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/primitives": "^2.1.2", + "@wordpress/rich-text": "^4.1.6", + "@wordpress/warning": "^2.1.2", "classnames": "^2.2.5", - "clipboard": "^2.0.1", "dom-scroll-into-view": "^1.2.1", - "downshift": "^4.0.5", + "downshift": "^6.0.15", + "emotion": "^10.0.23", "gradient-parser": "^0.1.5", - "lodash": "^4.17.15", - "memize": "^1.0.5", + "highlight-words-core": "^1.2.2", + "lodash": "^4.17.21", + "memize": "^1.1.0", "moment": "^2.22.1", - "re-resizable": "^6.0.0", + "re-resizable": "^6.4.0", "react-dates": "^17.1.1", - "react-resize-aware": "^3.0.0", + "react-resize-aware": "^3.1.0", "react-spring": "^8.0.20", - "reakit": "^1.0.0-beta.12", + "react-use-gesture": "^9.0.0", + "reakit": "^1.3.5", "rememo": "^3.0.0", - "tinycolor2": "^1.4.1", - "uuid": "^3.3.2" + "tinycolor2": "^1.4.2", + "uuid": "^8.3.0" } }, "@wordpress/compose": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-3.11.0.tgz", - "integrity": "sha512-CNbLn9NtG2A0X71wjEux126uEHpWp3v546FtSgMoWlq73z3LEEBDoEeS2glIPAbIK6e1X2UibsKrn5Tn651tlg==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/element": "^2.11.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "lodash": "^4.17.15", - "mousetrap": "^1.6.2" + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-4.1.6.tgz", + "integrity": "sha512-rzSHBvMMwkR70+qOmSGnZpOEa2fnseGbylR3DEN3IAlscxdAn08Ejyz+bZSQ8GgQ6Uq2OkwvYjHjPUD2llpQ/g==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/priority-queue": "^2.1.2", + "clipboard": "^2.0.1", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "mousetrap": "^1.6.5", + "react-resize-aware": "^3.1.0", + "use-memo-one": "^1.1.1" } }, "@wordpress/core-data": { - "version": "2.12.3", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-2.12.3.tgz", - "integrity": "sha512-aocWcI5z593QYCpSrYKUlrnRyTEdHSFMcScJHZ4cxqdFGtQinTenURi2/o2fyOcCI1OoNdp0q4ksM8I+QxRPuw==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/blocks": "^6.12.3", - "@wordpress/data": "^4.14.2", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/url": "^2.11.0", + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-3.1.12.tgz", + "integrity": "sha512-GUvuWc5SQi0eBKi6gaWDz3Xg8eQyAM4YmYPpWNhWP8oNeAwsLL/RM2kXv6O4ssnGGlS/W3zJtLFTy7yDo0c74Q==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/blocks": "^9.1.8", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/url": "^3.1.2", "equivalent-key-map": "^0.2.2", - "lodash": "^4.17.15", - "rememo": "^3.0.0" + "lodash": "^4.17.21", + "rememo": "^3.0.0", + "uuid": "^8.3.0" } }, "@wordpress/custom-templated-path-webpack-plugin": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/custom-templated-path-webpack-plugin/-/custom-templated-path-webpack-plugin-1.6.0.tgz", - "integrity": "sha512-1w/hYfHzTxiKgQss+BWWMhKDwTsaa99DHwU2z3Vgg8e1T00lvvWEtNP/X491UY2W9hk42m4lCT6wLhsJxHBjPQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/custom-templated-path-webpack-plugin/-/custom-templated-path-webpack-plugin-2.0.5.tgz", + "integrity": "sha512-8tEcTEkr4tB55UFo0oalmpj54jf3sfTNJEqqnu0VpfB3Zk2lh3nRYmo+/vL1ks5uP47k3+iXYiPEFy9rJ4lGLw==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, + "@wordpress/customize-widgets": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-1.0.20.tgz", + "integrity": "sha512-2zHmZ3IcnkXMD+n1FPRjZTvfTkxt1onxe4oqfQjpobdYjPTSMl3HKaYuHB1lBaVN7qw4sOk/3WgB9cH1kqWpqg==", + "requires": { + "@babel/runtime": "^7.11.2", + "@wordpress/a11y": "^3.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/block-library": "^3.2.19", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keyboard-shortcuts": "^2.1.7", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/media-utils": "^2.1.2", + "@wordpress/widgets": "^1.1.19", + "classnames": "^2.2.6", + "lodash": "^4.17.21" + } + }, "@wordpress/data": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-4.14.2.tgz", - "integrity": "sha512-UiYCj3PosFzI/UibfrXnv5pIuAbaX55hXkRwGyIY3lpdaiejwQ6GwnqxukbcT8Slx/jaPCEvx3BuxaE9cIeBXw==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/compose": "^3.11.0", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/priority-queue": "^1.5.1", - "@wordpress/redux-routine": "^3.7.0", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-5.1.6.tgz", + "integrity": "sha512-KKcAcYh6XuRXkQvIQOv1/ci5Tj1kXEE2gwNzujN4SytJZmQTNP2EEE8u9bBnhEPoS7bORzlqeNQuMW0Rz74qgg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/priority-queue": "^2.1.2", + "@wordpress/redux-routine": "^4.1.2", "equivalent-key-map": "^0.2.2", - "is-promise": "^2.1.0", - "lodash": "^4.17.15", - "memize": "^1.0.5", - "redux": "^4.0.0", + "is-promise": "^4.0.0", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "redux": "^4.1.0", "turbo-combine-reducers": "^1.0.2", "use-memo-one": "^1.1.1" } }, "@wordpress/data-controls": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-1.8.2.tgz", - "integrity": "sha512-QrnRbQogWp+G8I0vywI3jh0LCKGnZWbQ6GbrEJKeVCLxanlYBpk+PEHcyE8Gf6I9n3gOh7AVxq6JFP5HwEqhaQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-2.1.6.tgz", + "integrity": "sha512-AON1ZQLGhVQsJQIeW+4D1aB31TBJbDIQUMwnimiMkJ2n0M9V1Q0hvW4P7URC1k2aouNstnF2/TJ4xFPPRINf4Q==", "requires": { - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/data": "^4.14.2" + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/data": "^5.1.6", + "@wordpress/deprecated": "^3.1.2" } }, "@wordpress/date": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-3.8.0.tgz", - "integrity": "sha512-P0P02h7AdBtdZLeNhmfyPoWh8rBpWpHaOdvTHdZm3kUpu9+mSDfTsGvmvS35+TR766MwDRHioR7SD8nL8+jNQQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.1.2.tgz", + "integrity": "sha512-t1cM1eLCQkLJeypcnFQIBJW0+aS8ZUvZLNSxlMH0jVybF9+bjVIbKY+aRkGwP4OMxxrdQkvF2qFj349bn3nz3Q==", "requires": { - "@babel/runtime": "^7.8.3", + "@babel/runtime": "^7.13.10", "moment": "^2.22.1", - "moment-timezone": "^0.5.16" + "moment-timezone": "^0.5.31" } }, "@wordpress/dependency-extraction-webpack-plugin": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-2.4.0.tgz", - "integrity": "sha512-wU6HrroDCKbXUt3L39C+1WHt54wY71wW44U+kokQrO8ogVqrv5MeJ22r7Wx0MbbNPUJNi2pH3cbSF18S9ggJWQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-3.1.4.tgz", + "integrity": "sha512-SoFdhgt75symEJz57QwzDrcZzuSZ9Fxxr1adplSHHYfvRXBm/vDM0x6jeb2pHtVWH0Ltax4Z/yelRgv982nNYA==", "dev": true, "requires": { "json2php": "^0.0.4", - "webpack": "^4.8.3", - "webpack-sources": "^1.3.0" + "webpack-sources": "^2.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "webpack-sources": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz", + "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } + } } }, "@wordpress/deprecated": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-2.7.0.tgz", - "integrity": "sha512-Pq5r2/p0+3BgwkinSRMTky+iNerm34qPQeil0UCtFxNP5usJaK2ZI0W/pv6DokomOtxTNZyv2lMRlUoXmglDuQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.1.2.tgz", + "integrity": "sha512-kURIhVWssN6lv4YZNMqeFU8ZHk1Dh3SNbHHDs/Ah4Qcql9uHJisF89lLIQBCs063wgkeXfFxdvM/BXD4kfK6fw==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/hooks": "^2.7.0" + "@babel/runtime": "^7.13.10", + "@wordpress/hooks": "^3.1.1" } }, "@wordpress/dom": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-2.8.0.tgz", - "integrity": "sha512-JpTvlC7Z16xTI0st/3SL8dBA3uFnQnJTOF6CRjfMi8OcDX2f/pkGsnuHljXKByXGsXNoVh5CV58NNciNgfLsDg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.1.5.tgz", + "integrity": "sha512-EDX1BXtIEHw3LjAunASJO9lnbU2KU1gi4UBrjaa+Cem4u6npmfYHh6XkXO2ryA21yjx7rCWPbD0id6E7qlJ4Tw==", "requires": { - "@babel/runtime": "^7.8.3", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" } }, "@wordpress/dom-ready": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-2.7.0.tgz", - "integrity": "sha512-YTx/M3hpF4hJx5xFE5eECUalruIl/xvW8mJaqDRqCL22ktVDpWwyUtQkHtiVkNi2B8lYln8y57CB4q+7R3xIwg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.1.2.tgz", + "integrity": "sha512-g2zmgC/+6JYgWYzUMByRmjRAXs75q57wnNdYUTXmRFrtLs2+PNa1bUuYWZop15rTZbxuvP6ScVnPxZ5tyQLRUw==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/e2e-test-utils": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-4.3.1.tgz", - "integrity": "sha512-5/JWB68PaXH8eYLwMc1CfmJcAwSIySuBBJA6KyizV+kXRh45KNqkqRO6XluhUsgzDP5WhrBvF8XmATDpmntptw==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-5.4.3.tgz", + "integrity": "sha512-DDLIO/QZipMLpqfiYB570nVtxOGlC9ByZkyd/+dqjwViBc7ST9pWMQzQPahlGjkArU2EMB96fvPumPnjrReZOA==", "dev": true, "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/url": "^2.11.0", - "lodash": "^4.17.15", - "node-fetch": "^1.7.3" - } - }, - "@wordpress/edit-post": { - "version": "3.13.9", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-3.13.9.tgz", - "integrity": "sha512-cdntAHZyBxFkAbXZ1cDjx8tkm4H7S6juGRzN8vMV7ZCc038RKe5GaEZQWDIzQsJF6YZWHGBMQyuYPpCtyewrsQ==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/a11y": "^2.7.0", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/block-editor": "^3.7.7", - "@wordpress/block-library": "^2.14.7", - "@wordpress/blocks": "^6.12.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/core-data": "^2.12.3", - "@wordpress/data": "^4.14.2", - "@wordpress/editor": "^9.12.7", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/keyboard-shortcuts": "^1.1.2", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/media-utils": "^1.7.2", - "@wordpress/notices": "^2.0.2", - "@wordpress/plugins": "^2.12.0", - "@wordpress/primitives": "^1.1.0", - "@wordpress/url": "^2.11.0", - "@wordpress/viewport": "^2.13.2", - "classnames": "^2.2.5", - "lodash": "^4.17.15", - "memize": "^1.0.5", - "refx": "^3.0.0", - "rememo": "^3.0.0" - } - }, - "@wordpress/editor": { - "version": "9.12.7", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-9.12.7.tgz", - "integrity": "sha512-9mXeuv/9VvYRf+wj4ADIHdNR329yVMt8oClgVpWwvJc7ls0Ljq+yPrcYkUkvA2TUn2UQUv2rnVLLn/QqteqTOg==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/autop": "^2.6.0", - "@wordpress/blob": "^2.7.0", - "@wordpress/block-directory": "^1.5.7", - "@wordpress/block-editor": "^3.7.7", - "@wordpress/blocks": "^6.12.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/core-data": "^2.12.3", - "@wordpress/data": "^4.14.2", - "@wordpress/data-controls": "^1.8.2", - "@wordpress/date": "^3.8.0", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "@wordpress/html-entities": "^2.6.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/keyboard-shortcuts": "^1.1.2", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/media-utils": "^1.7.2", - "@wordpress/notices": "^2.0.2", - "@wordpress/rich-text": "^3.12.2", - "@wordpress/server-side-render": "^1.8.6", - "@wordpress/url": "^2.11.0", - "@wordpress/viewport": "^2.13.2", - "@wordpress/wordcount": "^2.7.0", - "classnames": "^2.2.5", - "equivalent-key-map": "^0.2.2", - "lodash": "^4.17.15", - "memize": "^1.0.5", - "react-autosize-textarea": "^3.0.2", - "redux-optimist": "^1.0.0", - "refx": "^3.0.0", - "rememo": "^3.0.0" - } - }, - "@wordpress/element": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-2.11.0.tgz", - "integrity": "sha512-56ZO8a+E7QEsYwiqS+3BQPSHrCPsOAIEz5smXzntb2f6BjvOKeA64pup40mdn1pNGexe06LBA8cjoZVdLBHB1w==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/escape-html": "^1.7.0", - "lodash": "^4.17.15", - "react": "^16.9.0", - "react-dom": "^16.9.0" - } + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.2.2", + "@wordpress/keycodes": "^3.2.2", + "@wordpress/url": "^3.2.2", + "form-data": "^4.0.0", + "lodash": "^4.17.21", + "node-fetch": "^2.6.0" + }, + "dependencies": { + "@wordpress/api-fetch": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-5.2.2.tgz", + "integrity": "sha512-WwJHOe6qiI4Oa1BSSo+Fpietdtm/0UgaN5A9k/TlEkARqIE+Fh56sfbC3JbjJDfQxz9TsAxMm+WWO5aNapantQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.2.2", + "@wordpress/url": "^3.2.2" + } + }, + "@wordpress/hooks": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.2.0.tgz", + "integrity": "sha512-nVR6V9kPxl8+aYQzQJdoDt+aKBKHHD0zplcYZbu2MHxjmHMvppAeL9mjzVhQZj/3n10NR2Ftk94mHQzHWfhCCg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/i18n": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.2.2.tgz", + "integrity": "sha512-6PrfTDpeW5dfWyuqUx4Z5ApKFbh45CAbCs/G3PuZLlKJlXs/8p2Oq6Zxs0gLZk1QfHkw0t5qMx61lDlxWQhuPw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/hooks": "^3.2.0", + "gettext-parser": "^1.3.1", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + } + }, + "@wordpress/keycodes": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.2.2.tgz", + "integrity": "sha512-z4B4vby+iGciJ9gvUBIozsseDkdQXDNuWm5szMnG5g1Nn7UGDWmfCNc9IHNs3alXySmAFev6d0T/o/zgm9BBvQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.2.2", + "lodash": "^4.17.21" + } + }, + "@wordpress/url": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.2.2.tgz", + "integrity": "sha512-TYWE7V9F8nj0ZkCJy1eFD0crdDTS7iB3cVNW2yIDOn1RTWJJtzINXQFMASokVsjuh+NetAIOu8ru2mIfoRMG8Q==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "react-native-url-polyfill": "^1.1.2" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, + "@wordpress/edit-post": { + "version": "4.1.21", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-4.1.21.tgz", + "integrity": "sha512-tthVG2vA/cEkM5Ksb+AWlfYdRQRh3TE45C0NPMTjRTQaETJjZGZp1VCVl6f+EBMIiW90mzgOfP6t0bvDHBtcFg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/block-library": "^3.2.19", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/editor": "^10.1.17", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/interface": "^3.1.12", + "@wordpress/keyboard-shortcuts": "^2.1.7", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/media-utils": "^2.1.2", + "@wordpress/notices": "^3.1.6", + "@wordpress/plugins": "^3.1.6", + "@wordpress/primitives": "^2.1.2", + "@wordpress/url": "^3.1.2", + "@wordpress/viewport": "^3.1.6", + "@wordpress/warning": "^2.1.2", + "classnames": "^2.2.5", + "framer-motion": "^4.1.3", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "rememo": "^3.0.0", + "uuid": "8.3.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + } + } + }, + "@wordpress/edit-widgets": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-2.1.21.tgz", + "integrity": "sha512-dkINHh3yPJnCtqXfcKX0+Wf85ztGJLEnt35pUdcif6fkxDvBciYX6maezo+m+r6TgI0J9wUO2t9+G6kX6bda0Q==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/block-library": "^3.2.19", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/interface": "^3.1.12", + "@wordpress/keyboard-shortcuts": "^2.1.7", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/media-utils": "^2.1.2", + "@wordpress/notices": "^3.1.6", + "@wordpress/plugins": "^3.1.6", + "@wordpress/reusable-blocks": "^2.1.17", + "@wordpress/server-side-render": "^2.1.12", + "@wordpress/url": "^3.1.2", + "@wordpress/widgets": "^1.1.19", + "classnames": "^2.2.5", + "lodash": "^4.17.21", + "rememo": "^3.0.0", + "uuid": "^8.3.0" + } + }, + "@wordpress/editor": { + "version": "10.1.17", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-10.1.17.tgz", + "integrity": "sha512-ALvuojonwMEjWN1tbQR+mZF3ggR/fdkvOKe4esxRL3U10eTfcsSw6qA2QzB8zHrjb1cZd/90gZWixAdE398f+w==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/autop": "^3.1.2", + "@wordpress/blob": "^3.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/data-controls": "^2.1.6", + "@wordpress/date": "^4.1.2", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keyboard-shortcuts": "^2.1.7", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/media-utils": "^2.1.2", + "@wordpress/notices": "^3.1.6", + "@wordpress/reusable-blocks": "^2.1.17", + "@wordpress/rich-text": "^4.1.6", + "@wordpress/server-side-render": "^2.1.12", + "@wordpress/url": "^3.1.2", + "@wordpress/wordcount": "^3.1.2", + "classnames": "^2.2.5", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "react-autosize-textarea": "^7.1.0", + "rememo": "^3.0.0" + } + }, + "@wordpress/element": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-3.1.2.tgz", + "integrity": "sha512-6ZDhwXkkohcocZSXp+IE4Xn774+PNHJTNsEOLJRAeDo/clIvly5HoczX03z1GLgvEB3VYik8qHaqrouNIcjZvA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@types/react": "^16.9.0", + "@types/react-dom": "^16.9.0", + "@wordpress/escape-html": "^2.1.2", + "lodash": "^4.17.21", + "react": "^16.13.1", + "react-dom": "^16.13.1" + } }, "@wordpress/escape-html": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-1.7.0.tgz", - "integrity": "sha512-xDOBo0P3Jnbdbb/UypsQaplsD2k4UXgd/EpKhMAKhDa2m20GxWWmEKW9IB3/5bS4Rh2YZjVM9WL4JyWPUo4hEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.1.2.tgz", + "integrity": "sha512-nEKvwzjMkuyV5MBnD5Um/McydurQ65mLjV1NG8bVlljZlP6/263qdZ5otH2uwr6cf2Lz1meupmi9sV3ef4TalQ==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/eslint-plugin": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-3.4.1.tgz", - "integrity": "sha512-ZH88rJDMiSpzf7fYYSe5FncUJYxN4iIGG6vtIE/McTX23huKdgd0A1qAQY9d9tegVftMz6ERMa2W9E+nbzldvw==", - "dev": true, - "requires": { - "babel-eslint": "^10.0.3", - "eslint-config-prettier": "^6.10.0", - "eslint-plugin-jest": "^22.15.1", - "eslint-plugin-jsdoc": "^15.8.0", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-prettier": "^3.1.2", - "eslint-plugin-react": "^7.14.3", - "eslint-plugin-react-hooks": "^1.6.1", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-9.1.1.tgz", + "integrity": "sha512-GduOwoTTHh132RHTfLU82ujOmzuLpkA9izq+gzKtzhoDGzcpORXIht7tnbB8fzima4PYIiePz2LmuMCSuP18RA==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^4.15.0", + "@typescript-eslint/parser": "^4.15.0", + "@wordpress/prettier-config": "^1.1.0", + "babel-eslint": "^10.1.0", + "cosmiconfig": "^7.0.0", + "eslint-config-prettier": "^7.1.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-jsdoc": "^34.1.0", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^3.3.0", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^4.2.0", "globals": "^12.0.0", + "prettier": "npm:wp-prettier@2.2.1-beta-1", "requireindex": "^1.2.0" }, "dependencies": { + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -2815,416 +3985,1060 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true } } }, "@wordpress/format-library": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-1.14.7.tgz", - "integrity": "sha512-9iln37uL/59lT5CuvhVHe+HKMyfzfCmA3TugNnHUOt3dMbFE2VeMjOWrNeB5R3CxqDdZvWdITB7b3lvUi2afTA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/block-editor": "^3.7.7", - "@wordpress/components": "^9.2.6", - "@wordpress/data": "^4.14.2", - "@wordpress/dom": "^2.8.0", - "@wordpress/element": "^2.11.0", - "@wordpress/html-entities": "^2.6.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "@wordpress/keycodes": "^2.9.0", - "@wordpress/rich-text": "^3.12.2", - "@wordpress/url": "^2.11.0", - "lodash": "^4.17.15" + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-2.1.14.tgz", + "integrity": "sha512-INmmTyJX0FDBkG8PTJqvIBi+yTfYHpdpkWqP/JswG7kslrG++elm4jyrA2EsV1anZyxDfsSrP3aSCy+arYkTgA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/html-entities": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/keycodes": "^3.1.2", + "@wordpress/rich-text": "^4.1.6", + "@wordpress/url": "^3.1.2", + "lodash": "^4.17.21" } }, "@wordpress/hooks": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-2.7.0.tgz", - "integrity": "sha512-Cr8uGEVxuGLkMq9UsbfAQqSTFVGBDhP8PagyIYJRUX6OkLiUF72OyT3xox7aM+ZlSr3INle2mEO+ZLPw0ieIPg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.1.1.tgz", + "integrity": "sha512-9f6H9WBwu6x/MM4ZCVLGGBuMiBcyaLapmAku5IwcWaeB2PtPduwjmk2NfGx35TuhBQD554DUg8WtTjIS019UAg==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/html-entities": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-2.6.0.tgz", - "integrity": "sha512-4TOMYtMwyWbDKhjn7YfhmhWg94eXwNwV7OMwEAJ2RgFGdklGyQz70KvWsU49RZlMXIVAEEPNhduT3/mmqgWeoA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.1.2.tgz", + "integrity": "sha512-pPbEBxUTZm9YA/ynq50UEGmefaqFIW4g07KrxDQfa+xm0jb3kFZOtxFqdX7gXNofNCn/f5v4jlpFGmmYYpJMaw==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/i18n": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.9.0.tgz", - "integrity": "sha512-ACpLPvdzAosAPqSLUaYQSX7fB5yAV5dFy8Y37FWLsZrv4NhUQ+rfDLdrXrCWm19LEZ5nTFfZUT0TIbYKekqIug==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.1.2.tgz", + "integrity": "sha512-Bp0BnGoN2XQyhFjACh74f3fDIQx/AnBIyZsDIhSlNYedFjuJ9b4M246/YTmCDlRHyCqLyG/OuS0hEZKksKAoRQ==", "requires": { - "@babel/runtime": "^7.8.3", + "@babel/runtime": "^7.13.10", + "@wordpress/hooks": "^3.1.1", "gettext-parser": "^1.3.1", - "lodash": "^4.17.15", - "memize": "^1.0.5", + "lodash": "^4.17.21", + "memize": "^1.1.0", "sprintf-js": "^1.1.1", - "tannin": "^1.1.0" + "tannin": "^1.2.0" } }, "@wordpress/icons": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-1.1.0.tgz", - "integrity": "sha512-JPSWz1qOj7pWhAd3pQaHIRrgVDaePv7w6nPX5Uy3LFny+RfBXMNDh+tBGEQvC5iAAhBhDvJyekiDc63tbdnO4g==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/element": "^2.11.0", - "@wordpress/primitives": "^1.1.0" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-4.0.3.tgz", + "integrity": "sha512-I68iAysutXkYP6JrvnPlha/DKtNhtI1u88PuroZC/RgG+R0WwmxphB/bPoj92BCYDjgrMI8P625Ivttuh1spFA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/element": "^3.1.2", + "@wordpress/primitives": "^2.1.2" + } + }, + "@wordpress/interface": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-3.1.12.tgz", + "integrity": "sha512-t7ksL3IIlWB47+r8UJ9CyAZZVlEVbA7lN9aqA5Ly6+QPIPwtvATDDM1agiUjGPwGLAsFSoZyda9MDjfVNDvXmw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/plugins": "^3.1.6", + "@wordpress/viewport": "^3.1.6", + "classnames": "^2.2.5", + "lodash": "^4.17.21" } }, "@wordpress/is-shallow-equal": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-1.8.0.tgz", - "integrity": "sha512-OV3qJqP9LhjuOzt85TsyBwv+//CvC8Byf/81D3NmjPKlstLaD/bBCC5nBhH6dKAv4bShYtQ2Hmut+V4dZnOM1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.1.1.tgz", + "integrity": "sha512-Bc782s4Kte98RKLtuDXOaUBpyJWUgN4XZJevEoFasKQTpABZUDF+Y2C0/dhnlJeYF5TDEd8TQgFfpF5csxEUNw==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/jest-console": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-3.5.0.tgz", - "integrity": "sha512-RzzVORieEtgiGs+YLlMw16seYVKQ4QD0PWoSYWGyQHUMRV8c+DdEwYIkJ9PpX2lTj//yBAeymzfAK4hNswBUgg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-4.1.0.tgz", + "integrity": "sha512-MAbEfYUH+odlYYtPNKoKnWzSZKZjSc2r2kvFJ7FR920ZdteEgSAPIOvjyv4r4UbJy3ZuKemnXHuVtcTAKca5Tw==", "dev": true, "requires": { - "@babel/runtime": "^7.8.3", - "jest-matcher-utils": "^24.7.0", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "jest-matcher-utils": "^26.6.2", + "lodash": "^4.17.21" } }, "@wordpress/jest-preset-default": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-5.4.0.tgz", - "integrity": "sha512-+7zlgPB57jxlVHQ2Vg0bbYYcJozc+YbBocHZ2ZQlQC5IUXHJ2IZDPGb6kUAWGCNXy/1MzFIMEa0znjxG5zc1Fg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-7.1.0.tgz", + "integrity": "sha512-N6OwVfvNodRTgIkmBor6YOGx3FbLdvPp9ZTGHJ1uw1u+HUuPwVWN9nhcGTnuP8Ht2RWyN5VpN2Peo5+dz5gp0w==", "dev": true, "requires": { - "@jest/reporters": "^24.8.0", - "@wordpress/jest-console": "^3.5.0", - "babel-jest": "^24.9.0", - "enzyme": "^3.9.0", - "enzyme-adapter-react-16": "^1.10.0", - "enzyme-to-json": "^3.3.5" + "@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", + "@wordpress/jest-console": "^4.1.0", + "babel-jest": "^26.6.3", + "enzyme": "^3.11.0", + "enzyme-to-json": "^3.4.4" } }, "@wordpress/keyboard-shortcuts": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-1.1.2.tgz", - "integrity": "sha512-aiYqHbGsR7VXUQ5FpN7Ml6XmGJs7s3rZj/NS6YrKZuHXluuoJ0UZFdGMjQr4wlU3mJgdUjpp+Yuhaiwy9tEbuQ==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/element": "^2.11.0", - "@wordpress/keycodes": "^2.9.0", - "lodash": "^4.17.15", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-2.1.7.tgz", + "integrity": "sha512-V04mCe0Uwxhe2qIkfJ4h5//KsngZA25G/3kI0Ab6vL2N8OrQZQojZ4fnCK3x/P7mvdjXKQn78+vjnp3KiMvRqg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/keycodes": "^3.1.2", + "lodash": "^4.17.21", "rememo": "^3.0.0" } }, "@wordpress/keycodes": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.9.0.tgz", - "integrity": "sha512-m9SO9eYbzuGv5kNZLimL2O7khDddb+uNAkCJC7juD9K/a+l2LiXSLJRm6gAmnBdrGP8UrTudR0oLaPZLcKXYZA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.1.2.tgz", + "integrity": "sha512-8N0JiHquULMezdWEAu/MjaW5cQ4EN8z61HkA4/sIIB8JPd2TvNEkE1SeEotzpPICcBitEoQzclQ3uOUPld0WAg==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/i18n": "^3.9.0", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.1.2", + "lodash": "^4.17.21" } }, "@wordpress/library-export-default-webpack-plugin": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/library-export-default-webpack-plugin/-/library-export-default-webpack-plugin-1.6.0.tgz", - "integrity": "sha512-5PIGFDte2b8NAb7G9SXIGeRUTM3gVvn+csRf0CKAUO0HcrdDmrYt5ooxXsCUKhGVvQ6cywsKmA7eWZFcRmmNmQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/library-export-default-webpack-plugin/-/library-export-default-webpack-plugin-2.0.5.tgz", + "integrity": "sha512-qqyna9btIqoQ3XhdvG3+0rEibgpt2EKCwwyZ7o6IN1TeyiR9ymgHSVwE2yOK9wKcAVyBayFCpN1Sy4MEzpwhog==", "dev": true, "requires": { - "lodash": "^4.17.15", - "webpack-sources": "^1.1.0" + "lodash": "^4.17.21", + "webpack-sources": "^2.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "webpack-sources": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz", + "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } + } } }, "@wordpress/list-reusable-blocks": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-1.13.6.tgz", - "integrity": "sha512-IQmw7C6MW1TsJLZTVEUmkOYQXO0KVkHDVT00IYYnzs7lrMjFgMa9pWtsIn/8o9IFN4NbB6v1+eY0X841WOyKSA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/element": "^2.11.0", - "@wordpress/i18n": "^3.9.0", - "lodash": "^4.17.15" + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-2.1.11.tgz", + "integrity": "sha512-/y9YbYKL0E0jGs0QJHzdAK3OHrpWec9/dt2oy/RkB6+r+SjHUMBbCyxtL67SPhqZAliXDO10tJSih0OFK0gULw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "lodash": "^4.17.21" } }, "@wordpress/media-utils": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-1.7.2.tgz", - "integrity": "sha512-EUlC5wg2XjNbkV/5lMrv3xRXNrR9FPzZjVdVMOvL+pNup9uXSIoyU44xjnlU6FNI0pB2iJb7R0xypPMav1UoUA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/blob": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/i18n": "^3.9.0", - "lodash": "^4.17.15" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-2.1.2.tgz", + "integrity": "sha512-LhZ52JdLz4Lwr1H1YB90pAHTlAowv9R2HwQXjjmKmkSfGwCOhd6xigSRnDVKEjJxT4sUsVVCJdnb4Og/SVk0Nw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/blob": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "lodash": "^4.17.21" } }, "@wordpress/notices": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-2.0.2.tgz", - "integrity": "sha512-VzGROU2/nHUZLq+u+BD9O9giZ/0q7m+3XQhcBAva42et7QKzTA8oKEon0H2QkzVc3Q5FZRc7sWa/vA60esG5pw==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-3.1.6.tgz", + "integrity": "sha512-I+xDHCY7n5I/mBeZvlker7BoMtRFgaHBe/XySGJv2V2D3ZxgpAGXeVv13v+ohSvhaEjFhll+RgszpZOW/8SMLA==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/a11y": "^2.7.0", - "@wordpress/data": "^4.14.2", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.2", + "@wordpress/data": "^5.1.6", + "lodash": "^4.17.21" } }, "@wordpress/npm-package-json-lint-config": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-2.2.0.tgz", - "integrity": "sha512-8Td9vWekCwZCPfWkVWKQllim/F/m0uN1cma3KkBsKxi0liftj/iXpDBDH6wDxsv8z1Gbwq+H9a4D6w7Ob8SqtQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.1.0.tgz", + "integrity": "sha512-FjXL5GbpmI/wXXcpCf2sKosVIVuWjUuHmDbwcMzd0SClcudo9QjDRdVe35We+js8eQLPgB9hsG4Cty6cAFFxsQ==", "dev": true }, "@wordpress/nux": { - "version": "3.12.6", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-3.12.6.tgz", - "integrity": "sha512-2Yx0A/U6u1vcBcUkx08fij04OEkBWZ+f98HS6byMfApFcKQQz+km0ppMU4uAhB4R2gwLpb1QmISsTQamz5h8QQ==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/components": "^9.2.6", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/icons": "^1.1.0", - "lodash": "^4.17.15", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-4.1.11.tgz", + "integrity": "sha512-GRuQW4guMp12NjdUQPpQHJ+YoLt9lzigWO5za5sPXtWzgpYjzzTGIvBrC8hU5s5dXAlvHzZ0yk6swCEBXGqVDw==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "lodash": "^4.17.21", "rememo": "^3.0.0" } }, "@wordpress/plugins": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-2.12.0.tgz", - "integrity": "sha512-snbH+eouGkiF3K5rpGBKE2aEkMDP4mpzw/FZmINLw6YHaHbOaUQVZ67kCPmjswSYqjl54Co3g8TTtIvkaSklCA==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-3.1.6.tgz", + "integrity": "sha512-I2ZE6M/IzkLDDy0YOWLqMebutuubeYCk5Y3QkSRVmQYiuTP0o6q2vO8iJjfL87L8wxB3BgkZwNxusFB1not+lw==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/compose": "^3.11.0", - "@wordpress/element": "^2.11.0", - "@wordpress/hooks": "^2.7.0", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/hooks": "^3.1.1", + "@wordpress/icons": "^4.0.3", + "lodash": "^4.17.21", + "memize": "^1.1.0" } }, - "@wordpress/primitives": { + "@wordpress/postcss-plugins-preset": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-3.2.0.tgz", + "integrity": "sha512-vYzlqr92pq9cIdN6eO5/h1hyDjEIUUvRlm3Tgd822dPPr6EpkM8uJ82quObE1pPt4JfmXYhTj+gMgOUzRNLHJg==", + "dev": true, + "requires": { + "@wordpress/base-styles": "^3.6.0", + "autoprefixer": "^10.2.5" + }, + "dependencies": { + "autoprefixer": { + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.3.tgz", + "integrity": "sha512-yRzjxfnggrP/+qVHlUuZz5FZzEbkT+Yt0/Df6ScEMnbbZBLzYB2W0KLxoQCW+THm1SpOsM1ZPcTHAwuvmibIsQ==", + "dev": true, + "requires": { + "browserslist": "^4.16.8", + "caniuse-lite": "^1.0.30001252", + "colorette": "^1.3.0", + "fraction.js": "^4.1.1", + "normalize-range": "^0.1.2", + "postcss-value-parser": "^4.1.0" + } + }, + "browserslist": { + "version": "4.16.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", + "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001251", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.811", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" + } + }, + "caniuse-lite": { + "version": "1.0.30001252", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", + "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", + "dev": true + }, + "colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.826", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.826.tgz", + "integrity": "sha512-bpLc4QU4B8PYmdO4MSu2ZBTMD8lAaEXRS43C09lB31BvYwuk9UxgBRXbY5OJBw7VuMGcg2MZG5FyTaP9u4PQnw==", + "dev": true + }, + "node-releases": { + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + } + } + }, + "@wordpress/prettier-config": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-1.1.0.tgz", - "integrity": "sha512-qENxMXnGASutHqbQzbGOj/66B1LQwSBBLGtL9/Tjze+X9e04tUfdJCGroAgaEKmpDFJO39sL26UhW/f8rKz7cw==", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-1.1.0.tgz", + "integrity": "sha512-cMYc/dtuiRo9VAb+m8S2Mvv/jELvoJAtcPsq6HT6XMppXC9slZ5z0q1A4PNf3ewMvvHtodjwkl2oHbO+vaAYzg==", + "dev": true + }, + "@wordpress/primitives": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-2.1.2.tgz", + "integrity": "sha512-Eof+TK+zoKIr6w4lMlwxq+HvP+nKXBoidukjP3YhNUPOdB7H27+X6/V/IJd/Zza2xKN2ExkJybssBAGqi5NS6g==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/element": "^2.11.0", + "@babel/runtime": "^7.13.10", + "@wordpress/element": "^3.1.2", "classnames": "^2.2.5" } }, "@wordpress/priority-queue": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-1.5.1.tgz", - "integrity": "sha512-zVT9rHhIRa6JJWu7SwXkzk4S/5DbErJYFAm+1M90yE+X4vsZW12xG3mtA5Vw5CgWY1Ie24pevcZLkmFRKpP6og==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.1.2.tgz", + "integrity": "sha512-qXZzmfTRH6ssSZpCbJEHnj/w9W8bjpYm8V1tLKUqBXEYkHbII4O2FIL21LGI5aFhPPWsHG7tlYz3Z4lA/MHALQ==", "requires": { - "@babel/runtime": "^7.8.3" + "@babel/runtime": "^7.13.10" } }, "@wordpress/redux-routine": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-3.7.0.tgz", - "integrity": "sha512-dnt/NA4bgXDdkoTlmZrb5QFSgYoVH/lHrJEpy32KyIkxgF8SCvu8aU5lz08hQaV2MQ3OCJA8WtLIAMw0nCidPg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.1.2.tgz", + "integrity": "sha512-1wOH4zdp58VNeMCoTNRHc1wHTGL3ZWqx8kCCqeA3NhULnRBx2RkI/v6nemKCho5QRbMdIWWUYXffFsLbDOUOSg==", "requires": { - "@babel/runtime": "^7.8.3", - "is-promise": "^2.1.0", - "lodash": "^4.17.15", + "@babel/runtime": "^7.13.10", + "is-promise": "^4.0.0", + "lodash": "^4.17.21", "rungen": "^0.3.2" } }, + "@wordpress/reusable-blocks": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-2.1.17.tgz", + "integrity": "sha512-54tZPQppe4kmDeivxsUk5ZZhTlSY8jum+5OEcYs0jJVctEXhRVh7rU3p2hqSWWriNghqVz4i3cuJ57tqt/tIsw==", + "requires": { + "@wordpress/block-editor": "^6.1.14", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/notices": "^3.1.6", + "@wordpress/url": "^3.1.2", + "lodash": "^4.17.21" + } + }, "@wordpress/rich-text": { - "version": "3.12.2", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-3.12.2.tgz", - "integrity": "sha512-jRYVTxuD9S+5XGZ7vUD5B1haQMH9qZIfQocQug1tcedfXL5Z0+8solnCRiwBB2/2Fp8VvVeEEMYqqTtsfMWxkA==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/escape-html": "^1.7.0", - "@wordpress/is-shallow-equal": "^1.8.0", - "@wordpress/keycodes": "^2.9.0", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-4.1.6.tgz", + "integrity": "sha512-wF60RXrGIQ0xgAvMSNwh1dP8lM4RRMWbRS5ZKOf1ld2s7oTsezEodBwCIHhFkHeraM/ORbeFoBPFsLbGf3oXwQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/dom": "^3.1.5", + "@wordpress/element": "^3.1.2", + "@wordpress/escape-html": "^2.1.2", + "@wordpress/is-shallow-equal": "^4.1.1", + "@wordpress/keycodes": "^3.1.2", "classnames": "^2.2.5", - "lodash": "^4.17.15", - "memize": "^1.0.5", + "lodash": "^4.17.21", + "memize": "^1.1.0", "rememo": "^3.0.0" } }, "@wordpress/scripts": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-6.2.0.tgz", - "integrity": "sha512-ontkmdA5prqBhHYrwv0JIHjHvCZOdG27LktT+UcHuDW6VW3axylmYkTXX0EMA05ChMqHlfLWc4nZJVaChnBkrA==", - "dev": true, - "requires": { - "@wordpress/babel-preset-default": "^4.9.0", - "@wordpress/dependency-extraction-webpack-plugin": "^2.1.0", - "@wordpress/eslint-plugin": "^3.3.0", - "@wordpress/jest-preset-default": "^5.3.1", - "@wordpress/npm-package-json-lint-config": "^2.1.0", - "babel-jest": "^24.7.1", - "babel-loader": "^8.0.6", - "chalk": "^2.4.2", - "check-node-version": "^3.1.1", - "command-exists": "^1.2.8", + "version": "16.1.5", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-16.1.5.tgz", + "integrity": "sha512-EF63cT5UGbWEMEJBBhxvcoNAuJIooKlqAAaMq5wN1urzsJRpQOTHTV658onoKFfgAxWB78CD7svuwIqNPGQdIw==", + "dev": true, + "requires": { + "@svgr/webpack": "^5.2.0", + "@wordpress/babel-preset-default": "^6.2.1", + "@wordpress/dependency-extraction-webpack-plugin": "^3.1.4", + "@wordpress/eslint-plugin": "^9.0.6", + "@wordpress/jest-preset-default": "^7.0.5", + "@wordpress/npm-package-json-lint-config": "^4.0.5", + "@wordpress/postcss-plugins-preset": "^3.1.4", + "@wordpress/prettier-config": "^1.0.5", + "@wordpress/stylelint-config": "^19.0.5", + "babel-jest": "^26.6.3", + "babel-loader": "^8.2.2", + "chalk": "^4.0.0", + "check-node-version": "^4.1.0", + "clean-webpack-plugin": "^3.0.0", "cross-spawn": "^5.1.0", - "decompress-zip": "^0.2.2", - "eslint": "^6.1.0", - "jest": "^24.7.1", - "jest-puppeteer": "^4.3.0", - "js-yaml": "^3.13.1", - "lodash": "^4.17.15", + "css-loader": "^5.1.3", + "cwd": "^0.10.0", + "dir-glob": "^3.0.1", + "eslint": "^7.17.0", + "eslint-plugin-markdown": "^1.0.2", + "expect-puppeteer": "^4.4.0", + "file-loader": "^6.2.0", + "filenamify": "^4.2.0", + "ignore-emit-webpack-plugin": "^2.0.6", + "jest": "^26.6.3", + "jest-circus": "^26.6.3", + "jest-dev-server": "^4.4.0", + "jest-environment-node": "^26.6.2", + "markdownlint": "^0.18.0", + "markdownlint-cli": "^0.21.0", + "merge-deep": "^3.0.3", + "mini-css-extract-plugin": "^1.3.9", "minimist": "^1.2.0", - "npm-package-json-lint": "^4.0.3", - "puppeteer": "^2.0.0", + "npm-package-json-lint": "^5.0.0", + "postcss": "^8.2.15", + "postcss-loader": "^4.2.0", + "prettier": "npm:wp-prettier@2.2.1-beta-1", + "puppeteer-core": "^9.0.0", "read-pkg-up": "^1.0.1", - "request": "^2.88.0", "resolve-bin": "^0.4.0", + "sass": "^1.26.11", + "sass-loader": "^10.1.1", "source-map-loader": "^0.2.4", - "sprintf-js": "^1.1.1", - "stylelint": "^9.10.1", - "stylelint-config-wordpress": "^13.1.0", - "thread-loader": "^2.1.2", - "webpack": "^4.41.0", - "webpack-bundle-analyzer": "^3.3.2", - "webpack-cli": "^3.1.2", - "webpack-livereload-plugin": "^2.2.0" + "stylelint": "^13.8.0", + "terser-webpack-plugin": "^3.0.3", + "thread-loader": "^3.0.1", + "url-loader": "^4.1.1", + "webpack": "^4.46.0", + "webpack-bundle-analyzer": "^4.2.0", + "webpack-cli": "^3.3.11", + "webpack-livereload-plugin": "^2.3.0", + "webpack-sources": "^2.2.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "dev": true + }, + "enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, + "filenamify": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz", + "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.1", + "trim-repeated": "^1.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" } }, - "check-node-version": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-3.3.0.tgz", - "integrity": "sha512-OAtp7prQf+8YYKn2UB/fK1Ppb9OT+apW56atoKYUvucYLPq69VozOY0B295okBwCKymk2cictrS3qsdcZwyfzw==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "chalk": "^2.3.0", - "map-values": "^1.0.1", - "minimist": "^1.2.0", - "object-filter": "^1.0.2", - "object.assign": "^4.0.4", - "run-parallel": "^1.1.4", - "semver": "^5.0.3" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "yocto-queue": "^0.1.0" } - } - } - }, - "@wordpress/server-side-render": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-1.8.6.tgz", - "integrity": "sha512-h/PuVCm8gNnPCMDMVkZdfsCmkGCKXP7YwycGGLCfETpZQFkW2q1b4JHQ2lvRfo1eI7LSY0f2Pgtkx3sj0ZXXEg==", - "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/api-fetch": "^3.11.0", - "@wordpress/components": "^9.2.6", - "@wordpress/data": "^4.14.2", - "@wordpress/deprecated": "^2.7.0", - "@wordpress/element": "^2.11.0", - "@wordpress/i18n": "^3.9.0", - "@wordpress/url": "^2.11.0", - "lodash": "^4.17.15" - } - }, - "@wordpress/shortcode": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-2.6.0.tgz", - "integrity": "sha512-Sm92AVfk2CfMHb1m/1VNexZObrfP0UcoFR1SS4LhXQGctHk8sj37GNKzg8DSrWTF5B3qjTHjPhDxpjUPopm56A==", - "requires": { - "@babel/runtime": "^7.8.3", - "lodash": "^4.17.15", - "memize": "^1.0.5" - } - }, - "@wordpress/token-list": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-1.9.0.tgz", - "integrity": "sha512-picya+Xit5VlTZVKYYi5K1aLMCU7APe8P9t2o4OHDc3qP+jUKStPsyuCX8Ec/nVc5Wt8fMeAzJfp9zwu9HTqjQ==", - "requires": { - "@babel/runtime": "^7.8.3", - "lodash": "^4.17.15" - } - }, - "@wordpress/url": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.11.0.tgz", - "integrity": "sha512-x7vac1Up64lxX7j69f1OYMcC61gADnz4iFYocJCPPioPjkp3OX1sTPIwBOARw/T/EzwRLSFJsyfEcxr7hJhCSw==", - "requires": { - "@babel/runtime": "^7.8.3", - "lodash": "^4.17.15", - "qs": "^6.5.2" - } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "postcss": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-loader": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", + "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", + "dev": true, + "requires": { + "async": "^2.5.0", + "loader-utils": "^1.1.0" + } + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "terser-webpack-plugin": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-3.1.0.tgz", + "integrity": "sha512-cjdZte66fYkZ65rQ2oJfrdCAkkhJA7YLYk5eGOcGCSGlq0ieZupRdjedSQXYknMPo2IveQL+tPdrxUkERENCFA==", + "dev": true, + "requires": { + "cacache": "^15.0.5", + "find-cache-dir": "^3.3.1", + "jest-worker": "^26.2.1", + "p-limit": "^3.0.2", + "schema-utils": "^2.6.6", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.8.0", + "webpack-sources": "^1.4.3" + }, + "dependencies": { + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } + } + }, + "webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "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.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } + } + }, + "webpack-sources": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz", + "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==", + "dev": true, + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "@wordpress/server-side-render": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-2.1.12.tgz", + "integrity": "sha512-NrxFv/u6xzs97Pgyb0BbhB2f7pAII2trD8nyDY+/JfjNcTguulthRh9kmmPWp/vo6kgyEO1xyo6yHUnHLnh/vQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "@wordpress/deprecated": "^3.1.2", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/url": "^3.1.2", + "lodash": "^4.17.21" + } + }, + "@wordpress/shortcode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.1.2.tgz", + "integrity": "sha512-pZQf4nu4iQdyQIz3OnphvPcKTL9jlEIR1a58icis+PDnqbr0gv4PGwS3Hbamlm4p7+bkxm5Pskfj3n3ykqwGLQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "memize": "^1.1.0" + } + }, + "@wordpress/stylelint-config": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-19.1.0.tgz", + "integrity": "sha512-K/wB9rhB+pH5WvDh3fV3DN5C3Bud+jPGXmnPY8fOXKMYI3twCFozK/j6sVuaJHqGp/0kKEF0hkkGh+HhD30KGQ==", + "dev": true, + "requires": { + "stylelint-config-recommended": "^3.0.0", + "stylelint-config-recommended-scss": "^4.2.0", + "stylelint-scss": "^3.17.2" + } + }, + "@wordpress/token-list": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.1.1.tgz", + "integrity": "sha512-haBjgsroaRjNBZ/wHd6nZamYL3Yfrt0s13Py+aR1ZKtYv+/Rmwu9VB45iB6Xb/G+v3xexopEM8uA8Zks5PNxbQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" + } + }, + "@wordpress/url": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.1.2.tgz", + "integrity": "sha512-hT214NQG2p+FiL4jdKPJItHMEeA70uqvhKlnPOa7qqf9u+6QMnhVplxFxWSIu5cB7glmx5JQG4EMR2Ohz3jgTg==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "react-native-url-polyfill": "^1.1.2" + } }, "@wordpress/viewport": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-2.13.2.tgz", - "integrity": "sha512-886qIJRTe4gnHBQI0MEE7U+HlsABlELGRmpnczjpOUrl5VJRrr5aSTwdTdPaRRx5f8Z1LSPd1DAl8E+qjdQ/hA==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-3.1.6.tgz", + "integrity": "sha512-SwIL26Nd691mO8R21GUrODjVqJx1Y1DVNHbX9VusJxvf7citc94dZnXXHiQ8zc7vlg5ryMBF49/EFn8rZ8Zn8w==", "requires": { - "@babel/runtime": "^7.8.3", - "@wordpress/compose": "^3.11.0", - "@wordpress/data": "^4.14.2", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.6", + "@wordpress/data": "^5.1.6", + "lodash": "^4.17.21" } }, "@wordpress/warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-1.0.0.tgz", - "integrity": "sha512-/xa3e4GuXdMhxKtGYbwkCvOJLRkFgRexhsJpq5xFHz/7jSFdBdIY/eiOIVk1jhnjQpS+w3jL9VSAsE1R2AlV7A==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.1.2.tgz", + "integrity": "sha512-MqMo5AYffG/Gi3h1uRFJGBxp4TGmxw+7A4W81oe7VC9linJYhbNyeyvaMlL02m06KG2szWwl4fn0bdhyre433w==" + }, + "@wordpress/widgets": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-1.1.19.tgz", + "integrity": "sha512-6ojIQVbeeS3fhXs+nNdmKIc6BtYnPoPq6qXLcTFGV9yXPJs8zX5RRdI3ziEFeV/IILCoIk4fmbw87ncIQwahQA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.2", + "@wordpress/block-editor": "^6.1.14", + "@wordpress/blocks": "^9.1.8", + "@wordpress/components": "^14.1.11", + "@wordpress/compose": "^4.1.6", + "@wordpress/core-data": "^3.1.12", + "@wordpress/data": "^5.1.6", + "@wordpress/element": "^3.1.2", + "@wordpress/i18n": "^4.1.2", + "@wordpress/icons": "^4.0.3", + "@wordpress/notices": "^3.1.6", + "@wordpress/url": "^3.1.2", + "classnames": "^2.2.5", + "lodash": "^4.17.21" + } }, "@wordpress/wordcount": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-2.7.0.tgz", - "integrity": "sha512-+gmIrIVyPfEtv1p+CxsKiRicVStCNd+clUWbNHmFUiyBbbcZZUB6P8p8swgIMyerWrEG+U0jNJXOZ6QpK7iokA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.1.2.tgz", + "integrity": "sha512-jFumH3IJzbEtGupxfre7asRMF6zHmNPeOlNgJw7luaeE1YFwgXkCtflDFf2Y6fC09xJmwuDPwxLnoII8RLhNtQ==", "requires": { - "@babel/runtime": "^7.8.3", - "lodash": "^4.17.15" + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" } }, "@xtuc/ieee754": { @@ -3245,9 +5059,9 @@ "integrity": "sha512-qeacf8dvGpf+XAT27ESHMh7z84uRzj/ua2pQdJg483m3bEXv/kVFtDnMgvf70BQGqzbZhR9t6BmASzKvqfJf3Q==" }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, "abbrev": { @@ -3257,9 +5071,9 @@ "dev": true }, "abort-controller": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-2.0.3.tgz", - "integrity": "sha512-EPSq5wr2aFyAZ1PejJB32IX9Qd4Nwus+adnp7STYFM5/23nLPBazqZ1oor6ZqbH+4otaaGXTlC8RN5hq3C8w9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "requires": { "event-target-shim": "^5.0.0" } @@ -3268,46 +5082,45 @@ "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, "requires": { "mime-types": "~2.1.24", "negotiator": "0.6.2" } }, "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, "acorn-globals": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", - "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true } } }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "acorn-walk": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", - "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, "agent-base": { @@ -3316,37 +5129,47 @@ "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", "dev": true }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, "airbnb-prop-types": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.15.0.tgz", - "integrity": "sha512-jUh2/hfKsRjNFC4XONQrxo/n/3GG4Tn6Hl0WlFQN5PY9OMC9loSCoAYKnZsWaP8wEfd5xcrPloK0Zg6iS1xwVA==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", + "integrity": "sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==", "requires": { - "array.prototype.find": "^2.1.0", - "function.prototype.name": "^1.1.1", - "has": "^1.0.3", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", + "array.prototype.find": "^2.1.1", + "function.prototype.name": "^1.1.2", + "is-regex": "^1.1.0", + "object-is": "^1.1.2", "object.assign": "^4.1.0", - "object.entries": "^1.1.0", + "object.entries": "^1.1.2", "prop-types": "^15.7.2", "prop-types-exact": "^1.2.0", - "react-is": "^16.9.0" - }, - "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - } + "react-is": "^16.13.1" } }, "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -3359,9 +5182,9 @@ "dev": true }, "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, "align-text": { @@ -3380,23 +5203,28 @@ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } }, "ansi-html": { "version": "0.0.7", @@ -3405,36 +5233,25 @@ "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } }, "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "aproba": { @@ -3444,9 +5261,9 @@ "dev": true }, "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, "optional": true }, @@ -3469,16 +5286,6 @@ } } }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -3497,13 +5304,13 @@ } }, "aria-query": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", - "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", "dev": true, "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" } }, "arr-diff": { @@ -3524,23 +5331,18 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", - "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", - "dev": true - }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true + "dev": true, + "optional": true }, "array-flatten": { "version": "1.1.1", @@ -3549,69 +5351,122 @@ "dev": true }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", "is-string": "^1.0.5" }, "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } } } }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -3633,6 +5488,117 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, + "array.prototype.filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.0.tgz", + "integrity": "sha512-TfO1gz+tLm+Bswq0FBOXPqAchtCr2Rn48T8dLJoRFl8NoEosjZmzptmuo1X8aZBzZcqsR1W8U761tjACJtngTQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.5" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, "array.prototype.find": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.1.tgz", @@ -3640,109 +5606,282 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.4" + } + }, + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" }, "dependencies": { "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } } } } }, - "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "array.prototype.flatmap": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz", + "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==", + "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1", + "function-bind": "^1.1.1" }, "dependencies": { "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } } } } @@ -3753,11 +5892,6 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -3768,14 +5902,23 @@ } }, "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } } }, "assert": { @@ -3824,18 +5967,18 @@ "dev": true }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.14" } }, "async-each": { @@ -3844,22 +5987,10 @@ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, "atob": { @@ -3874,127 +6005,32 @@ "integrity": "sha1-S3KPrwoZVVGU1PvQVYL4M/3NE3s=" }, "autoprefixer": { - "version": "9.6.2", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.2.tgz", - "integrity": "sha512-0hXVBruiJrTMJprJYwdWuIg87R8MJ/Yfrt85XgOgRwyC0mpBIyDdGZhSf+AEh6lAA+R/70Y+89G6YSXsCnnrEw==", + "version": "9.8.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", + "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", "dev": true, "requires": { - "browserslist": "^4.7.0", - "caniuse-lite": "^1.0.30000998", - "chalk": "^2.4.2", + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.18", - "postcss-value-parser": "^4.0.2" + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "browserslist": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", - "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000989", - "electron-to-chromium": "^1.3.247", - "node-releases": "^1.1.29" - } - }, - "caniuse-lite": { - "version": "1.0.30000998", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000998.tgz", - "integrity": "sha512-8Tj5sPZR9kMHeDD9SZXIVr5m9ofufLLCG2Y4QwQrH18GIwG+kCc+zYdlR036ZRkuKjVVetyxeAgGA1xF7XdmzQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "electron-to-chromium": { - "version": "1.3.274", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.274.tgz", - "integrity": "sha512-9bWkiXxGylowqMXoF1ec7k6akmsL2nOa1kzZ4CKzBuwK9WVz0VauE1w/RVyYraE1LpJM7+8fNCsW9b7ZSoxWIg==", - "dev": true - }, - "node-releases": { - "version": "1.1.34", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.34.tgz", - "integrity": "sha512-fNn12JTEfniTuCqo0r9jXgl44+KxRH/huV7zM/KAGOKxDKrHr6EbT7SSs4B+DNxyBE2mks28AD+Jw6PkfY5uwA==", - "dev": true, - "requires": { - "semver": "^6.3.0" - } - }, - "postcss": { - "version": "7.0.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", - "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, "autosize": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.2.tgz", - "integrity": "sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.4.tgz", + "integrity": "sha512-5yxLQ22O0fCRGoxGfeLSNt3J8LB1v+umtpMnPW6XjkTWXKoN0AmXAIhelJcDtFT/Y/wYWmfE+oqU10Q0b8FhaQ==" }, "aws-sign2": { "version": "0.7.0", @@ -4003,15 +6039,30 @@ "dev": true }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "axe-core": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.3.tgz", + "integrity": "sha512-/lqqLAmuIPi79WYfRpy2i8z+x+vxU3zX2uAm0gs1q52qTuKwolOj1P8XbufpXcsydrpKx2yGn2wzAnxCMV86QA==", "dev": true }, + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "requires": { + "follow-redirects": "^1.10.0" + } + }, "axobject-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", - "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", "dev": true }, "babel-eslint": { @@ -4028,178 +6079,137 @@ "resolve": "^1.12.0" }, "dependencies": { - "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, "babel-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", - "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + } + }, + "babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", "dev": true, "requires": { - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.9.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "babel-loader": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", - "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", - "dev": true, - "requires": { - "find-cache-dir": "^2.1.0", - "loader-utils": "^1.4.0", - "mkdirp": "^0.5.3", - "pify": "^4.0.1", - "schema-utils": "^2.6.5" - }, - "dependencies": { - "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "p-locate": "^4.1.0" } }, - "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", - "dev": true - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { - "minimist": "^1.2.0" + "semver": "^6.0.0" } }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" + "p-limit": "^2.2.0" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "minimist": "^1.2.5" + "find-up": "^4.0.0" } }, "schema-utils": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", - "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", "dev": true, "requires": { - "ajv": "^6.12.0", - "ajv-keywords": "^3.4.1" + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "requires": { "object.assign": "^4.1.0" } }, "babel-plugin-emotion": { - "version": "10.0.29", - "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.29.tgz", - "integrity": "sha512-7Jpi1OCxjyz0k163lKtqP+LHMg5z3S6A7vMBfHnF06l2unmtsOmFDzZBpGf0CWo1G4m8UACfVcDJiSiRuu/cSw==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.2.2.tgz", + "integrity": "sha512-SMSkGoqTbTyUTDeuVuPIWifPdUGkTk1Kf9BWRiXIOIcuyMfsdp2EjeiiFvOzX8NOBvEh/ypKYvUh2rkgAJMCLA==", "requires": { "@babel/helper-module-imports": "^7.0.0", "@emotion/hash": "0.8.0", @@ -4214,23 +6224,27 @@ } }, "babel-plugin-istanbul": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", - "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" } }, "babel-plugin-jest-hoist": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", - "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", "dev": true, "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", "@types/babel__traverse": "^7.0.6" } }, @@ -4242,59 +6256,79 @@ "@babel/runtime": "^7.7.2", "cosmiconfig": "^6.0.0", "resolve": "^1.12.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" }, "dependencies": { - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - } - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "requires": { - "path-parse": "^1.0.6" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, + "babel-plugin-polyfill-corejs3": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", + "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.14.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + } + }, "babel-plugin-syntax-jsx": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, "babel-preset-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", - "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", "dev": true, "requires": { - "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.9.0" + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" } }, "backbone": { @@ -4370,18 +6404,27 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } }, + "base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=" + }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" }, "batch": { "version": "0.6.1", @@ -4398,18 +6441,6 @@ "tweetnacl": "^0.14.3" } }, - "bfj": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.2.tgz", - "integrity": "sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "check-types": "^8.0.3", - "hoopy": "^0.1.4", - "tryer": "^1.0.1" - } - }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -4428,8 +6459,33 @@ "execa": "^0.7.0", "p-map-series": "^1.0.0", "tempfile": "^2.0.0" - } - }, + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + } + } + }, "bin-check": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", @@ -4439,42 +6495,17 @@ "requires": { "execa": "^0.7.0", "executable": "^4.1.0" - } - }, - "bin-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", - "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", - "dev": true, - "optional": true, - "requires": { - "execa": "^1.0.0", - "find-versions": "^3.0.0" }, "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "optional": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "optional": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", + "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", @@ -4483,17 +6514,25 @@ } }, "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true, - "optional": true, - "requires": { - "pump": "^3.0.0" - } + "optional": true } } }, + "bin-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", + "dev": true, + "optional": true, + "requires": { + "execa": "^1.0.0", + "find-versions": "^3.0.0" + } + }, "bin-version-check": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", @@ -4504,6 +6543,15 @@ "bin-version": "^3.0.0", "semver": "^5.6.0", "semver-truncate": "^1.1.2" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true + } } }, "bin-wrapper": { @@ -4558,6 +6606,13 @@ "dev": true, "optional": true }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + }, "got": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", @@ -4593,6 +6648,13 @@ } } }, + "import-lazy": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", + "dev": true, + "optional": true + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -4658,52 +6720,55 @@ } } }, - "binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", - "dev": true, - "requires": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - } - }, "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, - "bl": { - "version": "1.2.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dev": true, "optional": true, "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "file-uri-to-path": "1.0.0" } }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "bl": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "dev": true, "requires": { - "inherits": "~2.0.0" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "bluebird": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", - "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", "dev": true }, "body": { @@ -4746,7 +6811,6 @@ "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, "requires": { "bytes": "3.1.0", "content-type": "~1.0.4", @@ -4758,12 +6822,40 @@ "qs": "6.7.0", "raw-body": "2.4.0", "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } } }, "body-scroll-lock": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/body-scroll-lock/-/body-scroll-lock-2.7.1.tgz", - "integrity": "sha512-hS53SQ8RhM0e4DsQ3PKz6Gr2O7Kpdh59TWU98GHjaQznL7y4dFycEPk7pFQAikqBaUSCArkc5E3pe7CWIt2fZA==" + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/body-scroll-lock/-/body-scroll-lock-3.1.5.tgz", + "integrity": "sha512-Yi1Xaml0EvNA0OYWxXiYNqY24AfWkbA6w5vxE7GWxtKfzIbZM+Qw+aSmkgsbWzbHiy/RCSkUZBplVxTA+E4jJg==" }, "bonjour": { "version": "3.5.0", @@ -4848,26 +6940,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -4903,28 +6978,43 @@ } }, "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", "dev": true, "requires": { - "bn.js": "^4.1.0", + "bn.js": "^5.0.0", "randombytes": "^2.0.1" } }, "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "browserify-zlib": { @@ -4937,14 +7027,24 @@ } }, "browserslist": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.3.tgz", - "integrity": "sha512-CNBqTCq22RKM8wKJNowcqihHJ4SkI8CGeK7KOR9tPboXUuS5Zk5lQgzzTbs4oxD8x+6HUshZUa2OyNI9lR93bQ==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000975", - "electron-to-chromium": "^1.3.164", - "node-releases": "^1.1.23" + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + }, + "dependencies": { + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + } } }, "bser": { @@ -4957,14 +7057,12 @@ } }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-alloc": { @@ -4989,8 +7087,7 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true, - "optional": true + "dev": true }, "buffer-fill": { "version": "1.0.0", @@ -5017,12 +7114,6 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, - "buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", - "dev": true - }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -5032,13 +7123,12 @@ "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", "dev": true, "requires": { "bluebird": "^3.5.5", @@ -5067,12 +7157,6 @@ "yallist": "^3.0.2" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -5114,6 +7198,13 @@ "responselike": "1.0.2" }, "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + }, "lowercase-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", @@ -5140,6 +7231,18 @@ "dev": true, "optional": true }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "optional": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -5152,6 +7255,15 @@ } } }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -5195,21 +7307,25 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "camelcase-keys": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.1.tgz", - "integrity": "sha512-BPCNVH56RVIxQQIXskp5tLQXUNGQ6sXr7iCv1FHDt81xBOQ/1r6H8SPxf19InVP6DexWar4s87q9thfuk8X9HA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, + "optional": true, "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true, + "optional": true + } } }, - "camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" - }, "caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -5223,9 +7339,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000975", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000975.tgz", - "integrity": "sha512-ZsXA9YWQX6ATu5MNg+Vx/cMQ+hM6vBBSqDeJs8ruk9z0ky4yIHML15MoxcFt088ST2uyjgqyUGRJButkptWf0w==", + "version": "1.0.30001245", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz", + "integrity": "sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA==", "dev": true }, "capture-exit": { @@ -5244,12 +7360,12 @@ "dev": true }, "catharsis": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", - "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", "dev": true, "requires": { - "lodash": "^4.17.14" + "lodash": "^4.17.15" } }, "caw": { @@ -5265,12 +7381,6 @@ "url-to-options": "^1.0.1" } }, - "ccount": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz", - "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==", - "dev": true - }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", @@ -5280,63 +7390,67 @@ "lazy-cache": "^1.0.3" } }, - "chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", - "dev": true, - "requires": { - "traverse": ">=0.3.0 <0.4" - }, - "dependencies": { - "traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", - "dev": true - } - } - }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "color-name": "~1.1.4" } - } - } - }, - "character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "dev": true + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } }, - "character-entities-html4": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz", - "integrity": "sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==", + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", "dev": true }, "character-entities-legacy": { @@ -5352,117 +7466,243 @@ "dev": true }, "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, "check-node-version": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.0.1.tgz", - "integrity": "sha512-pWV+uuJJoOGbODDC6+DPUYeprv1CUg/jr1SGKpgkANstGN22f9T0Vn40mdv6hvRZ25KMH/IjkVc0LZH5ms+qEg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.1.0.tgz", + "integrity": "sha512-TSXGsyfW5/xY2QseuJn8/hleO2AU7HxVCdkc900jp1vcfzF840GkjvRT7CHl8sRtWn23n3X3k0cwH9RXeRwhfw==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^3.0.0", "map-values": "^1.0.1", "minimist": "^1.2.0", "object-filter": "^1.0.2", "run-parallel": "^1.1.4", - "semver": "^5.7.0" + "semver": "^6.3.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, - "check-types": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/check-types/-/check-types-8.0.3.tgz", - "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==", - "dev": true - }, "cheerio": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz", - "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==", + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", + "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "dev": true, + "requires": { + "cheerio-select": "^1.5.0", + "dom-serializer": "^1.3.2", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + }, + "dependencies": { + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, + "cheerio-select": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", + "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", "dev": true, "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.1", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" + "css-select": "^4.1.3", + "css-what": "^5.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0", + "domutils": "^2.7.0" }, "dependencies": { - "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "css-select": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" + } + }, + "css-what": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true + }, + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "nth-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", "dev": true, "requires": { - "@types/node": "*" + "boolbase": "^1.0.0" } } } }, "chokidar": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", - "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz", + "integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } } }, "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "chrome-trace-event": { @@ -5472,6 +7712,14 @@ "dev": true, "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "ci-info": { @@ -5490,6 +7738,12 @@ "safe-buffer": "^5.0.1" } }, + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -5514,14 +7768,19 @@ } }, "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + }, + "cldr-core": { + "version": "38.1.0", + "resolved": "https://registry.npmjs.org/cldr-core/-/cldr-core-38.1.0.tgz", + "integrity": "sha512-Da9xKjDp4qGGIX0VDsBqTan09iR5nuYD2a/KkfEaUyqKhu6wFVNRiCpPDXeRbpVwPBY6PgemV8WiHatMhcpy4A==" }, "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.1.1.tgz", + "integrity": "sha512-GQ6HdEyJN0543mRTA/TkZ7RPoMXGWKq1shs9H86F2kLuixR0RI+xd4JfhJxWUW08FGKQXTKAKpVjKQXu5zkFNA==", "dev": true, "requires": { "source-map": "~0.6.0" @@ -5535,6 +7794,22 @@ } } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "clean-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==", + "dev": true, + "requires": { + "@types/webpack": "^4.4.31", + "del": "^4.1.1" + } + }, "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", @@ -5555,15 +7830,15 @@ } }, "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", + "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", "requires": { "good-listener": "^1.2.2", "select": "^1.1.2", @@ -5571,14 +7846,13 @@ } }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, "clone-deep": { @@ -5595,13 +7869,12 @@ } }, "clone-regexp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz", - "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", + "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", "dev": true, "requires": { - "is-regexp": "^1.0.0", - "is-supported-regexp-flag": "^1.0.0" + "is-regexp": "^2.0.0" } }, "clone-response": { @@ -5631,15 +7904,6 @@ "q": "^1.1.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5650,28 +7914,13 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "coffee-script": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", + "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", "dev": true }, "collapse-white-space": { @@ -5680,6 +7929,12 @@ "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", "dev": true }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5691,13 +7946,13 @@ } }, "color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", - "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz", + "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==", "dev": true, "requires": { "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-string": "^1.5.4" } }, "color-convert": { @@ -5714,15 +7969,21 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "dev": true, "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -5738,22 +7999,16 @@ "delayed-stream": "~1.0.0" } }, - "command-exists": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", - "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==", - "dev": true - }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "comment-parser": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.6.2.tgz", - "integrity": "sha512-Wdms0Q8d4vvb2Yk72OwZjwNWtMklbC5Re7lD9cjCP/AG1fhocmc0TrxGBBAXPLy8fZQPrfHGgyygwI0lA7pbzA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", "dev": true }, "commondir": { @@ -5765,16 +8020,15 @@ "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "mime-db": ">= 1.40.0 < 2" + "mime-db": ">= 1.43.0 < 2" } }, "compression": { @@ -5797,13 +8051,34 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, "compute-scroll-into-view": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.13.tgz", - "integrity": "sha512-o+w9w7A98aAFi/GjK8cxSV+CdASuPa2rR5UWs3+yHkJzWqaKoBEufFNWYaXInCSmUfDCVhesG+v9MTWqOjsxFg==" + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.17.tgz", + "integrity": "sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==" }, "computed-style": { "version": "0.1.4", @@ -5838,6 +8113,32 @@ "proto-list": "~1.2.1" } }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "connect-history-api-fallback": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", @@ -5845,18 +8146,9 @@ "dev": true }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", "dev": true }, "console-stream": { @@ -5884,13 +8176,20 @@ "dev": true, "requires": { "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "continuable-cache": { "version": "0.3.1", @@ -5899,11 +8198,18 @@ "dev": true }, "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "requires": { "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "cookie": { @@ -5939,9 +8245,9 @@ "dev": true }, "copy-webpack-plugin": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz", - "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz", + "integrity": "sha512-Uh7crJAco3AjBvgAy9Z75CjK8IG+gxaErro71THQ+vv/bl4HaQcpkexAY8KVW/T6D2W2IRr+couF/knIRkZMIQ==", "dev": true, "requires": { "cacache": "^12.0.3", @@ -5954,10 +8260,40 @@ "normalize-path": "^3.0.0", "p-limit": "^2.2.1", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "webpack-log": "^2.0.0" }, "dependencies": { + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "globby": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", @@ -5978,75 +8314,81 @@ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true } } }, "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.17.0.tgz", + "integrity": "sha512-zXT4rclS9jM6tikbAUKAGLonuRKOJ2ZvBnZCEOJAbzuTLw4kKcuA5plNt8juzdU6O/py/EgAehzvLh0VXEdBbQ==", + "dev": true }, "core-js-compat": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", - "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.17.0.tgz", + "integrity": "sha512-haEcBrfU3hu83JXWpcLHzeg8Ypf05LGK4GIjzLiYgFJYXuxrkdN2MrDBeHt/t5/ZFmIzLcdsT2x8Xw654wXsuw==", "dev": true, "requires": { - "browserslist": "^4.8.3", + "browserslist": "^4.16.8", "semver": "7.0.0" }, "dependencies": { "browserslist": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.11.0.tgz", - "integrity": "sha512-WqEC7Yr5wUH5sg6ruR++v2SGOQYpyUdYYd4tZoAq1F7y+QXoLoYGXVbxhtaIqWmAJjtNTRjVD3HuJc1OXTel2A==", + "version": "4.16.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", + "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001035", - "electron-to-chromium": "^1.3.380", - "node-releases": "^1.1.52", - "pkg-up": "^3.1.0" + "caniuse-lite": "^1.0.30001251", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.811", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" } }, "caniuse-lite": { - "version": "1.0.30001038", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz", - "integrity": "sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==", + "version": "1.0.30001252", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", + "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", + "dev": true + }, + "colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", "dev": true }, "electron-to-chromium": { - "version": "1.3.388", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.388.tgz", - "integrity": "sha512-/FNHDmNmI4IR/qY+uuAVq8OET5S9J7d5QfQUnAz0edkhl02BjtOflF2H0RXKapVtJfMgaFthKBzeYJAzOaW8PA==", + "version": "1.3.826", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.826.tgz", + "integrity": "sha512-bpLc4QU4B8PYmdO4MSu2ZBTMD8lAaEXRS43C09lB31BvYwuk9UxgBRXbY5OJBw7VuMGcg2MZG5FyTaP9u4PQnw==", "dev": true }, "node-releases": { - "version": "1.1.52", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", - "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true }, "semver": { "version": "7.0.0", @@ -6057,9 +8399,9 @@ } }, "core-js-pure": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz", - "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.17.0.tgz", + "integrity": "sha512-O5RvMRWW+I0hfR227mrIwU+gPLVaa4kPEq+9b8FcjuFed4QckOvYc94c2KSI/X5dlvcsj/V1Sp5F5cecYpNQOQ==", "dev": true }, "core-js-url-browser": { @@ -6072,44 +8414,54 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" }, "dependencies": { - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, + "create-emotion": { + "version": "10.0.27", + "resolved": "https://registry.npmjs.org/create-emotion/-/create-emotion-10.0.27.tgz", + "integrity": "sha512-fIK73w82HPPn/RsAij7+Zt8eCE8SptcJ3WoRMfxMtjteYxud8GDTKKld7MYwAX2TVhrw29uR1N/bVGxeStHILg==", "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "@emotion/cache": "^10.0.27", + "@emotion/serialize": "^0.11.15", + "@emotion/sheet": "0.9.4", + "@emotion/utils": "0.11.3" } }, "create-hash": { @@ -6148,6 +8500,33 @@ "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + } } }, "crypto-browserify": { @@ -6176,21 +8555,8 @@ "dev": true, "requires": { "coffee-script": "^1.10.0" - }, - "dependencies": { - "coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "dev": true - } } }, - "css-color-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" - }, "css-color-names": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", @@ -6207,16 +8573,110 @@ "timsort": "^0.3.0" } }, + "css-loader": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.7.tgz", + "integrity": "sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==", + "dev": true, + "requires": { + "icss-utils": "^5.1.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.15", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.5" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "postcss": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "css-mediaquery": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", + "integrity": "sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA=" + }, "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", "dev": true, "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" } }, "css-select-base-adapter": { @@ -6225,42 +8685,28 @@ "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", "dev": true }, - "css-to-react-native": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", - "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", - "requires": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^3.3.0" - } - }, "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==", + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", "dev": true, "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", - "dev": true - }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", - "dev": true - }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", "dev": true }, "cssesc": { @@ -6270,21 +8716,61 @@ "dev": true }, "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", - "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", + "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", "dev": true, "requires": { "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", + "cssnano-preset-default": "^4.0.8", "is-resolvable": "^1.0.0", "postcss": "^7.0.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } } }, "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", + "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", "dev": true, "requires": { "css-declaration-sorter": "^4.0.1", @@ -6315,7 +8801,7 @@ "postcss-ordered-values": "^4.1.2", "postcss-reduce-initial": "^4.0.3", "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", + "postcss-svgo": "^4.0.3", "postcss-unique-selectors": "^4.0.1" } }, @@ -6347,55 +8833,86 @@ "dev": true }, "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.29" + "css-tree": "^1.1.2" }, "dependencies": { "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", "dev": true, "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" + "mdn-data": "2.0.14", + "source-map": "^0.6.1" } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", "dev": true }, "cssstyle": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", - "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, "requires": { - "cssom": "0.3.x" + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } } }, "csstype": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.9.tgz", - "integrity": "sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" + }, + "current-script-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/current-script-polyfill/-/current-script-polyfill-1.0.0.tgz", + "integrity": "sha1-8xz35PPiGLBybnOMqSoC00iO9hU=" }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, + "optional": true, "requires": { "array-find-index": "^1.0.1" } }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" + }, "cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", @@ -6407,15 +8924,15 @@ } }, "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", "dev": true }, "damerau-levenshtein": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", - "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz", + "integrity": "sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw==", "dev": true }, "dashdash": { @@ -6428,29 +8945,21 @@ } }, "data-urls": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", - "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, "requires": { - "abab": "^2.0.0", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" } }, + "date-format": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", + "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==" + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -6458,110 +8967,17 @@ "dev": true }, "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - } - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "decamelize": { @@ -6577,16 +8993,14 @@ "requires": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } } }, + "decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "dev": true + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -6594,9 +9008,9 @@ "dev": true }, "decompress": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", - "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "dev": true, "optional": true, "requires": { @@ -6660,12 +9074,39 @@ "tar-stream": "^1.5.2" }, "dependencies": { + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, "file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", "dev": true, "optional": true + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "optional": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } } } }, @@ -6726,16 +9167,6 @@ "yauzl": "^2.4.2" }, "dependencies": { - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "optional": true, - "requires": { - "pend": "~1.2.0" - } - }, "file-type": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", @@ -6760,65 +9191,19 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true, "optional": true - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "optional": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } } } }, - "decompress-zip": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.2.2.tgz", - "integrity": "sha512-v+Na3Ck86Px7s2ix+f77pMQC3GlkxHHN+YyvnkEW7+xX5F39pcDpIV/VFvGYk8MznTFcMoPjL3XNWEJLXWoSPw==", - "dev": true, - "requires": { - "binary": "^0.3.0", - "graceful-fs": "^4.1.3", - "mkpath": "^0.1.0", - "nopt": "^3.0.1", - "q": "^1.1.2", - "readable-stream": "^1.1.8", - "touch": "0.0.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true }, "deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", - "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "dev": true, "requires": { "is-arguments": "^1.0.4", @@ -6829,10 +9214,16 @@ "regexp.prototype.flags": "^1.2.0" } }, + "deep-extend": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "dev": true + }, "deep-for-each": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-2.0.3.tgz", - "integrity": "sha512-Y9mu+rplGcNZ7veer+5rqcdI9w3aPb7/WyE/nYnsuPevaE2z5YuC2u7/Gz/hIKsa0zo8sE8gKoBimSNsO/sr+A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-3.0.0.tgz", + "integrity": "sha512-pPN+0f8jlnNP+z90qqOdxGghJU5XM6oBDhvAR+qdQzjCg5pk/7VPPvKK1GqoXEFkHza6ZS+Otzzvmr0g3VUaKw==", "dev": true, "requires": { "lodash.isplainobject": "^4.0.6" @@ -6856,45 +9247,6 @@ "requires": { "execa": "^1.0.0", "ip-regex": "^2.1.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } } }, "define-properties": { @@ -6965,35 +9317,6 @@ "p-map": "^2.0.0", "pify": "^4.0.1", "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true - } } }, "delayed-stream": { @@ -7007,37 +9330,25 @@ "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" } }, - "desandro-get-style-property": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/desandro-get-style-property/-/desandro-get-style-property-1.0.4.tgz", - "integrity": "sha1-9YQsIeo0tjq89pvvNarJVuHFf3k=" - }, "desandro-matches-selector": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/desandro-matches-selector/-/desandro-matches-selector-1.0.3.tgz", - "integrity": "sha1-4bM3gcTcZU0GzU/FbO5EccKYTSM=" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz", + "integrity": "sha1-cXvu1NwT59jzdi9wem1YpndCGOE=" }, "destroy": { "version": "1.0.4", @@ -7052,9 +9363,9 @@ "dev": true }, "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, "detect-node": { @@ -7063,15 +9374,26 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, + "devtools-protocol": { + "version": "0.0.869402", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.869402.tgz", + "integrity": "sha512-VvlVYY+VDJe639yHs5PHISzdWTLL3Aw8rO4cvUtwvoxFd6FHbE4OpHHcde52M6096uYYazAmd4l0o5VuFRO2WA==", + "dev": true + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=" + }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" }, "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, "diffie-hellman": { @@ -7083,15 +9405,23 @@ "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } } }, "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { - "path-type": "^3.0.0" + "path-type": "^4.0.0" } }, "direction": { @@ -7112,9 +9442,9 @@ "dev": true }, "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz", + "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==", "dev": true, "requires": { "ip": "^1.1.0", @@ -7130,14 +9460,6 @@ "buffer-indexof": "^1.0.0" } }, - "doc-ready": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/doc-ready/-/doc-ready-1.0.4.tgz", - "integrity": "sha1-N/U5GWnP+ZQwP9/vLl1QNX+BZNM=", - "requires": { - "eventie": "^1" - } - }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -7148,9 +9470,9 @@ } }, "document.contains": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/document.contains/-/document.contains-1.0.1.tgz", - "integrity": "sha512-A1KqlZq1w605bwiiLqVZehWE9S9UYlUXPoduFWi64pNVNQ9vy6wwH/7BS+iEfSlF1YyZgcg5PZw5HqDi7FCrUw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/document.contains/-/document.contains-1.0.2.tgz", + "integrity": "sha512-YcvYFs15mX8m3AO1QNQy3BlIpSMfNRj3Ujk2BEJxsZG+HZf7/hZ6jr7mDpXrF8q+ff95Vef5yjhiZxm8CGJr6Q==", "requires": { "define-properties": "^1.1.3" } @@ -7160,14 +9482,33 @@ "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz", "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=" }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "dev": true + } } }, "domain-browser": { @@ -7183,27 +9524,35 @@ "dev": true }, "domexception": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", - "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, "requires": { - "webidl-conversions": "^4.0.2" + "webidl-conversions": "^5.0.0" } }, "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "^2.2.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + } } }, "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { "dom-serializer": "0", @@ -7211,18 +9560,18 @@ } }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "dotenv": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.1.0.tgz", - "integrity": "sha512-GUE3gqcDCaMltj2++g6bRQ5rBJWtkWTmqmD0fo1RnnMuUqHNCt2oTPeDnS9n6fKYvlhn7AeBkb38lymBtWBQdA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", "dev": true }, "dotenv-expand": { @@ -7258,10 +9607,17 @@ "dev": true, "optional": true }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "optional": true, "requires": { @@ -7278,27 +9634,41 @@ } }, "downshift": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/downshift/-/downshift-4.1.0.tgz", - "integrity": "sha512-GODZOZC65a8n8YD/S/87hR2t5PJfqZ7+lwEBJsNi/AJnhImfle+CFD/ZPde4l+nB8QNHfn0GbE1W9djEFOj1yQ==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/downshift/-/downshift-6.1.7.tgz", + "integrity": "sha512-cVprZg/9Lvj/uhYRxELzlu1aezRcgPWBjTvspiGTVEU64gF5pRdSRKFVLcxqsZC637cLAGMbL40JavEfWnqgNg==", "requires": { - "@babel/runtime": "^7.4.5", - "compute-scroll-into-view": "^1.0.9", + "@babel/runtime": "^7.14.8", + "compute-scroll-into-view": "^1.0.17", "prop-types": "^15.7.2", - "react-is": "^16.9.0" + "react-is": "^17.0.2", + "tslib": "^2.3.0" }, "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, "duplexer": { - "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, "duplexer3": { @@ -7333,19 +9703,12 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", - "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", - "dev": true + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.166", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.166.tgz", - "integrity": "sha512-7XwtJz81H/PBnkmQ/07oVPOGTkBZs6ibZN8OqXNUrxjRPzR0Xj+MFcMmRZEXGilEg1Pm+97V8BZVI63qnBX1hQ==", + "version": "1.3.740", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.740.tgz", + "integrity": "sha512-Mi2m55JrX2BFbNZGKYR+2ItcGnR4O5HhrvgoRRyZQlaMGQULqDhoGkLWHzJoshSzi7k1PUofxcDbNhlFrDZNhg==", "dev": true }, "element-closest": { @@ -7354,69 +9717,159 @@ "integrity": "sha1-cqdAoQdFM4LijfnOXbtajfD5Zuw=" }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } } }, + "emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, + "emotion": { + "version": "10.0.27", + "resolved": "https://registry.npmjs.org/emotion/-/emotion-10.0.27.tgz", + "integrity": "sha512-2xdDzdWWzue8R8lu4G76uWX5WhyQuzATon9LmNeCy/2BHVC6dsEpfhN1a0qhELgtDVdjyEA6J8Y/VlI5ZnaH0g==", + "requires": { + "babel-plugin-emotion": "^10.0.27", + "create-emotion": "^10.0.27" + } + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "requires": { - "iconv-lite": "~0.4.13" + "iconv-lite": "^0.6.2" } }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" } }, + "engine.io": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.1.1.tgz", + "integrity": "sha512-t2E9wLlssQjGw0nluF6aYyfX8LwYU8Jj0xct+pAhfWfv/YrBn6TSNtEYsgxHIfaMqfrLx07czcMg9bMN6di+3w==", + "requires": { + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~4.0.0", + "ws": "~7.4.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "engine.io-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz", + "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==", + "requires": { + "base64-arraybuffer": "0.1.4" + } + }, "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", + "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", + "memory-fs": "^0.5.0", "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", "dev": true }, "enzyme": { @@ -7447,223 +9900,27 @@ "raf": "^3.4.1", "rst-selector-parser": "^2.2.3", "string.prototype.trim": "^1.2.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "object-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", - "dev": true - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - } - } - }, - "enzyme-adapter-react-16": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.2.tgz", - "integrity": "sha512-SkvDrb8xU3lSxID8Qic9rB8pvevDbLybxPK6D/vW7PrT0s2Cl/zJYuXvsd1EBTz0q4o3iqG3FJhpYz3nUNpM2Q==", - "dev": true, - "requires": { - "enzyme-adapter-utils": "^1.13.0", - "enzyme-shallow-equal": "^1.0.1", - "has": "^1.0.3", - "object.assign": "^4.1.0", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "react-is": "^16.12.0", - "react-test-renderer": "^16.0.0-0", - "semver": "^5.7.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - } - } - }, - "enzyme-adapter-utils": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.13.0.tgz", - "integrity": "sha512-YuEtfQp76Lj5TG1NvtP2eGJnFKogk/zT70fyYHXK2j3v6CtuHqc8YmgH/vaiBfL8K1SgVVbQXtTcgQZFwzTVyQ==", - "dev": true, - "requires": { - "airbnb-prop-types": "^2.15.0", - "function.prototype.name": "^1.1.2", - "object.assign": "^4.1.0", - "object.fromentries": "^2.0.2", - "prop-types": "^15.7.2", - "semver": "^5.7.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "enzyme-shallow-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.1.tgz", - "integrity": "sha512-hGA3i1so8OrYOZSM9whlkNmVHOicJpsjgTzC+wn2JMJXhq1oO4kA4bJ5MsfzSIcC71aLDKzJ6gZpIxrqt3QTAQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", + "integrity": "sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q==", "dev": true, "requires": { "has": "^1.0.3", - "object-is": "^1.0.2" - }, - "dependencies": { - "object-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", - "dev": true - } + "object-is": "^1.1.2" } }, "enzyme-to-json": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.4.4.tgz", - "integrity": "sha512-50LELP/SCPJJGic5rAARvU7pgE3m1YaNj7JLM+Qkhl5t7PAs6fiyc8xzc50RnkKPFQCv0EeFVjEWdIFRGPWMsA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.6.2.tgz", + "integrity": "sha512-Ynm6Z6R6iwQ0g2g1YToz6DWhxVnt8Dy1ijR2zynRKxTyBGA8rCDXU3rs2Qc4OKvUvc2Qoe1bcFK6bnPs20TrTg==", "dev": true, "requires": { - "lodash": "^4.17.15", + "@types/cheerio": "^0.22.22", + "lodash": "^4.17.21", "react-is": "^16.12.0" - }, - "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - } } }, "equivalent-key-map": { @@ -7672,22 +9929,21 @@ "integrity": "sha512-xvHeyCDbZzkpN4VHQj/n+j2lOwL0VWszG30X4cOrc9Y7Tuo2qCdZK/0AMod23Z5dCtNUbaju6p0rwOhHUk05ew==" }, "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "dev": true, "requires": { "prr": "~1.0.1" } }, "error": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", - "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", "dev": true, "requires": { - "string-template": "~0.2.1", - "xtend": "~4.0.0" + "string-template": "~0.2.1" } }, "error-ex": { @@ -7699,39 +9955,48 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, "escape-string-regexp": { "version": "1.0.5", @@ -7739,126 +10004,144 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", - "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { "esprima": "^4.0.1", - "estraverse": "^4.2.0", + "estraverse": "^5.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" }, "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } } } }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "@babel/highlight": "^7.10.4" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "ms": "^2.1.1" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "doctrine": { @@ -7870,251 +10153,670 @@ "esutils": "^2.0.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "shebang-regex": "^3.0.0" } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "ansi-regex": "^5.0.0" } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true } } }, "eslint-config-prettier": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", - "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz", + "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==", + "dev": true }, - "eslint-plugin-jest": { - "version": "22.21.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.21.0.tgz", - "integrity": "sha512-OaqnSS7uBgcGiqXUiEnjoqxPNKvR4JWG5mSRkzVoR6+vDwlqqp11beeql1hYs0HTbdhiwrxWLxbX0Vx7roG3Ew==", + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "^1.13.0" + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + } } }, - "eslint-plugin-jsdoc": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.12.2.tgz", - "integrity": "sha512-QHzPc3VKTEbTn369/HpqDjl/czv3fCei/bZg5NA5tu9Od10MfpTH4kc1xnRDobhQoDs3AMz9wuaI4coHWRzMQw==", + "eslint-module-utils": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", "dev": true, "requires": { - "comment-parser": "^0.6.2", - "debug": "^4.1.1", - "jsdoctypeparser": "^5.1.1", - "lodash": "^4.17.15", - "object.entries-ponyfill": "^1.0.1", - "regextras": "^0.6.1" + "debug": "^3.2.7", + "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } } } }, - "eslint-plugin-jsx-a11y": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz", - "integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.5", - "aria-query": "^3.0.0", - "array-includes": "^3.0.3", - "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.2", - "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^7.0.2", - "has": "^1.0.3", - "jsx-ast-utils": "^2.2.1" - } - }, - "eslint-plugin-prettier": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", - "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-plugin-react": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz", - "integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==", + "eslint-plugin-import": { + "version": "2.24.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz", + "integrity": "sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==", "dev": true, "requires": { - "array-includes": "^3.1.1", + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", + "debug": "^2.6.9", "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.6.2", + "find-up": "^2.0.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.2.3", - "object.entries": "^1.1.1", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.15.1", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.2", - "xregexp": "^4.3.0" + "is-core-module": "^2.6.0", + "minimatch": "^3.0.4", + "object.values": "^1.1.4", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.11.0" }, "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "locate-path": "^2.0.0" } }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", "dev": true, "requires": { "has": "^1.0.3" } }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "es-abstract": "^1.18.2" } }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "p-try": "^1.0.0" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true - } - } - }, + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, + "eslint-plugin-jest": { + "version": "24.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz", + "integrity": "sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "^4.0.1" + } + }, + "eslint-plugin-jsdoc": { + "version": "34.8.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.8.2.tgz", + "integrity": "sha512-UOU9A40Cl806JMtla2vF+RM6sNqfLPbhLv9FZqhcC7+LmChD3DVaWqM7ADxpF0kMyZNWe1QKUnqGnXaA3NTn+w==", + "dev": true, + "requires": { + "@es-joy/jsdoccomment": "^0.6.0", + "comment-parser": "1.1.5", + "debug": "^4.3.1", + "esquery": "^1.4.0", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.21", + "regextras": "^0.7.1", + "semver": "^7.3.5", + "spdx-expression-parse": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-plugin-jsx-a11y": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", + "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.11.2", + "aria-query": "^4.2.2", + "array-includes": "^3.1.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.6", + "emoji-regex": "^9.0.0", + "has": "^1.0.3", + "jsx-ast-utils": "^3.1.0", + "language-tags": "^1.0.5" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + } + } + }, + "eslint-plugin-markdown": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.2.tgz", + "integrity": "sha512-BfvXKsO0K+zvdarNc801jsE/NTLmig4oKhZ1U3aSUgTf2dB/US5+CrfGxMsCK2Ki1vS1R3HPok+uYpufFndhzw==", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "remark-parse": "^5.0.0", + "unified": "^6.1.2" + } + }, + "eslint-plugin-prettier": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", + "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-react": { + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.25.1.tgz", + "integrity": "sha512-P4j9K1dHoFXxDNP05AtixcJEvIT6ht8FhYKsrkY0MPCPaUMYijhpWwNiRDZVtA8KFuZOkGSeft6QwH8KuVpJug==", + "dev": true, + "requires": { + "array-includes": "^3.1.3", + "array.prototype.flatmap": "^1.2.4", + "doctrine": "^2.1.0", + "estraverse": "^5.2.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.0.4", + "object.entries": "^1.1.4", + "object.fromentries": "^2.0.4", + "object.values": "^1.1.4", + "prop-types": "^15.7.2", + "resolve": "^2.0.0-next.3", + "string.prototype.matchall": "^4.0.5" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } + } + }, + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + } + }, + "resolve": { + "version": "2.0.0-next.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", + "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, "eslint-plugin-react-hooks": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz", - "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz", + "integrity": "sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==", "dev": true }, "eslint-scope": { @@ -8128,35 +10830,41 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^2.0.0" } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true } } @@ -8168,35 +10876,43 @@ "dev": true }, "esquery": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", - "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { - "estraverse": "^5.0.0" + "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", - "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { @@ -8211,10 +10927,15 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, + "ev-emitter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-1.1.1.tgz", + "integrity": "sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==" + }, "event-source-polyfill": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/event-source-polyfill/-/event-source-polyfill-0.0.9.tgz", - "integrity": "sha1-GMYgXRcKsJ24if/OqjPw5JPxSlA=" + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/event-source-polyfill/-/event-source-polyfill-1.0.24.tgz", + "integrity": "sha512-aEtMhrH5ww3X6RgbsNcwu0whw8zjOoeRnwPqRKqKuxWS5KlAZhCY+rTm6wMlHOXbxmLGn8lW6Xox7rfpBExzGA==" }, "event-target-shim": { "version": "5.0.1", @@ -8228,20 +10949,14 @@ "dev": true }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", - "dev": true - }, - "eventie": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/eventie/-/eventie-1.0.6.tgz", - "integrity": "sha1-1P/IsMK15JPCqhsiy+kY067nRDc=" + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "dev": true }, "eventsource": { @@ -8277,6 +10992,29 @@ "tempfile": "^2.0.0" }, "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -8287,34 +11025,63 @@ } }, "exec-sh": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", - "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", + "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", "dev": true }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, - "optional": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", + "cross-spawn": "^6.0.0", + "get-stream": "^4.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" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "execall": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz", - "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", + "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", "dev": true, "requires": { - "clone-regexp": "^1.0.0" + "clone-regexp": "^2.1.0" } }, "executable": { @@ -8357,6 +11124,15 @@ "to-regex": "^3.0.1" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -8374,6 +11150,12 @@ "requires": { "is-extendable": "^0.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -8387,29 +11169,44 @@ } }, "expect": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", - "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "ansi-styles": "^3.2.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.9.0" + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } - } - } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } }, "expect-puppeteer": { "version": "4.4.0", @@ -8453,6 +11250,35 @@ "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } } }, "ext-list": { @@ -8479,8 +11305,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "3.0.2", @@ -8504,14 +11329,25 @@ } }, "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", "tmp": "^0.0.33" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } } }, "extglob": { @@ -8578,23 +11414,34 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } }, "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } } }, "extsprintf": { @@ -8609,9 +11456,9 @@ "integrity": "sha512-k8FXd6+JeXoItmdNqB3hMwFgArryjdYBLuzEM8fRY/oztd/051yhSHU6GUrMOfIQU9dDHyFDcIAkGrQKlYtpDA==" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-diff": { @@ -8621,23 +11468,73 @@ "dev": true }, "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", - "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } } }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { @@ -8651,10 +11548,21 @@ "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==" }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==" + }, "fastq": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", - "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -8678,51 +11586,92 @@ "bser": "2.1.1" } }, - "fbjs": { - "version": "0.8.17", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", - "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" - } - }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { "pend": "~1.2.0" } }, + "fetch-blob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-2.1.2.tgz", + "integrity": "sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==" + }, "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", "dev": true }, "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } } }, "file-sync-cmp": { @@ -8737,12 +11686,18 @@ "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", "dev": true }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", - "dev": true, - "optional": true + "dev": true }, "filenamify": { "version": "2.1.0", @@ -8756,12 +11711,6 @@ "trim-repeated": "^1.0.0" } }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -8789,7 +11738,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -8798,6 +11746,21 @@ "parseurl": "~1.3.3", "statuses": "~1.5.0", "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, "find-cache-dir": { @@ -8822,9 +11785,9 @@ } }, "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.1.tgz", + "integrity": "sha512-o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A==", "dev": true }, "find-pkg": { @@ -8837,44 +11800,21 @@ } }, "find-process": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/find-process/-/find-process-1.4.3.tgz", - "integrity": "sha512-+IA+AUsQCf3uucawyTwMWcY+2M3FXq3BRvw3S+j5Jvydjk31f/+NPWpYZOJs+JUs2GvxH4Yfr6Wham0ZtRLlPA==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/find-process/-/find-process-1.4.4.tgz", + "integrity": "sha512-rRSuT1LE4b+BFK588D2V8/VG9liW0Ark1XJgroxZXI0LtwmQJOb490DvDYvbm+Hek9ETFzTutGfJ90gumITPhQ==", "dev": true, "requires": { - "chalk": "^2.0.1", - "commander": "^2.11.0", - "debug": "^2.6.8" + "chalk": "^4.0.0", + "commander": "^5.1.0", + "debug": "^4.1.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true } } }, @@ -8892,57 +11832,23 @@ } }, "find-versions": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.1.0.tgz", - "integrity": "sha512-NCTfNiVzeE/xL+roNDffGuRbrWI6atI18lTJ22vKp7rs2OhYzMK3W1dIdO2TUndH/QMcacM4d1uWwgcZcHK69Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", "dev": true, "optional": true, "requires": { - "array-uniq": "^2.1.0", "semver-regex": "^2.0.0" - }, - "dependencies": { - "array-uniq": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-2.1.0.tgz", - "integrity": "sha512-bdHxtev7FN6+MXI1YFW0Q8mQ8dTJc2S8AMfju+ZR77pbg2yAdVyDlwkaUI7Har0LyOMRFPHrJ9lYdyjZZswdlQ==", - "dev": true, - "optional": true - } - } - }, - "findup": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/findup/-/findup-0.1.5.tgz", - "integrity": "sha1-itkpozk7rGJ5V6fl3kYjsGsOLOs=", - "dev": true, - "requires": { - "colors": "~0.6.0-1", - "commander": "~2.1.0" - }, - "dependencies": { - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - }, - "commander": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", - "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=", - "dev": true - } } }, "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", "dev": true, "requires": { "detect-file": "^1.0.0", - "is-glob": "^3.1.0", + "is-glob": "^4.0.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" }, @@ -8980,15 +11886,6 @@ "which": "^1.2.14" } }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, "resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -8998,33 +11895,81 @@ "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, - "fizzy-ui-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fizzy-ui-utils/-/fizzy-ui-utils-1.0.1.tgz", - "integrity": "sha1-qkEGZB51O8ilzqAQMVskiYyTRAw=", + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, "requires": { - "desandro-matches-selector": "~1.0.2", - "doc-ready": "~1.0.3" + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + } + } + }, + "fizzy-ui-utils": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz", + "integrity": "sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==", + "requires": { + "desandro-matches-selector": "^2.0.0" } }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, "flush-write-stream": { @@ -9038,30 +11983,9 @@ } }, "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", - "dev": true, - "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "for-in": { "version": "1.0.2", @@ -9096,9 +12020,13 @@ } }, "formdata-polyfill": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-3.0.13.tgz", - "integrity": "sha512-aYrFSz9wxtBc9E1yCfD5IFhTK9FDZVRM53kUQn1W6Et5+R9c4tpa5Mg9hQIBIc2er3fLx0ElbKujipu+2551vQ==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.0.tgz", + "integrity": "sha512-sBVj9czlZu7nOjbHDZa3IqNT/OCs5JR45G5FW4B7ZthDpcfqIl9CCFbLXYSEh/5YDIr0cZaFEBzHaGs1o2hCgA==", + "requires": { + "fetch-blob": "*", + "karma": "^6.3.2" + } }, "forwarded": { "version": "0.1.2", @@ -9106,6 +12034,12 @@ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", "dev": true }, + "fraction.js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", + "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==", + "dev": true + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -9115,6 +12049,41 @@ "map-cache": "^0.2.2" } }, + "framer-motion": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-4.1.17.tgz", + "integrity": "sha512-thx1wvKzblzbs0XaK2X0G1JuwIdARcoNOW7VVwjO8BUltzXPyONGAElLu6CiCScsOQRI7FIk/45YTFtJw5Yozw==", + "requires": { + "@emotion/is-prop-valid": "^0.8.2", + "framesync": "5.3.0", + "hey-listen": "^1.0.8", + "popmotion": "9.3.6", + "style-value-types": "4.1.4", + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "framesync": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-5.3.0.tgz", + "integrity": "sha512-oc5m68HDO/tuK2blj7ZcdEBRx3p1PjrgHazL8GYEpvULhrtGIFbQArN6cQS2QhW8mitffaB+VYzMjDqBxxQeoA==", + "requires": { + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -9142,8 +12111,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true, - "optional": true + "dev": true }, "fs-exists-sync": { "version": "0.1.0", @@ -9152,14 +12120,32 @@ "dev": true }, "fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "dependencies": { + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0" + "minipass": "^3.0.0" } }, "fs-write-stream-atomic": { @@ -9180,624 +12166,112 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", + "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "function.prototype.name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.4.tgz", + "integrity": "sha512-iqy1pIotY/RmhdFZygSSlW0wko2yxkSCKqsuv4pr8QESohpYyG/Z7B/XXvPRKTJS//960rgguE5mSRUsDdaJrQ==", "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "functions-have-names": "^1.2.2" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { + "call-bind": { "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "requires": { - "minimatch": "^3.0.4" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } } }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "requires": { - "brace-expansion": "^1.1.7" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "function.prototype.name": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.2.tgz", - "integrity": "sha512-C8A+LlHBJjB2AdcRPorc5JvJ5VUoWlXdEHLOJdCI7kjHEtGTpHQUiqMvCIKUwIsGwZX2jZJy761AXsn356bJQg==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "functions-have-names": "^1.2.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } } } @@ -9809,62 +12283,9 @@ "dev": true }, "functions-have-names": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.1.tgz", - "integrity": "sha512-j48B/ZI7VKs3sgeI2cZp7WXWmZXu7Iq5pl5/vptV5N2mq+DGFuS/ulaDjtaoLpYzuD6u8UgrUKHfgo7fDTSiBA==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.2.tgz", + "integrity": "sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==" }, "gaze": { "version": "1.1.3", @@ -9876,15 +12297,30 @@ } }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-intrinsic": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, "get-proxy": { @@ -9898,25 +12334,24 @@ } }, "get-size": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-size/-/get-size-1.2.2.tgz", - "integrity": "sha1-v8PvHQGeNFCMmU+jJ9GDwoddYuY=", - "requires": { - "desandro-get-style-property": "^1" - } + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz", + "integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==" }, "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", "dev": true }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, - "optional": true + "requires": { + "pump": "^3.0.0" + } }, "get-value": { "version": "2.0.6", @@ -9925,9 +12360,9 @@ "dev": true }, "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.0.tgz", + "integrity": "sha512-tbUz6AKKKr2YiMB+fLWIgq5ZeBOobop9YMMAU9dC54/ot2ksMXt3DOFyBuhZw6ptcVszEykgByK20j7W9jHFag==", "dev": true }, "getpass": { @@ -9942,71 +12377,29 @@ "gettext-parser": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.4.0.tgz", - "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==", - "requires": { - "encoding": "^0.1.12", - "safe-buffer": "^5.1.1" - } - }, - "gifsicle": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", - "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", - "dev": true, - "optional": true, - "requires": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "execa": "^1.0.0", - "logalot": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "optional": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "optional": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "optional": true, - "requires": { - "pump": "^3.0.0" - } - } + "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==", + "requires": { + "encoding": "^0.1.12", + "safe-buffer": "^5.1.1" + } + }, + "gifsicle": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-4.0.1.tgz", + "integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==", + "dev": true, + "optional": true, + "requires": { + "bin-build": "^3.0.0", + "bin-wrapper": "^4.0.0", + "execa": "^1.0.0", + "logalot": "^2.0.0" } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -10017,24 +12410,11 @@ } }, "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } + "is-glob": "^4.0.1" } }, "glob-to-regexp": { @@ -10087,6 +12467,15 @@ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -10096,134 +12485,30 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true + }, "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" }, "dependencies": { - "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "fast-glob": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", - "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" - }, - "dependencies": { - "merge2": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", - "dev": true - } - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -10233,10 +12518,16 @@ "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", "dev": true }, + "globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "dev": true, "requires": { "glob": "~7.1.1", @@ -10244,21 +12535,19 @@ "minimatch": "~3.0.2" } }, + "glur": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/glur/-/glur-1.1.2.tgz", + "integrity": "sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok=", + "dev": true + }, "gonzales-pe": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.4.tgz", - "integrity": "sha512-v0Ts/8IsSbh9n1OJRnSfa7Nlxi4AkXIsWB6vPept8FDbL4bXn3FNuxjYtO/nmBGu7GDkL9MFeGebeSu6l55EPQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", + "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", "dev": true, "requires": { - "minimist": "1.1.x" - }, - "dependencies": { - "minimist": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", - "integrity": "sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag=", - "dev": true - } + "minimist": "^1.2.5" } }, "good-listener": { @@ -10290,19 +12579,27 @@ "timed-out": "^4.0.0", "url-parse-lax": "^1.0.0", "url-to-options": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + } } }, "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true, - "optional": true + "dev": true }, "gradient-parser": { "version": "0.1.5", @@ -10313,31 +12610,30 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true + "dev": true, + "optional": true }, "grunt": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.4.tgz", - "integrity": "sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.4.1.tgz", + "integrity": "sha512-ZXIYXTsAVrA7sM+jZxjQdrBOAg7DyMUplOMhTaspMRExei+fD0BTwdWXnn0W5SXqhb/Q/nlkzXclSi3IH55PIA==", "dev": true, "requires": { - "coffeescript": "~1.10.0", - "dateformat": "~1.0.12", + "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", - "exit": "~0.1.1", + "exit": "~0.1.2", "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", - "grunt-known-options": "~1.1.0", - "grunt-legacy-log": "~2.0.0", - "grunt-legacy-util": "~1.1.1", + "glob": "~7.1.6", + "grunt-cli": "~1.4.2", + "grunt-known-options": "~2.0.0", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.1", "iconv-lite": "~0.4.13", - "js-yaml": "~3.13.0", - "minimatch": "~3.0.2", - "mkdirp": "~0.5.1", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.6.2" + "rimraf": "~3.0.2" }, "dependencies": { "findup-sync": { @@ -10364,37 +12660,60 @@ } } }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "grunt-cli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "grunt-known-options": "~2.0.0", + "interpret": "~1.1.0", + "liftup": "~3.0.1", + "nopt": "~4.0.1", + "v8flags": "~3.2.0" + }, + "dependencies": { + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + } } }, - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } } } }, @@ -10405,6 +12724,48 @@ "dev": true, "requires": { "chalk": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "grunt-contrib-clean": { @@ -10425,6 +12786,48 @@ "requires": { "chalk": "^1.0.0", "source-map": "^0.5.3" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "grunt-contrib-copy": { @@ -10435,54 +12838,104 @@ "requires": { "chalk": "^1.1.1", "file-sync-cmp": "^0.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "grunt-contrib-cssmin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-3.0.0.tgz", - "integrity": "sha512-eXpooYmVGKMs/xV7DzTLgJFPVOfMuawPD3x0JwhlH0mumq2NtH3xsxaHxp1Y3NKxp0j0tRhFS6kSBRsz6TuTGg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-4.0.0.tgz", + "integrity": "sha512-jXU+Zlk8Q8XztOGNGpjYlD/BDQ0n95IHKrQKtFR7Gd8hZrzgqiG1Ra7cGYc8h2DD9vkSFGNlweb9Q00rBxOK2w==", "dev": true, "requires": { - "chalk": "^2.4.1", - "clean-css": "~4.2.1", - "maxmin": "^2.1.0" + "chalk": "^4.1.0", + "clean-css": "^5.0.1", + "maxmin": "^3.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "escape-string-regexp": "^1.0.5" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "duplexer": "^0.1.1", + "pify": "^4.0.1" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "maxmin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", + "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "chalk": "^4.1.0", + "figures": "^3.2.0", + "gzip-size": "^5.1.1", + "pretty-bytes": "^5.3.0" } + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true } } }, "grunt-contrib-imagemin": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-imagemin/-/grunt-contrib-imagemin-3.1.0.tgz", - "integrity": "sha512-c0duAb018eowVVfqNMN0S5Esx8mRZ1OP/hkEoKnJkOCaD9/DywKGvLuhschF+DByPSs4k1u1y38w9Bt+ihJG8A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-imagemin/-/grunt-contrib-imagemin-4.0.0.tgz", + "integrity": "sha512-2GYQBQFfJLjeTThJ8E7+vLgvgfOh78u0bgieIK85c2Rv9V6ssd2AvBvuF7T26mK261EN/SlNefpW5+zGWzfrVw==", "dev": true, "requires": { "chalk": "^2.4.1", @@ -10496,15 +12949,6 @@ "pretty-bytes": "^5.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -10516,95 +12960,105 @@ "supports-color": "^5.3.0" } }, - "pretty-bytes": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz", - "integrity": "sha512-hjGrh+P926p4R4WbaB6OckyRtO0F0/lQBiT+0gnxjV+5kjPBrfVBFCsCLbMqVQeydvIoouYTCmmEURiH3R1Bdg==", + "irregular-plurals": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", + "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "plur": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", + "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "irregular-plurals": "^2.0.0" } + }, + "pretty-bytes": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.5.0.tgz", + "integrity": "sha512-p+T744ZyjjiaFlMUZZv6YPC5JrkNj8maRmPaQCWFJFplUAzpIUTRaTcS+7wmZtUoFXHtESJb23ISliaWyz3SHA==", + "dev": true } } }, "grunt-contrib-jshint": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", - "integrity": "sha512-65S2/C/6RfjY/umTxfwXXn+wVvaYmykHkHSsW6Q6rhkbv3oudTEgqnFFZvWzWCoHUb+3GMZLbP3oSrNyvshmIQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-3.0.0.tgz", + "integrity": "sha512-o0V3HNK54+w2Lss/AP0LsAUCEmPDQIcgsDFvTy0sE8sdPXq/8vHdNdMEitK9Wcfoq7H6v02v6soiiwJ0wavT7A==", "dev": true, "requires": { - "chalk": "^2.4.2", + "chalk": "^4.1.0", "hooker": "^0.2.3", - "jshint": "~2.10.2" + "jshint": "~2.12.0" + } + }, + "grunt-contrib-qunit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-qunit/-/grunt-contrib-qunit-4.0.0.tgz", + "integrity": "sha512-XP9Ks+uoSQzic0eic6koD8kYAKQnSYfu2G1HBqvrvUyXaDDnSSXOKELND8j7dwudnJj4N6KgW6OU7AHeM5PGKA==", + "dev": true, + "requires": { + "eventemitter2": "^6.4.2", + "p-each-series": "^2.1.0", + "puppeteer": "^4.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } + "eventemitter2": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.3.tgz", + "integrity": "sha512-t0A2msp6BzOf+QAcI6z9XMktLj52OjGQg+8SJH6v5+3uxNpWYRR3wQmfA+6xtMU9kOC59qk9licus5dYcrYkMQ==", + "dev": true }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "puppeteer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-4.0.1.tgz", + "integrity": "sha512-LIiSWTRqpTnnm3R2yAoMBx1inSeKwVZy66RFSkgSTDINzheJZPd5z5mMbPM0FkvwWAZ27a+69j5nZf+Fpyhn3Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "debug": "^4.1.0", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^4.0.0", + "mime": "^2.0.3", + "mitt": "^2.0.1", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "glob": "^7.1.3" } } } }, - "grunt-contrib-qunit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-qunit/-/grunt-contrib-qunit-1.3.0.tgz", - "integrity": "sha1-naxijP1OyBWZhjPbc7Ur2z3byZ4=", - "dev": true, - "requires": { - "grunt-lib-phantomjs": "^1.0.0" - } - }, "grunt-contrib-uglify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.1.tgz", - "integrity": "sha512-dwf8/+4uW1+7pH72WButOEnzErPGmtUvc8p08B0eQS/6ON0WdeQu0+WFeafaPTbbY1GqtS25lsHWaDeiTQNWPg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.0.1.tgz", + "integrity": "sha512-T/aXZ4WIpAtoswZqb6HROKg7uq9QbKwl+lUuOwK4eoFj3tFv9/a/oMyd3/qvetV29Pbf8P1YYda1gDwZppr60A==", "dev": true, "requires": { "chalk": "^2.4.1", "maxmin": "^2.1.0", - "uglify-js": "^3.5.0", + "uglify-js": "^3.13.3", "uri-path": "^1.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -10615,15 +13069,6 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -10652,27 +13097,46 @@ "dev": true }, "grunt-jsdoc": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/grunt-jsdoc/-/grunt-jsdoc-2.4.0.tgz", - "integrity": "sha512-JpZd1W7HbK0sHbpiL9+VyDFwZlkYoDQMaP+v6z1R23W/NYLoqJM76L9eBOr7O6NycqtddRHN5DzlSkW45MJ82w==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/grunt-jsdoc/-/grunt-jsdoc-2.4.1.tgz", + "integrity": "sha512-S0zxU0wDewRu7z+vijEItOWe/UttxWVmvz0qz2ZVcAYR2GpXjsiski2CAVN0b18t2qeVLdmxZkJaEWCOsKzcAw==", "dev": true, "requires": { - "cross-spawn": "^6.0.5", - "jsdoc": "~3.6.0" + "cross-spawn": "^7.0.1", + "jsdoc": "^3.6.3" }, "dependencies": { "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true } } }, @@ -10694,196 +13158,68 @@ } }, "grunt-known-options": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", - "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true }, "grunt-legacy-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", - "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, "requires": { "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.5" - } - }, - "grunt-legacy-log-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", - "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", - "dev": true, - "requires": { - "chalk": "~2.4.1", - "lodash": "~4.17.10" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "grunt-legacy-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", - "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", - "dev": true, - "requires": { - "async": "~1.5.2", - "exit": "~0.1.1", - "getobject": "~0.1.0", + "grunt-legacy-log-utils": "~2.1.0", "hooker": "~0.2.3", - "lodash": "~4.17.10", - "underscore.string": "~3.3.4", - "which": "~1.3.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "grunt-lib-phantomjs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-lib-phantomjs/-/grunt-lib-phantomjs-1.1.0.tgz", - "integrity": "sha1-np7c3Z/S3UDgwYHJQ3HVcqpe6tI=", - "dev": true, - "requires": { - "eventemitter2": "^0.4.9", - "phantomjs-prebuilt": "^2.1.3", - "rimraf": "^2.5.2", - "semver": "^5.1.0", - "temporary": "^0.0.8" + "lodash": "~4.17.19" } }, - "grunt-patch-wordpress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-patch-wordpress/-/grunt-patch-wordpress-2.0.0.tgz", - "integrity": "sha512-9iCcgsZjBY6XPT25yFkln+7o/roy3zwF+RfrTZaTNVGXR1eEVWIPfjF0DJKMTvaqVIPXQyUq2uJ7/D65rAxiuA==", - "dev": true, - "requires": { - "grunt": "^1.0.3", - "inquirer": "^5.1.0", - "request": "^2.83.0", - "xmlrpc": "^1.3.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "grunt-legacy-log-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", + "dev": true, + "requires": { + "chalk": "~4.1.0", + "lodash": "~4.17.19" + } + }, + "grunt-legacy-util": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", + "dev": true, + "requires": { + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" + }, + "dependencies": { + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", "dev": true } } }, + "grunt-patch-wordpress": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/grunt-patch-wordpress/-/grunt-patch-wordpress-3.0.1.tgz", + "integrity": "sha512-jdeqk/r0hSPez2Afgj+Zz8R6tFYDyhNKTNZvJIE5lAqmkms2ox4a+UfbZWhf9ObFb+Q4JYKIXqJruGzujzmYgA==", + "dev": true, + "requires": { + "grunt": "^1.0.3", + "inquirer": "^5.1.0", + "request": "^2.83.0", + "xmlrpc": "^1.3.1" + } + }, "grunt-postcss": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz", @@ -10895,15 +13231,6 @@ "postcss": "^6.0.11" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -10915,6 +13242,12 @@ "supports-color": "^5.3.0" } }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "postcss": { "version": "6.0.23", "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", @@ -10931,15 +13264,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -10953,16 +13277,100 @@ "file-sync-cmp": "^0.1.0", "lodash": "^4.17.15", "next-applause": "^2.2.4" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "grunt-rtlcss": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-rtlcss/-/grunt-rtlcss-2.0.1.tgz", - "integrity": "sha1-6eYc5DdAY5f546Sxv2aeR+cf/MM=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/grunt-rtlcss/-/grunt-rtlcss-2.0.2.tgz", + "integrity": "sha512-WbI2thnwlF04N+xvJu+NxqEaCyPuLyar196SYhEQFZ2EJHkOS8YYE+Zkh+X9cWhwAtKp7ZEpR/IKXcyQggOIsQ==", "dev": true, "requires": { "chalk": "^1.0.0", "rtlcss": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "grunt-sass": { @@ -10972,29 +13380,28 @@ "dev": true }, "grunt-webpack": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-3.1.3.tgz", - "integrity": "sha512-SaZ8K8lG4iTxs7ClZxOWCf3kxqS2y+Eel8SbaEGgBKwhAp6e45beIu+vhBZRLX3vonKML2kjemKsQ21REaqNFQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-4.0.3.tgz", + "integrity": "sha512-hRnTf7y9pe4K+M/AKUJFgHykZeyIOUHhZSMVD0/jF/uXphMCen7txPIz8IOnJoa6bX0JrpoueOwo7FgS/OtC2Q==", "dev": true, "requires": { - "deep-for-each": "^2.0.2", - "lodash": "^4.7.0" + "deep-for-each": "^3.0.0", + "lodash": "^4.17.19" } }, "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", "dev": true, "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" + "duplexer": "^0.1.2" } }, "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", "dev": true }, "har-schema": { @@ -11004,12 +13411,12 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -11044,6 +13451,11 @@ } } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -11057,9 +13469,9 @@ "optional": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-to-string-tag-x": { "version": "1.4.1", @@ -11071,11 +13483,20 @@ "has-symbol-support-x": "^1.4.1" } }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + } + } }, "has-value": { "version": "1.0.0", @@ -11110,13 +13531,27 @@ } }, "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "hash.js": { @@ -11129,22 +13564,22 @@ "minimalistic-assert": "^1.0.1" } }, - "hasha": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", - "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", - "dev": true, - "requires": { - "is-stream": "^1.0.1", - "pinkie-promise": "^2.0.0" - } - }, "hex-color-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", "dev": true }, + "hey-listen": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", + "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + }, + "highlight-words-core": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/highlight-words-core/-/highlight-words-core-1.2.2.tgz", + "integrity": "sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg==" + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -11179,16 +13614,10 @@ "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", "dev": true }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", - "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", - "dev": true - }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "hoverintent": { @@ -11229,30 +13658,44 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", - "dev": true + "dev": true, + "optional": true }, "html-element-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.2.0.tgz", - "integrity": "sha512-0uXq8HsuG1v2TmQ8QkIhzbrqeskE4kn52Q18QJ9iAA/SnHoEKXWiUxHQtclRsCFWEUD2So34X+0+pZZu862nnw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", + "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", "dev": true, "requires": { - "array-filter": "^1.0.0" + "array.prototype.filter": "^1.0.0", + "call-bind": "^1.0.2" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } } }, "html-encoding-sniffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, "requires": { - "whatwg-encoding": "^1.0.1" + "whatwg-encoding": "^1.0.5" } }, "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", "dev": true }, "html-escaper": { @@ -11262,9 +13705,9 @@ "dev": true }, "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", + "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", "dev": true }, "html5shiv": { @@ -11273,28 +13716,43 @@ "integrity": "sha1-14qEo2e8uacQEA1XgCw4ewhGMdI=" }, "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", "dev": true, "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" } } } @@ -11316,7 +13774,6 @@ "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -11328,28 +13785,48 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", "dev": true }, "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", - "dev": true, + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "requires": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + } + } + }, "http-proxy-middleware": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", @@ -11387,39 +13864,33 @@ "requires": { "agent-base": "5", "debug": "4" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "dev": true }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", @@ -11427,9 +13898,15 @@ "dev": true }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "ignore-emit-webpack-plugin": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/ignore-emit-webpack-plugin/-/ignore-emit-webpack-plugin-2.0.6.tgz", + "integrity": "sha512-/zC18RWCC2wz4ZwnS4UoujGWzvSKy28DLjtE+jrGBOXej6YdmityhBDzE8E0NlktEqi4tgdNbydX8B6G4haHSQ==", "dev": true }, "imagemin": { @@ -11446,6 +13923,12 @@ "replace-ext": "^1.0.0" }, "dependencies": { + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, "dir-glob": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", @@ -11456,6 +13939,41 @@ "path-type": "^3.0.0" } }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "globby": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", @@ -11501,6 +14019,29 @@ "dev": true } } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true } } }, @@ -11541,48 +14082,104 @@ } }, "imagemin-svgo": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.0.0.tgz", - "integrity": "sha512-+iGJFaPIMx8TjFW6zN+EkOhlqcemdL7F3N3Y0wODvV2kCUBuUtZK7DRZc1+Zfu4U2W/lTMUyx2G8YMOrZntIWg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", + "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", "dev": true, "optional": true, "requires": { - "is-svg": "^3.0.0", - "svgo": "^1.0.5" + "is-svg": "^4.2.1", + "svgo": "^1.3.2" + }, + "dependencies": { + "is-svg": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.1.tgz", + "integrity": "sha512-PHx3ANecKsKNl5y5+Jvt53Y4J7MfMpbNZkv384QNiswMKAWIbvcqbPz+sYbFKJI8Xv3be01GSFniPmoaP+Ai5A==", + "dev": true, + "optional": true, + "requires": { + "html-comment-regex": "^1.1.2" + } + } } }, "imagesloaded": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/imagesloaded/-/imagesloaded-3.2.0.tgz", - "integrity": "sha1-MffAhA3udxhM5v+ega5Rk29OU4Q=", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/imagesloaded/-/imagesloaded-4.1.4.tgz", + "integrity": "sha512-ltiBVcYpc/TYTF5nolkMNsnREHW+ICvfQ3Yla2Sgr71YFwQ86bDwV9hgpFhFtrGPuwEx5+LqOHIrdXBdoWwwsA==", "requires": { - "eventie": "~1.0.4", - "wolfy87-eventemitter": ">=4.2 <5.0" + "ev-emitter": "^1.0.0" } }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", "dev": true }, "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", "dev": true, "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } } }, "imurmurhash": { @@ -11591,17 +14188,15 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true - }, "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "optional": true, + "requires": { + "repeating": "^2.0.0" + } }, "indexes-of": { "version": "1.0.1", @@ -11630,9 +14225,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "ink-docstrap": { @@ -11646,186 +14241,76 @@ } }, "inquirer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", - "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", - "cli-cursor": "^3.1.0", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", "through": "^2.3.6" }, "dependencies": { "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "dev": true, - "requires": { - "type-fest": "^0.11.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "color-name": "~1.1.4" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "run-async": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", - "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "has-flag": "^4.0.0" + "ansi-regex": "^3.0.0" } - }, - "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", - "dev": true } } }, @@ -11846,85 +14331,33 @@ } }, "internal-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz", - "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==", - "dev": true, + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", "requires": { - "es-abstract": "^1.17.0-next.1", + "get-intrinsic": "^1.1.0", "has": "^1.0.3", - "side-channel": "^1.0.2" + "side-channel": "^1.0.4" }, "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "requires": { - "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" + "has-symbols": "^1.0.1" } } } }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, - "intersection-observer": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.4.3.tgz", - "integrity": "sha512-sRobbVo/+DVGkbco/UkuREmXSr5ypWeQ7S7tYDhzIIP3NFtAHLkkFYdivFAIgNe4sfDYBFAjxEgUyxiEmA/dgQ==" - }, - "intl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/intl/-/intl-1.2.5.tgz", - "integrity": "sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94=" - }, "into-stream": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", @@ -11932,34 +14365,10 @@ "dev": true, "optional": true, "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - }, - "dependencies": { - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", - "dev": true, - "optional": true - } - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -11972,17 +14381,27 @@ "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, "irregular-plurals": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", - "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz", + "integrity": "sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==", "dev": true }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -12004,12 +14423,6 @@ "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", "dev": true }, - "is-alphanumeric": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", - "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=", - "dev": true - }, "is-alphanumerical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", @@ -12021,30 +14434,54 @@ } }, "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" } }, "is-boolean-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.0.1.tgz", - "integrity": "sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } }, "is-buffer": { "version": "1.1.6", @@ -12052,9 +14489,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" }, "is-ci": { "version": "2.0.0", @@ -12079,6 +14516,14 @@ "rgba-regex": "^1.0.0" } }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -12089,9 +14534,9 @@ } }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" }, "is-decimal": { "version": "1.0.4", @@ -12124,6 +14569,13 @@ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "optional": true + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -12133,17 +14585,14 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "optional": true }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -12170,7 +14619,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -12195,6 +14643,11 @@ "dev": true, "optional": true }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -12205,21 +14658,23 @@ } }, "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true, "optional": true }, @@ -12269,25 +14724,40 @@ "dev": true, "optional": true }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "requires": { - "has": "^1.0.1" + "has-symbols": "^1.0.1" } }, "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", + "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", "dev": true }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", @@ -12304,13 +14774,16 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-subset": { "version": "0.1.1", @@ -12318,27 +14791,12 @@ "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", "dev": true }, - "is-supported-regexp-flag": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz", - "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, "is-touch-device": { @@ -12352,6 +14810,21 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "is-url": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", @@ -12402,6 +14875,11 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isbinaryfile": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", + "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -12414,15 +14892,6 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -12430,24 +14899,21 @@ "dev": true }, "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "requires": { - "@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" + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" }, "dependencies": { "semver": { @@ -12459,55 +14925,59 @@ } }, "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" }, "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", + "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12517,12 +14987,13 @@ } }, "istanbul-reports": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", - "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", "dev": true, "requires": { - "html-escaper": "^2.0.0" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" } }, "isurl": { @@ -12537,153 +15008,178 @@ } }, "jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", - "integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", "dev": true, "requires": { - "import-local": "^2.0.0", - "jest-cli": "^24.9.0" + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "color-name": "~1.1.4" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "jest-cli": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", - "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", "dev": true, "requires": { - "@jest/core": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", "exit": "^0.1.2", - "import-local": "^2.0.0", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", "prompts": "^2.0.1", - "realpath-native": "^1.1.0", - "yargs": "^13.3.0" + "yargs": "^15.4.1" } }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "p-limit": "^2.2.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "ansi-regex": "^5.0.0" } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -12693,107 +15189,199 @@ } }, "jest-changed-files": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", - "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "execa": "^1.0.0", - "throat": "^4.0.0" + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" }, "dependencies": { "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" } }, "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true } } }, + "jest-circus": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.6.3.tgz", + "integrity": "sha512-ACrpWZGcQMpbv13XbzRzpytEJlilP/Su0JtNCi5r/xLpOUhnaIJr8leYYpLEMgPFURZISEHrnnpmB54Q/UziPw==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "stack-utils": "^2.0.2", + "throat": "^5.0.0" + } + }, "jest-config": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", - "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.9.0", - "@jest/types": "^24.9.0", - "babel-jest": "^24.9.0", - "chalk": "^2.0.1", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", "glob": "^7.1.1", - "jest-environment-jsdom": "^24.9.0", - "jest-environment-node": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "micromatch": "^3.1.10", - "pretty-format": "^24.9.0", - "realpath-native": "^1.1.0" + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "to-regex-range": "^5.0.1" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" } } } @@ -12814,12 +15402,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -12848,6 +15435,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12855,688 +15448,671 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" } + }, + "wait-on": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-3.3.0.tgz", + "integrity": "sha512-97dEuUapx4+Y12aknWZn7D25kkjMk16PbWoYzpSdA8bYpVfS6hpl2a2pOWZ3c+Tyt3/i4/pglyZctG3J4V1hWQ==", + "dev": true, + "requires": { + "@hapi/joi": "^15.0.3", + "core-js": "^2.6.5", + "minimist": "^1.2.0", + "request": "^2.88.0", + "rx": "^4.1.0" + } } } }, "jest-diff": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", "dev": true, "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, "jest-docblock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", - "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", "dev": true, "requires": { - "detect-newline": "^2.1.0" + "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", - "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" } }, "jest-environment-jsdom": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", - "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0", - "jsdom": "^11.5.1" + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" } }, "jest-environment-node": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", - "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0" + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" } }, - "jest-environment-puppeteer": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/jest-environment-puppeteer/-/jest-environment-puppeteer-4.4.0.tgz", - "integrity": "sha512-iV8S8+6qkdTM6OBR/M9gKywEk8GDSOe05hspCs5D8qKSwtmlUfdtHfB4cakdc68lC6YfK3AUsLirpfgodCHjzQ==", + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", "dev": true, "requires": { - "chalk": "^3.0.0", - "cwd": "^0.10.0", - "jest-dev-server": "^4.4.0", - "merge-deep": "^3.0.2" + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" }, "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "to-regex-range": "^5.0.1" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { - "color-name": "~1.1.4" + "braces": "^3.0.1", + "picomatch": "^2.2.3" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "is-number": "^7.0.0" } } } }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "jest-haste-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", - "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "anymatch": "^2.0.0", - "fb-watchman": "^2.0.0", - "fsevents": "^1.2.7", - "graceful-fs": "^4.1.15", - "invariant": "^2.2.4", - "jest-serializer": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.9.0", - "micromatch": "^3.1.10", - "sane": "^4.0.3", - "walker": "^1.0.7" - } - }, - "jest-jasmine2": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", - "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", + "jest-image-snapshot": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jest-image-snapshot/-/jest-image-snapshot-3.0.1.tgz", + "integrity": "sha512-bW8eYxgAVyO8cNLlTt15wd5YiWvRfzQyNQ4K8FKHUEPasQADEZ5NzaWmnOpSdh3/NLYoH++TMp6o/rRVLpOIkQ==", "dev": true, "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "co": "^4.6.0", - "expect": "^24.9.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0", - "throat": "^4.0.0" + "chalk": "^1.1.3", + "get-stdin": "^5.0.1", + "glur": "^1.1.2", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "pixelmatch": "^5.1.0", + "pngjs": "^3.4.0", + "rimraf": "^2.6.2" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "has-flag": "^3.0.0" + "ansi-regex": "^2.0.0" } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, + "jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" + } + }, "jest-leak-detector": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", - "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", "dev": true, "requires": { - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, "jest-matcher-utils": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", "dev": true, "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, "jest-message-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", - "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/stack-utils": "^1.0.1", - "chalk": "^2.0.1", - "micromatch": "^3.1.10", - "slash": "^2.0.0", - "stack-utils": "^1.0.1" + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "to-regex-range": "^5.0.1" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" } } } }, "jest-mock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", - "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", "dev": true, "requires": { - "@jest/types": "^24.9.0" + "@jest/types": "^26.6.2", + "@types/node": "*" } }, "jest-pnp-resolver": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", - "integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", "dev": true }, - "jest-puppeteer": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/jest-puppeteer/-/jest-puppeteer-4.4.0.tgz", - "integrity": "sha512-ZaiCTlPZ07B9HW0erAWNX6cyzBqbXMM7d2ugai4epBDKpKvRDpItlRQC6XjERoJELKZsPziFGS0OhhUvTvQAXA==", - "dev": true, - "requires": { - "expect-puppeteer": "^4.4.0", - "jest-environment-puppeteer": "^4.4.0" - } - }, "jest-regex-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", - "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", "dev": true }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", - "jest-pnp-resolver": "^1.2.1", - "realpath-native": "^1.1.0" + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "p-locate": "^4.1.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" } } } }, "jest-resolve-dependencies": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", - "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.9.0" + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" } }, "jest-runner": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", - "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", "dev": true, "requires": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.4.2", + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-leak-detector": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", "source-map-support": "^0.5.6", - "throat": "^4.0.0" + "throat": "^5.0.0" + } + }, + "jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" }, "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "color-name": "~1.1.4" } - } - } - }, - "jest-runtime": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", - "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", - "dev": true, - "requires": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "strip-bom": "^3.0.0", - "yargs": "^13.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "p-locate": "^4.1.0" } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "p-limit": "^2.2.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -13546,240 +16122,195 @@ } }, "jest-serializer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", - "integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", - "dev": true + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + } }, "jest-snapshot": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", - "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "expect": "^24.9.0", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "mkdirp": "^0.5.1", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", "natural-compare": "^1.4.0", - "pretty-format": "^24.9.0", - "semver": "^6.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^26.6.2", + "semver": "^7.3.2" } }, "jest-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", - "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", "dev": true, "requires": { - "@jest/console": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/source-map": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "callsites": "^3.0.0", - "chalk": "^2.0.1", - "graceful-fs": "^4.1.15", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", - "mkdirp": "^0.5.1", - "slash": "^2.0.0", - "source-map": "^0.6.0" + "micromatch": "^4.0.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "to-regex-range": "^5.0.1" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" } } } }, "jest-validate": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", - "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "camelcase": "^5.3.1", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", "leven": "^3.1.0", - "pretty-format": "^24.9.0" + "pretty-format": "^26.6.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true } } }, "jest-watcher": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", - "integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "jest-util": "^24.9.0", - "string-length": "^2.0.0" + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, - "jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "joi": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz", + "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==", "dev": true, "requires": { - "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.0", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" }, "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "@hapi/hoek": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz", + "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==", + "dev": true + }, + "@hapi/topo": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", + "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "@hapi/hoek": "^9.0.0" } } } @@ -13797,56 +16328,35 @@ } }, "jquery": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", - "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" }, "jquery-color": { - "version": "https://github.com/jquery/jquery-color/archive/2.1.2.tar.gz", - "integrity": "sha512-9aNJaaV4BIEznUUvTtxSomQZYwmX+nt7qPcCSZEz9XFWfjOKgPOyq0brsWKlkUx45m5j+8CW5xHWJXG/qgvDDw==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jquery-color/-/jquery-color-2.2.0.tgz", + "integrity": "sha512-4VoxsLMw860EQGNT/TmP3Lbr7/1OCQlBPS4ILj7bxRApJrPQfpqzdIOTY8Ll9nGY7UHtWqDuzR7cUcS1lcWjVw==" }, "jquery-form": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.2.1.tgz", - "integrity": "sha1-hn00Fct3uOciOqpwHw5IHdFq1cI=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz", + "integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==", "requires": { - "jquery": ">=1.7" + "jquery": ">=1.7.2" } }, "jquery-hoverintent": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/jquery-hoverintent/-/jquery-hoverintent-1.8.3.tgz", - "integrity": "sha512-vxxq6pCpUYM0bmgYP+28YT2B31B4eURsmap0orQQwH2BgZCc9UV99ZsP2bO/X9szh9FWPS2JaucROMGHjsbolg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/jquery-hoverintent/-/jquery-hoverintent-1.10.1.tgz", + "integrity": "sha512-PNZAVnNcuIB5MDmZPWK7H2lQINRJ4Z8+EGLseIZd/gnd5Q9W3dBOKv0vKG7WPFxG2/Na1YX0/soeufucO6bCJQ==", "requires": { "jquery": ">=1.7.0" } }, - "jquery-migrate": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-1.4.1.tgz", - "integrity": "sha1-hRUvPsmalWJfT30Lz2LpuGOPWnY=", - "dev": true - }, - "jquery-ui": { - "version": "https://github.com/jquery/jquery-ui/archive/1.11.4.tar.gz", - "integrity": "sha512-yMLXNruSte8iAAOsShJvUdcwgrHbWrxBCoKfPGqDmgFkfNLbnXoHcyxgOvI2IbgfupFF2paOm0AvOq6iERedKQ==" - }, - "js-base64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", - "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", - "dev": true - }, "js-polyfills": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/js-polyfills/-/js-polyfills-0.1.42.tgz", - "integrity": "sha1-XUhJArNh489gH9I60PMLr8yT8Ug=" - }, - "js-reporters": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/js-reporters/-/js-reporters-1.2.1.tgz", - "integrity": "sha1-+IxgjjJKM3OpW8xFrTBeXJecRZs=", - "dev": true + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/js-polyfills/-/js-polyfills-0.1.43.tgz", + "integrity": "sha512-wWCJcw7uMA12uk7qcqZlIQy9nj+Evh1wVUmn5MOlJ7GPC8HT5PLjB9Uiqjw9ldAbbOuNOWJ6ENb7NwU6qqf48g==" }, "js-tokens": { "version": "4.0.0", @@ -13854,9 +16364,9 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -13864,12 +16374,12 @@ } }, "js2xmlparser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.0.tgz", - "integrity": "sha512-WuNgdZOXVmBk5kUPMcTcVUpbGRzLfNkv7+7APq7WiDihpXVKrgxo6wwRpRl9OQeEBgKCVk9mR7RbzrnNWC8oBw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", + "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", "dev": true, "requires": { - "xmlcreate": "^2.0.0" + "xmlcreate": "^2.0.3" } }, "jsbn": { @@ -13879,96 +16389,126 @@ "dev": true }, "jsdoc": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.3.tgz", - "integrity": "sha512-Yf1ZKA3r9nvtMWHO1kEuMZTlHOF8uoQ0vyo5eH7SQy5YeIiHM+B0DgKnn+X6y6KDYZcF7G2SPkKF+JORCXWE/A==", + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", "dev": true, "requires": { - "@babel/parser": "^7.4.4", - "bluebird": "^3.5.4", - "catharsis": "^0.8.11", + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.0", + "js2xmlparser": "^4.0.1", "klaw": "^3.0.0", - "markdown-it": "^8.4.2", - "markdown-it-anchor": "^5.0.2", - "marked": "^0.7.0", - "mkdirp": "^0.5.1", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", "requizzle": "^0.2.3", - "strip-json-comments": "^3.0.1", + "strip-json-comments": "^3.1.0", "taffydb": "2.6.2", - "underscore": "~1.9.1" + "underscore": "~1.13.1" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true + }, + "jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" }, "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", "dev": true }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "debug": "4" } }, - "strip-json-comments": { + "form-data": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "dev": true } } }, - "jsdoctypeparser": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-5.1.1.tgz", - "integrity": "sha512-APGygIJrT5bbz5lsVt8vyLJC0miEbQf/z9ZBfTr4RYvdia8AhWMRlYgivvwHG5zKD/VW3d6qpChCy64hpQET3A==", - "dev": true - }, - "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", - "dev": true, - "requires": { - "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", - "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", - "domexception": "^1.0.1", - "escodegen": "^1.9.1", - "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", - "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", - "w3c-hr-time": "^1.0.1", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", - "xml-name-validator": "^3.0.0" - } - }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -13976,21 +16516,30 @@ "dev": true }, "jshint": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.2.tgz", - "integrity": "sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.12.0.tgz", + "integrity": "sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==", "dev": true, "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", "exit": "0.1.x", "htmlparser2": "3.8.x", - "lodash": "~4.17.11", + "lodash": "~4.17.19", "minimatch": "~3.0.2", "shelljs": "0.3.x", "strip-json-comments": "1.0.x" }, "dependencies": { + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, "domhandler": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", @@ -14000,6 +16549,16 @@ "domelementtype": "1" } }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", @@ -14061,7 +16620,13 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema": { "version": "0.2.3", @@ -14099,20 +16664,12 @@ "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" }, "json5": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", - "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } + "minimist": "^1.2.0" } }, "jsonc-parser": { @@ -14122,12 +16679,12 @@ "dev": true }, "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", + "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.1.6", + "universalify": "^0.1.2" } }, "jsprim": { @@ -14143,26 +16700,205 @@ } }, "jsx-ast-utils": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", - "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz", + "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==", "dev": true, "requires": { - "array-includes": "^3.0.3", - "object.assign": "^4.1.0" + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" } }, "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", - "dev": true - }, - "kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", - "dev": true + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "karma": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.2.tgz", + "integrity": "sha512-fo4Wt0S99/8vylZMxNj4cBFyOBBnC1bewZ0QOlePij/2SZVWxqbyLeIddY13q6URa2EpLRW8ixvFRUMjkmo1bw==", + "requires": { + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.4.2", + "colors": "^1.4.0", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.6", + "graceful-fs": "^4.2.4", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.6", + "lodash": "^4.17.19", + "log4js": "^6.2.1", + "mime": "^2.4.5", + "minimatch": "^3.0.4", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^3.1.0", + "source-map": "^0.6.1", + "tmp": "0.2.1", + "ua-parser-js": "^0.7.23", + "yargs": "^16.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "requires": { + "rimraf": "^3.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==" + } + } }, "keyv": { "version": "3.0.0", @@ -14189,9 +16925,9 @@ } }, "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", "dev": true, "requires": { "graceful-fs": "^4.1.9" @@ -14203,39 +16939,37 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, - "known-css-properties": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", - "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==", + "klona": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", "dev": true }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + "known-css-properties": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz", + "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==", + "dev": true }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "requires": { - "readable-stream": "^2.0.5" - } + "language-subtag-registry": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", + "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==", + "dev": true }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "language-subtag-registry": "~0.3.2" } }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, "leven": { "version": "3.1.0", @@ -14243,23 +16977,145 @@ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "leven": "^3.1.0" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "liftup": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", + "dev": true, + "requires": { + "extend": "^3.0.2", + "findup-sync": "^4.0.0", + "fined": "^1.2.0", + "flagged-respawn": "^1.0.1", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.1", + "rechoir": "^0.7.0", + "resolve": "^1.19.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "line-height": { @@ -14291,22 +17147,41 @@ "dev": true }, "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" }, "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } } } }, @@ -14317,31 +17192,14 @@ "dev": true }, "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "dev": true, "requires": { "big.js": "^5.2.2", - "emojis-list": "^2.0.0", + "emojis-list": "^3.0.0", "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } } }, "locate-path": { @@ -14354,9 +17212,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.clonedeep": { "version": "4.5.0", @@ -14364,16 +17222,28 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.differencewith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.differencewith/-/lodash.differencewith-4.5.0.tgz", + "integrity": "sha1-uvr7yRi1UVTheRdqALsK76rIVLc=", + "dev": true + }, "lodash.escape": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=", "dev": true }, - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", "dev": true }, "lodash.flattendeep": { @@ -14400,34 +17270,22 @@ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", "dev": true }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.mergewith": { + "lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", - "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, "lodash.uniq": { @@ -14437,42 +17295,31 @@ "dev": true }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "log4js": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", + "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "requires": { + "date-format": "^3.0.0", + "debug": "^4.1.1", + "flatted": "^2.0.1", + "rfdc": "^1.1.4", + "streamroller": "^2.2.4" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" } } }, @@ -14485,25 +17332,12 @@ "requires": { "figures": "^1.3.5", "squeak": "^1.0.0" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "optional": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - } } }, "loglevel": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.4.tgz", - "integrity": "sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", + "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", "dev": true }, "longest": { @@ -14530,6 +17364,7 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, + "optional": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -14555,112 +17390,21 @@ "meow": "^3.3.0" }, "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true, - "optional": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, "get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true, "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "optional": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "optional": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "optional": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true, - "optional": true - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "optional": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "optional": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "optional": true } } }, "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "yallist": "^4.0.0" } }, "make-dir": { @@ -14671,6 +17415,31 @@ "requires": { "pify": "^4.0.1", "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } } }, "makeerror": { @@ -14682,21 +17451,6 @@ "tmpl": "1.0.x" } }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -14704,9 +17458,9 @@ "dev": true }, "map-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", - "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true }, "map-values": { @@ -14730,45 +17484,103 @@ "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", "dev": true }, - "markdown-it": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + } + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true + }, + "markdownlint": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.18.0.tgz", + "integrity": "sha512-nQAfK9Pbq0ZRoMC/abNGterEnV3kL8MZmi0WHhw8WJKoIbsm3cXGufGsxzCRvjW15cxe74KWcxRSKqwplS26Bw==", "dev": true, "requires": { - "argparse": "^1.0.7", - "entities": "~1.1.1", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "markdown-it": "10.0.0" } }, - "markdown-it-anchor": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.4.tgz", - "integrity": "sha512-n8zCGjxA3T+Mx1pG8HEgbJbkB8JFUuRkeTZQuIM8iPY6oQ8sWOPRZJDFC9a/pNg2QkHEjjGkhBEl/RSyzaDZ3A==", - "dev": true + "markdownlint-cli": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.21.0.tgz", + "integrity": "sha512-gvnczz3W3Wgex851/cIQ/2y8GNhY+EVK8Ael8kRd8hoSQ0ps9xjhtwPwMyJPoiYbAoPxG6vSBFISiysaAbCEZg==", + "dev": true, + "requires": { + "commander": "~2.9.0", + "deep-extend": "~0.5.1", + "get-stdin": "~5.0.1", + "glob": "~7.1.2", + "ignore": "~5.1.4", + "js-yaml": "~3.13.1", + "jsonc-parser": "~2.2.0", + "lodash.differencewith": "~4.5.0", + "lodash.flatten": "~4.4.0", + "markdownlint": "~0.18.0", + "markdownlint-rule-helpers": "~0.6.0", + "minimatch": "~3.0.4", + "rc": "~1.2.7" + }, + "dependencies": { + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } }, - "markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "markdownlint-rule-helpers": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.6.0.tgz", + "integrity": "sha512-LiZVAbg9/cqkBHtLNNqHV3xuy4Y2L/KuGU6+ZXqCT9NnCdEkIoxeI5/96t+ExquBY0iHy2CVWxPH16nG1RKQVQ==", "dev": true }, "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", - "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.6.tgz", + "integrity": "sha512-S2mYj0FzTQa0dLddssqwRVW4EOJOVJ355Xm2Vcbm+LU7GQRGWvwbO5K87OaPSOux2AwTSgtPPaXmc8sDPrhn2A==", "dev": true }, "masonry-layout": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/masonry-layout/-/masonry-layout-3.3.2.tgz", - "integrity": "sha1-uQwMClCaXtKoBrvIqBEokKdjQbo=", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/masonry-layout/-/masonry-layout-4.2.2.tgz", + "integrity": "sha512-iGtAlrpHNyxaR19CvKC3npnEcAwszXoyJiI8ARV2ePi7fmYhIud25MHK8Zx4P0LCC4d3TNO9+rFa1KoK1OEOaA==", "requires": { - "fizzy-ui-utils": "^1.0.1", - "get-size": "~1.2.2", - "outlayer": "~1.4.0" + "get-size": "^2.0.2", + "outlayer": "^2.1.0" } }, "matchdep": { @@ -14781,6 +17593,81 @@ "micromatch": "^3.0.4", "resolve": "^1.4.0", "stack-trace": "0.0.10" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "mathml-tag-names": { @@ -14801,14 +17688,29 @@ "pretty-bytes": "^3.0.0" }, "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "gzip-size": { @@ -14819,6 +17721,21 @@ "requires": { "duplexer": "^0.1.1" } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, @@ -14833,19 +17750,84 @@ "safe-buffer": "^5.1.2" } }, - "mdast-util-compact": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz", - "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==", + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", "dev": true, "requires": { - "unist-util-visit": "^1.1.0" + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "dependencies": { + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + } + } + }, + "mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "dependencies": { + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + } } }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", "dev": true }, "mdurl": { @@ -14857,27 +17839,7 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - } - } + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "memize": { "version": "1.1.0", @@ -14894,118 +17856,29 @@ "readable-stream": "^2.0.1" } }, - "meow": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.0.tgz", - "integrity": "sha512-iIAoeI01v6pmSfObAAWFoITAA4GgiT45m4SmJgoxtZfvI0fyZwhV4d0lTwiUXvAKIPlma05Feb2Xngl52Mj5Cg==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.1.1", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.0.0", - "minimist-options": "^4.0.1", - "normalize-package-data": "^2.5.0", - "read-pkg-up": "^7.0.0", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.8.1", - "yargs-parser": "^18.1.1" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - } - }, - "yargs-parser": { - "version": "18.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz", - "integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "optional": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" } }, "merge-deep": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.2.tgz", - "integrity": "sha512-T7qC8kg4Zoti1cFd8Cr0M+qaZfOwjlPDEdZIIPPB2JZctjaPM4fX+i7HOId69tAti2fvO6X5ldfYUONDODsrkA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -15026,9 +17899,9 @@ "dev": true }, "merge2": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "methods": { "version": "1.1.2", @@ -15036,6 +17909,32 @@ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", "dev": true }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + }, + "dependencies": { + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + } + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -15065,6 +17964,11 @@ } } }, + "micromodal": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.6.tgz", + "integrity": "sha512-2VDso2a22jWPpqwuWT/4RomVpoU3Bl9qF9D01xzwlNp5UVsImeA0gY4nSpF44vqcQtQOtkiMUV9EZkAJSRxBsg==" + }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -15073,33 +17977,38 @@ "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } } }, "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", - "dev": true + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.7.tgz", + "integrity": "sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA==" }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", "requires": { - "mime-db": "1.40.0" + "mime-db": "1.45.0" } }, "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "mimic-response": { @@ -15110,11 +18019,61 @@ "optional": true }, "min-indent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.0.tgz", - "integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, + "mini-css-extract-plugin": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", + "integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -15136,18 +18095,74 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "minimist-options": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.0.2.tgz", - "integrity": "sha512-seq4hpWkYSUh1y7NXxzucwAN9yVlBc3Upgdjz8vLCP97jG8kaOmzYrVH/m7tQ1NYD1wdtZbSLfdy4zFmRWuc/w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "requires": { "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" } }, "mississippi": { @@ -15168,6 +18183,12 @@ "through2": "^2.0.0" } }, + "mitt": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-2.1.0.tgz", + "integrity": "sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==", + "dev": true + }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -15208,36 +18229,37 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, - "mkpath": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", - "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=", + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "mnemonist": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.27.2.tgz", - "integrity": "sha512-dJOzzaEZtSR23m8e/kTg0SNvV9WdDeYwRFQwT/6yb79z2rwXnd6L2xZkUBuArmBOug7xoKfImk/In1TC/Ry8lg==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.3.tgz", + "integrity": "sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw==", "requires": { - "obliterator": "^1.5.0" + "obliterator": "^1.6.1" } }, "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" }, "moment-timezone": { - "version": "0.5.28", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.28.tgz", - "integrity": "sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw==", + "version": "0.5.33", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz", + "integrity": "sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==", "requires": { "moment": ">= 2.9.0" } @@ -15268,10 +18290,9 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "multicast-dns": { "version": "6.2.3", @@ -15290,9 +18311,9 @@ "dev": true }, "mutationobserver-shim": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz", - "integrity": "sha512-gciOLNN8Vsf7YzcqRjKzlAJ6y7e+B86u7i3KXes0xfxx/nfLmozlW1Vn+Sc9x3tPIePFgc1AeIFhtRgkqTjzDQ==" + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/mutationobserver-shim/-/mutationobserver-shim-0.3.7.tgz", + "integrity": "sha512-oRIDTyZQU96nAiz2AQyngwx1e89iApl2hN5AOYwyxLUB47UYsU3Wv9lJWqH5y/QdiYkc5HQLi23ZNB3fELdHcQ==" }, "mute-stream": { "version": "0.0.7", @@ -15301,9 +18322,16 @@ "dev": true }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, + "nanoid": { + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", + "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", "dev": true }, "nanomatch": { @@ -15340,28 +18368,26 @@ "dev": true }, "nearley": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.19.1.tgz", - "integrity": "sha512-xq47GIUGXxU9vQg7g/y1o1xuKnkO7ev4nRWqftmQrLkfnE/FjRqDaGOUakM8XHPn/6pW3bGjU2wgoJyId90rqg==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", "dev": true, "requires": { "commander": "^2.19.0", "moo": "^0.5.0", "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6", - "semver": "^5.4.1" + "randexp": "0.4.6" } }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "next-applause": { @@ -15382,18 +18408,27 @@ "dev": true }, "nise": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", - "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" }, "dependencies": { + "@sinonjs/fake-timers": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.1.tgz", + "integrity": "sha512-am34LJf0N2nON/PT9G7pauA+xjcwX9P6x31m4hBgfUeSXYRZBRv/R6EcdWs8iV4XJjPO++NTsrj7ua/cN2s6ZA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -15412,48 +18447,17 @@ } }, "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", "dev": true }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - } - } - }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -15489,6 +18493,25 @@ "url": "^0.11.0", "util": "^0.11.0", "vm-browserify": "^1.0.1" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, "node-modules-regexp": { @@ -15498,154 +18521,42 @@ "dev": true }, "node-notifier": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", - "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", "dev": true, + "optional": true, "requires": { "growly": "^1.3.0", - "is-wsl": "^1.1.0", - "semver": "^5.5.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", "shellwords": "^0.1.1", - "which": "^1.3.0" - } - }, - "node-releases": { - "version": "1.1.23", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.23.tgz", - "integrity": "sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "node-sass": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", - "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", - "dev": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash": "^4.17.15", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "uuid": "^8.3.0", + "which": "^2.0.2" }, "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, + "optional": true, "requires": { - "get-stdin": "^4.0.1" + "is-docker": "^2.0.0" } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true } } }, + "node-releases": { + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==", + "dev": true + }, "node-watch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.6.1.tgz", - "integrity": "sha512-gwQiR7weFRV8mAtT0x0kXkZ18dfRLB45xH7q0hCOVQMLfLb2f1ZaSvR57q4/b/Vj6B0RwMNJYbvb69e1yM7qEA==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.7.1.tgz", + "integrity": "sha512-UWblPYuZYrkCQCW5PxAwYSxaELNBLUckrTBBk8xr1/bUgyOkYYTsUcV4e3ytcazFEOyiRyiUrsG37pu6I0I05g==", "dev": true }, "nopt": { @@ -15667,13 +18578,20 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "normalize-range": { "version": "0.1.2", @@ -15687,11 +18605,10 @@ "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", "dev": true }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true + "normalize-wheel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", + "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" }, "npm-conf": { "version": "1.1.3", @@ -15714,54 +18631,58 @@ } }, "npm-package-json-lint": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.6.0.tgz", - "integrity": "sha512-opoykADMeyGN2UuvypIYpysUXO4wdAYc8DPklO86kxF1YfxHnTXdEzm0K7BGE5CbEu6lweELQgvFej53din5xg==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-5.2.3.tgz", + "integrity": "sha512-rSgc4eVhtfwrU7AWwovqFWy8OEkgQL99vD3vWJmqtU9gxxJxKzi6Wqgo3gF7lhrBpyVcnlKxy/L2JCsvjWruDA==", "dev": true, "requires": { - "ajv": "^6.11.0", + "ajv": "^6.12.6", "ajv-errors": "^1.0.1", - "chalk": "^3.0.0", - "cosmiconfig": "^5.2.1", - "debug": "^4.1.1", - "globby": "^10.0.1", - "ignore": "^5.1.4", - "is-plain-obj": "^2.1.0", - "jsonc-parser": "^2.2.0", - "log-symbols": "^3.0.0", - "meow": "^6.0.0", - "plur": "^3.1.1", - "semver": "^7.1.2", + "chalk": "^4.1.2", + "cosmiconfig": "^6.0.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "ignore": "^5.1.8", + "is-plain-obj": "^3.0.0", + "jsonc-parser": "^2.3.1", + "log-symbols": "^4.1.0", + "meow": "^6.1.1", + "plur": "^4.0.0", + "semver": "^7.3.5", "slash": "^3.0.0", - "strip-json-comments": "^3.0.1" + "strip-json-comments": "^3.1.1" }, "dependencies": { - "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "color-convert": "^2.0.1" } }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" } }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -15784,19 +18705,37 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", - "dev": true + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } }, "has-flag": { "version": "4.0.0", @@ -15804,50 +18743,176 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true + }, + "jsonc-parser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", + "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true }, + "meow": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", + "integrity": "sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "^4.0.2", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "semver": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", - "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "slash": { + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "redent": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" } + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true + }, + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -15860,18 +18925,6 @@ "path-key": "^2.0.0" } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, "nth-check": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", @@ -15939,14 +18992,18 @@ "dev": true }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" }, "object-is": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", - "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz", + "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } }, "object-keys": { "version": "1.1.1", @@ -15963,154 +19020,300 @@ } }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } } }, "object.entries": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", - "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", + "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==", "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.2" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, + "object.fromentries": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.4.tgz", + "integrity": "sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", "has": "^1.0.3" }, "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } } } }, - "object.entries-ponyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.entries-ponyfill/-/object.entries-ponyfill-1.0.1.tgz", - "integrity": "sha1-Kavfd8v70mVm3RqiTp2I9lQz0lY=", - "dev": true - }, - "object.fromentries": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", - "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", + "object.getownpropertydescriptors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", + "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "es-abstract": "^1.18.0-next.1" }, "dependencies": { "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } } } }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } } }, "object.pick": { @@ -16123,20 +19326,46 @@ } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, + "objectFitPolyfill": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/objectFitPolyfill/-/objectFitPolyfill-2.3.5.tgz", + "integrity": "sha512-8Quz071ZmGi0QWEG4xB3Bv5Lpw6K0Uca87FLoLMKMWjB6qIq9IyBegP3b/VLNxv2WYvIMGoeUQ+c6ibUkNa8TA==" + }, "obliterator": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-1.6.0.tgz", - "integrity": "sha512-I0vjq7/v64B/mwb+wLXqAHySbSBWg6pibrpVBfsX2azEweF3Ant7tlVzgwDDaIubyG36eciPBlVXGCMa/ZHb1g==" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-1.6.1.tgz", + "integrity": "sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig==" }, "obuf": { "version": "1.1.2", @@ -16148,7 +19377,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, "requires": { "ee-first": "1.1.1" } @@ -16168,18 +19396,18 @@ } }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "^2.1.0" } }, "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true }, "opn": { @@ -16192,17 +19420,17 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "optipng-bin": { @@ -16248,71 +19476,6 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - } - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -16330,17 +19493,13 @@ } }, "outlayer": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/outlayer/-/outlayer-1.4.2.tgz", - "integrity": "sha1-bT81+QeMLLdyqb7JOLXqL8dSv0M=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/outlayer/-/outlayer-2.1.1.tgz", + "integrity": "sha1-KYY7beEOpdrf/8rfoNcokHOH6aI=", "requires": { - "desandro-get-style-property": "~1.0.4", - "desandro-matches-selector": "~1.0.2", - "doc-ready": "1.0.x", - "eventie": "~1.0.3", - "fizzy-ui-utils": "~1.0.1", - "get-size": "~1.2.2", - "wolfy87-eventemitter": ">=4.2 <5" + "ev-emitter": "^1.0.0", + "fizzy-ui-utils": "^2.0.0", + "get-size": "^2.0.2" } }, "p-cancelable": { @@ -16350,20 +19509,11 @@ "dev": true, "optional": true }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-each-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", - "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", - "dev": true, - "requires": { - "p-reduce": "^1.0.0" - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true }, "p-event": { "version": "1.3.0", @@ -16382,15 +19532,16 @@ "dev": true }, "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true, + "optional": true }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { "p-try": "^2.0.0" } @@ -16404,9 +19555,9 @@ } }, "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, "p-map-series": { @@ -16429,7 +19580,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true + "dev": true, + "optional": true }, "p-retry": { "version": "3.0.1", @@ -16455,25 +19607,19 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, - "package": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package/-/package-1.0.1.tgz", - "integrity": "sha1-0lofmeJQbcsn1nBLg9yooxLk7cw=", - "dev": true - }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "dev": true, "requires": { - "cyclist": "~0.2.2", + "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } @@ -16487,14 +19633,13 @@ } }, "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, "requires": { - "asn1.js": "^4.0.0", + "asn1.js": "^5.2.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" @@ -16514,14 +19659,26 @@ "is-hexadecimal": "^1.0.0" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", "dev": true, "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, "parse-passwd": { @@ -16530,17 +19687,31 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha1-8r0iH2zJcKk42IVWq8WJyqqiveE=", + "dev": true + }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, "pascalcase": { "version": "0.1.1", @@ -16587,6 +19758,21 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -16594,26 +19780,14 @@ "dev": true }, "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -16635,36 +19809,10 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, - "phantomjs-prebuilt": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", - "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3", - "extract-zip": "^1.6.5", - "fs-extra": "^1.0.0", - "hasha": "^2.2.0", - "kew": "^0.7.0", - "progress": "^1.1.8", - "request": "^2.81.0", - "request-progress": "^2.0.1", - "which": "^1.2.10" - }, - "dependencies": { - "progress": { - "version": "1.1.8", - "resolved": "http://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - } - } - }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "picturefill": { "version": "3.0.3", @@ -16701,6 +19849,23 @@ "node-modules-regexp": "^1.0.0" } }, + "pixelmatch": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.2.1.tgz", + "integrity": "sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==", + "dev": true, + "requires": { + "pngjs": "^4.0.1" + }, + "dependencies": { + "pngjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-4.0.1.tgz", + "integrity": "sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==", + "dev": true + } + } + }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -16708,107 +19873,113 @@ "dev": true, "requires": { "find-up": "^3.0.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" }, "dependencies": { "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^2.0.0" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^3.0.0", + "p-locate": "^2.0.0", "path-exists": "^3.0.0" } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^2.0.0" + "p-try": "^1.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^1.1.0" } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } - }, - "pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "requires": { - "find-up": "^3.0.0" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } } }, "plur": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", - "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", "dev": true, "requires": { - "irregular-plurals": "^2.0.0" + "irregular-plurals": "^3.2.0" } }, - "pn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", - "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", "dev": true }, "polyfill-library": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/polyfill-library/-/polyfill-library-3.42.0.tgz", - "integrity": "sha512-CXM/Hq9mGYhD3p0zj/jclYZgNQMAePBgNyrMIA3uwWV/kcAZA+Z7dvhZ1z7vOwywNTSIi7CcvYYEZny0ukbVnQ==", - "requires": { - "@financial-times/polyfill-useragent-normaliser": "^1.2.0", - "@iarna/toml": "^2.2.3", + "version": "3.105.0", + "resolved": "https://registry.npmjs.org/polyfill-library/-/polyfill-library-3.105.0.tgz", + "integrity": "sha512-Bt10kl+5I/k+F8U0/HYEw2RiHUyUYGz7KtzwhPVltngxcJjzm0pWTQi2Z8pYMI5ahE5B5WZv8CXgCVDxz/H4UA==", + "requires": { + "@financial-times/polyfill-useragent-normaliser": "^1.7.0", + "@formatjs/intl-datetimeformat": "3.2.9", + "@formatjs/intl-displaynames": "4.0.7", + "@formatjs/intl-getcanonicallocales": "1.5.3", + "@formatjs/intl-listformat": "5.0.6", + "@formatjs/intl-locale": "2.4.16", + "@formatjs/intl-numberformat": "6.1.5", + "@formatjs/intl-pluralrules": "4.0.7", + "@formatjs/intl-relativetimeformat": "8.0.5", + "@juggle/resize-observer": "^3.2.0", "@webcomponents/template": "^1.4.0", "Base64": "^1.0.0", - "abort-controller": "^2.0.2", + "abort-controller": "^3.0.0", "audio-context-polyfill": "^1.0.0", - "diff": "1.4.0", - "event-source-polyfill": "^0.0.9", + "current-script-polyfill": "^1.0.0", + "diff": "4.0.2", + "event-source-polyfill": "^1.0.12", + "fastestsmallesttextencoderdecoder": "1.0.22", "from2-string": "^1.1.0", "glob": "^7.1.1", "graceful-fs": "^4.1.10", "html5shiv": "^3.7.3", - "intersection-observer": "^0.4.1", - "intl": "^1.2.5", "js-polyfills": "^0.1.40", "json3": "^3.3.2", - "lazystream": "^1.0.0", "merge2": "^1.0.3", - "mkdirp": "^0.5.0", - "mnemonist": "^0.27.2", + "mkdirp": "^1.0.4", + "mnemonist": "^0.38.0", "mutationobserver-shim": "^0.3.2", "picturefill": "^3.0.1", - "resize-observer-polyfill": "^1.5.1", - "rimraf": "^2.6.2", - "smoothscroll-polyfill": "^0.4.4", + "rimraf": "^3.0.0", + "seamless-scroll-polyfill": "1.2.3", "spdx-licenses": "^1.0.0", "stream-cache": "^0.0.2", "stream-from-promise": "^1.0.0", @@ -16819,8 +19990,8 @@ "usertiming": "^0.1.8", "web-animations-js": "^2.2.5", "whatwg-fetch": "^3.0.0", - "wicg-inert": "^2.1.2", - "yaku": "0.18.6" + "wicg-inert": "^3.0.0", + "yaku": "1.0.1" }, "dependencies": { "camelcase": { @@ -16838,10 +20009,18 @@ "wordwrap": "0.0.2" } }, - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } }, "uglify-js": { "version": "2.8.29", @@ -16866,22 +20045,43 @@ } } }, + "popmotion": { + "version": "9.3.6", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-9.3.6.tgz", + "integrity": "sha512-ZTbXiu6zIggXzIliMi8LGxXBF5ST+wkpXGEjeTUDUOCdSQ356hij/xjeUdv0F8zCQNeqB1+PR5/BB+gC+QLAPw==", + "requires": { + "framesync": "5.3.0", + "hey-listen": "^1.0.8", + "style-value-types": "4.1.4", + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "portfinder": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", - "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", "dev": true, "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" }, "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } } } }, @@ -16892,9 +20092,9 @@ "dev": true }, "postcss": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", - "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -16902,15 +20102,6 @@ "supports-color": "^6.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -16951,33 +20142,21 @@ } }, "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", + "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", "dev": true, "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" }, "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "dev": true, - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } } } }, @@ -17047,15 +20226,48 @@ "dev": true, "requires": { "htmlparser2": "^3.10.0" - } - }, - "postcss-jsx": { - "version": "0.36.4", - "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.4.tgz", - "integrity": "sha512-jwO/7qWUvYuWYnpOb0+4bIIgJt7003pgU3P6nETBLaOyBXuTD55ho21xnals5nBrlpTIFodyd3/jBi6UO3dHvA==", - "dev": true, - "requires": { - "@babel/core": ">=7.2.2" + }, + "dependencies": { + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "postcss-less": { @@ -17067,14 +20279,69 @@ "postcss": "^7.0.14" } }, - "postcss-markdown": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz", - "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==", + "postcss-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.3.0.tgz", + "integrity": "sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==", "dev": true, "requires": { - "remark": "^10.0.1", - "unist-util-find-all-after": "^1.0.2" + "cosmiconfig": "^7.0.0", + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.4" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } } }, "postcss-media-query-parser": { @@ -17107,6 +20374,19 @@ "postcss": "^7.0.0", "postcss-selector-parser": "^3.0.0", "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } } }, "postcss-minify-font-values": { @@ -17155,6 +20435,62 @@ "has": "^1.0.0", "postcss": "^7.0.0", "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + } + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" } }, "postcss-normalize-charset": { @@ -17244,6 +20580,14 @@ "normalize-url": "^3.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + } } }, "postcss-normalize-whitespace": { @@ -17291,58 +20635,6 @@ "postcss-value-parser": "^3.0.0" } }, - "postcss-reporter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz", - "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "lodash": "^4.17.11", - "log-symbols": "^2.2.0", - "postcss": "^7.0.7" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postcss-resolve-nested-selector": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", @@ -17353,107 +20645,48 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", - "dev": true, - "requires": { - "postcss": "^7.0.26" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss": { - "version": "7.0.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz", - "integrity": "sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "dev": true, + "requires": { + "postcss": "^7.0.26" } }, "postcss-sass": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz", - "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.4.4.tgz", + "integrity": "sha512-BYxnVYx4mQooOhr+zer0qWbSPYnarAy8ZT7hAQtbxtgVf8gy+LSLT/hHGe35h14/pZDTw1DsxdbrwxBN++H+fg==", "dev": true, "requires": { - "gonzales-pe": "^4.2.3", - "postcss": "^7.0.1" + "gonzales-pe": "^4.3.0", + "postcss": "^7.0.21" } }, "postcss-scss": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", - "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", + "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", "dev": true, "requires": { - "postcss": "^7.0.0" + "postcss": "^7.0.6" } }, "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "cssesc": "^3.0.0", "indexes-of": "^1.0.1", - "uniq": "^1.0.1" + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" } }, "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", - "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", + "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", "dev": true, "requires": { - "is-svg": "^3.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "svgo": "^1.0.0" @@ -17479,12 +20712,13 @@ "postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prepend-http": { @@ -17494,6 +20728,12 @@ "dev": true, "optional": true }, + "prettier": { + "version": "npm:wp-prettier@2.0.5", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.0.5.tgz", + "integrity": "sha512-5GCgdeevIXwR3cW4Qj5XWC5MO1iSCz8+IPn0mMw6awAt/PBiey8yyO7MhePRsaMqghJAhg6Q3QLYWSnUHWkG6A==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -17513,40 +20753,55 @@ } }, "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-name": "~1.1.4" } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true } } }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -17564,14 +20819,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "~2.0.3" - } - }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -17584,13 +20831,13 @@ "integrity": "sha1-zQTv9G9clcOn0EVZHXm14+AfEtc=" }, "prompts": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz", - "integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", + "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", "dev": true, "requires": { "kleur": "^3.0.3", - "sisteransi": "^1.0.4" + "sisteransi": "^1.0.5" } }, "prop-types": { @@ -17621,13 +20868,13 @@ "optional": true }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "proxy-from-env": { @@ -17649,9 +20896,9 @@ "dev": true }, "psl": { - "version": "1.1.33", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.33.tgz", - "integrity": "sha512-LTDP2uSrsc7XCb5lO7A8BI1qYxRe/8EqlRvMeEl6rsnYAqDOl8xHR+8lSAIVfrNaSAlTPTNOCgNjWcoUL3AZsw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "public-encrypt": { @@ -17666,6 +20913,14 @@ "parse-asn1": "^5.0.0", "randombytes": "^2.0.1", "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } } }, "pump": { @@ -17702,65 +20957,99 @@ } }, "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, - "puppeteer": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz", - "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "puppeteer-core": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-9.1.1.tgz", + "integrity": "sha512-zbedbitVIGhmgz0nt7eIdLsnaoVZSlNJfBivqm2w67T8LR2bU1dvnruDZ8nQO0zn++Iet7zHbAOdnuS5+H2E7A==", "dev": true, "requires": { - "@types/mime-types": "^2.1.0", "debug": "^4.1.0", - "extract-zip": "^1.6.6", - "https-proxy-agent": "^4.0.0", - "mime": "^2.0.3", - "mime-types": "^2.1.25", + "devtools-protocol": "0.0.869402", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "pkg-dir": "^4.2.0", "progress": "^2.0.1", - "proxy-from-env": "^1.0.0", - "rimraf": "^2.6.1", - "ws": "^6.1.0" + "proxy-from-env": "^1.1.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "debug": "4" } }, - "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", - "dev": true + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } }, - "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", "dev": true, "requires": { - "mime-db": "1.43.0" + "agent-base": "6", + "debug": "4" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "async-limiter": "~1.0.0" + "find-up": "^4.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" } } } @@ -17771,27 +21060,22 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==" }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "optional": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } + "qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "dev": true }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true }, "querystring-es3": { "version": "0.2.1", @@ -17800,9 +21084,9 @@ "dev": true }, "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "quick-lru": { @@ -17812,32 +21096,21 @@ "dev": true }, "qunit": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.9.3.tgz", - "integrity": "sha512-RH4VYSaVsNRDthMFFboTJAJ8q4kJM5LvOqWponKUYPEAeOcmc/YFV1QsZ7ikknA3TjqliWFJYEV63vvVXaALmQ==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.16.0.tgz", + "integrity": "sha512-88x9t+rRMbB6IrCIUZvYU4pJy7NiBEv7SX8jD4LZAsIj+dV+kwGnFStOmPNvqa6HM96VZMD8CIIFKH2+3qvluA==", "dev": true, "requires": { - "commander": "2.12.2", - "js-reporters": "1.2.1", - "minimatch": "3.0.4", - "node-watch": "0.6.1", - "resolve": "1.9.0" + "commander": "7.1.0", + "node-watch": "0.7.1", + "tiny-glob": "0.2.8" }, "dependencies": { "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.1.0.tgz", + "integrity": "sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==", "dev": true - }, - "resolve": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", - "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, @@ -17888,33 +21161,67 @@ "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, "requires": { "bytes": "3.1.0", "http-errors": "1.7.2", "iconv-lite": "0.4.24", "unpipe": "1.0.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } } }, "re-resizable": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/re-resizable/-/re-resizable-6.2.0.tgz", - "integrity": "sha512-3bi0yTzub/obnqoTPs9C8A1ecrgt5OSWlKdHDJ6gBPiEiEIG5LO0PqbwWTpABfzAzdE4kldOG2MQDQEaJJNYkQ==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/re-resizable/-/re-resizable-6.9.0.tgz", + "integrity": "sha512-3cUDG81ylyqI0Pdgle/RHwwRYq0ORZzsUaySOCO8IbEtNyaRtrIHYm/jMQ5pjcNiKCxR3vsSymIQZHwJq4gg2Q==", "requires": { "fast-memoize": "^2.5.1" } }, "react": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.9.0.tgz", - "integrity": "sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -17922,20 +21229,19 @@ } }, "react-addons-shallow-compare": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.2.tgz", - "integrity": "sha1-GYoAuR/DdiPbZKKP0XtZa6NicC8=", + "version": "15.6.3", + "resolved": "https://registry.npmjs.org/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.3.tgz", + "integrity": "sha512-EDJbgKTtGRLhr3wiGDXK/+AEJ59yqGS+tKE6mue0aNXT6ZMR7VJbbzIiT6akotmHg1BLj46ElJSb+NBMp80XBg==", "requires": { - "fbjs": "^0.8.4", "object-assign": "^4.1.0" } }, "react-autosize-textarea": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz", - "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-7.1.0.tgz", + "integrity": "sha512-BHpjCDkuOlllZn3nLazY2F8oYO1tS2jHnWhcjTWQdcKiiMU6gHLNt/fzmqMSyerR0eTdKtfSIqtSeTtghNwS+g==", "requires": { - "autosize": "^4.0.0", + "autosize": "^4.0.2", "line-height": "^0.3.1", "prop-types": "^15.5.6" } @@ -17961,29 +21267,53 @@ } }, "react-dom": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.9.0.tgz", - "integrity": "sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", + "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.15.0" + "scheduler": "^0.19.1" + } + }, + "react-easy-crop": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/react-easy-crop/-/react-easy-crop-3.5.2.tgz", + "integrity": "sha512-cwSGO/wk42XDpEyrdAcnQ6OJetVDZZO2ry1i19+kSGZQ750aN06RU9y9z95B5QI6sW3SnaWQRKv5r5GSqVV//g==", + "requires": { + "normalize-wheel": "^1.0.1", + "tslib": "2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } } }, "react-is": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", - "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-moment-proptypes": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/react-moment-proptypes/-/react-moment-proptypes-1.7.0.tgz", - "integrity": "sha512-ZbOn/P4u469WEGAw5hgkS/E+g1YZqdves2BjYsLluJobzUZCtManhjHiZKjniBVT7MSHM6D/iKtRVzlXVv3ikA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/react-moment-proptypes/-/react-moment-proptypes-1.8.1.tgz", + "integrity": "sha512-Er940DxWoObfIqPrZNfwXKugjxMIuk1LAuEzn23gytzV6hKS/sw108wibi9QubfMN4h+nrlje8eUCSbQRJo2fQ==", "requires": { "moment": ">=1.6.0" } }, + "react-native-url-polyfill": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz", + "integrity": "sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ==", + "requires": { + "whatwg-url-without-unicode": "8.0.0-3" + } + }, "react-outside-click-handler": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/react-outside-click-handler/-/react-outside-click-handler-1.3.0.tgz", @@ -18005,9 +21335,19 @@ } }, "react-resize-aware": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/react-resize-aware/-/react-resize-aware-3.0.0.tgz", - "integrity": "sha512-UyLk1KNbFHDye9AFLyr7HBGmzkRDGz2mYp6LDS+LCxM6DXGpviwS5Q4JRzXWdw0tk+n46UE/Kotku/cb8HCh0Q==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/react-resize-aware/-/react-resize-aware-3.1.0.tgz", + "integrity": "sha512-bIhHlxVTX7xKUz14ksXMEHjzCZPTpQZKZISY3nbTD273pDKPABGFNFBP6Tr42KECxzC5YQiKpMchjTVJCqaxpA==" + }, + "react-shallow-renderer": { + "version": "16.14.1", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", + "integrity": "sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "react-is": "^16.12.0 || ^17.0.0" + } }, "react-spring": { "version": "8.0.27", @@ -18019,21 +21359,27 @@ } }, "react-test-renderer": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.13.1.tgz", - "integrity": "sha512-Sn2VRyOK2YJJldOqoh8Tn/lWQ+ZiKhyZTPtaO0Q6yNj+QDbmRkVFap6pZPy3YQk8DScRDfyqm/KxKYP9gCMRiQ==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-17.0.2.tgz", + "integrity": "sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==", "dev": true, "requires": { "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "react-is": "^16.8.6", - "scheduler": "^0.19.1" + "react-is": "^17.0.2", + "react-shallow-renderer": "^16.13.1", + "scheduler": "^0.20.2" }, "dependencies": { + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -18042,6 +21388,11 @@ } } }, + "react-use-gesture": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/react-use-gesture/-/react-use-gesture-9.1.3.tgz", + "integrity": "sha512-CdqA2SmS/fj3kkS2W8ZU8wjTbVBAIwDWaRprX7OKaj7HlGwBasGEFggmk5qNklknqk9zK/h8D355bEJFTpqEMg==" + }, "react-with-direction": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/react-with-direction/-/react-with-direction-1.3.1.tgz", @@ -18086,6 +21437,45 @@ "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", "path-type": "^3.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "read-pkg-up": { @@ -18108,28 +21498,6 @@ "pinkie-promise": "^2.0.0" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -18156,32 +21524,23 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } } } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -18190,66 +21549,82 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "picomatch": "^2.2.1" } }, "reakit": { - "version": "1.0.0-beta.16", - "resolved": "https://registry.npmjs.org/reakit/-/reakit-1.0.0-beta.16.tgz", - "integrity": "sha512-zytLIb7Ai2b6Yi0/C8lSPSvl/9HI7M8ntO1ty7aoJ9XCKxhFi4Oq1rwF6ja/242cBH7uqspRfhagBhgJniOr8A==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/reakit/-/reakit-1.3.8.tgz", + "integrity": "sha512-8SVejx6FUaFi2+Q9eXoDAd4wWi/xAn6v8JgXH8x2xnzye8pb6v5bYvegACVpYVZnrS5w/JUgMTGh1Xy8MkkPww==", "requires": { - "@popperjs/core": "^2.0.5", - "body-scroll-lock": "^2.6.4", - "reakit-system": "^0.9.0", - "reakit-utils": "^0.9.0" + "@popperjs/core": "^2.5.4", + "body-scroll-lock": "^3.1.5", + "reakit-system": "^0.15.1", + "reakit-utils": "^0.15.1", + "reakit-warning": "^0.6.1" } }, "reakit-system": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/reakit-system/-/reakit-system-0.9.0.tgz", - "integrity": "sha512-uxhjpxpI3XHAj3OhkDeyyulG3hNgEJ6KtEZbwRXiCv9DOKIe0zwN8qTAXRIKXtP4pu5PyETBh3XEZoxiv4FAww==" + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/reakit-system/-/reakit-system-0.15.1.tgz", + "integrity": "sha512-PkqfAyEohtcEu/gUvKriCv42NywDtUgvocEN3147BI45dOFAB89nrT7wRIbIcKJiUT598F+JlPXAZZVLWhc1Kg==", + "requires": { + "reakit-utils": "^0.15.1" + } }, "reakit-utils": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/reakit-utils/-/reakit-utils-0.9.0.tgz", - "integrity": "sha512-qVsGLmsFZv1+A5B/k1xEhFYD8U9fkl8ssvE3D5zIM33V0oIFvVClDTm8Iv96dpB1cod1kolLDKva6FkNxXP+bw==" + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/reakit-utils/-/reakit-utils-0.15.1.tgz", + "integrity": "sha512-6cZgKGvOkAMQgkwU9jdYbHfkuIN1Pr+vwcB19plLvcTfVN0Or10JhIuj9X+JaPZyI7ydqTDFaKNdUcDP69o/+Q==" }, - "realpath-native": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", - "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==", + "reakit-warning": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/reakit-warning/-/reakit-warning-0.6.1.tgz", + "integrity": "sha512-poFUV0EyxB+CcV9uTNBAFmcgsnR2DzAbOTkld4Ul+QOKSeEHZB3b3+MoZQgcYHmbvG19Na1uWaM7ES+/Eyr8tQ==", + "requires": { + "reakit-utils": "^0.15.1" + } + }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", "dev": true, "requires": { - "util.promisify": "^1.0.0" + "resolve": "^1.9.0" } }, "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, + "optional": true, "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" } }, "redux": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", - "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.1.tgz", + "integrity": "sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw==", "requires": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" + "@babel/runtime": "^7.9.2" } }, "redux-multi": { @@ -18257,25 +21632,15 @@ "resolved": "https://registry.npmjs.org/redux-multi/-/redux-multi-0.1.12.tgz", "integrity": "sha1-KOH+XklnLLxb2KB/Cyrq8O+DVcI=" }, - "redux-optimist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redux-optimist/-/redux-optimist-1.0.0.tgz", - "integrity": "sha512-AG1v8o6UZcGXTEH2jVcWG6KD+gEix+Cj9JXAAzln9MPkauSVd98H7N7EOOyT/v4c9N1mJB4sm1zfspGlLDkUEw==" - }, "reflect.ownkeys": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=" }, - "refx": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/refx/-/refx-3.1.1.tgz", - "integrity": "sha512-lwN27W5iYyagpCxxYDYDl0IIiKh0Vgi3wvafqfthbzTfBgLOYAstcftp+G2X612xVaB8rhn5wDxd4er4KEeb8A==" - }, "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { @@ -18288,18 +21653,17 @@ } }, "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" }, "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "@babel/runtime": "^7.8.4", - "private": "^0.1.8" + "@babel/runtime": "^7.8.4" } }, "regex-not": { @@ -18313,24 +21677,25 @@ } }, "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", "dev": true, "requires": { - "define-properties": "^1.1.2" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, "requires": { "regenerate": "^1.4.0", @@ -18342,21 +21707,21 @@ } }, "regextras": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.6.1.tgz", - "integrity": "sha512-EzIHww9xV2Kpqx+corS/I7OBmf2rZ0pKKJPsw5Dc+l6Zq1TslDmtRIP9maVn3UH+72MIXmn8zzDgP07ihQogUA==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", "dev": true }, "regjsgen": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", - "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", - "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -18371,20 +21736,88 @@ } }, "remark": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz", - "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", + "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", "dev": true, "requires": { - "remark-parse": "^6.0.0", - "remark-stringify": "^6.0.0", - "unified": "^7.0.0" + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "requires": { + "mdast-util-from-markdown": "^0.8.0" + } + }, + "unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + } } }, "remark-parse": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz", - "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-5.0.0.tgz", + "integrity": "sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==", "dev": true, "requires": { "collapse-white-space": "^1.0.2", @@ -18405,25 +21838,12 @@ } }, "remark-stringify": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz", - "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", + "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", "dev": true, "requires": { - "ccount": "^1.0.0", - "is-alphanumeric": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "longest-streak": "^2.0.1", - "markdown-escapes": "^1.0.0", - "markdown-table": "^1.1.0", - "mdast-util-compact": "^1.0.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "stringify-entities": "^1.0.1", - "unherit": "^1.0.4", - "xtend": "^4.0.1" + "mdast-util-to-markdown": "^0.6.0" } }, "rememo": { @@ -18453,6 +21873,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, + "optional": true, "requires": { "is-finite": "^1.0.0" } @@ -18464,9 +21885,9 @@ "dev": true }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -18476,7 +21897,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -18486,17 +21907,11 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -18504,57 +21919,39 @@ "dev": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "^1.1.28", + "punycode": "^2.1.1" } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, - "request-progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", - "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=", - "dev": true, - "requires": { - "throttleit": "^1.0.0" - } - }, - "request-promise-core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "request-promise-native": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", - "dev": true, - "requires": { - "request-promise-core": "1.1.3", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "requireindex": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", @@ -18564,8 +21961,7 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "requizzle": { "version": "0.2.3", @@ -18576,42 +21972,37 @@ "lodash": "^4.17.14" } }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", - "dev": true, + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, "resolve-bin": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/resolve-bin/-/resolve-bin-0.4.0.tgz", - "integrity": "sha1-RxMiSYkRAa+xmZH+k3ywpfBy5dk=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/resolve-bin/-/resolve-bin-0.4.1.tgz", + "integrity": "sha512-cPOo/AQjgGONYhFbAcJd1+nuVHKs5NZ8K96Zb6mW+nDl55a7+ya9MWkeYuSMDv/S+YpksZ3EbeAnGWs5x04x8w==", "dev": true, "requires": { "find-parent-dir": "~0.3.0" } }, "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "^5.0.0" }, "dependencies": { "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } @@ -18655,6 +22046,23 @@ "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + } } }, "ret": { @@ -18675,6 +22083,11 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, "rgb-regex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", @@ -18696,9 +22109,10 @@ } }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -18730,27 +22144,18 @@ "dev": true }, "rtlcss": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-2.4.0.tgz", - "integrity": "sha512-hdjFhZ5FCI0ABOfyXOMOhBtwPWtANLCG7rOiOcRf+yi5eDdxmDjqBruWouEnwVdzfh/TWF6NNncIEsigOCFZOA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-2.6.2.tgz", + "integrity": "sha512-06LFAr+GAPo+BvaynsXRfoYTJvSaWRyOhURCQ7aeI1MKph9meM222F+Zkt3bDamyHHJuGi3VPtiRkpyswmQbGA==", "dev": true, "requires": { - "chalk": "^2.3.0", - "findup": "^0.1.5", + "@choojs/findup": "^0.2.1", + "chalk": "^2.4.2", "mkdirp": "^0.5.1", - "postcss": "^6.0.14", + "postcss": "^6.0.23", "strip-json-comments": "^2.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -18779,30 +22184,24 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true } } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true }, "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", + "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", "dev": true }, "run-queue": { @@ -18826,18 +22225,26 @@ "dev": true }, "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", "dev": true, "requires": { - "tslib": "^1.9.0" + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-json-parse": { "version": "1.0.1", @@ -18851,232 +22258,194 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sane": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", - "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", - "dev": true, - "requires": { - "@cnakazawa/watch": "^1.0.3", - "anymatch": "^2.0.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" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } + "ret": "~0.1.10" } }, - "sanitize-html": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.20.1.tgz", - "integrity": "sha512-txnH8TQjaQvg2Q0HY06G6CDJLVYCpbnxrdO0WN8gjCKaU5J0KbyGYhZxx5QJg3WLZ1lB7XU9kDkfrCXUozqptA==", + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", "dev": true, "requires": { - "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.1", - "postcss": "^7.0.5", - "srcset": "^1.0.0", - "xtend": "^4.0.1" + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.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" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "has-flag": "^3.0.0" + "remove-trailing-separator": "^1.0.1" } } } }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "sanitize-html": { + "version": "1.27.5", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.27.5.tgz", + "integrity": "sha512-M4M5iXDAUEcZKLXkmk90zSYWEtk5NH3JmojQxKxV371fnMh+x9t1rqdmXaGoyEHw3z/X/8vnFhKjGL5xFGOJ3A==", "dev": true, "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "htmlparser2": "^4.1.0", + "lodash": "^4.17.15", + "parse-srcset": "^1.0.2", + "postcss": "^7.0.27" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dom-serializer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", + "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "dev": true, + "requires": { + "domelementtype": "^2.1.0" + } + } } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "dev": true + }, + "domhandler": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "domelementtype": "^2.0.1" } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "domutils": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", + "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", "dev": true, "requires": { - "lcid": "^1.0.0" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" + }, + "dependencies": { + "domhandler": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "dev": true, + "requires": { + "domelementtype": "^2.1.0" + } + } } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "htmlparser2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", + "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" } + } + } + }, + "sass": { + "version": "1.34.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.34.1.tgz", + "integrity": "sha512-scLA7EIZM+MmYlej6sdVr0HRbZX5caX5ofDT9asWnUJj21oqgsC+1LuNfm0eg+vM0fCTZHhwImTiCU0sx9h9CQ==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0" + } + }, + "sass-loader": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.2.0.tgz", + "integrity": "sha512-kUceLzC1gIHz0zNJPpqRsJyisWatGYNFRmv2CKZK2/ngMJgLqxTbXwe/hJ85luyvZkgqU3VlJ33UVF2T/0g6mw==", + "dev": true, + "requires": { + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "minimist": "^1.2.5" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" } }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" } } } @@ -19087,10 +22456,19 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, "scheduler": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.15.0.tgz", - "integrity": "sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -19107,47 +22485,19 @@ "ajv-keywords": "^3.1.0" } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } + "seamless-scroll-polyfill": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/seamless-scroll-polyfill/-/seamless-scroll-polyfill-1.2.3.tgz", + "integrity": "sha512-emnwZtu6NrlBlvT6HrlbAOs024JX4orWew8H5owBOyUJ7eFXn8lGe4bsXTBD6AAWzP/p7LL86AjVIH8Apqec5w==" }, "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", "dev": true, "optional": true, "requires": { - "commander": "~2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dev": true, - "optional": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } - } + "commander": "^2.8.1" } }, "select": { @@ -19162,19 +22512,21 @@ "dev": true }, "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", + "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", "dev": true, "requires": { - "node-forge": "0.9.0" + "node-forge": "^0.10.0" } }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } }, "semver-regex": { "version": "2.0.0", @@ -19191,6 +22543,15 @@ "optional": true, "requires": { "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true + } } }, "send": { @@ -19214,6 +22575,23 @@ "statuses": "~1.5.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -19229,10 +22607,13 @@ } }, "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } }, "serve-index": { "version": "1.9.1", @@ -19249,6 +22630,15 @@ "parseurl": "~1.3.2" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -19267,6 +22657,12 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", @@ -19318,13 +22714,13 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, "sha.js": { "version": "2.4.11", @@ -19390,7 +22786,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true + "dev": true, + "optional": true }, "showdown": { "version": "1.9.1", @@ -19401,78 +22798,25 @@ } }, "side-channel": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz", - "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==", - "dev": true, + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "requires": { - "es-abstract": "^1.17.0-next.1", - "object-inspect": "^1.7.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - } + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" } }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "simple-html-tokenizer": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.9.tgz", - "integrity": "sha512-w/3FEDN94r4JQ9WoYrIr8RqDIPZdyNkdpbK9glFady1CAEyD97XWCv8HFetQO21w81e7h7Nh59iYTyG1mUJftg==" + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.11.tgz", + "integrity": "sha512-C2WEK/Z3HoSFbYq8tI7ni3eOo/NneSPRoPpcM7WdLjFOArFuyXEjAoCdOC3DgMfRyziZQ1hCNR4mrNdWEvD0og==" }, "simple-swizzle": { "version": "0.2.2", @@ -19492,24 +22836,41 @@ } }, "sinon": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.1.tgz", - "integrity": "sha512-iTTyiQo5T94jrOx7X7QLBZyucUJ2WvL9J13+96HMfm2CGoJYbIPqRfl6wgNcqmzk0DI28jeGx5bUTXizkrqBmg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", + "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" }, "dependencies": { + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.1.tgz", + "integrity": "sha512-am34LJf0N2nON/PT9G7pauA+xjcwX9P6x31m4hBgfUeSXYRZBRv/R6EcdWs8iV4XJjPO++NTsrj7ua/cN2s6ZA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "has-flag": { @@ -19519,9 +22880,9 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -19530,11 +22891,22 @@ } }, "sinon-test": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sinon-test/-/sinon-test-3.0.0.tgz", - "integrity": "sha512-k2V042JwIS6SC3M8Ih3Uo6+6mlL5FKqvvobxoWQobFkACr61WpyAMKsfqXecLL+DrDD3s9T+eYSZdVQzMH1pkA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/sinon-test/-/sinon-test-3.1.0.tgz", + "integrity": "sha512-aGQwq6Xl9eJg/8Ugv4Ko4LQWUqjwRYNI8UtxnKa9hmcMEz3HBTR3nnzYrbW4isuRLsJWFuJTUcPGuz7f4XvODg==", "dev": true }, + "sirv": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.17.tgz", + "integrity": "sha512-qx9go5yraB7ekT7bCMqUHJ5jEaOC/GXBxUWv+jeWnb7WzHUFdcQPGWk7YmAwFBaQBrogpuSqd/azbC2lZRqqmw==", + "dev": true, + "requires": { + "@polka/url": "^1.0.0-next.20", + "mime": "^2.3.1", + "totalist": "^1.0.0" + } + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -19542,38 +22914,54 @@ "dev": true }, "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-name": "~1.1.4" } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true } } }, - "smoothscroll-polyfill": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/smoothscroll-polyfill/-/smoothscroll-polyfill-0.4.4.tgz", - "integrity": "sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg==" - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -19590,6 +22978,15 @@ "use": "^3.1.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -19607,6 +23004,12 @@ "requires": { "is-extendable": "^0.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -19660,9 +23063,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -19676,34 +23079,113 @@ "kind-of": "^3.2.0" } }, + "socket.io": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.1.2.tgz", + "integrity": "sha512-JubKZnTQ4Z8G4IZWtaAZSiRP3I/inpy8c/Bsx2jrwGrTbKeVU5xd6qkKMHpChYeM3dWZSO0QACiGK+obhBNwYw==", + "requires": { + "@types/cookie": "^0.4.0", + "@types/cors": "^2.8.8", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.1", + "engine.io": "~4.1.0", + "socket.io-adapter": "~2.1.0", + "socket.io-parser": "~4.0.3" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "socket.io-adapter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.1.0.tgz", + "integrity": "sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==" + }, + "socket.io-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz", + "integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==", + "requires": { + "@types/component-emitter": "^1.2.10", + "component-emitter": "~1.3.0", + "debug": "~4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", + "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", "dev": true, "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "faye-websocket": "^0.11.3", + "uuid": "^3.4.0", + "websocket-driver": "^0.7.4" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "sockjs-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", - "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.0.tgz", + "integrity": "sha512-8Dt3BDi4FYNrCFGTL/HtwVzkARrENdwOUf1ZoW/9p3M8lZdFT35jVdrHza+qgxuG9H3/shR4cuX/X9umUrjP8Q==", "dev": true, "requires": { - "debug": "^3.2.5", + "debug": "^3.2.6", "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" + "faye-websocket": "^0.11.3", + "inherits": "^2.0.4", + "json3": "^3.3.3", + "url-parse": "^1.4.7" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -19717,12 +23199,6 @@ "requires": { "websocket-driver": ">=0.5.1" } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, @@ -19757,23 +23233,72 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, + "source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "dev": true + }, "source-map-loader": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", - "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-1.1.3.tgz", + "integrity": "sha512-6YHeF+XzDOrT/ycFJNI53cgEsp/tHTMl37hi7uVyqFAlTXW109JazaQCkbc+jjoL2637qkH1amLi+JzrIpt5lA==", "dev": true, "requires": { - "async": "^2.5.0", - "loader-utils": "^1.1.0" + "abab": "^2.0.5", + "iconv-lite": "^0.6.2", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "source-map": "^0.6.1", + "whatwg-mimetype": "^2.3.0" + }, + "dependencies": { + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -19781,9 +23306,9 @@ } }, "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -19817,9 +23342,9 @@ } }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -19827,15 +23352,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -19843,9 +23368,9 @@ } }, "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "spdx-licenses": { @@ -19855,27 +23380,12 @@ "requires": { "debug": "4.1.1", "is2": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } } }, "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -19883,23 +23393,6 @@ "http-deceiver": "^1.2.7", "select-hose": "^2.0.0", "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "spdy-transport": { @@ -19916,25 +23409,10 @@ "wbuf": "^1.7.3" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -19974,16 +23452,53 @@ "chalk": "^1.0.0", "console-stream": "^0.1.1", "lpad-align": "^1.0.1" - } - }, - "srcset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", - "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", - "dev": true, - "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "optional": true + } } }, "sshpk": { @@ -20004,9 +23519,9 @@ } }, "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -20025,10 +23540,21 @@ "dev": true }, "stack-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", - "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", - "dev": true + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } }, "state-toggle": { "version": "1.0.3", @@ -20057,26 +23583,10 @@ } } }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "stream-browserify": { "version": "2.0.2", @@ -20122,9 +23632,9 @@ } }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "stream-to-string": { @@ -20135,6 +23645,23 @@ "promise-polyfill": "^1.1.6" } }, + "streamroller": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", + "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", + "requires": { + "date-format": "^2.1.0", + "debug": "^4.1.1", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "date-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", + "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==" + } + } + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -20143,13 +23670,30 @@ "optional": true }, "string-length": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", - "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, "requires": { - "astral-regex": "^1.0.0", - "strip-ansi": "^4.0.0" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "string-template": { @@ -20159,172 +23703,262 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "string.prototype.matchall": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz", - "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz", + "integrity": "sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "has-symbols": "^1.0.1", - "internal-slot": "^1.0.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2" + "es-abstract": "^1.18.2", + "get-intrinsic": "^1.1.1", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.3.1", + "side-channel": "^1.0.4" }, "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } } } }, "string.prototype.trim": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz", - "integrity": "sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz", + "integrity": "sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1" + "es-abstract": "^1.18.0-next.2" }, "dependencies": { - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { - "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "get-intrinsic": "^1.0.2" } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + } } }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } } } }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "string.prototype.trimend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "string.prototype.trimstart": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -20333,27 +23967,21 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" - } - }, - "stringify-entities": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz", - "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==", - "dev": true, - "requires": { - "character-entities-html4": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-hexadecimal": "^1.0.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } }, "strip-bom": { @@ -20378,19 +24006,35 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, + "optional": true, "requires": { - "min-indent": "^1.0.0" + "get-stdin": "^4.0.1" + }, + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true, + "optional": true + } } }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "strip-outer": { @@ -20398,7 +24042,6 @@ "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", "dev": true, - "optional": true, "requires": { "escape-string-regexp": "^1.0.2" } @@ -20409,6 +24052,22 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", "dev": true }, + "style-value-types": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-4.1.4.tgz", + "integrity": "sha512-LCJL6tB+vPSUoxgUBt9juXIlNJHtBMy8jkXzUJSBzeHWdBu6lhzHqCvLVkXFGsFIlNa2ln1sQHya/gzaFmB2Lg==", + "requires": { + "hey-listen": "^1.0.8", + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "stylehacks": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", @@ -20418,133 +24077,168 @@ "browserslist": "^4.0.0", "postcss": "^7.0.0", "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } } }, "stylelint": { - "version": "9.10.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz", - "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==", - "dev": true, - "requires": { - "autoprefixer": "^9.0.0", - "balanced-match": "^1.0.0", - "chalk": "^2.4.1", - "cosmiconfig": "^5.0.0", - "debug": "^4.0.0", - "execall": "^1.0.0", - "file-entry-cache": "^4.0.0", - "get-stdin": "^6.0.0", + "version": "13.13.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz", + "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==", + "dev": true, + "requires": { + "@stylelint/postcss-css-in-js": "^0.37.2", + "@stylelint/postcss-markdown": "^0.36.2", + "autoprefixer": "^9.8.6", + "balanced-match": "^2.0.0", + "chalk": "^4.1.1", + "cosmiconfig": "^7.0.0", + "debug": "^4.3.1", + "execall": "^2.0.0", + "fast-glob": "^3.2.5", + "fastest-levenshtein": "^1.0.12", + "file-entry-cache": "^6.0.1", + "get-stdin": "^8.0.0", "global-modules": "^2.0.0", - "globby": "^9.0.0", + "globby": "^11.0.3", "globjoin": "^0.1.4", - "html-tags": "^2.0.0", - "ignore": "^5.0.4", - "import-lazy": "^3.1.0", + "html-tags": "^3.1.0", + "ignore": "^5.1.8", + "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", - "known-css-properties": "^0.11.0", - "leven": "^2.1.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "mathml-tag-names": "^2.0.1", - "meow": "^5.0.0", - "micromatch": "^3.1.10", + "known-css-properties": "^0.21.0", + "lodash": "^4.17.21", + "log-symbols": "^4.1.0", + "mathml-tag-names": "^2.1.3", + "meow": "^9.0.0", + "micromatch": "^4.0.4", "normalize-selector": "^0.2.0", - "pify": "^4.0.0", - "postcss": "^7.0.13", + "postcss": "^7.0.35", "postcss-html": "^0.36.0", - "postcss-jsx": "^0.36.0", - "postcss-less": "^3.1.0", - "postcss-markdown": "^0.36.0", + "postcss-less": "^3.1.4", "postcss-media-query-parser": "^0.2.3", - "postcss-reporter": "^6.0.0", "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^4.0.0", - "postcss-sass": "^0.3.5", - "postcss-scss": "^2.0.0", - "postcss-selector-parser": "^3.1.0", + "postcss-safe-parser": "^4.0.2", + "postcss-sass": "^0.4.4", + "postcss-scss": "^2.1.1", + "postcss-selector-parser": "^6.0.5", "postcss-syntax": "^0.36.2", - "postcss-value-parser": "^3.3.0", - "resolve-from": "^4.0.0", - "signal-exit": "^3.0.2", - "slash": "^2.0.0", + "postcss-value-parser": "^4.1.0", + "resolve-from": "^5.0.0", + "slash": "^3.0.0", "specificity": "^0.4.1", - "string-width": "^3.0.0", + "string-width": "^4.2.2", + "strip-ansi": "^6.0.0", "style-search": "^0.1.0", "sugarss": "^2.0.0", "svg-tags": "^1.0.0", - "table": "^5.0.0" + "table": "^6.6.0", + "v8-compile-cache": "^2.3.0", + "write-file-atomic": "^3.0.3" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "fill-range": "^7.0.1" } }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "file-entry-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", - "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "to-regex-range": "^5.0.1" } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true + }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -20560,45 +24254,59 @@ "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" } }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "dev": true, + "requires": { + "has": "^1.0.3" } }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "kind-of": { @@ -20607,62 +24315,49 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "chalk": "^2.0.1" + "p-locate": "^4.1.0" } }, "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true }, "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", "dev": true, "requires": { - "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" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" } }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" + "braces": "^3.0.1", + "picomatch": "^2.2.3" } }, "ms": { @@ -20671,168 +24366,241 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "requires": { - "p-try": "^1.0.0" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.2.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } } }, "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } }, "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" } }, "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "isexe": "^2.0.0" } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true } } }, "stylelint-config-recommended": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.2.0.tgz", - "integrity": "sha512-bZ+d4RiNEfmoR74KZtCKmsABdBJr4iXRiCso+6LtMJPw5rd/KnxUWTxht7TbafrTJK1YRjNgnN0iVZaJfc3xJA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", + "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==", "dev": true }, "stylelint-config-recommended-scss": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-3.3.0.tgz", - "integrity": "sha512-BvuuLYwoet8JutOP7K1a8YaiENN+0HQn390eDi0SWe1h7Uhx6O3GUQ6Ubgie9b/AmHX4Btmp+ZzVGbzriFTBcA==", - "dev": true, - "requires": { - "stylelint-config-recommended": "^2.2.0" - } - }, - "stylelint-config-wordpress": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/stylelint-config-wordpress/-/stylelint-config-wordpress-13.1.0.tgz", - "integrity": "sha512-dpKj2/d3/XjDVoOvQzd54GoM8Rj5zldluOZKkVhBCc4JYMc6r1VYL5hpcgIjqy/i2Hyqg4Rh7zTafE/2AWq//w==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-4.3.0.tgz", + "integrity": "sha512-/noGjXlO8pJTr/Z3qGMoaRFK8n1BFfOqmAbX1RjTIcl4Yalr+LUb1zb9iQ7pRx1GsEBXOAm4g2z5/jou/pfMPg==", "dev": true, "requires": { - "stylelint-config-recommended": "^2.1.0", - "stylelint-config-recommended-scss": "^3.2.0", - "stylelint-scss": "^3.3.0" + "stylelint-config-recommended": "^5.0.0" + }, + "dependencies": { + "stylelint-config-recommended": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-5.0.0.tgz", + "integrity": "sha512-c8aubuARSu5A3vEHLBeOSJt1udOdS+1iue7BmJDTSXoCBmfEQmmWX+59vYIj3NQdJBY6a/QRv1ozVFpaB9jaqA==", + "dev": true + } } }, "stylelint-scss": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.16.0.tgz", - "integrity": "sha512-dAWs/gagdPYO3VDdvgRv5drRBMcWI4E//z3AXPAY1qYkSdXCEVJtEW+R9JtinG0U2rcJIu5XWaVddPQeaaufzw==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.20.1.tgz", + "integrity": "sha512-OTd55O1TTAC5nGKkVmUDLpz53LlK39R3MImv1CfuvsK7/qugktqiZAeQLuuC4UBhzxCnsc7fp9u/gfRZwFAIkA==", "dev": true, "requires": { "lodash": "^4.17.15", "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.1", "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" + "postcss-value-parser": "^4.1.0" }, "dependencies": { - "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", - "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, "postcss-value-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", - "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true } } @@ -20847,9 +24615,44 @@ } }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "svg-parser": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", "dev": true }, "svg-tags": { @@ -20859,18 +24662,17 @@ "dev": true }, "svgo": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.2.2.tgz", - "integrity": "sha512-rAfulcwp2D9jjdGu+0CuqlrAUin6bBWrpoqXWwKDZZZJfXcUXQSxLJOFJCQCSA0x0pP2U0TxSlJu2ROq5Bq6qA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", "dev": true, "requires": { "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.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", "js-yaml": "^3.13.1", "mkdirp": "~0.5.1", "object.values": "^1.1.0", @@ -20880,64 +24682,19 @@ "util.promisify": "~1.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^2.1.2", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } } } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -20945,59 +24702,73 @@ "dev": true }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } } } @@ -21023,30 +24794,69 @@ "dev": true }, "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "dev": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" } }, "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, - "optional": true, "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "temp-dir": { @@ -21065,21 +24875,31 @@ "requires": { "temp-dir": "^1.0.0", "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true, + "optional": true + } } }, - "temporary": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/temporary/-/temporary-0.0.8.tgz", - "integrity": "sha1-oYqYHSi6jKNgJ/s8MFOMPst0CsA=", + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", "dev": true, "requires": { - "package": ">= 1.0.0 < 1.2.0" + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" } }, "terser": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.7.tgz", - "integrity": "sha512-rJFxzWIzJdgiOwYIPJHu6L3hDegEYJj2cHuKcngMraUfhMXGDEbok9Tqjw7yxzrU4IagvG74uTEKdiqeG6T7bg==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", "dev": true, "requires": { "commander": "^2.20.0", @@ -21092,42 +24912,26 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } } } }, "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" }, "dependencies": { - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -21137,33 +24941,14 @@ } }, "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - }, - "dependencies": { - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - } + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" } }, "text-table": { @@ -21173,26 +24958,67 @@ "dev": true }, "thread-loader": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.3.tgz", - "integrity": "sha512-wNrVKH2Lcf8ZrWxDF/khdlLlsTMczdcwPA9VEK4c2exlEPynYWxi9op3nPTo5lAnDIkE0rQEB3VBP+4Zncc9Hg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-3.0.4.tgz", + "integrity": "sha512-ByaL2TPb+m6yArpqQUZvP+5S1mZtXsEP7nWKKlAUTm7fCml8kB5s1uI3+eHRP2bk5mVYfRSBI7FFf+tWEyLZwA==", "dev": true, "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.1.0", + "loader-utils": "^2.0.0", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "dev": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } } }, "throat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", - "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", - "dev": true - }, - "throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", "dev": true }, "through": { @@ -21212,9 +25038,9 @@ } }, "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, "timed-out": { @@ -21225,9 +25051,9 @@ "optional": true }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -21244,6 +25070,16 @@ "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, + "tiny-glob": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.8.tgz", + "integrity": "sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==", + "dev": true, + "requires": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, "tiny-lr": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", @@ -21259,26 +25095,20 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, "tinycolor2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", - "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz", + "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==" }, "tmp": { "version": "0.0.33", @@ -21347,67 +25177,37 @@ "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, "toposort": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=" }, - "touch": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", - "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=", - "dev": true, - "requires": { - "nopt": "~1.0.10" - }, - "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, - "requires": { - "abbrev": "1" - } - } - } + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "dev": true }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" } }, "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } + "punycode": "^2.1.1" } }, "traverse": { @@ -21428,25 +25228,25 @@ "dev": true }, "trim-newlines": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", - "integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true, + "optional": true }, "trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", "dev": true, - "optional": true, "requires": { "escape-string-regexp": "^1.0.2" } }, "trim-trailing-lines": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz", - "integrity": "sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", "dev": true }, "trough": { @@ -21455,27 +25255,33 @@ "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "dev": true }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", + "tsconfig-paths": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", + "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", "dev": true, "requires": { - "glob": "^7.1.2" + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" } }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", - "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", - "dev": true - }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -21503,64 +25309,28 @@ "dev": true }, "twemoji": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.1.3.tgz", - "integrity": "sha512-Y5mC7vVovHZvCzdXDepJaU6FHPd7PaW6ZTBMWy9sGYafLBn1x0h2T6aGA3cpnz3WgWWg2QI+3D+9Rn4Z/ViitQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-13.1.0.tgz", + "integrity": "sha512-e3fZRl2S9UQQdBFLYXtTBT6o4vidJMnpWUAhJA+yLGR+kaUTZAt3PixC0cGvvxWSuq2MSz/o0rJraOXrWw/4Ew==", "requires": { "fs-extra": "^8.0.1", "jsonfile": "^5.0.0", - "twemoji-parser": "12.1.0", + "twemoji-parser": "13.1.0", "universalify": "^0.1.2" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "dependencies": { - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" - }, - "jsonfile": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", - "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^0.1.2" - } - } } }, "twemoji-parser": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.1.0.tgz", - "integrity": "sha512-jaHYltumP/E8nR+YzRrY753j9dEpL3zH8+pDXgf9h/10wHeW/9IIjs6mZ1Z/Syh8rIaOQObev1BAX/AinFmuOg==" + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-13.1.0.tgz", + "integrity": "sha512-AQOzLJpYlpWMy8n+0ATyKKZzWlZBJN+G0C+5lhX7Ftc2PeEVdUU/7ns2Pn2vVje26AIZ/OHwFoUbdv6YYD/wGg==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -21579,7 +25349,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -21591,10 +25360,19 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "ua-parser-js": { - "version": "0.7.21", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", - "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==" + "version": "0.7.28", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", + "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==" }, "uc.micro": { "version": "1.0.6", @@ -21603,22 +25381,10 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "version": "3.13.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.9.tgz", + "integrity": "sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g==", + "dev": true }, "uglify-to-browserify": { "version": "1.0.2", @@ -21643,52 +25409,58 @@ "worker-farm": "^1.7.0" }, "dependencies": { + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } + } + } + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" } } }, "unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, - "optional": true, "requires": { "buffer": "^5.2.1", "through": "^2.3.8" - }, - "dependencies": { - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - } } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" }, "underscore.string": { "version": "3.3.5", @@ -21739,18 +25511,16 @@ "dev": true }, "unified": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", - "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-6.2.0.tgz", + "integrity": "sha512-1k+KPhlVtqmG99RaTbAv/usu85fcSRu3wY8X+vnsEhIxNP5VbVIDiXnLqyKIG+UMdyTg0ZX9EI6k2AfjJkHPtA==", "dev": true, "requires": { - "@types/unist": "^2.0.0", - "@types/vfile": "^3.0.0", "bail": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^1.1.0", "trough": "^1.0.0", - "vfile": "^3.0.0", + "vfile": "^2.0.0", "x-is-string": "^0.1.0" } }, @@ -21797,12 +25567,20 @@ } }, "unist-util-find-all-after": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz", - "integrity": "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.2.tgz", + "integrity": "sha512-xaTC/AGZ0rIM2gM28YVRAFPIZpzbpDtU3dRmp7EXlNVA8ziQc4hY3H7BHXM1J49nEmiqc3svnqMReW+PGqbZKQ==", "dev": true, "requires": { - "unist-util-is": "^3.0.0" + "unist-util-is": "^4.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true + } } }, "unist-util-is": { @@ -21821,13 +25599,10 @@ } }, "unist-util-stringify-position": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", - "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", - "dev": true, - "requires": { - "@types/unist": "^2.0.2" - } + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==", + "dev": true }, "unist-util-visit": { "version": "1.4.1", @@ -21860,8 +25635,7 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "unquote": { "version": "1.1.1", @@ -21910,26 +25684,18 @@ } }, "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", "dev": true, "requires": { "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } } }, "uri-path": { @@ -21948,15 +25714,74 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-loader": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", + "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "mime-types": "^2.1.27", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } } }, "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", "dev": true, "requires": { "querystringify": "^2.1.1", @@ -21987,9 +25812,9 @@ "dev": true }, "use-memo-one": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.1.tgz", - "integrity": "sha512-oFfsyun+bP7RX8X2AskHNTxu+R3QdE/RC5IefMbqptmACAA/gfol1KDD5KRzPsGMa62sWxGZw+Ui43u6x4ddoQ==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.2.tgz", + "integrity": "sha512-u2qFKtxLsia/r8qG0ZKkbytbztzRb317XCkT7yP8wxL0tZ/CzK2G+WWie5vWvpyeP7+YoPIwbJoIHJ4Ba4k0oQ==" }, "usertiming": { "version": "0.1.8", @@ -22019,32 +25844,61 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" } }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "v8-to-istanbul": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", + "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -22058,13 +25912,12 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vendors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", - "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", "dev": true }, "verror": { @@ -22079,38 +25932,15 @@ } }, "vfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz", - "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz", + "integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==", "dev": true, "requires": { - "is-buffer": "^2.0.0", + "is-buffer": "^1.1.4", "replace-ext": "1.0.0", "unist-util-stringify-position": "^1.0.0", "vfile-message": "^1.0.0" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "unist-util-stringify-position": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", - "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==", - "dev": true - }, - "vfile-message": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", - "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", - "dev": true, - "requires": { - "unist-util-stringify-position": "^1.1.1" - } - } } }, "vfile-location": { @@ -22120,21 +25950,25 @@ "dev": true }, "vfile-message": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.3.tgz", - "integrity": "sha512-qQg/2z8qnnBHL0psXyF72kCjb9YioIynvyltuNKFaUhRtqTIcIMP3xnBaPzirVZNuBrUe1qwFciSx2yApa4byw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", "dev": true, "requires": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" + "unist-util-stringify-position": "^1.1.1" } }, "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -22144,37 +25978,43 @@ "browser-process-hrtime": "^1.0.0" } }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, "wait-on": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-3.3.0.tgz", - "integrity": "sha512-97dEuUapx4+Y12aknWZn7D25kkjMk16PbWoYzpSdA8bYpVfS6hpl2a2pOWZ3c+Tyt3/i4/pglyZctG3J4V1hWQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.3.0.tgz", + "integrity": "sha512-DwrHrnTK+/0QFaB9a8Ol5Lna3k7WvUR4jzSKmz0YaPBpuN2sACyiPVKVfj6ejnjcajAcvn3wlbTyMIn9AZouOg==", "dev": true, "requires": { - "@hapi/joi": "^15.0.3", - "core-js": "^2.6.5", - "minimist": "^1.2.0", - "request": "^2.88.0", - "rx": "^4.1.0" + "axios": "^0.21.1", + "joi": "^17.3.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^6.6.3" }, "dependencies": { - "core-js": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", - "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", - "dev": true - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "rxjs": { + "version": "6.6.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.6.tgz", + "integrity": "sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } } } }, "wait-port": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-0.2.7.tgz", - "integrity": "sha512-pJ6cSBIa0w1sDg4y/wXN4bmvhM9OneOvwdFHo647L2NShBi/oXG4lRaLic5cO1HaYGbUhEvratPfl/WMlIC+tg==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-0.2.9.tgz", + "integrity": "sha512-hQ/cVKsNqGZ/UbZB/oakOGFqic00YAMM5/PEj3Bt4vKarv2jWIWzDbqlwT94qMs/exAQAsvMOq99sZblV92zxQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -22182,15 +26022,6 @@ "debug": "^4.1.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -22207,30 +26038,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -22244,14 +26051,134 @@ } }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.1" + } + }, + "watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + } } }, "wbuf": { @@ -22269,22 +26196,21 @@ "integrity": "sha512-TOMFWtQdxzjWp8qx4DAraTWTsdhxVSiWa6NkPFSaPtZ1diKUxTn4yTix73A1euG1WbSOMMPcY51cnjTIHrGtDA==" }, "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" }, "webpack": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.0.tgz", - "integrity": "sha512-yNV98U4r7wX1VJAj5kyMsu36T8RPPQntcb5fJLOsMz/pt/WrKC0Vp1bAlqPLkA1LegSwQwf6P+kAbyhRKVQ72g==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", + "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", "dev": true, "requires": { - "@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.2.1", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", @@ -22295,165 +26221,72 @@ "loader-utils": "^1.2.3", "memory-fs": "^0.4.1", "micromatch": "^3.1.10", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "neo-async": "^2.6.1", "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.1", - "watchpack": "^1.6.0", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.6.1", "webpack-sources": "^1.4.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", - "dev": true - }, - "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, - "requires": { - "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-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - } } }, "webpack-bundle-analyzer": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.1.tgz", - "integrity": "sha512-Nfd8HDwfSx1xBwC+P8QMGvHAOITxNBSvu/J/mCJvOwv+G4VWkU7zir9SSenTtyCi0LnVtmsc7G5SZo1uV+bxRw==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.15", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz", + "integrity": "sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==", + "dev": true, + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", "dev": true }, "acorn-walk": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", - "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz", + "integrity": "sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "ws": { + "commander": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true } } }, "webpack-cli": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.11.tgz", - "integrity": "sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", + "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==", "dev": true, "requires": { - "chalk": "2.4.2", - "cross-spawn": "6.0.5", - "enhanced-resolve": "4.1.0", - "findup-sync": "3.0.0", - "global-modules": "2.0.0", - "import-local": "2.0.0", - "interpret": "1.2.0", - "loader-utils": "1.2.3", - "supports-color": "6.1.0", - "v8-compile-cache": "2.0.3", - "yargs": "13.2.4" + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.1", + "findup-sync": "^3.0.0", + "global-modules": "^2.0.0", + "import-local": "^2.0.0", + "interpret": "^1.4.0", + "loader-utils": "^1.4.0", + "supports-color": "^6.1.0", + "v8-compile-cache": "^2.1.1", + "yargs": "^13.3.2" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -22476,17 +26309,6 @@ } } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -22500,33 +26322,6 @@ "which": "^1.2.9" } }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -22534,32 +26329,27 @@ "dev": true, "requires": { "global-prefix": "^3.0.0" - }, - "dependencies": { - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - } } }, "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" } }, "kind-of": { @@ -22568,54 +26358,26 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "require-main-filename": { + "resolve-cwd": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "dependencies": { - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - } + "resolve-from": "^3.0.0" } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, "supports-color": { "version": "6.1.0", @@ -22626,46 +26388,31 @@ "has-flag": "^3.0.0" } }, - "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", - "dev": true - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "isexe": "^2.0.0" } }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", - "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "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" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { @@ -22681,9 +26428,9 @@ } }, "webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", - "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", + "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", "dev": true, "requires": { "memory-fs": "^0.4.1", @@ -22694,9 +26441,9 @@ } }, "webpack-dev-server": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz", - "integrity": "sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", + "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -22707,31 +26454,31 @@ "debug": "^4.1.1", "del": "^4.1.1", "express": "^4.17.1", - "html-entities": "^1.2.1", + "html-entities": "^1.3.1", "http-proxy-middleware": "0.19.1", "import-local": "^2.0.0", "internal-ip": "^4.3.0", "ip": "^1.1.5", "is-absolute-url": "^3.0.3", "killable": "^1.0.1", - "loglevel": "^1.6.4", + "loglevel": "^1.6.8", "opn": "^5.5.0", "p-retry": "^3.0.1", - "portfinder": "^1.0.24", + "portfinder": "^1.0.26", "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", + "selfsigned": "^1.10.8", "semver": "^6.3.0", "serve-index": "^1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.4.0", - "spdy": "^4.0.1", + "sockjs": "^0.3.21", + "sockjs-client": "^1.5.0", + "spdy": "^4.0.2", "strip-ansi": "^3.0.1", "supports-color": "^6.1.0", "url": "^0.11.0", "webpack-dev-middleware": "^3.7.2", "webpack-log": "^2.0.0", "ws": "^6.2.1", - "yargs": "12.0.5" + "yargs": "^13.3.2" }, "dependencies": { "ansi-regex": { @@ -22740,16 +26487,31 @@ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, "chokidar": { @@ -22767,79 +26529,52 @@ "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, + "optional": true, "requires": { - "locate-path": "^3.0.0" + "bindings": "^1.5.0", + "nan": "^2.12.1" } }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "pump": "^3.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } } }, - "invert-kv": { + "import-local": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } }, "is-absolute-url": { "version": "3.0.3", @@ -22847,111 +26582,41 @@ "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "binary-extensions": "^1.0.0" } }, - "p-limit": { + "readdirp": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "p-limit": "^2.0.0" + "resolve-from": "^3.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, - "portfinder": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.24.tgz", - "integrity": "sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -22977,38 +26642,44 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", "dev": true, "requires": { "async-limiter": "~1.0.0" + }, + "dependencies": { + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + } } }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "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 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -23018,11 +26689,12 @@ } }, "webpack-livereload-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/webpack-livereload-plugin/-/webpack-livereload-plugin-2.2.0.tgz", - "integrity": "sha512-sx9xA5mHoNOUgLQI0PmXT3KV9ecsVmUaTgr+fsoL69qAOHw/7VzkL1+ZMDQ8n0dPbWounswK6cBRSgMod7Nhgg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/webpack-livereload-plugin/-/webpack-livereload-plugin-2.3.0.tgz", + "integrity": "sha512-vVBLQLlNpElt2sfsBG+XLDeVbQFS4RrniVU8Hi1/hX5ycSfx6mtW8MEEITr2g0Cvo36kuPWShFFDuy+DS7KFMA==", "dev": true, "requires": { + "anymatch": "^3.1.1", "portfinder": "^1.0.17", "tiny-lr": "^1.1.1" } @@ -23035,6 +26707,20 @@ "requires": { "ansi-colors": "^3.0.0", "uuid": "^3.3.2" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "webpack-sources": { @@ -23056,20 +26742,20 @@ } }, "websocket-driver": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", - "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", "dev": true, "requires": { - "http-parser-js": ">=0.4.0 <0.4.11", + "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "whatwg-encoding": { @@ -23079,12 +26765,23 @@ "dev": true, "requires": { "iconv-lite": "0.4.24" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } } }, "whatwg-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", - "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" }, "whatwg-mimetype": { "version": "2.3.0", @@ -23093,54 +26790,70 @@ "dev": true }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + } + } + }, + "whatwg-url-without-unicode": { + "version": "8.0.0-3", + "resolved": "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz", + "integrity": "sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig==", + "requires": { + "buffer": "^5.4.3", + "punycode": "^2.1.1", + "webidl-conversions": "^5.0.0" } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wicg-inert": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/wicg-inert/-/wicg-inert-2.2.1.tgz", - "integrity": "sha512-xaI3ig1hhEcec2+5uUs9i2BrVXzJ83dOn2ij3ze2RAKUQ4X03Cm99SLny1Vh1KL4Rc1SPZnQOs0mdtVkQ0Tclw==" - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/wicg-inert/-/wicg-inert-3.1.1.tgz", + "integrity": "sha512-PhBaNh8ur9Xm4Ggy4umelwNIP6pPP1bv3EaWaKqfb/QNme2rdLjm7wIInvV4WhxVHhzA4Spgw9qNSqWtB/ca2A==" }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" }, - "wolfy87-eventemitter": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-4.3.0.tgz", - "integrity": "sha1-ZJc5bJXnQ1nwa241QJM5MY2Nlk8=" - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -23162,50 +26875,13 @@ } }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } }, "wrappy": { @@ -23213,34 +26889,22 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", - "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" }, "x-is-string": { "version": "0.1.0", @@ -23260,10 +26924,16 @@ "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=", "dev": true }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, "xmlcreate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.1.tgz", - "integrity": "sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", + "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", "dev": true }, "xmlrpc": { @@ -23276,45 +26946,31 @@ "xmlbuilder": "8.2.x" } }, - "xregexp": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz", - "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==", - "dev": true, - "requires": { - "@babel/runtime-corejs3": "^7.8.3" - } - }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" }, "yaku": { - "version": "0.18.6", - "resolved": "https://registry.npmjs.org/yaku/-/yaku-0.18.6.tgz", - "integrity": "sha512-pZ7KsMhnb8+46v6w17H96r16iA3O0qalqE7FMfiSYYEgyh7yBBVT7/bzTeYCAW3FnD1U4BElijQm4g13dETKqw==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/yaku/-/yaku-1.0.1.tgz", + "integrity": "sha512-uZCrhA5DEytGnFfw9XZKIoWRG43v6oCA20vInFS4anPJb3G5Hy+PKuaKSMTJ+aChvFdNDxY5K8jFx5wmlLbTjQ==" }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz", - "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==", - "requires": { - "@babel/runtime": "^7.8.7" - } + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" }, "yargs": { "version": "14.2.3", @@ -23332,93 +26988,38 @@ "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^15.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - } } }, "yargs-parser": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", - "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", + "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "requires": { - "fd-slicer": "~1.0.1" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true } } } diff --git a/package.json b/package.json index 1c22e1146e866..d3b6998d602c5 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,19 @@ { "name": "WordPress", - "version": "5.5.0", + "version": "5.9.0", "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", "repository": { "type": "svn", "url": "https://develop.svn.wordpress.org/trunk" }, "engines": { - "node": "10.13.0", - "npm": "6.1.0" + "node": ">=14.15.0", + "npm": ">=6.14.8" }, "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", "browserslist": [ "> 1%", - "ie >= 11", "last 1 Android versions", "last 1 ChromeAndroid versions", "last 2 Chrome versions", @@ -25,124 +24,134 @@ "last 2 Opera versions" ], "devDependencies": { - "@wordpress/custom-templated-path-webpack-plugin": "1.6.0", - "@wordpress/dependency-extraction-webpack-plugin": "2.4.0", - "@wordpress/e2e-test-utils": "4.3.1", - "@wordpress/library-export-default-webpack-plugin": "1.6.0", - "@wordpress/scripts": "6.2.0", - "autoprefixer": "9.6.2", - "check-node-version": "4.0.1", - "copy-webpack-plugin": "^5.1.1", - "cssnano": "4.1.10", - "dotenv": "8.1.0", + "@wordpress/babel-preset-default": "6.2.1", + "@wordpress/custom-templated-path-webpack-plugin": "2.0.5", + "@wordpress/dependency-extraction-webpack-plugin": "3.1.4", + "@wordpress/e2e-test-utils": "5.4.3", + "@wordpress/library-export-default-webpack-plugin": "2.0.5", + "@wordpress/scripts": "16.1.5", + "autoprefixer": "^9.8.6", + "chalk": "4.1.1", + "check-node-version": "4.1.0", + "copy-webpack-plugin": "^5.1.2", + "cssnano": "4.1.11", + "dotenv": "10.0.0", "dotenv-expand": "5.1.0", - "grunt": "~1.0.4", + "grunt": "~1.4.1", "grunt-banner": "^0.6.0", "grunt-contrib-clean": "~2.0.0", "grunt-contrib-concat": "1.0.1", "grunt-contrib-copy": "~1.0.0", - "grunt-contrib-cssmin": "~3.0.0", - "grunt-contrib-imagemin": "~3.1.0", - "grunt-contrib-jshint": "2.1.0", - "grunt-contrib-qunit": "^1.2.0", - "grunt-contrib-uglify": "~4.0.1", + "grunt-contrib-cssmin": "~4.0.0", + "grunt-contrib-imagemin": "~4.0.0", + "grunt-contrib-jshint": "3.0.0", + "grunt-contrib-qunit": "^4.0.0", + "grunt-contrib-uglify": "~5.0.1", "grunt-contrib-watch": "~1.1.0", "grunt-file-append": "0.0.7", "grunt-includes": "~1.1.0", - "grunt-jsdoc": "2.4.0", + "grunt-jsdoc": "2.4.1", "grunt-jsvalidate": "~0.2.2", - "grunt-legacy-util": "^1.1.1", - "grunt-patch-wordpress": "~2.0.0", + "grunt-legacy-util": "^2.0.1", + "grunt-patch-wordpress": "~3.0.0", "grunt-postcss": "~0.9.0", "grunt-replace-lts": "~1.1.0", - "grunt-rtlcss": "~2.0.1", + "grunt-rtlcss": "~2.0.2", "grunt-sass": "~3.1.0", - "grunt-webpack": "^3.1.3", + "grunt-webpack": "^4.0.3", "ink-docstrap": "1.3.2", "install-changed": "1.1.0", - "jquery-migrate": "1.4.1", + "jest-image-snapshot": "3.0.1", "matchdep": "~2.0.0", - "node-sass": "~4.13.1", - "qunit": "~2.9.0", - "sinon": "~9.0.0", - "sinon-test": "~3.0.0", - "source-map-loader": "^0.2.4", - "uglify-js": "^3.6.0", + "prettier": "npm:wp-prettier@2.0.5", + "qunit": "~2.16.0", + "sass": "^1.34.1", + "sinon": "~11.1.1", + "sinon-test": "~3.1.0", + "source-map-loader": "^1.1.3", + "uglify-js": "^3.13.9", "uglifyjs-webpack-plugin": "2.2.0", - "wait-on": "3.3.0", - "webpack": "4.41.0", - "webpack-dev-server": "3.8.2", - "webpack-livereload-plugin": "2.2.0" + "uuid": "8.3.2", + "wait-on": "5.3.0", + "webpack": "4.43.0", + "webpack-dev-server": "3.11.2", + "webpack-livereload-plugin": "2.3.0" }, "dependencies": { - "@babel/polyfill": "7.4.4", - "@wordpress/a11y": "2.7.0", - "@wordpress/annotations": "1.12.3", - "@wordpress/api-fetch": "3.11.0", - "@wordpress/autop": "2.6.0", - "@wordpress/blob": "2.7.0", - "@wordpress/block-directory": "1.5.7", - "@wordpress/block-editor": "3.7.7", - "@wordpress/block-library": "2.14.7", - "@wordpress/block-serialization-default-parser": "3.5.0", - "@wordpress/blocks": "6.12.3", - "@wordpress/components": "9.2.6", - "@wordpress/compose": "3.11.0", - "@wordpress/core-data": "2.12.3", - "@wordpress/data": "4.14.2", - "@wordpress/data-controls": "1.8.2", - "@wordpress/date": "3.8.0", - "@wordpress/deprecated": "2.7.0", - "@wordpress/dom": "2.8.0", - "@wordpress/dom-ready": "2.7.0", - "@wordpress/edit-post": "3.13.9", - "@wordpress/editor": "9.12.7", - "@wordpress/element": "2.11.0", - "@wordpress/escape-html": "1.7.0", - "@wordpress/format-library": "1.14.7", - "@wordpress/hooks": "2.7.0", - "@wordpress/html-entities": "2.6.0", - "@wordpress/i18n": "3.9.0", - "@wordpress/icons": "1.1.0", - "@wordpress/is-shallow-equal": "1.8.0", - "@wordpress/keyboard-shortcuts": "1.1.2", - "@wordpress/keycodes": "2.9.0", - "@wordpress/list-reusable-blocks": "1.13.6", - "@wordpress/media-utils": "1.7.2", - "@wordpress/notices": "2.0.2", - "@wordpress/nux": "3.12.6", - "@wordpress/plugins": "2.12.0", - "@wordpress/primitives": "1.1.0", - "@wordpress/priority-queue": "1.5.1", - "@wordpress/redux-routine": "3.7.0", - "@wordpress/rich-text": "3.12.2", - "@wordpress/server-side-render": "1.8.6", - "@wordpress/shortcode": "2.6.0", - "@wordpress/token-list": "1.9.0", - "@wordpress/url": "2.11.0", - "@wordpress/viewport": "2.13.2", - "@wordpress/warning": "1.0.0", - "@wordpress/wordcount": "2.7.0", + "@wordpress/a11y": "3.1.2", + "@wordpress/annotations": "2.1.6", + "@wordpress/api-fetch": "5.1.2", + "@wordpress/autop": "3.1.2", + "@wordpress/blob": "3.1.2", + "@wordpress/block-directory": "2.1.21", + "@wordpress/block-editor": "6.1.14", + "@wordpress/block-library": "3.2.19", + "@wordpress/block-serialization-default-parser": "4.1.2", + "@wordpress/blocks": "9.1.8", + "@wordpress/components": "14.1.11", + "@wordpress/compose": "4.1.6", + "@wordpress/core-data": "3.1.12", + "@wordpress/customize-widgets": "1.0.20", + "@wordpress/data": "5.1.6", + "@wordpress/data-controls": "2.1.6", + "@wordpress/date": "4.1.2", + "@wordpress/deprecated": "3.1.2", + "@wordpress/dom": "3.1.5", + "@wordpress/dom-ready": "3.1.2", + "@wordpress/edit-post": "4.1.21", + "@wordpress/edit-widgets": "2.1.21", + "@wordpress/editor": "10.1.17", + "@wordpress/element": "3.1.2", + "@wordpress/escape-html": "2.1.2", + "@wordpress/format-library": "2.1.14", + "@wordpress/hooks": "3.1.1", + "@wordpress/html-entities": "3.1.2", + "@wordpress/i18n": "4.1.2", + "@wordpress/icons": "4.0.3", + "@wordpress/interface": "3.1.12", + "@wordpress/is-shallow-equal": "4.1.1", + "@wordpress/keyboard-shortcuts": "2.1.7", + "@wordpress/keycodes": "3.1.2", + "@wordpress/list-reusable-blocks": "2.1.11", + "@wordpress/media-utils": "2.1.2", + "@wordpress/notices": "3.1.6", + "@wordpress/nux": "4.1.11", + "@wordpress/plugins": "3.1.6", + "@wordpress/primitives": "2.1.2", + "@wordpress/priority-queue": "2.1.2", + "@wordpress/redux-routine": "4.1.2", + "@wordpress/reusable-blocks": "2.1.17", + "@wordpress/rich-text": "4.1.6", + "@wordpress/server-side-render": "2.1.12", + "@wordpress/shortcode": "3.1.2", + "@wordpress/token-list": "2.1.1", + "@wordpress/url": "3.1.2", + "@wordpress/viewport": "3.1.6", + "@wordpress/warning": "2.1.2", + "@wordpress/widgets": "1.1.19", + "@wordpress/wordcount": "3.1.2", "backbone": "1.4.0", - "clipboard": "2.0.4", + "clipboard": "2.0.8", "core-js-url-browser": "3.6.4", "element-closest": "^2.0.2", - "formdata-polyfill": "3.0.13", + "formdata-polyfill": "4.0.0", "hoverintent": "2.2.1", - "imagesloaded": "3.2.0", - "jquery-color": "https://github.com/jquery/jquery-color/archive/2.1.2.tar.gz", - "jquery-form": "4.2.1", - "jquery-hoverintent": "1.8.3", - "jquery-ui": "https://github.com/jquery/jquery-ui/archive/1.11.4.tar.gz", - "lodash": "4.17.15", - "masonry-layout": "3.3.2", - "moment": "2.22.2", - "polyfill-library": "3.42.0", - "react": "16.9.0", - "react-dom": "16.9.0", - "twemoji": "12.1.3", - "underscore": "1.8.3", - "whatwg-fetch": "3.0.0" + "imagesloaded": "4.1.4", + "jquery": "3.6.0", + "jquery-color": "2.2.0", + "jquery-form": "4.3.0", + "jquery-hoverintent": "1.10.1", + "lodash": "4.17.21", + "masonry-layout": "4.2.2", + "moment": "2.29.1", + "objectFitPolyfill": "2.3.5", + "polyfill-library": "3.105.0", + "react": "16.13.1", + "react-dom": "16.13.1", + "regenerator-runtime": "0.13.7", + "twemoji": "13.1.0", + "underscore": "1.13.1", + "whatwg-fetch": "3.6.2" }, "scripts": { "build": "grunt build", @@ -151,6 +160,8 @@ "test": "grunt test", "watch": "grunt watch", "grunt": "grunt", + "lint:jsdoc": "wp-scripts lint-js", + "lint:jsdoc:fix": "wp-scripts lint-js --fix", "env:start": "node ./tools/local-env/scripts/start.js", "env:stop": "node ./tools/local-env/scripts/docker.js down", "env:restart": "npm run env:stop && npm run env:start", @@ -160,7 +171,9 @@ "env:cli": "node ./tools/local-env/scripts/docker.js run cli", "env:logs": "node ./tools/local-env/scripts/docker.js logs", "env:pull": "node ./tools/local-env/scripts/docker.js pull", - "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit", - "test:e2e": "node ./tests/e2e/run-tests.js" + "test:php": "node ./tools/local-env/scripts/docker.js run -T php composer update -W && node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit", + "test:e2e": "node ./tests/e2e/run-tests.js", + "test:visual": "node ./tests/visual-regression/run-tests.js", + "wp-packages-update": "wp-scripts packages-update" } } diff --git a/phpcompat.xml.dist b/phpcompat.xml.dist index 3ff7f8b302961..5af8e2a5039ae 100644 --- a/phpcompat.xml.dist +++ b/phpcompat.xml.dist @@ -74,7 +74,7 @@ - + /src/wp-includes/wp-db\.php diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3718c5aab1b88..dedf053d632aa 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -96,7 +96,7 @@ - + ^build/* @@ -112,11 +112,9 @@ /src/wp-includes/class-IXR\.php /src/wp-includes/class-json\.php /src/wp-includes/class-phpass\.php - /src/wp-includes/class-phpmailer\.php /src/wp-includes/class-pop3\.php /src/wp-includes/class-requests\.php /src/wp-includes/class-simplepie\.php - /src/wp-includes/class-smtp\.php /src/wp-includes/class-snoopy\.php /src/wp-includes/class-wp-block-parser\.php /src/wp-includes/deprecated\.php @@ -129,13 +127,12 @@ /src/wp-includes/ID3/* /src/wp-includes/IXR/* /src/wp-includes/js/* + /src/wp-includes/PHPMailer/* /src/wp-includes/random_compat/* /src/wp-includes/Requests/* /src/wp-includes/SimplePie/* - /src/wp-includes/Text/* /src/wp-includes/sodium_compat/* - - /tests/phpunit/includes/speed-trap-listener\.php + /src/wp-includes/Text/* /tests/phpunit/build* @@ -234,20 +231,18 @@ - - - - - - - - + + + + + + - - + - + + @@ -263,8 +258,8 @@ - + @@ -286,6 +281,7 @@ + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b7da1303c17f6..20267a5e9113d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,15 @@ @@ -29,17 +36,6 @@ - - - - - - 150 - - - - - src @@ -48,10 +44,15 @@ src/wp-includes/ID3 src/wp-includes/IXR src/wp-includes/random_compat + src/wp-includes/PHPMailer src/wp-includes/Requests src/wp-includes/SimplePie + src/wp-includes/sodium_compat src/wp-includes/Text + + src/wp-content/ + src/wp-admin/includes/class-ftp* src/wp-admin/includes/class-pclzip.php src/wp-admin/includes/deprecated.php @@ -61,11 +62,9 @@ src/wp-includes/class-IXR.php src/wp-includes/class-json.php src/wp-includes/class-phpass.php - src/wp-includes/class-phpmailer.php src/wp-includes/class-pop3.php src/wp-includes/class-requests.php src/wp-includes/class-simplepie.php - src/wp-includes/class-smtp.php src/wp-includes/class-snoopy.php src/wp-includes/deprecated.php src/wp-includes/ms-deprecated.php diff --git a/src/js/_enqueues/admin/application-passwords.js b/src/js/_enqueues/admin/application-passwords.js new file mode 100644 index 0000000000000..ae9fe43b0c1a5 --- /dev/null +++ b/src/js/_enqueues/admin/application-passwords.js @@ -0,0 +1,219 @@ +/** + * @output wp-admin/js/application-passwords.js + */ + +( function( $ ) { + var $appPassSection = $( '#application-passwords-section' ), + $newAppPassForm = $appPassSection.find( '.create-application-password' ), + $newAppPassField = $newAppPassForm.find( '.input' ), + $newAppPassButton = $newAppPassForm.find( '.button' ), + $appPassTwrapper = $appPassSection.find( '.application-passwords-list-table-wrapper' ), + $appPassTbody = $appPassSection.find( 'tbody' ), + $appPassTrNoItems = $appPassTbody.find( '.no-items' ), + $removeAllBtn = $( '#revoke-all-application-passwords' ), + tmplNewAppPass = wp.template( 'new-application-password' ), + tmplAppPassRow = wp.template( 'application-password-row' ), + userId = $( '#user_id' ).val(); + + $newAppPassButton.on( 'click', function( e ) { + e.preventDefault(); + + if ( $newAppPassButton.prop( 'aria-disabled' ) ) { + return; + } + + var name = $newAppPassField.val(); + + if ( 0 === name.length ) { + $newAppPassField.trigger( 'focus' ); + return; + } + + clearNotices(); + $newAppPassButton.prop( 'aria-disabled', true ).addClass( 'disabled' ); + + var request = { + name: name + }; + + /** + * Filters the request data used to create a new Application Password. + * + * @since 5.6.0 + * + * @param {Object} request The request data. + * @param {number} userId The id of the user the password is added for. + */ + request = wp.hooks.applyFilters( 'wp_application_passwords_new_password_request', request, userId ); + + wp.apiRequest( { + path: '/wp/v2/users/' + userId + '/application-passwords?_locale=user', + method: 'POST', + data: request + } ).always( function() { + $newAppPassButton.removeProp( 'aria-disabled' ).removeClass( 'disabled' ); + } ).done( function( response ) { + $newAppPassField.val( '' ); + $newAppPassButton.prop( 'disabled', false ); + + $newAppPassForm.after( tmplNewAppPass( { + name: response.name, + password: response.password + } ) ); + $( '.new-application-password-notice' ).trigger( 'focus' ); + + $appPassTbody.prepend( tmplAppPassRow( response ) ); + + $appPassTwrapper.show(); + $appPassTrNoItems.remove(); + + /** + * Fires after an application password has been successfully created. + * + * @since 5.6.0 + * + * @param {Object} response The response data from the REST API. + * @param {Object} request The request data used to create the password. + */ + wp.hooks.doAction( 'wp_application_passwords_created_password', response, request ); + } ).fail( handleErrorResponse ); + } ); + + $appPassTbody.on( 'click', '.delete', function( e ) { + e.preventDefault(); + + if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to revoke this password? This action cannot be undone.' ) ) ) { + return; + } + + var $submitButton = $( this ), + $tr = $submitButton.closest( 'tr' ), + uuid = $tr.data( 'uuid' ); + + clearNotices(); + $submitButton.prop( 'disabled', true ); + + wp.apiRequest( { + path: '/wp/v2/users/' + userId + '/application-passwords/' + uuid + '?_locale=user', + method: 'DELETE' + } ).always( function() { + $submitButton.prop( 'disabled', false ); + } ).done( function( response ) { + if ( response.deleted ) { + if ( 0 === $tr.siblings().length ) { + $appPassTwrapper.hide(); + } + $tr.remove(); + + addNotice( wp.i18n.__( 'Application password revoked.' ), 'success' ).trigger( 'focus' ); + } + } ).fail( handleErrorResponse ); + } ); + + $removeAllBtn.on( 'click', function( e ) { + e.preventDefault(); + + if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to revoke all passwords? This action cannot be undone.' ) ) ) { + return; + } + + var $submitButton = $( this ); + + clearNotices(); + $submitButton.prop( 'disabled', true ); + + wp.apiRequest( { + path: '/wp/v2/users/' + userId + '/application-passwords?_locale=user', + method: 'DELETE' + } ).always( function() { + $submitButton.prop( 'disabled', false ); + } ).done( function( response ) { + if ( response.deleted ) { + $appPassTbody.children().remove(); + $appPassSection.children( '.new-application-password' ).remove(); + $appPassTwrapper.hide(); + + addNotice( wp.i18n.__( 'All application passwords revoked.' ), 'success' ).trigger( 'focus' ); + } + } ).fail( handleErrorResponse ); + } ); + + $appPassSection.on( 'click', '.notice-dismiss', function( e ) { + e.preventDefault(); + var $el = $( this ).parent(); + $el.removeAttr( 'role' ); + $el.fadeTo( 100, 0, function () { + $el.slideUp( 100, function () { + $el.remove(); + $newAppPassField.trigger( 'focus' ); + } ); + } ); + } ); + + $newAppPassField.on( 'keypress', function ( e ) { + if ( 13 === e.which ) { + e.preventDefault(); + $newAppPassButton.trigger( 'click' ); + } + } ); + + // If there are no items, don't display the table yet. If there are, show it. + if ( 0 === $appPassTbody.children( 'tr' ).not( $appPassTrNoItems ).length ) { + $appPassTwrapper.hide(); + } + + /** + * Handles an error response from the REST API. + * + * @since 5.6.0 + * + * @param {jqXHR} xhr The XHR object from the ajax call. + * @param {string} textStatus The string categorizing the ajax request's status. + * @param {string} errorThrown The HTTP status error text. + */ + function handleErrorResponse( xhr, textStatus, errorThrown ) { + var errorMessage = errorThrown; + + if ( xhr.responseJSON && xhr.responseJSON.message ) { + errorMessage = xhr.responseJSON.message; + } + + addNotice( errorMessage, 'error' ); + } + + /** + * Displays a message in the Application Passwords section. + * + * @since 5.6.0 + * + * @param {string} message The message to display. + * @param {string} type The notice type. Either 'success' or 'error'. + * @returns {jQuery} The notice element. + */ + function addNotice( message, type ) { + var $notice = $( '
' ) + .attr( 'role', 'alert' ) + .attr( 'tabindex', '-1' ) + .addClass( 'is-dismissible notice notice-' + type ) + .append( $( '

' ).text( message ) ) + .append( + $( '' ) + .attr( 'type', 'button' ) + .addClass( 'notice-dismiss' ) + .append( $( '' ).addClass( 'screen-reader-text' ).text( wp.i18n.__( 'Dismiss this notice.' ) ) ) + ); + + $newAppPassForm.after( $notice ); + + return $notice; + } + + /** + * Clears notice messages from the Application Passwords section. + * + * @since 5.6.0 + */ + function clearNotices() { + $( '.notice', $appPassSection ).remove(); + } +}( jQuery ) ); diff --git a/src/js/_enqueues/admin/auth-app.js b/src/js/_enqueues/admin/auth-app.js new file mode 100644 index 0000000000000..99478d1824a2d --- /dev/null +++ b/src/js/_enqueues/admin/auth-app.js @@ -0,0 +1,165 @@ +/** + * @output wp-admin/js/auth-app.js + */ + +/* global authApp */ + +( function( $, authApp ) { + var $appNameField = $( '#app_name' ), + $approveBtn = $( '#approve' ), + $rejectBtn = $( '#reject' ), + $form = $appNameField.closest( 'form' ), + context = { + userLogin: authApp.user_login, + successUrl: authApp.success, + rejectUrl: authApp.reject + }; + + $approveBtn.on( 'click', function( e ) { + var name = $appNameField.val(), + appId = $( 'input[name="app_id"]', $form ).val(); + + e.preventDefault(); + + if ( $approveBtn.prop( 'aria-disabled' ) ) { + return; + } + + if ( 0 === name.length ) { + $appNameField.trigger( 'focus' ); + return; + } + + $approveBtn.prop( 'aria-disabled', true ).addClass( 'disabled' ); + + var request = { + name: name + }; + + if ( appId.length > 0 ) { + request.app_id = appId; + } + + /** + * Filters the request data used to Authorize an Application Password request. + * + * @since 5.6.0 + * + * @param {Object} request The request data. + * @param {Object} context Context about the Application Password request. + * @param {string} context.userLogin The user's login username. + * @param {string} context.successUrl The URL the user will be redirected to after approving the request. + * @param {string} context.rejectUrl The URL the user will be redirected to after rejecting the request. + */ + request = wp.hooks.applyFilters( 'wp_application_passwords_approve_app_request', request, context ); + + wp.apiRequest( { + path: '/wp/v2/users/me/application-passwords?_locale=user', + method: 'POST', + data: request + } ).done( function( response, textStatus, jqXHR ) { + + /** + * Fires when an Authorize Application Password request has been successfully approved. + * + * In most cases, this should be used in combination with the {@see 'wp_authorize_application_password_form_approved_no_js'} + * action to ensure that both the JS and no-JS variants are handled. + * + * @since 5.6.0 + * + * @param {Object} response The response from the REST API. + * @param {string} response.password The newly created password. + * @param {string} textStatus The status of the request. + * @param {jqXHR} jqXHR The underlying jqXHR object that made the request. + */ + wp.hooks.doAction( 'wp_application_passwords_approve_app_request_success', response, textStatus, jqXHR ); + + var raw = authApp.success, + url, message, $notice; + + if ( raw ) { + url = raw + ( -1 === raw.indexOf( '?' ) ? '?' : '&' ) + + 'site_url=' + encodeURIComponent( authApp.site_url ) + + '&user_login=' + encodeURIComponent( authApp.user_login ) + + '&password=' + encodeURIComponent( response.password ); + + window.location = url; + } else { + message = wp.i18n.sprintf( + /* translators: %s: Application name. */ + '', + '' + ) + ' '; + $notice = $( '
' ) + .attr( 'role', 'alert' ) + .attr( 'tabindex', -1 ) + .addClass( 'notice notice-success notice-alt' ) + .append( $( '

' ).addClass( 'application-password-display' ).html( message ) ) + .append( '

' + wp.i18n.__( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ) + '

' ); + + // We're using .text() to write the variables to avoid any chance of XSS. + $( 'strong', $notice ).text( response.name ); + $( 'input', $notice ).val( response.password ); + + $form.replaceWith( $notice ); + $notice.trigger( 'focus' ); + } + } ).fail( function( jqXHR, textStatus, errorThrown ) { + var errorMessage = errorThrown, + error = null; + + if ( jqXHR.responseJSON ) { + error = jqXHR.responseJSON; + + if ( error.message ) { + errorMessage = error.message; + } + } + + var $notice = $( '
' ) + .attr( 'role', 'alert' ) + .addClass( 'notice notice-error' ) + .append( $( '

' ).text( errorMessage ) ); + + $( 'h1' ).after( $notice ); + + $approveBtn.removeProp( 'aria-disabled', false ).removeClass( 'disabled' ); + + /** + * Fires when an Authorize Application Password request encountered an error when trying to approve the request. + * + * @since 5.6.0 + * @since 5.6.1 Corrected action name and signature. + * + * @param {Object|null} error The error from the REST API. May be null if the server did not send proper JSON. + * @param {string} textStatus The status of the request. + * @param {string} errorThrown The error message associated with the response status code. + * @param {jqXHR} jqXHR The underlying jqXHR object that made the request. + */ + wp.hooks.doAction( 'wp_application_passwords_approve_app_request_error', error, textStatus, errorThrown, jqXHR ); + } ); + } ); + + $rejectBtn.on( 'click', function( e ) { + e.preventDefault(); + + /** + * Fires when an Authorize Application Password request has been rejected by the user. + * + * @since 5.6.0 + * + * @param {Object} context Context about the Application Password request. + * @param {string} context.userLogin The user's login username. + * @param {string} context.successUrl The URL the user will be redirected to after approving the request. + * @param {string} context.rejectUrl The URL the user will be redirected to after rejecting the request. + */ + wp.hooks.doAction( 'wp_application_passwords_reject_app', context ); + + // @todo: Make a better way to do this so it feels like less of a semi-open redirect. + window.location = authApp.reject; + } ); + + $form.on( 'submit', function( e ) { + e.preventDefault(); + } ); +}( jQuery, authApp ) ); diff --git a/src/js/_enqueues/admin/comment.js b/src/js/_enqueues/admin/comment.js index fd347d448b1cb..4e4f3c5ed98d4 100644 --- a/src/js/_enqueues/admin/comment.js +++ b/src/js/_enqueues/admin/comment.js @@ -2,7 +2,7 @@ * @output wp-admin/js/comment.js */ -/* global postboxes, commentL10n */ +/* global postboxes */ /** * Binds to the document ready event. @@ -11,7 +11,7 @@ * * @param {jQuery} $ The jQuery object. */ -jQuery(document).ready( function($) { +jQuery( function($) { postboxes.add_postbox_toggles('comment'); @@ -29,11 +29,11 @@ jQuery(document).ready( function($) { * @param {Event} event The event object. * @return {void} */ - $edittimestamp.click( function( event ) { + $edittimestamp.on( 'click', function( event ) { if ( $timestampdiv.is( ':hidden' ) ) { // Slide down the form and set focus on the first field. $timestampdiv.slideDown( 'fast', function() { - $( 'input, select', $timestampwrap ).first().focus(); + $( 'input, select', $timestampwrap ).first().trigger( 'focus' ); } ); $(this).hide(); } @@ -49,9 +49,9 @@ jQuery(document).ready( function($) { * @return {void} */ - $timestampdiv.find('.cancel-timestamp').click( function( event ) { + $timestampdiv.find('.cancel-timestamp').on( 'click', function( event ) { // Move focus back to the Edit link. - $edittimestamp.show().focus(); + $edittimestamp.show().trigger( 'focus' ); $timestampdiv.slideUp( 'fast' ); $('#mm').val($('#hidden_mm').val()); $('#jj').val($('#hidden_jj').val()); @@ -70,7 +70,7 @@ jQuery(document).ready( function($) { * @param {Event} event The event object. * @return {void} */ - $timestampdiv.find('.save-timestamp').click( function( event ) { // Crazyhorse - multiple OK cancels. + $timestampdiv.find('.save-timestamp').on( 'click', function( event ) { // Crazyhorse - multiple OK cancels. var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(), newD = new Date( aa, mm - 1, jj, hh, mn ); @@ -84,8 +84,9 @@ jQuery(document).ready( function($) { } $timestamp.html( - commentL10n.submittedOn + ' ' + - commentL10n.dateFormat + wp.i18n.__( 'Submitted on:' ) + ' ' + + /* translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. */ + wp.i18n.__( '%1$s %2$s, %3$s at %4$s:%5$s' ) .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) .replace( '%2$s', parseInt( jj, 10 ) ) .replace( '%3$s', aa ) @@ -95,7 +96,7 @@ jQuery(document).ready( function($) { ); // Move focus back to the Edit link. - $edittimestamp.show().focus(); + $edittimestamp.show().trigger( 'focus' ); $timestampdiv.slideUp( 'fast' ); }); }); diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index 75c77b3bac57a..d5e2d9ad5841e 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -2,7 +2,7 @@ * @output wp-admin/js/common.js */ -/* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */ +/* global setUserSetting, ajaxurl, alert, confirm, pagenow */ /* global columns, screenMeta */ /** @@ -15,7 +15,343 @@ ( function( $, window, undefined ) { var $document = $( document ), $window = $( window ), - $body = $( document.body ); + $body = $( document.body ), + __ = wp.i18n.__, + sprintf = wp.i18n.sprintf; + +/** + * Throws an error for a deprecated property. + * + * @since 5.5.1 + * + * @param {string} propName The property that was used. + * @param {string} version The version of WordPress that deprecated the property. + * @param {string} replacement The property that should have been used. + */ +function deprecatedProperty( propName, version, replacement ) { + var message; + + if ( 'undefined' !== typeof replacement ) { + message = sprintf( + /* translators: 1: Deprecated property name, 2: Version number, 3: Alternative property name. */ + __( '%1$s is deprecated since version %2$s! Use %3$s instead.' ), + propName, + version, + replacement + ); + } else { + message = sprintf( + /* translators: 1: Deprecated property name, 2: Version number. */ + __( '%1$s is deprecated since version %2$s with no alternative available.' ), + propName, + version + ); + } + + window.console.warn( message ); +} + +/** + * Deprecate all properties on an object. + * + * @since 5.5.1 + * @since 5.6.0 Added the `version` parameter. + * + * @param {string} name The name of the object, i.e. commonL10n. + * @param {object} l10nObject The object to deprecate the properties on. + * @param {string} version The version of WordPress that deprecated the property. + * + * @return {object} The object with all its properties deprecated. + */ +function deprecateL10nObject( name, l10nObject, version ) { + var deprecatedObject = {}; + + Object.keys( l10nObject ).forEach( function( key ) { + var prop = l10nObject[ key ]; + var propName = name + '.' + key; + + if ( 'object' === typeof prop ) { + Object.defineProperty( deprecatedObject, key, { get: function() { + deprecatedProperty( propName, version, prop.alternative ); + return prop.func(); + } } ); + } else { + Object.defineProperty( deprecatedObject, key, { get: function() { + deprecatedProperty( propName, version, 'wp.i18n' ); + return prop; + } } ); + } + } ); + + return deprecatedObject; +} + +window.wp.deprecateL10nObject = deprecateL10nObject; + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.6.0 + * @deprecated 5.5.0 + */ +window.commonL10n = window.commonL10n || { + warnDelete: '', + dismiss: '', + collapseMenu: '', + expandMenu: '' +}; + +window.commonL10n = deprecateL10nObject( 'commonL10n', window.commonL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 3.3.0 + * @deprecated 5.5.0 + */ +window.wpPointerL10n = window.wpPointerL10n || { + dismiss: '' +}; + +window.wpPointerL10n = deprecateL10nObject( 'wpPointerL10n', window.wpPointerL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 4.3.0 + * @deprecated 5.5.0 + */ +window.userProfileL10n = window.userProfileL10n || { + warn: '', + warnWeak: '', + show: '', + hide: '', + cancel: '', + ariaShow: '', + ariaHide: '' +}; + +window.userProfileL10n = deprecateL10nObject( 'userProfileL10n', window.userProfileL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 4.9.6 + * @deprecated 5.5.0 + */ +window.privacyToolsL10n = window.privacyToolsL10n || { + noDataFound: '', + foundAndRemoved: '', + noneRemoved: '', + someNotRemoved: '', + removalError: '', + emailSent: '', + noExportFile: '', + exportError: '' +}; + +window.privacyToolsL10n = deprecateL10nObject( 'privacyToolsL10n', window.privacyToolsL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 3.6.0 + * @deprecated 5.5.0 + */ +window.authcheckL10n = { + beforeunload: '' +}; + +window.authcheckL10n = window.authcheckL10n || deprecateL10nObject( 'authcheckL10n', window.authcheckL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.8.0 + * @deprecated 5.5.0 + */ +window.tagsl10n = { + noPerm: '', + broken: '' +}; + +window.tagsl10n = window.tagsl10n || deprecateL10nObject( 'tagsl10n', window.tagsl10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.5.0 + * @deprecated 5.5.0 + */ +window.adminCommentsL10n = window.adminCommentsL10n || { + hotkeys_highlight_first: { + alternative: 'window.adminCommentsSettings.hotkeys_highlight_first', + func: function() { return window.adminCommentsSettings.hotkeys_highlight_first; } + }, + hotkeys_highlight_last: { + alternative: 'window.adminCommentsSettings.hotkeys_highlight_last', + func: function() { return window.adminCommentsSettings.hotkeys_highlight_last; } + }, + replyApprove: '', + reply: '', + warnQuickEdit: '', + warnCommentChanges: '', + docTitleComments: '', + docTitleCommentsCount: '' +}; + +window.adminCommentsL10n = deprecateL10nObject( 'adminCommentsL10n', window.adminCommentsL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.5.0 + * @deprecated 5.5.0 + */ +window.tagsSuggestL10n = window.tagsSuggestL10n || { + tagDelimiter: '', + removeTerm: '', + termSelected: '', + termAdded: '', + termRemoved: '' +}; + +window.tagsSuggestL10n = deprecateL10nObject( 'tagsSuggestL10n', window.tagsSuggestL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 3.5.0 + * @deprecated 5.5.0 + */ +window.wpColorPickerL10n = window.wpColorPickerL10n || { + clear: '', + clearAriaLabel: '', + defaultString: '', + defaultAriaLabel: '', + pick: '', + defaultLabel: '' +}; + +window.wpColorPickerL10n = deprecateL10nObject( 'wpColorPickerL10n', window.wpColorPickerL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.7.0 + * @deprecated 5.5.0 + */ +window.attachMediaBoxL10n = window.attachMediaBoxL10n || { + error: '' +}; + +window.attachMediaBoxL10n = deprecateL10nObject( 'attachMediaBoxL10n', window.attachMediaBoxL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.5.0 + * @deprecated 5.5.0 + */ +window.postL10n = window.postL10n || { + ok: '', + cancel: '', + publishOn: '', + publishOnFuture: '', + publishOnPast: '', + dateFormat: '', + showcomm: '', + endcomm: '', + publish: '', + schedule: '', + update: '', + savePending: '', + saveDraft: '', + 'private': '', + 'public': '', + publicSticky: '', + password: '', + privatelyPublished: '', + published: '', + saveAlert: '', + savingText: '', + permalinkSaved: '' +}; + +window.postL10n = deprecateL10nObject( 'postL10n', window.postL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.7.0 + * @deprecated 5.5.0 + */ +window.inlineEditL10n = window.inlineEditL10n || { + error: '', + ntdeltitle: '', + notitle: '', + comma: '', + saved: '' +}; + +window.inlineEditL10n = deprecateL10nObject( 'inlineEditL10n', window.inlineEditL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.7.0 + * @deprecated 5.5.0 + */ +window.plugininstallL10n = window.plugininstallL10n || { + plugin_information: '', + plugin_modal_label: '', + ays: '' +}; + +window.plugininstallL10n = deprecateL10nObject( 'plugininstallL10n', window.plugininstallL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 3.0.0 + * @deprecated 5.5.0 + */ +window.navMenuL10n = window.navMenuL10n || { + noResultsFound: '', + warnDeleteMenu: '', + saveAlert: '', + untitled: '' +}; + +window.navMenuL10n = deprecateL10nObject( 'navMenuL10n', window.navMenuL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.5.0 + * @deprecated 5.5.0 + */ +window.commentL10n = window.commentL10n || { + submittedOn: '', + dateFormat: '' +}; + +window.commentL10n = deprecateL10nObject( 'commentL10n', window.commentL10n, '5.5.0' ); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 2.9.0 + * @deprecated 5.5.0 + */ +window.setPostThumbnailL10n = window.setPostThumbnailL10n || { + setThumbnail: '', + saving: '', + error: '', + done: '' +}; + +window.setPostThumbnailL10n = deprecateL10nObject( 'setPostThumbnailL10n', window.setPostThumbnailL10n, '5.5.0' ); /** * Removed in 3.3.0, needed for back-compatibility. @@ -46,7 +382,7 @@ window.columns = { */ init : function() { var that = this; - $('.hide-column-tog', '#adv-settings').click( function() { + $('.hide-column-tog', '#adv-settings').on( 'click', function() { var $t = $(this), column = $t.val(); if ( $t.prop('checked') ) that.checked(column); @@ -136,7 +472,7 @@ window.columns = { * * @since 3.1.0 * - * @param {int} diff The modifier for the column span. + * @param {number} diff The modifier for the column span. */ colSpanChange : function(diff) { var $t = $('table').find('.colspanchange'), n; @@ -147,7 +483,7 @@ window.columns = { } }; -$document.ready(function(){columns.init();}); +$( function() { columns.init(); } ); /** * Validates that the required form fields are not empty. @@ -164,7 +500,7 @@ window.validateForm = function( form ) { .filter( function() { return $( ':input:visible', this ).val() === ''; } ) .addClass( 'form-invalid' ) .find( ':input:visible' ) - .change( function() { $( this ).closest( '.form-invalid' ).removeClass( 'form-invalid' ); } ) + .on( 'change', function() { $( this ).closest( '.form-invalid' ).removeClass( 'form-invalid' ); } ) .length; }; @@ -188,8 +524,7 @@ window.showNotice = { * @return {boolean} Returns true if the message is confirmed. */ warn : function() { - var msg = commonL10n.warnDelete || ''; - if ( confirm(msg) ) { + if ( confirm( __( 'You are about to permanently delete these items from your site.\nThis action cannot be undone.\n\'Cancel\' to stop, \'OK\' to delete.' ) ) ) { return true; } @@ -236,7 +571,7 @@ window.screenMeta = { this.toggles = $( '#screen-meta-links' ).find( '.show-settings' ); this.page = $('#wpcontent'); - this.toggles.click( this.toggleEvent ); + this.toggles.on( 'click', this.toggleEvent ); }, /** @@ -282,7 +617,7 @@ window.screenMeta = { * @return {void} */ panel.slideDown( 'fast', function() { - panel.focus(); + panel.trigger( 'focus' ); button.addClass( 'screen-meta-active' ).attr( 'aria-expanded', true ); }); @@ -324,7 +659,7 @@ window.screenMeta = { * * @return {void} */ -$('.contextual-help-tabs').delegate('a', 'click', function(e) { +$('.contextual-help-tabs').on( 'click', 'a', function(e) { var link = $(this), panel; @@ -384,7 +719,7 @@ $permalinkStructure.on( 'focus', function( event ) { * If the structure is already used in the custom permalink structure, * it will be disabled. * - * @param {object} button Button jQuery object. + * @param {Object} button Button jQuery object. */ function changeStructureTagButtonState( button ) { if ( -1 !== $permalinkStructure.val().indexOf( button.text().trim() ) ) { @@ -463,18 +798,17 @@ $availableStructureTags.on( 'click', function() { if ( permalinkStructureFocused && $permalinkStructure[0].setSelectionRange ) { newSelectionStart = ( permalinkStructureValue.substr( 0, selectionStart ) + textToAppend ).length; $permalinkStructure[0].setSelectionRange( newSelectionStart, newSelectionStart ); - $permalinkStructure.focus(); + $permalinkStructure.trigger( 'focus' ); } } ); -$document.ready( function() { +$( function() { var checks, first, last, checked, sliced, mobileEvent, transitionTimeout, focusedRowActions, lastClicked = false, pageInput = $('input.current-page'), currentPage = pageInput.val(), isIOS = /iPhone|iPad|iPod/.test( navigator.userAgent ), isAndroid = navigator.userAgent.indexOf( 'Android' ) !== -1, - isIE8 = $( document.documentElement ).hasClass( 'ie8' ), $adminMenuWrap = $( '#adminmenuwrap' ), $wpwrap = $( '#wpwrap' ), $adminmenu = $( '#adminmenu' ), @@ -520,7 +854,7 @@ $document.ready( function() { // Reset any compensation for submenus near the bottom of the screen. $('#adminmenu div.wp-submenu').css('margin-top', ''); - if ( viewportWidth < 960 ) { + if ( viewportWidth <= 960 ) { if ( $body.hasClass('auto-fold') ) { $body.removeClass('auto-fold').removeClass('folded'); setUserSetting('unfold', 1); @@ -758,11 +1092,14 @@ $document.ready( function() { function makeNoticesDismissible() { $( '.notice.is-dismissible' ).each( function() { var $el = $( this ), - $button = $( '' ), - btnText = commonL10n.dismiss || ''; + $button = $( '' ); + + if ( $el.find( '.notice-dismiss' ).length ) { + return; + } // Ensure plain text. - $button.find( '.screen-reader-text' ).text( btnText ); + $button.find( '.screen-reader-text' ).text( __( 'Dismiss this notice.' ) ); $button.on( 'click.wp-dismiss-notice', function( event ) { event.preventDefault(); $el.fadeTo( 100, 0, function() { @@ -882,6 +1219,62 @@ $document.ready( function() { }); }); + /** + * Marries a secondary control to its primary control. + * + * @param {jQuery} topSelector The top selector element. + * @param {jQuery} topSubmit The top submit element. + * @param {jQuery} bottomSelector The bottom selector element. + * @param {jQuery} bottomSubmit The bottom submit element. + * @return {void} + */ + function marryControls( topSelector, topSubmit, bottomSelector, bottomSubmit ) { + /** + * Updates the primary selector when the secondary selector is changed. + * + * @since 5.7.0 + * + * @return {void} + */ + function updateTopSelector() { + topSelector.val($(this).val()); + } + bottomSelector.on('change', updateTopSelector); + + /** + * Updates the secondary selector when the primary selector is changed. + * + * @since 5.7.0 + * + * @return {void} + */ + function updateBottomSelector() { + bottomSelector.val($(this).val()); + } + topSelector.on('change', updateBottomSelector); + + /** + * Triggers the primary submit when then secondary submit is clicked. + * + * @since 5.7.0 + * + * @return {void} + */ + function triggerSubmitClick(e) { + e.preventDefault(); + e.stopPropagation(); + + topSubmit.trigger('click'); + } + bottomSubmit.on('click', triggerSubmitClick); + } + + // Marry the secondary "Bulk actions" controls to the primary controls: + marryControls( $('#bulk-action-selector-top'), $('#doaction'), $('#bulk-action-selector-bottom'), $('#doaction2') ); + + // Marry the secondary "Change role to" controls to the primary controls: + marryControls( $('#new_role'), $('#changeit'), $('#new_role2'), $('#changeit2') ); + /** * Shows row actions on focus of its parent container element or any other elements contained within. * @@ -902,14 +1295,14 @@ $document.ready( function() { focusedRowActions.removeClass( 'visible' ); }, 30 ); } - }, '.has-row-actions' ); + }, '.table-view-list .has-row-actions' ); // Toggle list table rows on small screens. $( 'tbody' ).on( 'click', '.toggle-row', function() { $( this ).closest( 'tr' ).toggleClass( 'is-expanded' ); }); - $('#default-password-nag-no').click( function() { + $('#default-password-nag-no').on( 'click', function() { setUserSetting('default_password_nag', 'hide'); $('div.default-password-nag').hide(); return false; @@ -922,7 +1315,7 @@ $document.ready( function() { * * @return {void} */ - $('#newcontent').bind('keydown.wpevent_InsertTab', function(e) { + $('#newcontent').on('keydown.wpevent_InsertTab', function(e) { var el = e.target, selStart, selEnd, val, scroll, sel; // After pressing escape key (keyCode: 27), the tab key should tab out of the textarea. @@ -981,12 +1374,11 @@ $document.ready( function() { * * @return {void} */ - pageInput.closest('form').submit( function() { + pageInput.closest('form').on( 'submit', function() { /* * action = bulk action dropdown at the top of the table - * action2 = bulk action dropdow at the bottom of the table */ - if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage ) + if ( $('select[name="action"]').val() == -1 && pageInput.val() == currentPage ) pageInput.val('1'); }); } @@ -996,7 +1388,7 @@ $document.ready( function() { * * @return {void} */ - $('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function () { + $('.search-box input[type="search"], .search-box input[type="submit"]').on( 'mousedown', function () { $('select[name^="action"]').val('-1'); }); @@ -1060,7 +1452,7 @@ $document.ready( function() { var windowPos = $window.scrollTop(), resizing = ! event || event.type !== 'scroll'; - if ( isIOS || isIE8 || $adminmenu.data( 'wp-responsive' ) ) { + if ( isIOS || $adminmenu.data( 'wp-responsive' ) ) { return; } @@ -1297,12 +1689,31 @@ $document.ready( function() { $wpwrap.toggleClass( 'wp-responsive-open' ); if ( $wpwrap.hasClass( 'wp-responsive-open' ) ) { $(this).find('a').attr( 'aria-expanded', 'true' ); - $( '#adminmenu a:first' ).focus(); + $( '#adminmenu a:first' ).trigger( 'focus' ); } else { $(this).find('a').attr( 'aria-expanded', 'false' ); } } ); + // Close sidebar when focus moves outside of toggle and sidebar. + $( '#wp-admin-bar-menu-toggle, #adminmenumain' ).on( 'focusout', function() { + var focusIsInToggle, focusIsInSidebar; + + if ( ! $wpwrap.hasClass( 'wp-responsive-open' ) ) { + return; + } + + // A brief delay is required to allow focus to switch to another element. + setTimeout( function() { + focusIsInToggle = $.contains( $( '#wp-admin-bar-menu-toggle' )[0], $( ':focus' )[0] ); + focusIsInSidebar = $.contains( $( '#adminmenumain' )[0], $( ':focus' )[0] ); + + if ( ! focusIsInToggle && ! focusIsInSidebar ) { + $( '#wp-admin-bar-menu-toggle' ).trigger( 'click.wp-responsive' ); + } + }, 10 ); + } ); + // Add menu events. $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) { if ( ! $adminmenu.data('wp-responsive') ) { @@ -1314,7 +1725,7 @@ $document.ready( function() { }); self.trigger(); - $document.on( 'wp-window-resized.wp-responsive', $.proxy( this.trigger, this ) ); + $document.on( 'wp-window-resized.wp-responsive', this.trigger.bind( this ) ); // This needs to run later as UI Sortable may be initialized later on $(document).ready(). $window.on( 'load.wp-responsive', this.maybeDisableSortables ); @@ -1497,7 +1908,7 @@ $document.ready( function() { $( '.aria-button-if-js' ).attr( 'role', 'button' ); } - $( document ).ajaxComplete( function() { + $( document ).on( 'ajaxComplete', function() { aria_button_if_js(); }); @@ -1560,12 +1971,14 @@ $document.ready( function() { */ $document.on( 'wp-menu-state-set wp-collapse-menu', function( event, eventData ) { var $collapseButton = $( '#collapse-button' ), - ariaExpanded = 'true', - ariaLabelText = commonL10n.collapseMenu; + ariaExpanded, ariaLabelText; if ( 'folded' === eventData.state ) { ariaExpanded = 'false'; - ariaLabelText = commonL10n.expandMenu; + ariaLabelText = __( 'Expand Main menu' ); + } else { + ariaExpanded = 'true'; + ariaLabelText = __( 'Collapse Main menu' ); } $collapseButton.attr({ @@ -1584,7 +1997,7 @@ $document.ready( function() { $document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu ); // Set initial focus on a specific element. - $( '.wp-initial-focus' ).focus(); + $( '.wp-initial-focus' ).trigger( 'focus' ); // Toggle update details on update-core.php. $body.on( 'click', '.js-update-details-toggle', function() { @@ -1606,6 +2019,41 @@ $document.ready( function() { }); }); +/** + * Hides the update button for expired plugin or theme uploads. + * + * On the "Update plugin/theme from uploaded zip" screen, once the upload has expired, + * hides the "Replace current with uploaded" button and displays a warning. + * + * @since 5.5.0 + */ +$( function( $ ) { + var $overwrite, $warning; + + if ( ! $body.hasClass( 'update-php' ) ) { + return; + } + + $overwrite = $( 'a.update-from-upload-overwrite' ); + $warning = $( '.update-from-upload-expired' ); + + if ( ! $overwrite.length || ! $warning.length ) { + return; + } + + window.setTimeout( + function() { + $overwrite.hide(); + $warning.removeClass( 'hidden' ); + + if ( window.wp && window.wp.a11y ) { + window.wp.a11y.speak( $warning.text() ); + } + }, + 7140000 // 119 minutes. The uploaded file is deleted after 2 hours. + ); +} ); + // Fire a custom jQuery event at the end of window resize. ( function() { var timeout; diff --git a/src/js/_enqueues/admin/custom-background.js b/src/js/_enqueues/admin/custom-background.js index 346ae9c627e57..f83db00af03b4 100644 --- a/src/js/_enqueues/admin/custom-background.js +++ b/src/js/_enqueues/admin/custom-background.js @@ -12,7 +12,7 @@ * @requires jQuery */ (function($) { - $(document).ready(function() { + $( function() { var frame, bgImage = $( '#custom-background-image' ); @@ -39,7 +39,7 @@ * * @return {void} */ - $( 'select[name="background-size"]' ).change( function() { + $( 'select[name="background-size"]' ).on( 'change', function() { bgImage.css( 'background-size', $( this ).val() ); }); @@ -50,7 +50,7 @@ * * @return {void} */ - $( 'input[name="background-position"]' ).change( function() { + $( 'input[name="background-position"]' ).on( 'change', function() { bgImage.css( 'background-position', $( this ).val() ); }); @@ -61,7 +61,7 @@ * * @return {void} */ - $( 'input[name="background-repeat"]' ).change( function() { + $( 'input[name="background-repeat"]' ).on( 'change', function() { bgImage.css( 'background-repeat', $( this ).is( ':checked' ) ? 'repeat' : 'no-repeat' ); }); @@ -72,7 +72,7 @@ * * @return {void} */ - $( 'input[name="background-attachment"]' ).change( function() { + $( 'input[name="background-attachment"]' ).on( 'change', function() { bgImage.css( 'background-attachment', $( this ).is( ':checked' ) ? 'scroll' : 'fixed' ); }); @@ -83,7 +83,7 @@ * * @return {void} */ - $('#choose-from-library-link').click( function( event ) { + $('#choose-from-library-link').on( 'click', function( event ) { var $el = $(this); event.preventDefault(); @@ -126,11 +126,13 @@ frame.on( 'select', function() { // Grab the selected attachment. var attachment = frame.state().get('selection').first(); + var nonceValue = $( '#_wpnonce' ).val() || ''; - // Run an AJAX request to set the background image. + // Run an Ajax request to set the background image. $.post( ajaxurl, { action: 'set-background-image', attachment_id: attachment.id, + _ajax_nonce: nonceValue, size: 'full' }).done( function() { // When the request completes, reload the window. diff --git a/src/js/_enqueues/admin/custom-header.js b/src/js/_enqueues/admin/custom-header.js index b1414a439eed9..367756ef8758b 100644 --- a/src/js/_enqueues/admin/custom-header.js +++ b/src/js/_enqueues/admin/custom-header.js @@ -35,7 +35,7 @@ * * @return {void} */ - $('#choose-from-library-link').click( function( event ) { + $('#choose-from-library-link').on( 'click', function( event ) { var $el = $(this); event.preventDefault(); diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js index 88004e913d676..96ca1f9f48993 100644 --- a/src/js/_enqueues/admin/edit-comments.js +++ b/src/js/_enqueues/admin/edit-comments.js @@ -6,14 +6,15 @@ * @output wp-admin/js/edit-comments.js */ -/* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ +/* global adminCommentsSettings, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ /* global commentReply, theExtraList, theList, setCommentsList */ (function($) { var getCount, updateCount, updateCountText, updatePending, updateApproved, updateHtmlTitle, updateDashboardText, updateInModerationText, adminTitle = document.title, isDashboard = $('#dashboard_right_now').length, - titleDiv, titleRegEx; + titleDiv, titleRegEx, + __ = wp.i18n.__; /** * Extracts a number from the content of a jQuery element. @@ -158,7 +159,7 @@ var getCount, updateCount, updateCountText, updatePending, updateApproved, * * @since 5.2.0 * - * @param {object} response Ajax response from the server that includes a + * @param {Object} response Ajax response from the server that includes a * translated "comments in moderation" message. * * @return {void} @@ -191,7 +192,8 @@ var getCount, updateCount, updateCountText, updatePending, updateApproved, updateHtmlTitle = function( diff ) { var newTitle, regExMatch, titleCount, commentFrag; - titleRegEx = titleRegEx || new RegExp( adminCommentsL10n.docTitleCommentsCount.replace( '%s', '\\([0-9' + thousandsSeparator + ']+\\)' ) + '?' ); + /* translators: %s: Comments count. */ + titleRegEx = titleRegEx || new RegExp( __( 'Comments (%s)' ).replace( '%s', '\\([0-9' + thousandsSeparator + ']+\\)' ) + '?' ); // Count funcs operate on a $'d element. titleDiv = titleDiv || $( '
' ); newTitle = adminTitle; @@ -210,12 +212,13 @@ var getCount, updateCount, updateCountText, updatePending, updateApproved, updateCount( titleDiv, titleCount ); regExMatch = titleRegEx.exec( document.title ); if ( regExMatch ) { - newTitle = document.title.replace( regExMatch[0], adminCommentsL10n.docTitleCommentsCount.replace( '%s', titleDiv.text() ) + ' ' ); + /* translators: %s: Comments count. */ + newTitle = document.title.replace( regExMatch[0], __( 'Comments (%s)' ).replace( '%s', titleDiv.text() ) + ' ' ); } } else { regExMatch = titleRegEx.exec( newTitle ); if ( regExMatch ) { - newTitle = newTitle.replace( regExMatch[0], adminCommentsL10n.docTitleComments ); + newTitle = newTitle.replace( regExMatch[0], __( 'Comments' ) ); } } document.title = newTitle; @@ -360,14 +363,14 @@ window.setCommentsList = function() { if ( c.is('.unapproved') ) { if ( settings.data.id == replyID ) - replyButton.text(adminCommentsL10n.replyApprove); + replyButton.text( __( 'Approve and Reply' ) ); c.find( '.row-actions span.view' ).addClass( 'hidden' ).end() .find( 'div.comment_status' ).html( '0' ); } else { if ( settings.data.id == replyID ) - replyButton.text(adminCommentsL10n.reply); + replyButton.text( __( 'Reply' ) ); c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end() .find( 'div.comment_status' ).html( '1' ); @@ -442,7 +445,7 @@ window.setCommentsList = function() { a.attr('class', 'vim-z vim-destructive aria-button-if-js'); $('.avatar', el).first().clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside'); - a.click(function( e ){ + a.on( 'click', function( e ){ e.preventDefault(); e.stopPropagation(); // Ticket #35904. list.wpList.del(this); @@ -759,7 +762,7 @@ window.setCommentsList = function() { * @global */ window.theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ) - .bind('wpListDelEnd', function(e, s){ + .on('wpListDelEnd', function(e, s){ var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, ''); if ( wpListsData.indexOf(':trash=1') != -1 || wpListsData.indexOf(':spam=1') != -1 ) @@ -790,9 +793,9 @@ window.commentReply = { init : function() { var row = $('#replyrow'); - $( '.cancel', row ).click( function() { return commentReply.revert(); } ); - $( '.save', row ).click( function() { return commentReply.send(); } ); - $( 'input#author-name, input#author-email, input#author-url', row ).keypress( function( e ) { + $( '.cancel', row ).on( 'click', function() { return commentReply.revert(); } ); + $( '.save', row ).on( 'click', function() { return commentReply.send(); } ); + $( 'input#author-name, input#author-email, input#author-url', row ).on( 'keypress', function( e ) { if ( e.which == 13 ) { commentReply.send(); e.preventDefault(); @@ -801,11 +804,11 @@ window.commentReply = { }); // Add events. - $('#the-comment-list .column-comment > p').dblclick(function(){ + $('#the-comment-list .column-comment > p').on( 'dblclick', function(){ commentReply.toggle($(this).parent()); }); - $('#doaction, #doaction2, #post-query-submit').click(function(){ + $('#doaction, #post-query-submit').on( 'click', function(){ if ( $('#the-comment-list #replyrow').length > 0 ) commentReply.close(); }); @@ -828,7 +831,7 @@ window.commentReply = { */ addEvents : function(r) { r.each(function() { - $(this).find('.column-comment > p').dblclick(function(){ + $(this).find('.column-comment > p').on( 'dblclick', function(){ commentReply.toggle($(this).parent()); }); }); @@ -846,8 +849,8 @@ window.commentReply = { * @return {void} */ toggle : function(el) { - if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( adminCommentsL10n.warnQuickEdit ) ) ) { - $( el ).find( 'button.vim-q' ).click(); + if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( __( 'Are you sure you want to edit this comment?\nThe changes you made will be lost.' ) ) ) ) { + $( el ).find( 'button.vim-q' ).trigger( 'click' ); } }, @@ -902,7 +905,7 @@ window.commentReply = { .show() .find( '.vim-q' ) .attr( 'aria-expanded', 'false' ) - .focus(); + .trigger( 'focus' ); } ).css( 'backgroundColor', '' ); } @@ -910,7 +913,7 @@ window.commentReply = { if ( 'replyto-comment' === this.act ) { commentRow.find( '.vim-r' ) .attr( 'aria-expanded', 'false' ) - .focus(); + .trigger( 'focus' ); } // Reset the Quicktags buttons. @@ -939,8 +942,8 @@ window.commentReply = { * * @memberof commentReply * - * @param {number} comment_id The comment id to open an editor for. - * @param {number} post_id The post id to open an editor for. + * @param {number} comment_id The comment ID to open an editor for. + * @param {number} post_id The post ID to open an editor for. * @param {string} action The action to perform. Either 'edit' or 'replyto'. * * @return {boolean} Always false. @@ -1007,9 +1010,9 @@ window.commentReply = { c.after(editRow); if ( c.hasClass('unapproved') ) { - replyButton.text(adminCommentsL10n.replyApprove); + replyButton.text( __( 'Approve and Reply' ) ); } else { - replyButton.text(adminCommentsL10n.reply); + replyButton.text( __( 'Reply' ) ); } $('#replyrow').fadeIn(300, function(){ $(this).show(); }); @@ -1029,7 +1032,7 @@ window.commentReply = { else if ( rtop - 20 < scrollTop ) window.scroll(0, rtop - 35); - $('#replycontent').focus().keyup(function(e){ + $('#replycontent').trigger( 'focus' ).on( 'keyup', function(e){ if ( e.which == 27 ) commentReply.revert(); // Close on Escape. }); @@ -1132,7 +1135,8 @@ window.commentReply = { updateCountText( 'span.all-count', 1 ); } - c = $.trim(r.data); // Trim leading whitespaces. + r.data = r.data || ''; + c = r.data.toString().trim(); // Trim leading whitespaces. $(c).hide(); $('#replyrow').after(c); @@ -1186,7 +1190,7 @@ window.commentReply = { * * @memberof commentReply * - * @param {number} post_id The post id. + * @param {number} post_id The post ID. * * @return {void} */ @@ -1217,11 +1221,11 @@ window.commentReply = { return true; } - return window.confirm( adminCommentsL10n.warnCommentChanges ); + return window.confirm( __( 'Are you sure you want to do this?\nThe comment changes you made will be lost.' ) ); } }; -$(document).ready(function(){ +$( function(){ var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk; setCommentsList(); @@ -1294,7 +1298,7 @@ $(document).ready(function(){ return function() { var scope = $('select[name="action"]'); $('option[value="' + value + '"]', scope).prop('selected', true); - $('#doaction').click(); + $('#doaction').trigger( 'click' ); }; }; @@ -1312,8 +1316,8 @@ $(document).ready(function(){ ['shift+u', make_bulk('unapprove')] ], { - highlight_first: adminCommentsL10n.hotkeys_highlight_first, - highlight_last: adminCommentsL10n.hotkeys_highlight_last, + highlight_first: adminCommentsSettings.hotkeys_highlight_first, + highlight_last: adminCommentsSettings.hotkeys_highlight_last, prev_page_link_cb: make_hotkeys_redirect('prev'), next_page_link_cb: make_hotkeys_redirect('next'), hotkeys_opts: { diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js index 70a57e1200dec..4d297e0c1afc9 100644 --- a/src/js/_enqueues/admin/inline-edit-post.js +++ b/src/js/_enqueues/admin/inline-edit-post.js @@ -5,7 +5,7 @@ * @output wp-admin/js/inline-edit-post.js */ -/* global inlineEditL10n, ajaxurl, typenow, inlineEditPost */ +/* global ajaxurl, typenow, inlineEditPost */ window.wp = window.wp || {}; @@ -19,7 +19,7 @@ window.wp = window.wp || {}; * @type {Object} * * @property {string} type The type of inline editor. - * @property {string} what The prefix before the post id. + * @property {string} what The prefix before the post ID. * */ ( function( $, wp ) { @@ -51,7 +51,7 @@ window.wp = window.wp || {}; * * @return {boolean} The result of revert. */ - qeRow.keyup(function(e){ + qeRow.on( 'keyup', function(e){ // Revert changes if Escape key is pressed. if ( e.which === 27 ) { return inlineEditPost.revert(); @@ -63,7 +63,7 @@ window.wp = window.wp || {}; * * @return {boolean} The result of revert. */ - bulkRow.keyup(function(e){ + bulkRow.on( 'keyup', function(e){ // Revert changes if Escape key is pressed. if ( e.which === 27 ) { return inlineEditPost.revert(); @@ -75,7 +75,7 @@ window.wp = window.wp || {}; * * @return {boolean} The result of revert. */ - $( '.cancel', qeRow ).click( function() { + $( '.cancel', qeRow ).on( 'click', function() { return inlineEditPost.revert(); }); @@ -84,7 +84,7 @@ window.wp = window.wp || {}; * * @return {boolean} The result of save. */ - $( '.save', qeRow ).click( function() { + $( '.save', qeRow ).on( 'click', function() { return inlineEditPost.save(this); }); @@ -93,7 +93,7 @@ window.wp = window.wp || {}; * * @return {boolean} The result of save. */ - $('td', qeRow).keydown(function(e){ + $('td', qeRow).on( 'keydown', function(e){ if ( e.which === 13 && ! $( e.target ).hasClass( 'cancel' ) ) { return inlineEditPost.save(this); } @@ -104,14 +104,14 @@ window.wp = window.wp || {}; * * @return {boolean} The result of revert. */ - $( '.cancel', bulkRow ).click( function() { + $( '.cancel', bulkRow ).on( 'click', function() { return inlineEditPost.revert(); }); /** * Disables the password input field when the private post checkbox is checked. */ - $('#inline-edit .inline-edit-private input[value="private"]').click( function(){ + $('#inline-edit .inline-edit-private input[value="private"]').on( 'click', function(){ var pw = $('input.inline-edit-password-input'); if ( $(this).prop('checked') ) { pw.val('').prop('disabled', true); @@ -139,7 +139,7 @@ window.wp = window.wp || {}; /** * Adds onclick events to the apply buttons. */ - $('#doaction, #doaction2').click(function(e){ + $('#doaction').on( 'click', function(e){ var n; t.whichBulkButtonId = $( this ).attr( 'id' ); @@ -198,8 +198,8 @@ window.wp = window.wp || {}; if ( $(this).prop('checked') ) { c = false; var id = $(this).val(), theTitle; - theTitle = $('#inline_'+id+' .post_title').html() || inlineEditL10n.notitle; - te += '
X'+theTitle+'
'; + theTitle = $('#inline_'+id+' .post_title').html() || wp.i18n.__( '(no title)' ); + te += '
X'+theTitle+'
'; } }); @@ -215,7 +215,7 @@ window.wp = window.wp || {}; * * @listens click */ - $('#bulk-titles a').click(function(){ + $('#bulk-titles a').on( 'click', function(){ var id = $(this).attr('id').substr(1); $('table.widefat input[value="' + id + '"]').prop('checked', false); @@ -249,7 +249,7 @@ window.wp = window.wp || {}; * * @memberof inlineEditPost * - * @param {number|Object} id The id of the clicked post or an element within a post + * @param {number|Object} id The ID of the clicked post or an element within a post * table row. * @return {boolean} Always returns false at the end of execution. */ @@ -327,7 +327,12 @@ window.wp = window.wp || {}; var terms = $(this), taxname = $(this).attr('id').replace('_' + id, ''), textarea = $('textarea.tax_input_' + taxname, editRow), - comma = inlineEditL10n.comma; + comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); + + // Ensure the textarea exists. + if ( ! textarea.length ) { + return; + } terms.find( 'img' ).replaceWith( function() { return this.alt; } ); terms = terms.text(); @@ -378,20 +383,20 @@ window.wp = window.wp || {}; } $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); - $('.ptitle', editRow).focus(); + $('.ptitle', editRow).trigger( 'focus' ); return false; }, /** * Saves the changes made in the quick edit window to the post. - * AJAX saving is only for Quick Edit and not for bulk edit. + * Ajax saving is only for Quick Edit and not for bulk edit. * * @since 2.7.0 * - * @param {int} id The id for the post that has been changed. - * @return {boolean} False, so the form does not submit when pressing - * Enter on a focused field. + * @param {number} id The ID for the post that has been changed. + * @return {boolean} False, so the form does not submit when pressing + * Enter on a focused field. */ save : function(id) { var params, fields, page = $('.post_status_page').val() || ''; @@ -420,7 +425,6 @@ window.wp = window.wp || {}; $error = $errorNotice.find( '.error' ); $( 'table.widefat .spinner' ).removeClass( 'is-active' ); - $( '.ac_results' ).hide(); if (r) { if ( -1 !== r.indexOf( ']*?>/g, '' ); @@ -441,8 +445,8 @@ window.wp = window.wp || {}; } } else { $errorNotice.removeClass( 'hidden' ); - $error.html( inlineEditL10n.error ); - wp.a11y.speak( inlineEditL10n.error ); + $error.text( wp.i18n.__( 'Error while saving the changes.' ) ); + wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ) ); } }, 'html'); @@ -466,7 +470,6 @@ window.wp = window.wp || {}; if ( id ) { $( '.spinner', $tableWideFat ).removeClass( 'is-active' ); - $( '.ac_results' ).hide(); if ( 'bulk-edit' === id ) { @@ -478,7 +481,7 @@ window.wp = window.wp || {}; $('#inlineedit').append( $('#bulk-edit') ); // Move focus back to the Bulk Action button that was activated. - $( '#' + inlineEditPost.whichBulkButtonId ).focus(); + $( '#' + inlineEditPost.whichBulkButtonId ).trigger( 'focus' ); } else { // Remove both the inline-editor and its hidden tr siblings. @@ -488,7 +491,7 @@ window.wp = window.wp || {}; // Show the post row and move focus back to the Quick Edit button. $( this.what + id ).show().find( '.editinline' ) .attr( 'aria-expanded', 'false' ) - .focus(); + .trigger( 'focus' ); } } @@ -496,15 +499,15 @@ window.wp = window.wp || {}; }, /** - * Gets the id for a the post that you want to quick edit from the row in the quick + * Gets the ID for a the post that you want to quick edit from the row in the quick * edit table. * * @since 2.7.0 * * @memberof inlineEditPost * - * @param {Object} o DOM row object to get the id for. - * @return {string} The post id extracted from the table row in the object. + * @param {Object} o DOM row object to get the ID for. + * @return {string} The post ID extracted from the table row in the object. */ getId : function(o) { var id = $(o).closest('tr').attr('id'), @@ -513,10 +516,16 @@ window.wp = window.wp || {}; } }; -$( document ).ready( function(){ inlineEditPost.init(); } ); +$( function() { inlineEditPost.init(); } ); // Show/hide locks on posts. -$( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { +$( function() { + + // Set the heartbeat interval to 15 seconds. + if ( typeof wp !== 'undefined' && wp.heartbeat ) { + wp.heartbeat.interval( 15 ); + } +}).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { var locked = data['wp-check-locked-posts'] || {}; $('#the-list tr').each( function(i, el) { @@ -529,7 +538,14 @@ $( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { row.find('.check-column checkbox').prop('checked', false); if ( lock_data.avatar_src ) { - avatar = $( '' ).attr( 'src', lock_data.avatar_src.replace( /&/g, '&' ) ); + avatar = $( '', { + 'class': 'avatar avatar-18 photo', + width: 18, + height: 18, + alt: '', + src: lock_data.avatar_src, + srcset: lock_data.avatar_src_2x ? lock_data.avatar_src_2x + ' 2x' : undefined + } ); row.find('.column-title .locked-avatar').empty().append( avatar ); } row.addClass('wp-locked'); @@ -550,12 +566,6 @@ $( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { if ( check.length ) { data['wp-check-locked-posts'] = check; } -}).ready( function() { - - // Set the heartbeat interval to 15 seconds. - if ( typeof wp !== 'undefined' && wp.heartbeat ) { - wp.heartbeat.interval( 15 ); - } }); })( jQuery, window.wp ); diff --git a/src/js/_enqueues/admin/inline-edit-tax.js b/src/js/_enqueues/admin/inline-edit-tax.js index 5a3cad885cc48..86e3498cd1eac 100644 --- a/src/js/_enqueues/admin/inline-edit-tax.js +++ b/src/js/_enqueues/admin/inline-edit-tax.js @@ -4,7 +4,7 @@ * @output wp-admin/js/inline-edit-tax.js */ -/* global inlineEditL10n, ajaxurl, inlineEditTax */ +/* global ajaxurl, inlineEditTax */ window.wp = window.wp || {}; @@ -47,7 +47,7 @@ window.inlineEditTax = { * * @param {Object} e The keyup event that has been triggered. */ - row.keyup( function( e ) { + row.on( 'keyup', function( e ) { // 27 = [Escape]. if ( e.which === 27 ) { return inlineEditTax.revert(); @@ -57,21 +57,21 @@ window.inlineEditTax = { /** * Cancels inline editing when clicking the cancel button. */ - $( '.cancel', row ).click( function() { + $( '.cancel', row ).on( 'click', function() { return inlineEditTax.revert(); }); /** * Saves the inline edits when clicking the save button. */ - $( '.save', row ).click( function() { + $( '.save', row ).on( 'click', function() { return inlineEditTax.save(this); }); /** * Saves the inline edits when pressing Enter inside the inline editor. */ - $( 'input, select', row ).keydown( function( e ) { + $( 'input, select', row ).on( 'keydown', function( e ) { // 13 = [Enter]. if ( e.which === 13 ) { return inlineEditTax.save( this ); @@ -81,7 +81,7 @@ window.inlineEditTax = { /** * Saves the inline edits on submitting the inline edit form. */ - $( '#posts-filter input[type="submit"]' ).mousedown( function() { + $( '#posts-filter input[type="submit"]' ).on( 'mousedown', function() { t.revert(); }); }, @@ -143,7 +143,7 @@ window.inlineEditTax = { $(':input[name="slug"]', editRow).val( val ); $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); - $('.ptitle', editRow).eq(0).focus(); + $('.ptitle', editRow).eq(0).trigger( 'focus' ); return false; }, @@ -223,8 +223,8 @@ window.inlineEditTax = { // Move focus back to the Quick Edit button. row.find( '.editinline' ) .attr( 'aria-expanded', 'false' ) - .focus(); - wp.a11y.speak( inlineEditL10n.saved ); + .trigger( 'focus' ); + wp.a11y.speak( wp.i18n.__( 'Changes saved.' ) ); }); } else { @@ -238,8 +238,8 @@ window.inlineEditTax = { } } else { $errorNotice.removeClass( 'hidden' ); - $error.html( inlineEditL10n.error ); - wp.a11y.speak( inlineEditL10n.error ); + $error.text( wp.i18n.__( 'Error while saving the changes.' ) ); + wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ) ); } } ); @@ -268,7 +268,7 @@ window.inlineEditTax = { // Show the taxonomy row and move focus back to the Quick Edit button. $( this.what + id ).show().find( '.editinline' ) .attr( 'aria-expanded', 'false' ) - .focus(); + .trigger( 'focus' ); } }, @@ -289,6 +289,6 @@ window.inlineEditTax = { } }; -$(document).ready(function(){inlineEditTax.init();}); +$( function() { inlineEditTax.init(); } ); })( jQuery, window.wp ); diff --git a/src/js/_enqueues/admin/link.js b/src/js/_enqueues/admin/link.js index 02698e5eea6eb..1456ba9530ede 100644 --- a/src/js/_enqueues/admin/link.js +++ b/src/js/_enqueues/admin/link.js @@ -4,11 +4,11 @@ /* global postboxes, deleteUserSetting, setUserSetting, getUserSetting */ -jQuery(document).ready( function($) { +jQuery( function($) { var newCat, noSyncChecks = false, syncChecks, catAddAfter; - $('#link_name').focus(); + $('#link_name').trigger( 'focus' ); // Postboxes. postboxes.add_postbox_toggles('link'); @@ -19,7 +19,7 @@ jQuery(document).ready( function($) { * * @return {boolean} Always returns false to prevent the default behavior. */ - $('#category-tabs a').click(function(){ + $('#category-tabs a').on( 'click', function(){ var t = $(this).attr('href'); $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); $('.tabs-panel').hide(); @@ -31,7 +31,7 @@ jQuery(document).ready( function($) { return false; }); if ( getUserSetting('cats') ) - $('#category-tabs a[href="#categories-pop"]').click(); + $('#category-tabs a[href="#categories-pop"]').trigger( 'click' ); // Ajax Cat. newCat = $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ); } ); @@ -41,7 +41,7 @@ jQuery(document).ready( function($) { * * @return {void} */ - $('#link-category-add-submit').click( function() { newCat.focus(); } ); + $('#link-category-add-submit').on( 'click', function() { newCat.focus(); } ); /** * Synchronize category checkboxes. @@ -81,8 +81,12 @@ jQuery(document).ready( function($) { $(s.what + ' response_data', r).each( function() { var t = $($(this).text()); t.find( 'label' ).each( function() { - var th = $(this), val = th.find('input').val(), id = th.find('input')[0].id, name = $.trim( th.text() ), o; - $('#' + id).change( syncChecks ); + var th = $(this), + val = th.find('input').val(), + id = th.find('input')[0].id, + name = th.text().trim(), + o; + $('#' + id).on( 'change', syncChecks ); o = $( '' ).text( name ); } ); } ); @@ -108,13 +112,13 @@ jQuery(document).ready( function($) { } ); // All categories is the default tab, so we delete the user setting. - $('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');}); + $('a[href="#categories-all"]').on( 'click', function(){deleteUserSetting('cats');}); // Set a preference for the popular categories to cookies. - $('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');}); + $('a[href="#categories-pop"]').on( 'click', function(){setUserSetting('cats','pop');}); if ( 'pop' == getUserSetting('cats') ) - $('a[href="#categories-pop"]').click(); + $('a[href="#categories-pop"]').trigger( 'click' ); /** * Adds event handler that shows the interface controls to add a new category. @@ -125,12 +129,12 @@ jQuery(document).ready( function($) { * @return {boolean} Always returns false to prevent regular link * functionality. */ - $('#category-add-toggle').click( function() { + $('#category-add-toggle').on( 'click', function() { $(this).parents('div:first').toggleClass( 'wp-hidden-children' ); - $('#category-tabs a[href="#categories-all"]').click(); - $('#newcategory').focus(); + $('#category-tabs a[href="#categories-all"]').trigger( 'click' ); + $('#newcategory').trigger( 'focus' ); return false; } ); - $('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); + $('.categorychecklist :checkbox').on( 'change', syncChecks ).filter( ':checked' ).trigger( 'change' ); }); diff --git a/src/js/_enqueues/admin/media-upload.js b/src/js/_enqueues/admin/media-upload.js index 1a28f36d048ce..fb620464bbc7a 100644 --- a/src/js/_enqueues/admin/media-upload.js +++ b/src/js/_enqueues/admin/media-upload.js @@ -108,6 +108,6 @@ window.send_to_editor = function( html ) { }; // Add handler to recalculates the ThickBox position when the window is resized. - $(window).resize(function(){ tb_position(); }); + $(window).on( 'resize', function(){ tb_position(); }); })(jQuery); diff --git a/src/js/_enqueues/admin/media.js b/src/js/_enqueues/admin/media.js index 5bcad08ef64be..13d46e485b6db 100644 --- a/src/js/_enqueues/admin/media.js +++ b/src/js/_enqueues/admin/media.js @@ -10,7 +10,7 @@ * @requires jQuery */ -/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice, findPosts */ +/* global ajaxurl, _wpMediaGridSettings, showNotice, findPosts */ ( function( $ ){ window.findPosts = { @@ -46,7 +46,7 @@ $( '#find-posts' ).show(); // Close the dialog when the escape key is pressed. - $('#find-posts-input').focus().keyup( function( event ){ + $('#find-posts-input').trigger( 'focus' ).on( 'keyup', function( event ){ if ( event.which == 27 ) { findPosts.close(); } @@ -124,12 +124,12 @@ spinner.removeClass( 'is-active' ); }).done( function( x ) { if ( ! x.success ) { - $( '#find-posts-response' ).text( attachMediaBoxL10n.error ); + $( '#find-posts-response' ).text( wp.i18n.__( 'An error has occurred. Please reload the page and try again.' ) ); } $( '#find-posts-response' ).html( x.data ); }).fail( function() { - $( '#find-posts-response' ).text( attachMediaBoxL10n.error ); + $( '#find-posts-response' ).text( wp.i18n.__( 'An error has occurred. Please reload the page and try again.' ) ); }); } }; @@ -140,28 +140,31 @@ * * @return {void} */ - $( document ).ready( function() { + $( function() { var settings, $mediaGridWrap = $( '#wp-media-grid' ); // Opens a manage media frame into the grid. if ( $mediaGridWrap.length && window.wp && window.wp.media ) { settings = _wpMediaGridSettings; - window.wp.media({ + var frame = window.wp.media({ frame: 'manage', container: $mediaGridWrap, library: settings.queryVars }).open(); + + // Fire a global ready event. + $mediaGridWrap.trigger( 'wp-media-grid-ready', frame ); } // Prevents form submission if no post has been selected. - $( '#find-posts-submit' ).click( function( event ) { + $( '#find-posts-submit' ).on( 'click', function( event ) { if ( ! $( '#find-posts-response input[type="radio"]:checked' ).length ) event.preventDefault(); }); // Submits the search query when hitting the enter key in the search input. - $( '#find-posts .find-box-search :input' ).keypress( function( event ) { + $( '#find-posts .find-box-search :input' ).on( 'keypress', function( event ) { if ( 13 == event.which ) { findPosts.send(); return false; @@ -169,19 +172,18 @@ }); // Binds the click event to the search button. - $( '#find-posts-search' ).click( findPosts.send ); + $( '#find-posts-search' ).on( 'click', findPosts.send ); // Binds the close dialog click event. - $( '#find-posts-close' ).click( findPosts.close ); + $( '#find-posts-close' ).on( 'click', findPosts.close ); // Binds the bulk action events to the submit buttons. - $( '#doaction, #doaction2' ).click( function( event ) { + $( '#doaction' ).on( 'click', function( event ) { /* - * Retrieves all select elements for bulk actions that have a name starting with `action` - * and handle its action based on its value. + * Handle the bulk action based on its value. */ - $( 'select[name^="action"]' ).each( function() { + $( 'select[name="action"]' ).each( function() { var optionValue = $( this ).val(); if ( 'attach' === optionValue ) { diff --git a/src/js/_enqueues/admin/plugin-install.js b/src/js/_enqueues/admin/plugin-install.js index f9c2be395dd59..9b43b53e13a43 100644 --- a/src/js/_enqueues/admin/plugin-install.js +++ b/src/js/_enqueues/admin/plugin-install.js @@ -4,9 +4,9 @@ * @output wp-admin/js/plugin-install.js */ -/* global plugininstallL10n, tb_click, tb_remove, tb_position */ +/* global tb_click, tb_remove, tb_position */ -jQuery( document ).ready( function( $ ) { +jQuery( function( $ ) { var tbWindow, $iframeBody, @@ -50,7 +50,7 @@ jQuery( document ).ready( function( $ ) { }); }; - $( window ).resize( function() { + $( window ).on( 'resize', function() { tb_position(); }); @@ -75,7 +75,7 @@ jQuery( document ).ready( function( $ ) { .on( 'thickbox:removed', function() { // Set focus back to the element that opened the modal dialog. // Note: IE 8 would need this wrapped in a fake setTimeout `0`. - $focusedBefore.focus(); + $focusedBefore.trigger( 'focus' ); }); function iframeLoaded() { @@ -88,7 +88,7 @@ jQuery( document ).ready( function( $ ) { handleTabbables(); // Set initial focus on the "Close" button. - $firstTabbable.focus(); + $firstTabbable.trigger( 'focus' ); /* * When the "Install" button is disabled (e.g. the Plugin is already installed) @@ -141,22 +141,28 @@ jQuery( document ).ready( function( $ ) { if ( $lastTabbable[0] === event.target && ! event.shiftKey ) { event.preventDefault(); - $firstTabbable.focus(); + $firstTabbable.trigger( 'focus' ); } else if ( $firstTabbable[0] === event.target && event.shiftKey ) { event.preventDefault(); - $lastTabbable.focus(); + $lastTabbable.trigger( 'focus' ); } } /* * Open the Plugin details modal. The event is delegated to get also the links - * in the plugins search tab, after the AJAX search rebuilds the HTML. It's + * in the plugins search tab, after the Ajax search rebuilds the HTML. It's * delegated on the closest ancestor and not on the body to avoid conflicts * with other handlers, see Trac ticket #43082. */ $( '.wrap' ).on( 'click', '.thickbox.open-plugin-details-modal', function( e ) { // The `data-title` attribute is used only in the Plugin screens. - var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label; + var title = $( this ).data( 'title' ) ? + wp.i18n.sprintf( + // translators: %s: Plugin name. + wp.i18n.__( 'Plugin: %s' ), + $( this ).data( 'title' ) + ) : + wp.i18n.__( 'Plugin details' ); e.preventDefault(); e.stopPropagation(); @@ -170,7 +176,7 @@ jQuery( document ).ready( function( $ ) { tbWindow .attr({ 'role': 'dialog', - 'aria-label': plugininstallL10n.plugin_modal_label + 'aria-label': wp.i18n.__( 'Plugin details' ) }) .addClass( 'plugin-details-modal' ); @@ -179,7 +185,7 @@ jQuery( document ).ready( function( $ ) { }); /* Plugin install related JS */ - $( '#plugin-information-tabs a' ).click( function( event ) { + $( '#plugin-information-tabs a' ).on( 'click', function( event ) { var tab = $( this ).attr( 'name' ); event.preventDefault(); diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index cc7cab1a7284e..b0fca99135f14 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -4,18 +4,19 @@ * @output wp-admin/js/post.js */ - /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ + /* global ajaxurl, wpAjax, postboxes, pagenow, tinymce, alert, deleteUserSetting, ClipboardJS */ /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */ /* global WPSetThumbnailHTML, wptitlehint */ -// Backwards compatibility: prevent fatal errors. +// Backward compatibility: prevent fatal errors. window.makeSlugeditClickable = window.editPermalink = function(){}; // Make sure the wp object exists. window.wp = window.wp || {}; ( function( $ ) { - var titleHasFocus = false; + var titleHasFocus = false, + __ = wp.i18n.__; /** * Control loading of comments on the post and term edit pages. @@ -29,12 +30,12 @@ window.wp = window.wp || {}; st : 0, /** - * Fetch comments using AJAX and display them in the box. + * Fetch comments using Ajax and display them in the box. * * @memberof commentsBox * - * @param {int} total Total number of comments for this post. - * @param {int} num Optional. Number of comments to fetch, defaults to 20. + * @param {number} total Total number of comments for this post. + * @param {number} num Optional. Number of comments to fetch, defaults to 20. * @return {boolean} Always returns false. */ get : function(total, num) { @@ -67,17 +68,17 @@ window.wp = window.wp || {}; $('#the-comment-list').append( r.responses[0].data ); theList = theExtraList = null; - $( 'a[className*=\':\']' ).unbind(); + $( 'a[className*=\':\']' ).off(); // If the offset is over the total number of comments we cannot fetch any more, so hide the button. if ( commentsBox.st > commentsBox.total ) $('#show-comments').hide(); else - $('#show-comments').show().children('a').html(postL10n.showcomm); + $('#show-comments').show().children('a').text( __( 'Show more comments' ) ); return; } else if ( 1 == r ) { - $('#show-comments').html(postL10n.endcomm); + $('#show-comments').text( __( 'No more comments found.' ) ); return; } @@ -93,7 +94,7 @@ window.wp = window.wp || {}; * * @memberof commentsBox * - * @param {int} total Total number of comments to load. + * @param {number} total Total number of comments to load. */ load: function(total){ this.st = jQuery('#the-comment-list tr.comment:visible').length; @@ -115,7 +116,7 @@ window.wp = window.wp || {}; /** * Set the Image ID of the Featured Image * - * @param {int} id The post_id of the image to use as Featured Image. + * @param {number} id The post_id of the image to use as Featured Image. * * @global */ @@ -144,7 +145,7 @@ window.wp = window.wp || {}; */ function(str){ if ( str == '0' ) { - alert( setPostThumbnailL10n.error ); + alert( __( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); } else { WPSetThumbnailHTML(str); } @@ -200,12 +201,19 @@ window.wp = window.wp || {}; } if ( received.lock_error.avatar_src ) { - avatar = $( '' ).attr( 'src', received.lock_error.avatar_src.replace( /&/g, '&' ) ); + avatar = $( '', { + 'class': 'avatar avatar-64 photo', + width: 64, + height: 64, + alt: '', + src: received.lock_error.avatar_src, + srcset: received.lock_error.avatar_src_2x ? received.lock_error.avatar_src_2x + ' 2x' : undefined + } ); wrap.find('div.post-locked-avatar').empty().append( avatar ); } wrap.show().find('.currently-editing').text( received.lock_error.text ); - wrap.find('.wp-tab-first').focus(); + wrap.find('.wp-tab-first').trigger( 'focus' ); } } else if ( received.new_lock ) { $('#active_post_lock').val( received.new_lock ); @@ -252,7 +260,9 @@ window.wp = window.wp || {}; timeout = window.setTimeout( function(){ check = true; }, 300000 ); } - $(document).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) { + $( function() { + schedule(); + }).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) { var post_id, $authCheck = $('#wp-auth-check-wrap'); @@ -278,17 +288,14 @@ window.wp = window.wp || {}; if ( nonces.heartbeatNonce ) window.heartbeatSettings.nonce = nonces.heartbeatNonce; } - }).ready( function() { - schedule(); }); }(jQuery)); /** * All post and postbox controls and functionality. */ -jQuery(document).ready( function($) { +jQuery( function($) { var stamp, visibility, $submitButtons, updateVisibility, updateText, - sticky = '', $textarea = $('#content'), $document = $(document), postId = $('#post_ID').val() || 0, @@ -297,7 +304,10 @@ jQuery(document).ready( function($) { $postVisibilitySelect = $('#post-visibility-select'), $timestampdiv = $('#timestampdiv'), $postStatusSelect = $('#post-status-select'), - isMac = window.navigator.platform ? window.navigator.platform.indexOf( 'Mac' ) !== -1 : false; + isMac = window.navigator.platform ? window.navigator.platform.indexOf( 'Mac' ) !== -1 : false, + copyAttachmentURLClipboard = new ClipboardJS( '.copy-attachment-url.edit-media' ), + copyAttachmentURLSuccessTimeout, + __ = wp.i18n.__, _x = wp.i18n._x; postboxes.add_postbox_toggles(pagenow); @@ -317,14 +327,14 @@ jQuery(document).ready( function($) { // [Shift] + [Tab] on first tab cycles back to last tab. if ( target.hasClass('wp-tab-first') && e.shiftKey ) { - $(this).find('.wp-tab-last').focus(); + $(this).find('.wp-tab-last').trigger( 'focus' ); e.preventDefault(); // [Tab] on last tab cycles back to first tab. } else if ( target.hasClass('wp-tab-last') && ! e.shiftKey ) { - $(this).find('.wp-tab-first').focus(); + $(this).find('.wp-tab-first').trigger( 'focus' ); e.preventDefault(); } - }).filter(':visible').find('.wp-tab-first').focus(); + }).filter(':visible').find('.wp-tab-first').trigger( 'focus' ); // Set the heartbeat interval to 15 seconds if post lock dialogs are enabled. if ( wp.heartbeat && $('#post-lock-dialog').length ) { @@ -404,7 +414,7 @@ jQuery(document).ready( function($) { } $previewField.val('dopreview'); - $form.attr( 'target', target ).submit().attr( 'target', '' ); + $form.attr( 'target', target ).trigger( 'submit' ).attr( 'target', '' ); // Workaround for WebKit bug preventing a form submitting twice to the same action. // https://bugs.webkit.org/show_bug.cgi?id=28633 @@ -427,7 +437,7 @@ jQuery(document).ready( function($) { if ( editor && ! editor.isHidden() ) { editor.focus(); } else if ( $textarea.length ) { - $textarea.focus(); + $textarea.trigger( 'focus' ); } else { return; } @@ -438,7 +448,7 @@ jQuery(document).ready( function($) { // Auto save new posts after a title is typed. if ( $( '#auto_draft' ).val() ) { - $( '#title' ).blur( function() { + $( '#title' ).on( 'blur', function() { var cancel; if ( ! this.value || $('#edit-slug-box > *').length ) { @@ -465,7 +475,7 @@ jQuery(document).ready( function($) { $submitButtons.removeClass( 'disabled' ); } }).on( 'before-autosave.edit-post', function() { - $( '.autosave-message' ).text( postL10n.savingText ); + $( '.autosave-message' ).text( __( 'Saving Draft…' ) ); }).on( 'after-autosave.edit-post', function( event, data ) { $( '.autosave-message' ).text( data.message ); @@ -478,13 +488,21 @@ jQuery(document).ready( function($) { * When the user is trying to load another page, or reloads current page * show a confirmation dialog when there are unsaved changes. */ - $(window).on( 'beforeunload.edit-post', function() { - var editor = typeof tinymce !== 'undefined' && tinymce.get('content'); + $( window ).on( 'beforeunload.edit-post', function( event ) { + var editor = window.tinymce && window.tinymce.get( 'content' ); + var changed = false; - if ( ( editor && ! editor.isHidden() && editor.isDirty() ) || - ( wp.autosave && wp.autosave.server.postChanged() ) ) { + if ( wp.autosave ) { + changed = wp.autosave.server.postChanged(); + } else if ( editor ) { + changed = ( ! editor.isHidden() && editor.isDirty() ); + } - return postL10n.saveAlert; + if ( changed ) { + event.preventDefault(); + // The return string is needed for browser compat. + // See https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event. + return __( 'The changes you made will be lost if you navigate away from this page.' ); } }).on( 'unload.edit-post', function( event ) { if ( ! releaseLock ) { @@ -560,7 +578,7 @@ jQuery(document).ready( function($) { } // @todo Move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js. - $('a', '#' + taxonomy + '-tabs').click( function( e ) { + $('a', '#' + taxonomy + '-tabs').on( 'click', function( e ) { e.preventDefault(); var t = $(this).attr('href'); $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); @@ -574,7 +592,7 @@ jQuery(document).ready( function($) { }); if ( getUserSetting( settingName ) ) - $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').click(); + $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').trigger( 'click' ); // Add category button controls. $('#new' + taxonomy).one( 'focus', function() { @@ -582,16 +600,16 @@ jQuery(document).ready( function($) { }); // On [Enter] submit the taxonomy. - $('#new' + taxonomy).keypress( function(event){ + $('#new' + taxonomy).on( 'keypress', function(event){ if( 13 === event.keyCode ) { event.preventDefault(); - $('#' + taxonomy + '-add-submit').click(); + $('#' + taxonomy + '-add-submit').trigger( 'click' ); } }); // After submitting a new taxonomy, re-focus the input field. - $('#' + taxonomy + '-add-submit').click( function() { - $('#new' + taxonomy).focus(); + $('#' + taxonomy + '-add-submit').on( 'click', function() { + $('#new' + taxonomy).trigger( 'focus' ); }); /** @@ -640,11 +658,11 @@ jQuery(document).ready( function($) { }); // Add new taxonomy button toggles input form visibility. - $('#' + taxonomy + '-add-toggle').click( function( e ) { + $('#' + taxonomy + '-add-toggle').on( 'click', function( e ) { e.preventDefault(); $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' ); - $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click(); - $('#new'+taxonomy).focus(); + $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').trigger( 'click' ); + $('#new'+taxonomy).trigger( 'focus' ); }); // Sync checked items between "All {taxonomy}" and "Most used" lists. @@ -744,14 +762,14 @@ jQuery(document).ready( function($) { // Determine what the publish should be depending on the date and post status. if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) { - publishOn = postL10n.publishOnFuture; - $('#publish').val( postL10n.schedule ); + publishOn = __( 'Schedule for:' ); + $('#publish').val( _x( 'Schedule', 'post action/button label' ) ); } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) { - publishOn = postL10n.publishOn; - $('#publish').val( postL10n.publish ); + publishOn = __( 'Publish on:' ); + $('#publish').val( __( 'Publish' ) ); } else { - publishOn = postL10n.publishOnPast; - $('#publish').val( postL10n.update ); + publishOn = __( 'Published on:' ); + $('#publish').val( __( 'Update' ) ); } // If the date is the same, set it to trigger update events. @@ -761,7 +779,8 @@ jQuery(document).ready( function($) { } else { $('#timestamp').html( '\n' + publishOn + ' ' + - postL10n.dateFormat + // translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. + __( '%1$s %2$s, %3$s at %4$s:%5$s' ) .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) .replace( '%2$s', parseInt( jj, 10 ) ) .replace( '%3$s', aa ) @@ -773,11 +792,11 @@ jQuery(document).ready( function($) { // Add "privately published" to post status when applies. if ( $postVisibilitySelect.find('input:radio:checked').val() == 'private' ) { - $('#publish').val( postL10n.update ); + $('#publish').val( __( 'Update' ) ); if ( 0 === optPublish.length ) { - postStatus.append(''); + postStatus.append(''); } else { - optPublish.html( postL10n.privatelyPublished ); + optPublish.html( __( 'Privately Published' ) ); } $('option[value="publish"]', postStatus).prop('selected', true); $('#misc-publishing-actions .edit-post-status').hide(); @@ -788,7 +807,7 @@ jQuery(document).ready( function($) { postStatus.val($('#hidden_post_status').val()); } } else { - optPublish.html( postL10n.published ); + optPublish.html( __( 'Published' ) ); } if ( postStatus.is(':hidden') ) $('#misc-publishing-actions .edit-post-status').show(); @@ -806,68 +825,76 @@ jQuery(document).ready( function($) { } else { $('#save-post').show(); if ( $('option:selected', postStatus).val() == 'pending' ) { - $('#save-post').show().val( postL10n.savePending ); + $('#save-post').show().val( __( 'Save as Pending' ) ); } else { - $('#save-post').show().val( postL10n.saveDraft ); + $('#save-post').show().val( __( 'Save Draft' ) ); } } return true; }; // Show the visibility options and hide the toggle button when opened. - $( '#visibility .edit-visibility').click( function( e ) { + $( '#visibility .edit-visibility').on( 'click', function( e ) { e.preventDefault(); if ( $postVisibilitySelect.is(':hidden') ) { updateVisibility(); $postVisibilitySelect.slideDown( 'fast', function() { - $postVisibilitySelect.find( 'input[type="radio"]' ).first().focus(); + $postVisibilitySelect.find( 'input[type="radio"]' ).first().trigger( 'focus' ); } ); $(this).hide(); } }); // Cancel visibility selection area and hide it from view. - $postVisibilitySelect.find('.cancel-post-visibility').click( function( event ) { + $postVisibilitySelect.find('.cancel-post-visibility').on( 'click', function( event ) { $postVisibilitySelect.slideUp('fast'); $('#visibility-radio-' + $('#hidden-post-visibility').val()).prop('checked', true); $('#post_password').val($('#hidden-post-password').val()); $('#sticky').prop('checked', $('#hidden-post-sticky').prop('checked')); $('#post-visibility-display').html(visibility); - $('#visibility .edit-visibility').show().focus(); + $('#visibility .edit-visibility').show().trigger( 'focus' ); updateText(); event.preventDefault(); }); // Set the selected visibility as current. - $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // Crazyhorse - multiple OK cancels. + $postVisibilitySelect.find('.save-post-visibility').on( 'click', function( event ) { // Crazyhorse - multiple OK cancels. + var visibilityLabel = '', selectedVisibility = $postVisibilitySelect.find('input:radio:checked').val(); + $postVisibilitySelect.slideUp('fast'); - $('#visibility .edit-visibility').show().focus(); + $('#visibility .edit-visibility').show().trigger( 'focus' ); updateText(); - if ( $postVisibilitySelect.find('input:radio:checked').val() != 'public' ) { + if ( 'public' !== selectedVisibility ) { $('#sticky').prop('checked', false); } - if ( $('#sticky').prop('checked') ) { - sticky = 'Sticky'; - } else { - sticky = ''; + switch ( selectedVisibility ) { + case 'public': + visibilityLabel = $( '#sticky' ).prop( 'checked' ) ? __( 'Public, Sticky' ) : __( 'Public' ); + break; + case 'private': + visibilityLabel = __( 'Private' ); + break; + case 'password': + visibilityLabel = __( 'Password Protected' ); + break; } - $('#post-visibility-display').html( postL10n[ $postVisibilitySelect.find('input:radio:checked').val() + sticky ] ); + $('#post-visibility-display').text( visibilityLabel ); event.preventDefault(); }); // When the selection changes, update labels. - $postVisibilitySelect.find('input:radio').change( function() { + $postVisibilitySelect.find('input:radio').on( 'change', function() { updateVisibility(); }); // Edit publish time click. - $timestampdiv.siblings('a.edit-timestamp').click( function( event ) { + $timestampdiv.siblings('a.edit-timestamp').on( 'click', function( event ) { if ( $timestampdiv.is( ':hidden' ) ) { $timestampdiv.slideDown( 'fast', function() { - $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().focus(); + $( 'input, select', $timestampdiv.find( '.timestamp-wrap' ) ).first().trigger( 'focus' ); } ); $(this).hide(); } @@ -875,8 +902,8 @@ jQuery(document).ready( function($) { }); // Cancel editing the publish time and hide the settings. - $timestampdiv.find('.cancel-timestamp').click( function( event ) { - $timestampdiv.slideUp('fast').siblings('a.edit-timestamp').show().focus(); + $timestampdiv.find('.cancel-timestamp').on( 'click', function( event ) { + $timestampdiv.slideUp('fast').siblings('a.edit-timestamp').show().trigger( 'focus' ); $('#mm').val($('#hidden_mm').val()); $('#jj').val($('#hidden_jj').val()); $('#aa').val($('#hidden_aa').val()); @@ -887,10 +914,10 @@ jQuery(document).ready( function($) { }); // Save the changed timestamp. - $timestampdiv.find('.save-timestamp').click( function( event ) { // Crazyhorse - multiple OK cancels. + $timestampdiv.find('.save-timestamp').on( 'click', function( event ) { // Crazyhorse - multiple OK cancels. if ( updateText() ) { $timestampdiv.slideUp('fast'); - $timestampdiv.siblings('a.edit-timestamp').show().focus(); + $timestampdiv.siblings('a.edit-timestamp').show().trigger( 'focus' ); } event.preventDefault(); }); @@ -910,10 +937,10 @@ jQuery(document).ready( function($) { }); // Post Status edit click. - $postStatusSelect.siblings('a.edit-post-status').click( function( event ) { + $postStatusSelect.siblings('a.edit-post-status').on( 'click', function( event ) { if ( $postStatusSelect.is( ':hidden' ) ) { $postStatusSelect.slideDown( 'fast', function() { - $postStatusSelect.find('select').focus(); + $postStatusSelect.find('select').trigger( 'focus' ); } ); $(this).hide(); } @@ -921,15 +948,15 @@ jQuery(document).ready( function($) { }); // Save the Post Status changes and hide the options. - $postStatusSelect.find('.save-post-status').click( function( event ) { - $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().focus(); + $postStatusSelect.find('.save-post-status').on( 'click', function( event ) { + $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().trigger( 'focus' ); updateText(); event.preventDefault(); }); // Cancel Post Status editing and hide the options. - $postStatusSelect.find('.cancel-post-status').click( function( event ) { - $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().focus(); + $postStatusSelect.find('.cancel-post-status').on( 'click', function( event ) { + $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().trigger( 'focus' ); $('#post_status').val( $('#hidden_post_status').val() ); updateText(); event.preventDefault(); @@ -938,7 +965,7 @@ jQuery(document).ready( function($) { /** * Handle the editing of the post_name. Create the required HTML elements and - * update the changes via AJAX. + * update the changes via Ajax. * * @global * @@ -967,14 +994,14 @@ jQuery(document).ready( function($) { $el = $( '#editable-post-name' ); revert_e = $el.html(); - buttons.html( ' ' ); + buttons.html( ' ' ); // Save permalink changes. - buttons.children( '.save' ).click( function() { + buttons.children( '.save' ).on( 'click', function() { var new_slug = $el.children( 'input' ).val(); if ( new_slug == $('#editable-post-name-full').text() ) { - buttons.children('.cancel').click(); + buttons.children('.cancel').trigger( 'click' ); return; } @@ -999,20 +1026,20 @@ jQuery(document).ready( function($) { buttons.html(buttonsOrig); permalink.html(permalinkOrig); real_slug.val(new_slug); - $( '.edit-slug' ).focus(); - wp.a11y.speak( postL10n.permalinkSaved ); + $( '.edit-slug' ).trigger( 'focus' ); + wp.a11y.speak( __( 'Permalink saved' ) ); } ); }); // Cancel editing of permalink. - buttons.children( '.cancel' ).click( function() { + buttons.children( '.cancel' ).on( 'click', function() { $('#view-post-btn').show(); $el.html(revert_e); buttons.html(buttonsOrig); permalink.html(permalinkOrig); real_slug.val(revert_slug); - $( '.edit-slug' ).focus(); + $( '.edit-slug' ).trigger( 'focus' ); }); // If more than 1/4th of 'full' is '%', make it empty. @@ -1022,20 +1049,20 @@ jQuery(document).ready( function($) { } slug_value = ( c > full.length / 4 ) ? '' : full; - $el.html( '' ).children( 'input' ).keydown( function( e ) { + $el.html( '' ).children( 'input' ).on( 'keydown', function( e ) { var key = e.which; // On [Enter], just save the new slug, don't save the post. if ( 13 === key ) { e.preventDefault(); - buttons.children( '.save' ).click(); + buttons.children( '.save' ).trigger( 'click' ); } // On [Esc] cancel the editing. if ( 27 === key ) { - buttons.children( '.cancel' ).click(); + buttons.children( '.cancel' ).trigger( 'click' ); } - } ).keyup( function() { + } ).on( 'keyup', function() { real_slug.val( this.value ); - }).focus(); + }).trigger( 'focus' ); } $( '#titlediv' ).on( 'click', '.edit-slug', function() { @@ -1127,7 +1154,7 @@ jQuery(document).ready( function($) { height = parseInt( $('#content_ifr').css('height'), 10 ) + toolbarHeight - 28; } else { - $textarea.focus(); + $textarea.trigger( 'focus' ); height = parseInt( $textarea.css('height'), 10 ); } @@ -1150,7 +1177,7 @@ jQuery(document).ready( function($) { } else { mce = false; offset = $textarea.height() - event.pageY; - $textarea.blur(); + $textarea.trigger( 'blur' ); } $document.on( 'mousemove.wp-editor-resize', dragging ) @@ -1217,7 +1244,38 @@ jQuery(document).ready( function($) { window.history.replaceState( null, null, location ); }); } -}); + + /** + * Copies the attachment URL in the Edit Media page to the clipboard. + * + * @since 5.5.0 + * + * @param {MouseEvent} event A click event. + * + * @return {void} + */ + copyAttachmentURLClipboard.on( 'success', function( event ) { + var triggerElement = $( event.trigger ), + successElement = $( '.success', triggerElement.closest( '.copy-to-clipboard-container' ) ); + + // Clear the selection and move focus back to the trigger. + event.clearSelection(); + // Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680 + triggerElement.trigger( 'focus' ); + + // Show success visual feedback. + clearTimeout( copyAttachmentURLSuccessTimeout ); + successElement.removeClass( 'hidden' ); + + // Hide success visual feedback after 3 seconds since last success. + copyAttachmentURLSuccessTimeout = setTimeout( function() { + successElement.addClass( 'hidden' ); + }, 3000 ); + + // Handle success audible feedback. + wp.a11y.speak( __( 'The file URL has been copied to your clipboard' ) ); + } ); +} ); /** * TinyMCE word count display diff --git a/src/js/_enqueues/admin/postbox.js b/src/js/_enqueues/admin/postbox.js index 0a3d06d5b2c67..4f521acd93ba3 100644 --- a/src/js/_enqueues/admin/postbox.js +++ b/src/js/_enqueues/admin/postbox.js @@ -7,10 +7,11 @@ * @output wp-admin/js/postbox.js */ -/* global ajaxurl, postBoxL10n, postboxes */ +/* global ajaxurl, postboxes */ (function($) { - var $document = $( document ); + var $document = $( document ), + __ = wp.i18n.__; /** * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see @@ -41,7 +42,7 @@ */ handle_click : function () { var $el = $( this ), - p = $el.parent( '.postbox' ), + p = $el.closest( '.postbox' ), id = p.attr( 'id' ), ariaExpandedValue; @@ -50,7 +51,6 @@ } p.toggleClass( 'closed' ); - ariaExpandedValue = ! p.hasClass( 'closed' ); if ( $el.hasClass( 'handlediv' ) ) { @@ -67,9 +67,9 @@ } if ( id ) { - if ( !p.hasClass('closed') && $.isFunction( postboxes.pbshow ) ) { + if ( !p.hasClass('closed') && typeof postboxes.pbshow === 'function' ) { postboxes.pbshow( id ); - } else if ( p.hasClass('closed') && $.isFunction( postboxes.pbhide ) ) { + } else if ( p.hasClass('closed') && typeof postboxes.pbhide === 'function' ) { postboxes.pbhide( id ); } } @@ -88,6 +88,157 @@ $document.trigger( 'postbox-toggled', p ); }, + /** + * Handles clicks on the move up/down buttons. + * + * @since 5.5.0 + * + * @return {void} + */ + handleOrder: function() { + var button = $( this ), + postbox = button.closest( '.postbox' ), + postboxId = postbox.attr( 'id' ), + postboxesWithinSortables = postbox.closest( '.meta-box-sortables' ).find( '.postbox:visible' ), + postboxesWithinSortablesCount = postboxesWithinSortables.length, + postboxWithinSortablesIndex = postboxesWithinSortables.index( postbox ), + firstOrLastPositionMessage; + + if ( 'dashboard_browser_nag' === postboxId ) { + return; + } + + // If on the first or last position, do nothing and send an audible message to screen reader users. + if ( 'true' === button.attr( 'aria-disabled' ) ) { + firstOrLastPositionMessage = button.hasClass( 'handle-order-higher' ) ? + __( 'The box is on the first position' ) : + __( 'The box is on the last position' ); + + wp.a11y.speak( firstOrLastPositionMessage ); + return; + } + + // Move a postbox up. + if ( button.hasClass( 'handle-order-higher' ) ) { + // If the box is first within a sortable area, move it to the previous sortable area. + if ( 0 === postboxWithinSortablesIndex ) { + postboxes.handleOrderBetweenSortables( 'previous', button, postbox ); + return; + } + + postbox.prevAll( '.postbox:visible' ).eq( 0 ).before( postbox ); + button.trigger( 'focus' ); + postboxes.updateOrderButtonsProperties(); + postboxes.save_order( postboxes.page ); + } + + // Move a postbox down. + if ( button.hasClass( 'handle-order-lower' ) ) { + // If the box is last within a sortable area, move it to the next sortable area. + if ( postboxWithinSortablesIndex + 1 === postboxesWithinSortablesCount ) { + postboxes.handleOrderBetweenSortables( 'next', button, postbox ); + return; + } + + postbox.nextAll( '.postbox:visible' ).eq( 0 ).after( postbox ); + button.trigger( 'focus' ); + postboxes.updateOrderButtonsProperties(); + postboxes.save_order( postboxes.page ); + } + + }, + + /** + * Moves postboxes between the sortables areas. + * + * @since 5.5.0 + * + * @param {string} position The "previous" or "next" sortables area. + * @param {Object} button The jQuery object representing the button that was clicked. + * @param {Object} postbox The jQuery object representing the postbox to be moved. + * + * @return {void} + */ + handleOrderBetweenSortables: function( position, button, postbox ) { + var closestSortablesId = button.closest( '.meta-box-sortables' ).attr( 'id' ), + sortablesIds = [], + sortablesIndex, + detachedPostbox; + + // Get the list of sortables within the page. + $( '.meta-box-sortables:visible' ).each( function() { + sortablesIds.push( $( this ).attr( 'id' ) ); + }); + + // Return if there's only one visible sortables area, e.g. in the block editor page. + if ( 1 === sortablesIds.length ) { + return; + } + + // Find the index of the current sortables area within all the sortable areas. + sortablesIndex = $.inArray( closestSortablesId, sortablesIds ); + // Detach the postbox to be moved. + detachedPostbox = postbox.detach(); + + // Move the detached postbox to its new position. + if ( 'previous' === position ) { + $( detachedPostbox ).appendTo( '#' + sortablesIds[ sortablesIndex - 1 ] ); + } + + if ( 'next' === position ) { + $( detachedPostbox ).prependTo( '#' + sortablesIds[ sortablesIndex + 1 ] ); + } + + postboxes._mark_area(); + button.focus(); + postboxes.updateOrderButtonsProperties(); + postboxes.save_order( postboxes.page ); + }, + + /** + * Update the move buttons properties depending on the postbox position. + * + * @since 5.5.0 + * + * @return {void} + */ + updateOrderButtonsProperties: function() { + var firstSortablesId = $( '.meta-box-sortables:visible:first' ).attr( 'id' ), + lastSortablesId = $( '.meta-box-sortables:visible:last' ).attr( 'id' ), + firstPostbox = $( '.postbox:visible:first' ), + lastPostbox = $( '.postbox:visible:last' ), + firstPostboxId = firstPostbox.attr( 'id' ), + lastPostboxId = lastPostbox.attr( 'id' ), + firstPostboxSortablesId = firstPostbox.closest( '.meta-box-sortables' ).attr( 'id' ), + lastPostboxSortablesId = lastPostbox.closest( '.meta-box-sortables' ).attr( 'id' ), + moveUpButtons = $( '.handle-order-higher' ), + moveDownButtons = $( '.handle-order-lower' ); + + // Enable all buttons as a reset first. + moveUpButtons + .attr( 'aria-disabled', 'false' ) + .removeClass( 'hidden' ); + moveDownButtons + .attr( 'aria-disabled', 'false' ) + .removeClass( 'hidden' ); + + // When there's only one "sortables" area (e.g. in the block editor) and only one visible postbox, hide the buttons. + if ( firstSortablesId === lastSortablesId && firstPostboxId === lastPostboxId ) { + moveUpButtons.addClass( 'hidden' ); + moveDownButtons.addClass( 'hidden' ); + } + + // Set an aria-disabled=true attribute on the first visible "move" buttons. + if ( firstSortablesId === firstPostboxSortablesId ) { + $( firstPostbox ).find( '.handle-order-higher' ).attr( 'aria-disabled', 'true' ); + } + + // Set an aria-disabled=true attribute on the last visible "move" buttons. + if ( lastSortablesId === lastPostboxSortablesId ) { + $( '.postbox:visible .handle-order-lower' ).last().attr( 'aria-disabled', 'true' ); + } + }, + /** * Adds event handlers to all postboxes and screen option on the current page. * @@ -102,17 +253,21 @@ * @return {void} */ add_postbox_toggles : function (page, args) { - var $handles = $( '.postbox .hndle, .postbox .handlediv' ); + var $handles = $( '.postbox .hndle, .postbox .handlediv' ), + $orderButtons = $( '.postbox .handle-order-higher, .postbox .handle-order-lower' ); this.page = page; this.init( page, args ); $handles.on( 'click.postboxes', this.handle_click ); + // Handle the order of the postboxes. + $orderButtons.on( 'click.postboxes', this.handleOrder ); + /** * @since 2.7.0 */ - $('.postbox .hndle a').click( function(e) { + $('.postbox .hndle a').on( 'click', function(e) { e.stopPropagation(); }); @@ -122,6 +277,8 @@ * Event handler for the postbox dismiss button. After clicking the button * the postbox will be hidden. * + * As of WordPress 5.5, this is only used for the browser update nag. + * * @since 3.2.0 * * @return {void} @@ -145,19 +302,19 @@ * * @return {void} */ - $('.hide-postbox-tog').bind('click.postboxes', function() { + $('.hide-postbox-tog').on('click.postboxes', function() { var $el = $(this), boxId = $el.val(), $postbox = $( '#' + boxId ); if ( $el.prop( 'checked' ) ) { $postbox.show(); - if ( $.isFunction( postboxes.pbshow ) ) { + if ( typeof postboxes.pbshow === 'function' ) { postboxes.pbshow( boxId ); } } else { $postbox.hide(); - if ( $.isFunction( postboxes.pbhide ) ) { + if ( typeof postboxes.pbhide === 'function' ) { postboxes.pbhide( boxId ); } } @@ -179,7 +336,7 @@ * * @return {void} */ - $('.columns-prefs input[type="radio"]').bind('click.postboxes', function(){ + $('.columns-prefs input[type="radio"]').on('click.postboxes', function(){ var n = parseInt($(this).val(), 10); if ( n ) { @@ -209,7 +366,6 @@ $handleButtons = $( '.postbox .handlediv' ); $.extend( this, args || {} ); - $('#wpbody-content').css('overflow','hidden'); $('.meta-box-sortables').sortable({ placeholder: 'sortable-placeholder', connectWith: '.meta-box-sortables', @@ -236,14 +392,22 @@ .end(); }, opacity: 0.65, + start: function() { + $( 'body' ).addClass( 'is-dragging-metaboxes' ); + // Refresh the cached positions of all the sortable items so that the min-height set while dragging works. + $( '.meta-box-sortables' ).sortable( 'refreshPositions' ); + }, stop: function() { var $el = $( this ); + $( 'body' ).removeClass( 'is-dragging-metaboxes' ); + if ( $el.find( '#dashboard_browser_nag' ).is( ':visible' ) && 'dashboard_browser_nag' != this.firstChild.id ) { $el.sortable('cancel'); return; } + postboxes.updateOrderButtonsProperties(); postboxes.save_order(page); }, receive: function(e,ui) { @@ -256,16 +420,20 @@ }); if ( isMobile ) { - $(document.body).bind('orientationchange.postboxes', function(){ postboxes._pb_change(); }); + $(document.body).on('orientationchange.postboxes', function(){ postboxes._pb_change(); }); this._pb_change(); } this._mark_area(); + // Update the "move" buttons properties. + this.updateOrderButtonsProperties(); + $document.on( 'postbox-toggled', this.updateOrderButtonsProperties ); + // Set the handle buttons `aria-expanded` attribute initial value on page load. $handleButtons.each( function () { var $el = $( this ); - $el.attr( 'aria-expanded', ! $el.parent( '.postbox' ).hasClass( 'closed' ) ); + $el.attr( 'aria-expanded', ! $el.closest( '.postbox' ).hasClass( 'closed' ) ); }); }, @@ -328,7 +496,15 @@ postVars[ 'order[' + this.id.split( '-' )[0] + ']' ] = $( this ).sortable( 'toArray' ).join( ',' ); } ); - $.post( ajaxurl, postVars ); + $.post( + ajaxurl, + postVars, + function( response ) { + if ( response.success ) { + wp.a11y.speak( __( 'The boxes order has been saved.' ) ); + } + } + ); }, /** @@ -346,26 +522,48 @@ * @return {void} */ _mark_area : function() { - var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables'); + var visible = $( 'div.postbox:visible' ).length, + visibleSortables = $( '#dashboard-widgets .meta-box-sortables:visible, #post-body .meta-box-sortables:visible' ), + areAllVisibleSortablesEmpty = true; - $( '#dashboard-widgets .meta-box-sortables:visible' ).each( function() { + visibleSortables.each( function() { var t = $(this); - if ( visible == 1 || t.children('.postbox:visible').length ) { + if ( visible == 1 || t.children( '.postbox:visible' ).length ) { t.removeClass('empty-container'); + areAllVisibleSortablesEmpty = false; } else { t.addClass('empty-container'); - t.attr('data-emptyString', postBoxL10n.postBoxEmptyString); } }); - if ( side.length ) { - if ( side.children('.postbox:visible').length ) - side.removeClass('empty-container'); - else if ( $('#postbox-container-1').css('width') == '280px' ) - side.addClass('empty-container'); + postboxes.updateEmptySortablesText( visibleSortables, areAllVisibleSortablesEmpty ); + }, + + /** + * Updates the text for the empty sortable areas on the Dashboard. + * + * @since 5.5.0 + * + * @param {Object} visibleSortables The jQuery object representing the visible sortable areas. + * @param {boolean} areAllVisibleSortablesEmpty Whether all the visible sortable areas are "empty". + * + * @return {void} + */ + updateEmptySortablesText: function( visibleSortables, areAllVisibleSortablesEmpty ) { + var isDashboard = $( '#dashboard-widgets' ).length, + emptySortableText = areAllVisibleSortablesEmpty ? __( 'Add boxes from the Screen Options menu' ) : __( 'Drag boxes here' ); + + if ( ! isDashboard ) { + return; } + + visibleSortables.each( function() { + if ( $( this ).hasClass( 'empty-container' ) ) { + $( this ).attr( 'data-emptyString', emptySortableText ); + } + } ); }, /** diff --git a/src/js/_enqueues/admin/privacy-tools.js b/src/js/_enqueues/admin/privacy-tools.js index 7d91e50044096..e5fceb86d78c6 100644 --- a/src/js/_enqueues/admin/privacy-tools.js +++ b/src/js/_enqueues/admin/privacy-tools.js @@ -5,8 +5,9 @@ */ // Privacy request action handling. -jQuery( document ).ready( function( $ ) { - var strings = window.privacyToolsL10n || {}; +jQuery( function( $ ) { + var __ = wp.i18n.__, + copiedNoticeTimeout; function setActionState( $action, state ) { $action.children().addClass( 'hidden' ); @@ -55,7 +56,7 @@ jQuery( document ).ready( function( $ ) { }); } - $( '.export-personal-data-handle' ).click( function( event ) { + $( '.export-personal-data-handle' ).on( 'click', function( event ) { var $this = $( this ), $action = $this.parents( '.export-personal-data' ), $requestRow = $this.parents( 'tr' ), @@ -71,12 +72,16 @@ jQuery( document ).ready( function( $ ) { $rowActions.addClass( 'processing' ); - $action.blur(); + $action.trigger( 'blur' ); clearResultsAfterRow( $requestRow ); setExportProgress( 0 ); function onExportDoneSuccess( zipUrl ) { - var summaryMessage = strings.emailSent; + var summaryMessage = __( 'This user’s personal data export link was sent.' ); + + if ( 'undefined' !== typeof zipUrl ) { + summaryMessage = __( 'This user’s personal data export file was downloaded.' ); + } setActionState( $action, 'export-personal-data-success' ); @@ -85,24 +90,28 @@ jQuery( document ).ready( function( $ ) { if ( 'undefined' !== typeof zipUrl ) { window.location = zipUrl; } else if ( ! sendAsEmail ) { - onExportFailure( strings.noExportFile ); + onExportFailure( __( 'No personal data export file was generated.' ) ); } - setTimeout( function(){ $rowActions.removeClass( 'processing' ); }, 500 ); + setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 ); } function onExportFailure( errorMessage ) { + var summaryMessage = __( 'An error occurred while attempting to export personal data.' ); + setActionState( $action, 'export-personal-data-failed' ); + if ( errorMessage ) { - appendResultsAfterRow( $requestRow, 'notice-error', strings.exportError, [ errorMessage ] ); + appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [ errorMessage ] ); } - setTimeout( function(){ $rowActions.removeClass( 'processing' ); }, 500 ); + setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 ); } function setExportProgress( exporterIndex ) { - var progress = ( exportersCount > 0 ? exporterIndex / exportersCount : 0 ); - var progressString = Math.round( progress * 100 ).toString() + '%'; + var progress = ( exportersCount > 0 ? exporterIndex / exportersCount : 0 ), + progressString = Math.round( progress * 100 ).toString() + '%'; + $progress.html( progressString ); } @@ -125,7 +134,7 @@ jQuery( document ).ready( function( $ ) { if ( ! response.success ) { // e.g. invalid request ID. - setTimeout( function(){ onExportFailure( response.data ); }, 500 ); + setTimeout( function() { onExportFailure( response.data ); }, 500 ); return; } @@ -136,12 +145,12 @@ jQuery( document ).ready( function( $ ) { if ( exporterIndex < exportersCount ) { setTimeout( doNextExport( exporterIndex + 1, 1 ) ); } else { - setTimeout( function(){ onExportDoneSuccess( responseData.url ); }, 500 ); + setTimeout( function() { onExportDoneSuccess( responseData.url ); }, 500 ); } } }).fail( function( jqxhr, textStatus, error ) { // e.g. Nonce failure. - setTimeout( function(){ onExportFailure( error ); }, 500 ); + setTimeout( function() { onExportFailure( error ); }, 500 ); }); } @@ -150,7 +159,7 @@ jQuery( document ).ready( function( $ ) { doNextExport( 1, 1 ); }); - $( '.remove-personal-data-handle' ).click( function( event ) { + $( '.remove-personal-data-handle' ).on( 'click', function( event ) { var $this = $( this ), $action = $this.parents( '.remove-personal-data' ), $requestRow = $this.parents( 'tr' ), @@ -168,46 +177,50 @@ jQuery( document ).ready( function( $ ) { $rowActions.addClass( 'processing' ); - $action.blur(); + $action.trigger( 'blur' ); clearResultsAfterRow( $requestRow ); setErasureProgress( 0 ); function onErasureDoneSuccess() { - var summaryMessage = strings.noDataFound; - var classes = 'notice-success'; + var summaryMessage = __( 'No personal data was found for this user.' ), + classes = 'notice-success'; setActionState( $action, 'remove-personal-data-success' ); if ( false === hasRemoved ) { if ( false === hasRetained ) { - summaryMessage = strings.noDataFound; + summaryMessage = __( 'No personal data was found for this user.' ); } else { - summaryMessage = strings.noneRemoved; + summaryMessage = __( 'Personal data was found for this user but was not erased.' ); classes = 'notice-warning'; } } else { if ( false === hasRetained ) { - summaryMessage = strings.foundAndRemoved; + summaryMessage = __( 'All of the personal data found for this user was erased.' ); } else { - summaryMessage = strings.someNotRemoved; + summaryMessage = __( 'Personal data was found for this user but some of the personal data found was not erased.' ); classes = 'notice-warning'; } } appendResultsAfterRow( $requestRow, classes, summaryMessage, messages ); - setTimeout( function(){ $rowActions.removeClass( 'processing' ); }, 500 ); + setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 ); } function onErasureFailure() { + var summaryMessage = __( 'An error occurred while attempting to find and erase personal data.' ); + setActionState( $action, 'remove-personal-data-failed' ); - appendResultsAfterRow( $requestRow, 'notice-error', strings.removalError, [] ); - setTimeout( function(){ $rowActions.removeClass( 'processing' ); }, 500 ); + appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [] ); + + setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 ); } function setErasureProgress( eraserIndex ) { - var progress = ( erasersCount > 0 ? eraserIndex / erasersCount : 0 ); - var progressString = Math.round( progress * 100 ).toString() + '%'; + var progress = ( erasersCount > 0 ? eraserIndex / erasersCount : 0 ), + progressString = Math.round( progress * 100 ).toString() + '%'; + $progress.html( progressString ); } @@ -226,7 +239,7 @@ jQuery( document ).ready( function( $ ) { var responseData = response.data; if ( ! response.success ) { - setTimeout( function(){ onErasureFailure(); }, 500 ); + setTimeout( function() { onErasureFailure(); }, 500 ); return; } if ( responseData.items_removed ) { @@ -245,11 +258,11 @@ jQuery( document ).ready( function( $ ) { if ( eraserIndex < erasersCount ) { setTimeout( doNextErasure( eraserIndex + 1, 1 ) ); } else { - setTimeout( function(){ onErasureDoneSuccess(); }, 500 ); + setTimeout( function() { onErasureDoneSuccess(); }, 500 ); } } }).fail( function() { - setTimeout( function(){ onErasureFailure(); }, 500 ); + setTimeout( function() { onErasureFailure(); }, 500 ); }); } @@ -262,21 +275,16 @@ jQuery( document ).ready( function( $ ) { // Privacy Policy page, copy action. $( document ).on( 'click', function( event ) { var $parent, - $container, range, - __ = wp.i18n.__, $target = $( event.target ), copiedNotice = $target.siblings( '.success' ); - if ( $target.is( 'button.privacy-text-copy' ) ) { - $parent = $target.parent().parent(); - $container = $parent.find( 'div.wp-suggested-text' ); + clearTimeout( copiedNoticeTimeout ); - if ( ! $container.length ) { - $container = $parent.find( 'div.policy-text' ); - } + if ( $target.is( 'button.privacy-text-copy' ) ) { + $parent = $target.closest( '.privacy-settings-accordion-panel' ); - if ( $container.length ) { + if ( $parent.length ) { try { var documentPosition = document.documentElement.scrollTop, bodyPosition = document.body.scrollTop; @@ -286,15 +294,15 @@ jQuery( document ).ready( function( $ ) { // Hide tutorial content to remove from copied content. range = document.createRange(); - $container.addClass( 'hide-privacy-policy-tutorial' ); + $parent.addClass( 'hide-privacy-policy-tutorial' ); // Copy action. - range.selectNodeContents( $container[0] ); + range.selectNodeContents( $parent[0] ); window.getSelection().addRange( range ); document.execCommand( 'copy' ); // Reset section. - $container.removeClass( 'hide-privacy-policy-tutorial' ); + $parent.removeClass( 'hide-privacy-policy-tutorial' ); window.getSelection().removeAllRanges(); // Return scroll position - see #49540. @@ -306,13 +314,33 @@ jQuery( document ).ready( function( $ ) { // Display and speak notice to indicate action complete. copiedNotice.addClass( 'visible' ); - wp.a11y.speak( __( 'The section has been copied to your clipboard.' ) ); + wp.a11y.speak( __( 'The suggested policy text has been copied to your clipboard.' ) ); // Delay notice dismissal. - setTimeout( function(){ copiedNotice.removeClass( 'visible' ); }, 3000 ); + copiedNoticeTimeout = setTimeout( function() { + copiedNotice.removeClass( 'visible' ); + }, 3000 ); } catch ( er ) {} } } }); -}); + // Label handling to focus the create page button on Privacy settings page. + $( 'body.options-privacy-php label[for=create-page]' ).on( 'click', function( e ) { + e.preventDefault(); + $( 'input#create-page' ).trigger( 'focus' ); + } ); + + // Accordion handling in various new Privacy settings pages. + $( '.privacy-settings-accordion' ).on( 'click', '.privacy-settings-accordion-trigger', function() { + var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) ); + + if ( isExpanded ) { + $( this ).attr( 'aria-expanded', 'false' ); + $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true ); + } else { + $( this ).attr( 'aria-expanded', 'true' ); + $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false ); + } + } ); +}); diff --git a/src/js/_enqueues/admin/set-post-thumbnail.js b/src/js/_enqueues/admin/set-post-thumbnail.js index 0f3849af34d04..5f5f565564cc8 100644 --- a/src/js/_enqueues/admin/set-post-thumbnail.js +++ b/src/js/_enqueues/admin/set-post-thumbnail.js @@ -2,23 +2,23 @@ * @output wp-admin/js/set-post-thumbnail.js */ -/* global setPostThumbnailL10n, ajaxurl, post_id, alert */ +/* global ajaxurl, post_id, alert */ /* exported WPSetAsThumbnail */ window.WPSetAsThumbnail = function( id, nonce ) { var $link = jQuery('a#wp-post-thumbnail-' + id); - $link.text( setPostThumbnailL10n.saving ); + $link.text( wp.i18n.__( 'Saving…' ) ); jQuery.post(ajaxurl, { action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) }, function(str){ var win = window.dialogArguments || opener || parent || top; - $link.text( setPostThumbnailL10n.setThumbnail ); + $link.text( wp.i18n.__( 'Use as featured image' ) ); if ( str == '0' ) { - alert( setPostThumbnailL10n.error ); + alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); } else { jQuery('a.wp-post-thumbnail').show(); - $link.text( setPostThumbnailL10n.done ); + $link.text( wp.i18n.__( 'Done' ) ); $link.fadeOut( 2000 ); win.WPSetThumbnailID(id); win.WPSetThumbnailHTML(str); diff --git a/src/js/_enqueues/admin/site-health.js b/src/js/_enqueues/admin/site-health.js index b0f24c7121f97..e9e5c06bdbb58 100644 --- a/src/js/_enqueues/admin/site-health.js +++ b/src/js/_enqueues/admin/site-health.js @@ -6,23 +6,42 @@ /* global ajaxurl, ClipboardJS, SiteHealth, wp */ -jQuery( document ).ready( function( $ ) { +jQuery( function( $ ) { var __ = wp.i18n.__, _n = wp.i18n._n, - sprintf = wp.i18n.sprintf; - - var data; - var clipboard = new ClipboardJS( '.site-health-copy-buttons .copy-button' ); - var isDebugTab = $( '.health-check-body.health-check-debug-tab' ).length; - var pathsSizesSection = $( '#health-check-accordion-block-wp-paths-sizes' ); + sprintf = wp.i18n.sprintf, + clipboard = new ClipboardJS( '.site-health-copy-buttons .copy-button' ), + isStatusTab = $( '.health-check-body.health-check-status-tab' ).length, + isDebugTab = $( '.health-check-body.health-check-debug-tab' ).length, + pathsSizesSection = $( '#health-check-accordion-block-wp-paths-sizes' ), + successTimeout; // Debug information copy section. clipboard.on( 'success', function( e ) { - var $wrapper = $( e.trigger ).closest( 'div' ); - $( '.success', $wrapper ).addClass( 'visible' ); + var triggerElement = $( e.trigger ), + successElement = $( '.success', triggerElement.closest( 'div' ) ); + + // Clear the selection and move focus back to the trigger. + e.clearSelection(); + // Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680 + triggerElement.trigger( 'focus' ); + + // Show success visual feedback. + clearTimeout( successTimeout ); + successElement.removeClass( 'hidden' ); + + // Hide success visual feedback after 3 seconds since last success. + successTimeout = setTimeout( function() { + successElement.addClass( 'hidden' ); + // Remove the visually hidden textarea so that it isn't perceived by assistive technologies. + if ( clipboard.clipboardAction.fakeElem && clipboard.clipboardAction.removeFake ) { + clipboard.clipboardAction.removeFake(); + } + }, 3000 ); - wp.a11y.speak( __( 'Site information has been added to your clipboard.' ) ); + // Handle success audible feedback. + wp.a11y.speak( __( 'Site information has been copied to your clipboard.' ) ); } ); // Accordion handling in various areas. @@ -48,28 +67,101 @@ jQuery( document ).ready( function( $ ) { } ); /** - * Append a new issue to the issue list. + * Validates the Site Health test result format. + * + * @since 5.6.0 + * + * @param {Object} issue + * + * @return {boolean} + */ + function validateIssueData( issue ) { + // Expected minimum format of a valid SiteHealth test response. + var minimumExpected = { + test: 'string', + label: 'string', + description: 'string' + }, + passed = true, + key, value, subKey, subValue; + + // If the issue passed is not an object, return a `false` state early. + if ( 'object' !== typeof( issue ) ) { + return false; + } + + // Loop over expected data and match the data types. + for ( key in minimumExpected ) { + value = minimumExpected[ key ]; + + if ( 'object' === typeof( value ) ) { + for ( subKey in value ) { + subValue = value[ subKey ]; + + if ( 'undefined' === typeof( issue[ key ] ) || + 'undefined' === typeof( issue[ key ][ subKey ] ) || + subValue !== typeof( issue[ key ][ subKey ] ) + ) { + passed = false; + } + } + } else { + if ( 'undefined' === typeof( issue[ key ] ) || + value !== typeof( issue[ key ] ) + ) { + passed = false; + } + } + } + + return passed; + } + + /** + * Appends a new issue to the issue list. * * @since 5.2.0 * * @param {Object} issue The issue data. */ - function AppendIssue( issue ) { + function appendIssue( issue ) { var template = wp.template( 'health-check-issue' ), issueWrapper = $( '#health-check-issues-' + issue.status ), heading, count; + /* + * Validate the issue data format before using it. + * If the output is invalid, discard it. + */ + if ( ! validateIssueData( issue ) ) { + return false; + } + SiteHealth.site_status.issues[ issue.status ]++; count = SiteHealth.site_status.issues[ issue.status ]; + // If no test name is supplied, append a placeholder for markup references. + if ( typeof issue.test === 'undefined' ) { + issue.test = issue.status + count; + } + if ( 'critical' === issue.status ) { - heading = sprintf( _n( '%s critical issue', '%s critical issues', count ), '' + count + '' ); + heading = sprintf( + _n( '%s critical issue', '%s critical issues', count ), + '' + count + '' + ); } else if ( 'recommended' === issue.status ) { - heading = sprintf( _n( '%s recommended improvement', '%s recommended improvements', count ), '' + count + '' ); + heading = sprintf( + _n( '%s recommended improvement', '%s recommended improvements', count ), + '' + count + '' + ); } else if ( 'good' === issue.status ) { - heading = sprintf( _n( '%s item with no issues detected', '%s items with no issues detected', count ), '' + count + '' ); + heading = sprintf( + _n( '%s item with no issues detected', '%s items with no issues detected', count ), + '' + count + '' + ); } if ( heading ) { @@ -80,18 +172,21 @@ jQuery( document ).ready( function( $ ) { } /** - * Update site health status indicator as asynchronous tests are run and returned. + * Updates site health status indicator as asynchronous tests are run and returned. * * @since 5.2.0 */ - function RecalculateProgression() { + function recalculateProgression() { var r, c, pct; var $progress = $( '.site-health-progress' ); var $wrapper = $progress.closest( '.site-health-progress-wrapper' ); var $progressLabel = $( '.site-health-progress-label', $wrapper ); var $circle = $( '.site-health-progress svg #bar' ); - var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); - var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); + var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); + var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); var val = 100 - Math.ceil( ( failedTests / totalTests ) * 100 ); if ( 0 === totalTests ) { @@ -111,7 +206,7 @@ jQuery( document ).ready( function( $ ) { val = 100; } - pct = ( ( 100 - val ) / 100 ) * c; + pct = ( ( 100 - val ) / 100 ) * c + 'px'; $circle.css( { strokeDashoffset: pct } ); @@ -135,7 +230,7 @@ jQuery( document ).ready( function( $ ) { wp.a11y.speak( __( 'All site health tests have finished running. There are items that should be addressed, and the results are now available on the page.' ) ); } - if ( ! isDebugTab ) { + if ( isStatusTab ) { $.post( ajaxurl, { @@ -153,7 +248,7 @@ jQuery( document ).ready( function( $ ) { } /** - * Queue the next asynchronous test when we're ready to run it. + * Queues the next asynchronous test when we're ready to run it. * * @since 5.2.0 */ @@ -175,28 +270,86 @@ jQuery( document ).ready( function( $ ) { this.completed = true; - $.post( - ajaxurl, - data, - function( response ) { + if ( 'undefined' !== typeof( this.has_rest ) && this.has_rest ) { + wp.apiRequest( { + url: wp.url.addQueryArgs( this.test, { _locale: 'user' } ), + headers: this.headers + } ) + .done( function( response ) { + /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ + appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response ) ); + } ) + .fail( function( response ) { + var description; + + if ( 'undefined' !== typeof( response.responseJSON ) && 'undefined' !== typeof( response.responseJSON.message ) ) { + description = response.responseJSON.message; + } else { + description = __( 'No details available' ); + } + + addFailedSiteHealthCheckNotice( this.url, description ); + } ) + .always( function() { + maybeRunNextAsyncTest(); + } ); + } else { + $.post( + ajaxurl, + data + ).done( function( response ) { /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ - AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) ); + appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) ); + } ).fail( function( response ) { + var description; + + if ( 'undefined' !== typeof( response.responseJSON ) && 'undefined' !== typeof( response.responseJSON.message ) ) { + description = response.responseJSON.message; + } else { + description = __( 'No details available' ); + } + + addFailedSiteHealthCheckNotice( this.url, description ); + } ).always( function() { maybeRunNextAsyncTest(); - } - ); + } ); + } return false; } ); } if ( doCalculation ) { - RecalculateProgression(); + recalculateProgression(); } } - if ( 'undefined' !== typeof SiteHealth && ! isDebugTab ) { + /** + * Add the details of a failed asynchronous test to the list of test results. + * + * @since 5.6.0 + */ + function addFailedSiteHealthCheckNotice( url, description ) { + var issue; + + issue = { + 'status': 'recommended', + 'label': __( 'A test is unavailable' ), + 'badge': { + 'color': 'red', + 'label': __( 'Unavailable' ) + }, + 'description': '

' + url + '

' + description + '

', + 'actions': '' + }; + + /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ + appendIssue( wp.hooks.applyFilters( 'site_status_test_result', issue ) ); + } + + if ( 'undefined' !== typeof SiteHealth ) { if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) { - RecalculateProgression(); + recalculateProgression(); } else { SiteHealth.site_status.issues = { 'good': 0, @@ -207,37 +360,18 @@ jQuery( document ).ready( function( $ ) { if ( 0 < SiteHealth.site_status.direct.length ) { $.each( SiteHealth.site_status.direct, function() { - AppendIssue( this ); + appendIssue( this ); } ); } if ( 0 < SiteHealth.site_status.async.length ) { - data = { - 'action': 'health-check-' + SiteHealth.site_status.async[0].test.replace( '_', '-' ), - '_wpnonce': SiteHealth.nonce.site_status - }; - - SiteHealth.site_status.async[0].completed = true; - - $.post( - ajaxurl, - data, - function( response ) { - AppendIssue( response.data ); - maybeRunNextAsyncTest(); - } - ); + maybeRunNextAsyncTest(); } else { - RecalculateProgression(); + recalculateProgression(); } } function getDirectorySizes() { - var data = { - action: 'health-check-get-sizes', - _wpnonce: SiteHealth.nonce.site_status_result - }; - var timestamp = ( new Date().getTime() ); // After 3 seconds announce that we're still waiting for directory sizes. @@ -245,20 +379,17 @@ jQuery( document ).ready( function( $ ) { wp.a11y.speak( __( 'Please wait...' ) ); }, 3000 ); - $.post( { - type: 'POST', - url: ajaxurl, - data: data, - dataType: 'json' + wp.apiRequest( { + path: '/wp-site-health/v1/directory-sizes' } ).done( function( response ) { - updateDirSizes( response.data || {} ); + updateDirSizes( response || {} ); } ).always( function() { var delay = ( new Date().getTime() ) - timestamp; $( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' ); - RecalculateProgression(); + recalculateProgression(); - if ( delay > 3000 ) { + if ( delay > 3000 ) { /* * We have announced that we're waiting. * Announce that we're ready after giving at least 3 seconds @@ -310,7 +441,12 @@ jQuery( document ).ready( function( $ ) { if ( pathsSizesSection.length ) { getDirectorySizes(); } else { - RecalculateProgression(); + recalculateProgression(); } } + + // Trigger a class toggle when the extended menu button is clicked. + $( '.health-check-offscreen-nav-wrapper' ).on( 'click', function() { + $( this ).toggleClass( 'visible' ); + } ); } ); diff --git a/src/js/_enqueues/admin/tags-box.js b/src/js/_enqueues/admin/tags-box.js index 40105e2d384bb..99d664691c9c8 100644 --- a/src/js/_enqueues/admin/tags-box.js +++ b/src/js/_enqueues/admin/tags-box.js @@ -6,7 +6,7 @@ /* global ajaxurl, tagBox, array_unique_noempty */ ( function( $ ) { - var tagDelimiter = ( window.tagsSuggestL10n && window.tagsSuggestL10n.tagDelimiter ) || ','; + var tagDelimiter = wp.i18n._x( ',', 'tag delimiter' ) || ','; /** * Filters unique items and returns a new array. @@ -27,7 +27,8 @@ // Trim the values and ensure they are unique. $.each( array, function( key, val ) { - val = $.trim( val ); + val = val || ''; + val = val.trim(); if ( val && $.inArray( val, out ) === -1 ) { out.push( val ); @@ -96,7 +97,8 @@ // Sanitize the current tags and push them as if they're new tags. $.each( current_tags, function( key, val ) { - val = $.trim( val ); + val = val || ''; + val = val.trim(); if ( val ) { new_tags.push( val ); } @@ -148,7 +150,8 @@ $.each( current_tags, function( key, val ) { var listItem, xbutton; - val = $.trim( val ); + val = val || ''; + val = val.trim(); if ( ! val ) return; @@ -164,7 +167,7 @@ */ xbutton = $( '' ); /** @@ -188,7 +191,7 @@ * key this will fire the `keyup` event on the input. */ if ( 13 === e.keyCode || 32 === e.keyCode ) { - $( this ).closest( '.tagsdiv' ).find( 'input.newtag' ).focus(); + $( this ).closest( '.tagsdiv' ).find( 'input.newtag' ).trigger( 'focus' ); } tagBox.userAction = 'remove'; @@ -255,7 +258,7 @@ if ( ! a ) newtag.val(''); if ( 'undefined' == typeof( f ) ) - newtag.focus(); + newtag.trigger( 'focus' ); return false; }, @@ -284,8 +287,8 @@ * * @since 2.9.0 * - * @param {number|string} r The response message from the AJAX call. - * @param {string} stat The status of the AJAX request. + * @param {number|string} r The response message from the Ajax call. + * @param {string} stat The status of the Ajax request. * * @return {void} */ @@ -303,7 +306,7 @@ * * @return {boolean} Returns false to prevent the default action. */ - $( 'a', r ).click( function() { + $( 'a', r ).on( 'click', function() { tagBox.userAction = 'add'; tagBox.flushTags( $( '#' + tax ), this ); return false; @@ -334,11 +337,11 @@ switch ( this.userAction ) { case 'remove': - message = window.tagsSuggestL10n.termRemoved; + message = wp.i18n.__( 'Term removed.' ); break; case 'add': - message = window.tagsSuggestL10n.termAdded; + message = wp.i18n.__( 'Term added.' ); break; default: @@ -368,7 +371,7 @@ tagBox.quickClicks( this ); }); - $( '.tagadd', ajaxtag ).click( function() { + $( '.tagadd', ajaxtag ).on( 'click', function() { tagBox.userAction = 'add'; tagBox.flushTags( $( this ).closest( '.tagsdiv' ) ); }); @@ -385,7 +388,7 @@ * * @return {void} */ - $( 'input.newtag', ajaxtag ).keypress( function( event ) { + $( 'input.newtag', ajaxtag ).on( 'keypress', function( event ) { if ( 13 == event.which ) { tagBox.userAction = 'add'; tagBox.flushTags( $( this ).closest( '.tagsdiv' ) ); @@ -404,7 +407,7 @@ * * @return {void} */ - $('#post').submit(function(){ + $('#post').on( 'submit', function(){ $('div.tagsdiv').each( function() { tagBox.flushTags(this, false, 1); }); @@ -419,14 +422,14 @@ * * @return {void} */ - $('.tagcloud-link').click(function(){ + $('.tagcloud-link').on( 'click', function(){ // On the first click, fetch the tag cloud and insert it in the DOM. tagBox.get( $( this ).attr( 'id' ) ); // Update button state, remove previous click event and attach a new one to toggle the cloud. $( this ) .attr( 'aria-expanded', 'true' ) - .unbind() - .click( function() { + .off() + .on( 'click', function() { $( this ) .attr( 'aria-expanded', 'false' === $( this ).attr( 'aria-expanded' ) ? 'true' : 'false' ) .siblings( '.the-tagcloud' ).toggle(); diff --git a/src/js/_enqueues/admin/tags-suggest.js b/src/js/_enqueues/admin/tags-suggest.js index c5ccf16eafd63..0381f0053cb22 100644 --- a/src/js/_enqueues/admin/tags-suggest.js +++ b/src/js/_enqueues/admin/tags-suggest.js @@ -4,12 +4,12 @@ * @output wp-admin/js/tags-suggest.js */ ( function( $ ) { - if ( typeof window.tagsSuggestL10n === 'undefined' || typeof window.uiAutocompleteL10n === 'undefined' ) { + if ( typeof window.uiAutocompleteL10n === 'undefined' ) { return; } var tempID = 0; - var separator = window.tagsSuggestL10n.tagDelimiter || ','; + var separator = wp.i18n._x( ',', 'tag delimiter' ) || ','; function split( val ) { return val.split( new RegExp( separator + '\\s*' ) ); @@ -30,14 +30,19 @@ * * @since 4.7.0 * - * @param {object} options Options that are passed to UI Autocomplete. Can be used to override the default settings. - * @return {object} jQuery instance. + * @param {Object} options Options that are passed to UI Autocomplete. Can be used to override the default settings. + * @return {Object} jQuery instance. */ $.fn.wpTagsSuggest = function( options ) { var cache; var last; var $element = $( this ); + // Do not initialize if the element doesn't exist. + if ( ! $element.length ) { + return this; + } + options = options || {}; var taxonomy = options.taxonomy || $element.attr( 'data-wp-taxonomy' ) || 'post_tag'; @@ -104,7 +109,7 @@ if ( $.ui.keyCode.TAB === event.keyCode ) { // Audible confirmation message when a tag has been selected. - window.wp.a11y.speak( window.tagsSuggestL10n.termSelected, 'assertive' ); + window.wp.a11y.speak( wp.i18n.__( 'Term selected.' ), 'assertive' ); event.preventDefault(); } else if ( $.ui.keyCode.ENTER === event.keyCode ) { // If we're in the edit post Tags meta box, add the tag. @@ -146,9 +151,16 @@ $element.on( 'keydown', function() { $element.removeAttr( 'aria-activedescendant' ); - } ) - .autocomplete( options ) - .autocomplete( 'instance' )._renderItem = function( ul, item ) { + } ); + + $element.autocomplete( options ); + + // Ensure the autocomplete instance exists. + if ( ! $element.autocomplete( 'instance' ) ) { + return this; + } + + $element.autocomplete( 'instance' )._renderItem = function( ul, item ) { return $( '
  • ' ) .text( item.name ) .appendTo( ul ); @@ -168,9 +180,10 @@ if ( inputValue ) { $element.autocomplete( 'search' ); } - } ) + } ); + // Returns a jQuery object containing the menu element. - .autocomplete( 'widget' ) + $element.autocomplete( 'widget' ) .addClass( 'wp-tags-autocomplete' ) .attr( 'role', 'listbox' ) .removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI. diff --git a/src/js/_enqueues/admin/tags.js b/src/js/_enqueues/admin/tags.js index d87b98174ba0c..6c25e55537d97 100644 --- a/src/js/_enqueues/admin/tags.js +++ b/src/js/_enqueues/admin/tags.js @@ -7,9 +7,9 @@ * @output wp-admin/js/tags.js */ - /* global ajaxurl, wpAjax, tagsl10n, showNotice, validateForm */ + /* global ajaxurl, wpAjax, showNotice, validateForm */ -jQuery(document).ready(function($) { +jQuery( function($) { var addingTerm = false; @@ -47,19 +47,19 @@ jQuery(document).ready(function($) { /** * Removes the term from the parent box and the tag cloud. * - * `data.match(/tag_ID=(\d+)/)[1]` matches the term id from the data variable. - * This term id is then used to select the relevant HTML elements: + * `data.match(/tag_ID=(\d+)/)[1]` matches the term ID from the data variable. + * This term ID is then used to select the relevant HTML elements: * The parent box and the tag cloud. */ $('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove(); $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove(); } else if ( '-1' == r ) { - $('#ajax-response').empty().append('

    ' + tagsl10n.noPerm + '

    '); + $('#ajax-response').empty().append('

    ' + wp.i18n.__( 'Sorry, you are not allowed to do that.' ) + '

    '); tr.children().css('backgroundColor', ''); } else { - $('#ajax-response').empty().append('

    ' + tagsl10n.broken + '

    '); + $('#ajax-response').empty().append('

    ' + wp.i18n.__( 'Something went wrong.' ) + '

    '); tr.children().css('backgroundColor', ''); } }); @@ -98,7 +98,7 @@ jQuery(document).ready(function($) { * * @return {boolean} Always returns false to cancel the default event handling. */ - $('#submit').click(function(){ + $('#submit').on( 'click', function(){ var form = $(this).parents('form'); if ( ! validateForm( form ) ) diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js index ff4830242c0e1..c2a403fe38799 100644 --- a/src/js/_enqueues/admin/user-profile.js +++ b/src/js/_enqueues/admin/user-profile.js @@ -5,7 +5,7 @@ /* global ajaxurl, pwsL10n, userProfileL10n */ (function($) { var updateLock = false, - + __ = wp.i18n.__, $pass1Row, $pass1, $pass2, @@ -14,32 +14,35 @@ $toggleButton, $submitButtons, $submitButton, - currentPass; + currentPass, + $passwordWrapper; function generatePassword() { if ( typeof zxcvbn !== 'function' ) { setTimeout( generatePassword, 50 ); return; - } else if ( ! $pass1.val() ) { - // zxcvbn loaded before user entered password. + } else if ( ! $pass1.val() || $passwordWrapper.hasClass( 'is-open' ) ) { + // zxcvbn loaded before user entered password, or generating new password. $pass1.val( $pass1.data( 'pw' ) ); $pass1.trigger( 'pwupdate' ); showOrHideWeakPasswordCheckbox(); - } - else { + } else { // zxcvbn loaded after the user entered password, check strength. check_pass_strength(); showOrHideWeakPasswordCheckbox(); } + // Install screen. if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) { + // Show the password not masked if admin_password hasn't been posted yet. $pass1.attr( 'type', 'text' ); } else { + // Otherwise, mask the password. $toggleButton.trigger( 'click' ); } // Once zxcvbn loads, passwords strength is known. - $( '#pw-weak-text-label' ).html( userProfileL10n.warnWeak ); + $( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) ); } function bindPass1() { @@ -56,6 +59,7 @@ currentPass = $pass1.val(); + // Refresh password strength area. $pass1.removeClass( 'short bad good strong' ); showOrHideWeakPasswordCheckbox(); } ); @@ -64,10 +68,10 @@ function resetToggle( show ) { $toggleButton .attr({ - 'aria-label': show ? userProfileL10n.ariaShow : userProfileL10n.ariaHide + 'aria-label': show ? __( 'Show password' ) : __( 'Hide password' ) }) .find( '.text' ) - .text( show ? userProfileL10n.show : userProfileL10n.hide ) + .text( show ? __( 'Show' ) : __( 'Hide' ) ) .end() .find( '.dashicons' ) .removeClass( show ? 'dashicons-hidden' : 'dashicons-visibility' ) @@ -84,21 +88,76 @@ $pass1.attr( 'type', 'password' ); resetToggle( true ); } + }); + } - $pass1.focus(); + /** + * Handle the password reset button. Sets up an ajax callback to trigger sending + * a password reset email. + */ + function bindPasswordResetLink() { + $( '#generate-reset-link' ).on( 'click', function() { + var $this = $(this), + data = { + 'user_id': userProfileL10n.user_id, // The user to send a reset to. + 'nonce': userProfileL10n.nonce // Nonce to validate the action. + }; + + // Remove any previous error messages. + $this.parent().find( '.notice-error' ).remove(); + + // Send the reset request. + var resetAction = wp.ajax.post( 'send-password-reset', data ); + + // Handle reset success. + resetAction.done( function( response ) { + addInlineNotice( $this, true, response ); + } ); + + // Handle reset failure. + resetAction.fail( function( response ) { + addInlineNotice( $this, false, response ); + } ); - if ( ! _.isUndefined( $pass1[0].setSelectionRange ) ) { - $pass1[0].setSelectionRange( 0, 100 ); - } }); + + } + + /** + * Helper function to insert an inline notice of success or failure. + * + * @param {jQuery Object} $this The button element: the message will be inserted + * above this button + * @param {bool} success Whether the message is a success message. + * @param {string} message The message to insert. + */ + function addInlineNotice( $this, success, message ) { + var resultDiv = $( '
    ' ); + + // Set up the notice div. + resultDiv.addClass( 'notice inline' ); + + // Add a class indicating success or failure. + resultDiv.addClass( 'notice-' + ( success ? 'success' : 'error' ) ); + + // Add the message, wrapping in a p tag, with a fadein to highlight each message. + resultDiv.text( $( $.parseHTML( message ) ).text() ).wrapInner( '

    '); + + // Disable the button when the callback has succeeded. + $this.prop( 'disabled', success ); + + // Remove any previous notices. + $this.siblings( '.notice' ).remove(); + + // Insert the notice. + $this.before( resultDiv ); } function bindPasswordForm() { - var $passwordWrapper, - $generateButton, + var $generateButton, $cancelButton; - $pass1Row = $( '.user-pass1-wrap, .user-pass-wrap' ); + $pass1Row = $( '.user-pass1-wrap, .user-pass-wrap, .reset-pass-submit' ); // Hide the confirm password field when JavaScript support is enabled. $('.user-pass2-wrap').hide(); @@ -111,7 +170,7 @@ $weakRow = $( '.pw-weak' ); $weakCheckbox = $weakRow.find( '.pw-checkbox' ); - $weakCheckbox.change( function() { + $weakCheckbox.on( 'change', function() { $submitButtons.prop( 'disabled', ! $weakCheckbox.prop( 'checked' ) ); } ); @@ -123,7 +182,7 @@ $pass1 = $( '#user_pass' ); } - /** + /* * Fix a LastPass mismatch issue, LastPass only changes pass2. * * This fixes the issue by copying any changes from the hidden @@ -149,57 +208,52 @@ bindToggleButton(); - if ( $generateButton.length ) { - $passwordWrapper.hide(); - } - $generateButton.show(); $generateButton.on( 'click', function () { updateLock = true; - $generateButton.hide(); - $passwordWrapper.show(); + // Make sure the password fields are shown. + $generateButton.attr( 'aria-expanded', 'true' ); + $passwordWrapper + .show() + .addClass( 'is-open' ); // Enable the inputs when showing. $pass1.attr( 'disabled', false ); $pass2.attr( 'disabled', false ); - if ( $pass1.val().length === 0 ) { - generatePassword(); - } - } ); - - $cancelButton = $pass1Row.find( 'button.wp-cancel-pw' ); - $cancelButton.on( 'click', function () { - updateLock = false; + // Set the password to the generated value. + generatePassword(); - // Clear any entered password. - $pass1.val( '' ); + // Show generated password in plaintext by default. + resetToggle ( false ); - // Generate a new password. + // Generate the next password and cache. wp.ajax.post( 'generate-password' ) .done( function( data ) { $pass1.data( 'pw', data ); } ); + } ); - $generateButton.show().focus(); - $passwordWrapper.hide(); - - $weakRow.hide( 0, function () { - $weakCheckbox.removeProp( 'checked' ); - } ); + $cancelButton = $pass1Row.find( 'button.wp-cancel-pw' ); + $cancelButton.on( 'click', function () { + updateLock = false; // Disable the inputs when hiding to prevent autofill and submission. $pass1.prop( 'disabled', true ); $pass2.prop( 'disabled', true ); + // Clear password field and update the UI. + $pass1.val( '' ).trigger( 'pwupdate' ); resetToggle( false ); - if ( $pass1Row.closest( 'form' ).is( '#your-profile' ) ) { - // Clear password field to prevent update. - $pass1.val( '' ).trigger( 'pwupdate' ); - $submitButtons.prop( 'disabled', false ); - } + // Hide password controls. + $passwordWrapper + .hide() + .removeClass( 'is-open' ); + + // Stop an empty password from being submitted as a change. + $submitButtons.prop( 'disabled', false ); } ); $pass1Row.closest( 'form' ).on( 'submit', function () { @@ -215,12 +269,12 @@ var pass1 = $('#pass1').val(), strength; $('#pass-strength-result').removeClass('short bad good strong empty'); - if ( ! pass1 ) { + if ( ! pass1 || '' === pass1.trim() ) { $( '#pass-strength-result' ).addClass( 'empty' ).html( ' ' ); return; } - strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass1 ); + strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputDisallowedList(), pass1 ); switch ( strength ) { case -1: @@ -265,7 +319,7 @@ } } - $(document).ready( function() { + $( function() { var $colorpicker, $stylesheet, user_id, current_user_id, select = $( '#display_name' ), current_name = select.val(), @@ -273,12 +327,12 @@ $( '#pass1' ).val( '' ).on( 'input' + ' pwupdate', check_pass_strength ); $('#pass-strength-result').show(); - $('.color-palette').click( function() { + $('.color-palette').on( 'click', function() { $(this).siblings('input[name="admin_color"]').prop('checked', true); }); if ( select.length ) { - $('#first_name, #last_name, #nickname').bind( 'blur.user_profile', function() { + $('#first_name, #last_name, #nickname').on( 'blur.user_profile', function() { var dub = [], inputs = { display_nickname : $('#nickname').val() || '', @@ -320,7 +374,7 @@ return; } - var display_name = $.trim( this.value ) || current_name; + var display_name = this.value.trim() || current_name; greeting.text( display_name ); } ); @@ -354,7 +408,7 @@ // Repaint icons. if ( typeof wp !== 'undefined' && wp.svgPainter ) { try { - colors = $.parseJSON( $this.children( '.icon_colors' ).val() ); + colors = JSON.parse( $this.children( '.icon_colors' ).val() ); } catch ( error ) {} if ( colors ) { @@ -377,6 +431,7 @@ }); bindPasswordForm(); + bindPasswordResetLink(); }); $( '#destroy-sessions' ).on( 'click', function( e ) { @@ -399,11 +454,22 @@ window.generatePassword = generatePassword; - /* Warn the user if password was generated but not saved */ + // Warn the user if password was generated but not saved. $( window ).on( 'beforeunload', function () { if ( true === updateLock ) { - return userProfileL10n.warn; + return __( 'Your new password has not been saved.' ); } } ); + /* + * We need to generate a password as soon as the Reset Password page is loaded, + * to avoid double clicking the button to retrieve the first generated password. + * See ticket #39638. + */ + $( function() { + if ( $( '.reset-pass-submit' ).length ) { + $( '.reset-pass-submit button.wp-generate-pw' ).trigger( 'click' ); + } + }); + })(jQuery); diff --git a/src/js/_enqueues/admin/widgets.js b/src/js/_enqueues/admin/widgets.js index a0cb25efb6aac..e8fc42507d382 100644 --- a/src/js/_enqueues/admin/widgets.js +++ b/src/js/_enqueues/admin/widgets.js @@ -15,20 +15,6 @@ window.wpWidgets = { */ hoveredSidebar: null, - /** - * Translations. - * - * Exported from PHP in wp_default_scripts(). - * - * @var {object} - */ - l10n: { - save: '{save}', - saved: '{saved}', - saveAlert: '{saveAlert}', - widgetAdded: '{widgetAdded}' - }, - /** * Lookup of which widgets have had change events triggered. * @@ -50,7 +36,7 @@ window.wpWidgets = { * Toggle the widgets containers when clicked and update the toggle * button `aria-expanded` attribute value. */ - .click( function() { + .on( 'click', function() { var $this = $( this ), $wrap = $this.closest( '.widgets-holder-wrap '), $toggle = $this.find( '.handlediv' ); @@ -95,7 +81,7 @@ window.wpWidgets = { }); unsavedWidgetsElements.each( function() { if ( ! $( this ).hasClass( 'open' ) ) { - $( this ).find( '.widget-title-action:first' ).click(); + $( this ).find( '.widget-title-action:first' ).trigger( 'click' ); } }); @@ -106,16 +92,16 @@ window.wpWidgets = { } else { this.scrollIntoView(); } - $( this ).find( '.widget-inside :tabbable:first' ).focus(); + $( this ).find( '.widget-inside :tabbable:first' ).trigger( 'focus' ); } ); - event.returnValue = wpWidgets.l10n.saveAlert; + event.returnValue = wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); return event.returnValue; } }); // Handle the widgets containers in the left column. - $( '#widgets-left .sidebar-name' ).click( function() { + $( '#widgets-left .sidebar-name' ).on( 'click', function() { var $wrap = $( this ).closest( '.widgets-holder-wrap' ); $wrap @@ -126,7 +112,7 @@ window.wpWidgets = { $document.triggerHandler( 'wp-pin-menu' ); }); - $(document.body).bind('click.widgets-toggle', function(e) { + $(document.body).on('click.widgets-toggle', function(e) { var target = $(e.target), css = {}, widget, inside, targetWidth, widgetWidth, margin, saveButton, widgetId, toggleBtn = target.closest( '.widget' ).find( '.widget-top button.widget-action' ); @@ -141,11 +127,11 @@ window.wpWidgets = { // Save button is initially disabled, but is enabled when a field is changed. if ( ! widget.data( 'dirty-state-initialized' ) ) { saveButton = inside.find( '.widget-control-save' ); - saveButton.prop( 'disabled', true ).val( wpWidgets.l10n.saved ); + saveButton.prop( 'disabled', true ).val( wp.i18n.__( 'Saved' ) ); inside.on( 'input change', function() { self.dirtyWidgets[ widgetId ] = true; widget.addClass( 'widget-dirty' ); - saveButton.prop( 'disabled', false ).val( wpWidgets.l10n.save ); + saveButton.prop( 'disabled', false ).val( wp.i18n.__( 'Save' ) ); }); widget.data( 'dirty-state-initialized', true ); } @@ -248,7 +234,7 @@ window.wpWidgets = { * * @ignore * - * @param {object} event jQuery event object. + * @param {Object} event jQuery event object. */ over: function( event ) { var $wrap = $( event.target ).parent(); @@ -273,7 +259,7 @@ window.wpWidgets = { * * @ignore * - * @param {object} event jQuery event object. + * @param {Object} event jQuery event object. */ out: function( event ) { if ( wpWidgets.hoveredSidebar ) { @@ -433,7 +419,7 @@ window.wpWidgets = { // Area Chooser. $( '#widgets-right .widgets-holder-wrap' ).each( function( index, element ) { var $element = $( element ), - name = $element.find( '.sidebar-name h2' ).text(), + name = $element.find( '.sidebar-name h2' ).text() || '', ariaLabel = $element.find( '.sidebar-name' ).data( 'add-to' ), id = $element.find( '.widgets-sortables' ).attr( 'id' ), li = $( '

  • ' ), @@ -442,7 +428,7 @@ window.wpWidgets = { 'aria-pressed': 'false', 'class': 'widgets-chooser-button', 'aria-label': ariaLabel - } ).text( $.trim( name ) ); + } ).text( name.toString().trim() ); li.append( button ); @@ -586,7 +572,7 @@ window.wpWidgets = { wpWidgets.appendTitle( widget ); // Re-disable the save button. - widget.find( '.widget-control-save' ).prop( 'disabled', true ).val( wpWidgets.l10n.saved ); + widget.find( '.widget-control-save' ).prop( 'disabled', true ).val( wp.i18n.__( 'Saved' ) ); widget.removeClass( 'widget-dirty' ); @@ -717,7 +703,7 @@ window.wpWidgets = { // have to queue this "by hand". widget.find( '.widget-title' ).trigger('click'); // At the end of the animation, announce the widget has been added. - window.wp.a11y.speak( wpWidgets.l10n.widgetAdded, 'assertive' ); + window.wp.a11y.speak( wp.i18n.__( 'Widget has been added to the selected sidebar' ), 'assertive' ); }, 250 ); }, @@ -743,7 +729,7 @@ window.wpWidgets = { * * Used when a Widget gets dragged in/out of the Sidebar and never dropped. * - * @param {object} event jQuery event object. + * @param {Object} event jQuery event object. */ closeSidebar: function( event ) { this.hoveredSidebar @@ -755,6 +741,23 @@ window.wpWidgets = { } }; -$document.ready( function(){ wpWidgets.init(); } ); +$( function(){ wpWidgets.init(); } ); })(jQuery); + +/** + * Removed in 5.5.0, needed for back-compatibility. + * + * @since 4.9.0 + * @deprecated 5.5.0 + * + * @type {object} +*/ +wpWidgets.l10n = wpWidgets.l10n || { + save: '', + saved: '', + saveAlert: '', + widgetAdded: '' +}; + +wpWidgets.l10n = window.wp.deprecateL10nObject( 'wpWidgets.l10n', wpWidgets.l10n, '5.5.0' ); diff --git a/src/js/_enqueues/admin/xfn.js b/src/js/_enqueues/admin/xfn.js index b72540d335dcd..cf7fcf8bb7f52 100644 --- a/src/js/_enqueues/admin/xfn.js +++ b/src/js/_enqueues/admin/xfn.js @@ -4,9 +4,9 @@ * @deprecated 3.5.0 * @output wp-admin/js/xfn.js */ -jQuery( document ).ready(function( $ ) { +jQuery( function( $ ) { $( '#link_rel' ).prop( 'readonly', true ); - $( '#linkxfndiv input' ).bind( 'click keyup', function() { + $( '#linkxfndiv input' ).on( 'click keyup', function() { var isMe = $( '#me' ).is( ':checked' ), inputs = ''; $( 'input.valinp' ).each( function() { if ( isMe ) { diff --git a/src/js/_enqueues/deprecated/media-gallery.js b/src/js/_enqueues/deprecated/media-gallery.js index 805a6f92604fe..6df4c37e6a2c5 100644 --- a/src/js/_enqueues/deprecated/media-gallery.js +++ b/src/js/_enqueues/deprecated/media-gallery.js @@ -10,8 +10,8 @@ jQuery(function($) { /** * Adds a click event handler to the element with a 'wp-gallery' class. */ - $( 'body' ).bind( 'click.wp-gallery', function(e) { - var target = $( e.target ), id, img_size; + $( 'body' ).on( 'click.wp-gallery', function(e) { + var target = $( e.target ), id, img_size, nonceValue; if ( target.hasClass( 'wp-set-header' ) ) { // Opens the image to preview it full size. @@ -21,13 +21,15 @@ jQuery(function($) { // Sets the image as background of the theme. id = target.data( 'attachment-id' ); img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val(); + nonceValue = $( '#_wpnonce' ).val() && ''; /** - * This AJAX action has been deprecated since 3.5.0, see custom-background.php + * This Ajax action has been deprecated since 3.5.0, see custom-background.php */ jQuery.post(ajaxurl, { action: 'set-background-image', attachment_id: id, + _ajax_nonce: nonceValue, size: img_size }, function() { var win = window.dialogArguments || opener || parent || top; diff --git a/src/js/_enqueues/lib/accordion.js b/src/js/_enqueues/lib/accordion.js index 7eacbec966db2..c420e8ccb88ef 100644 --- a/src/js/_enqueues/lib/accordion.js +++ b/src/js/_enqueues/lib/accordion.js @@ -31,7 +31,7 @@ ( function( $ ){ - $( document ).ready( function () { + $( function () { // Expand/Collapse accordion sections on click. $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { diff --git a/src/js/_enqueues/lib/admin-bar.js b/src/js/_enqueues/lib/admin-bar.js index 537df2d98f60d..8cb94ea72f69a 100644 --- a/src/js/_enqueues/lib/admin-bar.js +++ b/src/js/_enqueues/lib/admin-bar.js @@ -22,7 +22,6 @@ shortlink, skipLink, mobileEvent, - fontFaceRegex, adminBarSearchInput, i; @@ -37,7 +36,6 @@ shortlink = document.getElementById( 'wp-admin-bar-get-shortlink' ); skipLink = adminBar.querySelector( '.screen-reader-shortcut' ); mobileEvent = /Mobile\/.+Safari/.test( navigator.userAgent ) ? 'touchstart' : 'click'; - fontFaceRegex = /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/; // Remove nojs class after the DOM is loaded. removeClass( adminBar, 'nojs' ); @@ -111,15 +109,6 @@ window.scrollBy( 0, -32 ); } - // Add no-font-face class to body if needed. - if ( - navigator.userAgent && - fontFaceRegex.test( navigator.userAgent ) && - ! hasClass( document.body, 'no-font-face' ) - ) { - addClass( document.body, 'no-font-face' ); - } - // Clear sessionStorage on logging out. if ( adminBarLogout ) { adminBarLogout.addEventListener( 'click', emptySessionStorage ); @@ -305,8 +294,8 @@ * @since 5.3.1 * * @param {HTMLElement} element The HTML element. - * @param {String} className The class name. - * @return {bool} Whether the element has the className. + * @param {string} className The class name. + * @return {boolean} Whether the element has the className. */ function hasClass( element, className ) { var classNames; @@ -331,7 +320,7 @@ * @since 5.3.1 * * @param {HTMLElement} element The HTML element. - * @param {String} className The class name. + * @param {string} className The class name. */ function addClass( element, className ) { if ( ! element ) { @@ -355,7 +344,7 @@ * @since 5.3.1 * * @param {HTMLElement} element The HTML element. - * @param {String} className The class name. + * @param {string} className The class name. */ function removeClass( element, className ) { var testName, diff --git a/src/js/_enqueues/lib/ajax-response.js b/src/js/_enqueues/lib/ajax-response.js index f2eedf37323c2..38816f3c38a9e 100644 --- a/src/js/_enqueues/lib/ajax-response.js +++ b/src/js/_enqueues/lib/ajax-response.js @@ -11,7 +11,7 @@ window.wpAjax = jQuery.extend( { q = s.split('?'); if ( q[1] ) { s = q[1]; } pp = s.split('&'); for ( i in pp ) { - if ( jQuery.isFunction(pp.hasOwnProperty) && !pp.hasOwnProperty(i) ) { continue; } + if ( typeof pp.hasOwnProperty === 'function' && !pp.hasOwnProperty(i) ) { continue; } p = pp[i].split('='); r[p[0]] = p[1]; } @@ -20,7 +20,7 @@ window.wpAjax = jQuery.extend( { parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission. var parsed = {}, re = jQuery('#' + r).empty(), err = ''; - if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) { + if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) { parsed.responses = []; parsed.errors = false; jQuery('response', x).each( function() { @@ -51,7 +51,7 @@ window.wpAjax = jQuery.extend( { } if ( isNaN(x) ) { return !re.html('

    ' + x + '

    '); } x = parseInt(x,10); - if ( -1 == x ) { return !re.html('

    ' + wpAjax.noPerm + '

    '); } + if ( -1 === x ) { return !re.html('

    ' + wpAjax.noPerm + '

    '); } else if ( 0 === x ) { return !re.html('

    ' + wpAjax.broken + '

    '); } return true; }, @@ -65,6 +65,6 @@ window.wpAjax = jQuery.extend( { }, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'Something went wrong.' } ); // Basic form validation. -jQuery(document).ready( function($){ - $('form.validate').submit( function() { return wpAjax.validateForm( $(this) ); } ); +jQuery( function($){ + $('form.validate').on( 'submit', function() { return wpAjax.validateForm( $(this) ); } ); }); diff --git a/src/js/_enqueues/lib/auth-check.js b/src/js/_enqueues/lib/auth-check.js index ef6d861de0bab..44ff15a153410 100644 --- a/src/js/_enqueues/lib/auth-check.js +++ b/src/js/_enqueues/lib/auth-check.js @@ -4,9 +4,10 @@ * @output wp-includes/js/wp-auth-check.js */ -/* global adminpage */ -(function($){ - var wrap, next; +( function( $ ) { + var wrap, + tempHidden, + tempHiddenTimeout; /** * Shows the authentication form popup. @@ -15,18 +16,18 @@ * @private */ function show() { - var parent = $('#wp-auth-check'), - form = $('#wp-auth-check-form'), - noframe = wrap.find('.wp-auth-fallback-expired'), + var parent = $( '#wp-auth-check' ), + form = $( '#wp-auth-check-form' ), + noframe = wrap.find( '.wp-auth-fallback-expired' ), frame, loaded = false; if ( form.length ) { // Add unload confirmation to counter (frame-busting) JS redirects. - $(window).on( 'beforeunload.wp-auth-check', function(e) { - e.originalEvent.returnValue = window.authcheckL10n.beforeunload; + $( window ).on( 'beforeunload.wp-auth-check', function( event ) { + event.originalEvent.returnValue = window.wp.i18n.__( 'Your session has expired. You can log in again from this page or go to the login page.' ); }); - frame = $('
    "); - jQuery("#TB_overlay").click(tb_remove); + jQuery("#TB_overlay").on( 'click', tb_remove ); } }else{//all others if(document.getElementById("TB_overlay") === null){ jQuery("body").append("
    "); - jQuery("#TB_overlay").click(tb_remove); + jQuery("#TB_overlay").on( 'click', tb_remove ); jQuery( 'body' ).addClass( 'modal-open' ); } } @@ -141,17 +141,17 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic TB_HEIGHT = imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
    "+caption+"
    " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
    "); - jQuery("#TB_closeWindowButton").click(tb_remove); + jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if (!(TB_PrevHTML === "")) { function goPrev(){ - if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);} + if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);} jQuery("#TB_window").remove(); jQuery("body").append("
    "); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } - jQuery("#TB_prev").click(goPrev); + jQuery("#TB_prev").on( 'click', goPrev ); } if (!(TB_NextHTML === "")) { @@ -161,22 +161,22 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } - jQuery("#TB_next").click(goNext); + jQuery("#TB_next").on( 'click', goNext ); } - jQuery(document).bind('keydown.thickbox', function(e){ + jQuery(document).on('keydown.thickbox', function(e){ if ( e.which == 27 ){ // close tb_remove(); } else if ( e.which == 190 ){ // display previous image if(!(TB_NextHTML == "")){ - jQuery(document).unbind('thickbox'); + jQuery(document).off('thickbox'); goNext(); } } else if ( e.which == 188 ){ // display next image if(!(TB_PrevHTML == "")){ - jQuery(document).unbind('thickbox'); + jQuery(document).off('thickbox'); goPrev(); } } @@ -185,7 +185,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic tb_position(); jQuery("#TB_load").remove(); - jQuery("#TB_ImageOff").click(tb_remove); + jQuery("#TB_ImageOff").on( 'click', tb_remove ); jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show }; @@ -206,7 +206,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic if(params['modal'] != "true"){//iframe no modal jQuery("#TB_window").append("
    "+caption+"
    "); }else{//iframe modal - jQuery("#TB_overlay").unbind(); + jQuery("#TB_overlay").off(); jQuery("#TB_window").append(""); } }else{// not an iframe, ajax @@ -214,7 +214,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic if(params['modal'] != "true"){//ajax no modal jQuery("#TB_window").append("
    "+caption+"
    "); }else{//ajax modal - jQuery("#TB_overlay").unbind(); + jQuery("#TB_overlay").off(); jQuery("#TB_window").append("
    "); } }else{//this means the window is already up, we are just loading new content via ajax @@ -225,11 +225,11 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic } } - jQuery("#TB_closeWindowButton").click(tb_remove); + jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if(url.indexOf('TB_inline') != -1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); - jQuery("#TB_window").bind('tb_unload', function () { + jQuery("#TB_window").on('tb_unload', function () { jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); @@ -253,7 +253,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic } if(!params['modal']){ - jQuery(document).bind('keydown.thickbox', function(e){ + jQuery(document).on('keydown.thickbox', function(e){ if ( e.which == 27 ){ // close tb_remove(); return false; @@ -268,7 +268,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic * In other admin screens is hidden and replaced by a different icon. */ if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) { - $closeBtn.focus(); + $closeBtn.trigger( 'focus' ); } } catch(e) { @@ -283,10 +283,10 @@ function tb_showIframe(){ } function tb_remove() { - jQuery("#TB_imageOff").unbind("click"); - jQuery("#TB_closeWindowButton").unbind("click"); + jQuery("#TB_imageOff").off("click"); + jQuery("#TB_closeWindowButton").off("click"); jQuery( '#TB_window' ).fadeOut( 'fast', function() { - jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).unbind().remove(); + jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove(); jQuery( 'body' ).trigger( 'thickbox:removed' ); }); jQuery( 'body' ).removeClass( 'modal-open' ); @@ -295,7 +295,7 @@ function tb_remove() { jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow",""); } - jQuery(document).unbind('.thickbox'); + jQuery(document).off('.thickbox'); return false; } diff --git a/src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css b/src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css index 0aacc8b3e879b..e75543a18ef2d 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css +++ b/src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css @@ -1,3 +1,8 @@ +/* + * Edited for compatibility with old TinyMCE 3.x plugins in WordPress. + * More info: https://core.trac.wordpress.org/ticket/31596#comment:10 + */ + /* Generic */ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; diff --git a/src/js/_enqueues/vendor/tinymce/plugins/compat3x/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/compat3x/plugin.js index 9be24f3e1ae02..92d433edcd5e5 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/compat3x/plugin.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/compat3x/plugin.js @@ -44,7 +44,7 @@ this.add = function (callback, scope, prepend) { log('.on' + newEventName + ".add(..)"); - // Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2). + // Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2) function patchedEventCallback(e) { var callbackArgs = []; diff --git a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.js index b79a08cdc5f5f..ed26968b74c93 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.js @@ -204,6 +204,8 @@ var lists = (function (domGlobals) { resolveBookmark: resolveBookmark }; + var noop = function () { + }; var constant = function (value) { return function () { return value; @@ -221,8 +223,6 @@ var lists = (function (domGlobals) { var never = constant(false); var always = constant(true); - var never$1 = never; - var always$1 = always; var none = function () { return NONE; }; @@ -236,37 +236,27 @@ var lists = (function (domGlobals) { var id = function (n) { return n; }; - var noop = function () { - }; - var nul = function () { - return null; - }; - var undef = function () { - return undefined; - }; var me = { fold: function (n, s) { return n(); }, - is: never$1, - isSome: never$1, - isNone: always$1, + is: never, + isSome: never, + isNone: always, getOr: id, getOrThunk: call, getOrDie: function (msg) { throw new Error(msg || 'error: getOrDie called on none.'); }, - getOrNull: nul, - getOrUndefined: undef, + getOrNull: constant(null), + getOrUndefined: constant(undefined), or: id, orThunk: call, map: none, - ap: none, each: noop, bind: none, - flatten: none, - exists: never$1, - forall: always$1, + exists: never, + forall: always, filter: none, equals: eq, equals_: eq, @@ -281,15 +271,10 @@ var lists = (function (domGlobals) { return me; }(); var some = function (a) { - var constant_a = function () { - return a; - }; + var constant_a = constant(a); var self = function () { return me; }; - var map = function (f) { - return some(f(a)); - }; var bind = function (f) { return f(a); }; @@ -300,8 +285,8 @@ var lists = (function (domGlobals) { is: function (v) { return a === v; }, - isSome: always$1, - isNone: never$1, + isSome: always, + isNone: never, getOr: constant_a, getOrThunk: constant_a, getOrDie: constant_a, @@ -309,35 +294,31 @@ var lists = (function (domGlobals) { getOrUndefined: constant_a, or: self, orThunk: self, - map: map, - ap: function (optfab) { - return optfab.fold(none, function (fab) { - return some(fab(a)); - }); + map: function (f) { + return some(f(a)); }, each: function (f) { f(a); }, bind: bind, - flatten: constant_a, exists: bind, forall: bind, filter: function (f) { return f(a) ? me : NONE; }, + toArray: function () { + return [a]; + }, + toString: function () { + return 'some(' + a + ')'; + }, equals: function (o) { return o.is(a); }, equals_: function (o, elementEq) { - return o.fold(never$1, function (b) { + return o.fold(never, function (b) { return elementEq(a, b); }); - }, - toArray: function () { - return [a]; - }, - toString: function () { - return 'some(' + a + ')'; } }; return me; @@ -375,27 +356,28 @@ var lists = (function (domGlobals) { var isFunction = isType('function'); var isNumber = isType('number'); - var slice = Array.prototype.slice; + var nativeSlice = Array.prototype.slice; + var nativePush = Array.prototype.push; var map = function (xs, f) { var len = xs.length; var r = new Array(len); for (var i = 0; i < len; i++) { var x = xs[i]; - r[i] = f(x, i, xs); + r[i] = f(x, i); } return r; }; var each = function (xs, f) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; - f(x, i, xs); + f(x, i); } }; var filter = function (xs, pred) { var r = []; for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; - if (pred(x, i, xs)) { + if (pred(x, i)) { r.push(x); } } @@ -433,20 +415,19 @@ var lists = (function (domGlobals) { var find = function (xs, pred) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; - if (pred(x, i, xs)) { + if (pred(x, i)) { return Option.some(x); } } return Option.none(); }; - var push = Array.prototype.push; var flatten = function (xs) { var r = []; for (var i = 0, len = xs.length; i < len; ++i) { if (!isArray(xs[i])) { throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); } - push.apply(r, xs[i]); + nativePush.apply(r, xs[i]); } return r; }; @@ -455,7 +436,7 @@ var lists = (function (domGlobals) { return flatten(output); }; var reverse = function (xs) { - var r = slice.call(xs, 0); + var r = nativeSlice.call(xs, 0); r.reverse(); return r; }; @@ -466,7 +447,7 @@ var lists = (function (domGlobals) { return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]); }; var from$1 = isFunction(Array.from) ? Array.from : function (x) { - return slice.call(x); + return nativeSlice.call(x); }; var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')(); @@ -621,17 +602,8 @@ var lists = (function (domGlobals) { fromPoint: fromPoint }; - var liftN = function (arr, f) { - var r = []; - for (var i = 0; i < arr.length; i++) { - var x = arr[i]; - if (x.isSome()) { - r.push(x.getOrDie()); - } else { - return Option.none(); - } - } - return Option.some(f.apply(null, r)); + var lift2 = function (oa, ob, f) { + return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none(); }; var fromElements = function (elements, scope) { @@ -670,7 +642,7 @@ var lists = (function (domGlobals) { for (var k = 0, len = props.length; k < len; k++) { var i = props[k]; var x = obj[i]; - f(x, i, obj); + f(x, i); } }; @@ -1197,10 +1169,7 @@ var lists = (function (domGlobals) { } }; var appendSegments = function (head$1, tail) { - liftN([ - last(head$1), - head(tail) - ], joinSegment); + lift2(last(head$1), head(tail), joinSegment); }; var createSegment = function (scope, listType) { var segment = { @@ -1497,10 +1466,7 @@ var lists = (function (domGlobals) { }; var getItemSelection = function (editor) { var selectedListItems = map(Selection.getSelectedListItems(editor), Element.fromDom); - return liftN([ - find(selectedListItems, not(hasFirstChildList)), - find(reverse(selectedListItems), not(hasFirstChildList)) - ], function (start, end) { + return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) { return { start: start, end: end diff --git a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js index e177a332a0572..d92fc6df35bdf 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js @@ -1 +1 @@ -!function(u){"use strict";var e,n,t,r,o,i,a,s,c,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},C=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},O=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},T=h,E=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},L=function(e,n){return e&&e.nodeName in n},D=function(e,n){return!!h(n)&&!(!e.isBlock(n.nextSibling)||h(n.previousSibling))},w=function(e,n,t){var r=e.isEmpty(n);return!(t&&0=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},_=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},B=function(e){return function(){return e}},P=function(t){return function(){for(var e=[],n=0;ne.length?Cn(t,e,n):Sn(t,e,n)},[]),ie(o).map(function(e){return e.list})).toArray();var t,r,o},Mn=function(e){var n,t,r=J(he.getSelectedListItems(e),Ne.fromDom);return Se([te(r,P(bn)),te((n=r,t=G.call(n,0),t.reverse(),t),P(bn))],function(e,n){return{start:e,end:n}})},Un=function(a,e,s){var n,t,r,o=(n=e,t=Mn(a),r=An(!1),J(n,function(e){return{sourceList:e,entries:Rn(0,t,r,e)}}));Z(o,function(e){var n,t,r,o,i,u;n=e.entries,t=s,Z(ee(n,En),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=a,u=e.entries,o=oe(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},_=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},B=function(){},P=function(e){return function(){return e}},M=function(t){return function(){for(var e=[],n=0;ne.length?Sn(t,e,n):Nn(t,e,n)},[]),oe(o).map(function(e){return e.list})).toArray();var t,r,o},Pn=function(e){var n,t,r=J(ve.getSelectedListItems(e),ye.fromDom);return Ne(te(r,M(On)),te((n=r,(t=Y.call(n,0)).reverse(),t),M(On)),function(e,n){return{start:e,end:n}})},Mn=function(s,e,a){var n,t,r,o=(n=e,t=Pn(s),r=kn(!1),J(n,function(e){return{sourceList:e,entries:xn(0,t,r,e)}}));Z(o,function(e){var n,t,r,o,i,u;n=e.entries,t=a,Z(ee(n,Tn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=s,u=e.entries,o=re(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i= 0; i--) { + var attrName = attrs[i].name; + if (attrName.indexOf('on') === 0) { + delete attrs.map[attrName]; + attrs.splice(i, 1); } - if (attrs[i].name === 'style') { + if (attrName === 'style') { attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name); } } @@ -884,7 +1024,7 @@ var media = (function () { } writer.end(name); } - }, global$7({})).parse(html); + }, global$6({})).parse(html); return writer.getContent(); }; var Sanitize = { sanitize: sanitize }; diff --git a/src/js/_enqueues/vendor/tinymce/plugins/media/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/media/plugin.min.js index 0dd06ba6816d9..e78d8efc11915 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/media/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/media/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){return e.getParam("media_scripts")},b=function(e){return e.getParam("audio_template_callback")},y=function(e){return e.getParam("video_template_callback")},n=function(e){return e.getParam("media_live_embeds",!0)},t=function(e){return e.getParam("media_filter_html",!0)},s=function(e){return e.getParam("media_url_resolver")},m=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},h=function(e){return e.getParam("media_dimensions",!0)},p=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=function(e,t){if(e)for(var r=0;r"):"application/x-shockwave-flash"===i.source1mime?(d='',m.poster&&(d+=''),d+=""):-1!==i.source1mime.indexOf("audio")?(u=i,(l=f)?l(u):'"):"script"===i.type?' + diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php index 75ff053154332..9106c63a0352c 100644 --- a/src/wp-admin/admin-header.php +++ b/src/wp-admin/admin-header.php @@ -22,9 +22,10 @@ * @global string $update_title * @global int $total_update_count * @global string $parent_file + * @global string $typenow */ global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, - $update_title, $total_update_count, $parent_file; + $update_title, $total_update_count, $parent_file, $typenow; // Catch plugins that include admin-header.php before admin.php completes. if ( empty( $current_screen ) ) { @@ -44,12 +45,27 @@ $admin_title = get_bloginfo( 'name' ); } -if ( $admin_title == $title ) { +if ( $admin_title === $title ) { /* translators: Admin screen title. %s: Admin screen name. */ $admin_title = sprintf( __( '%s — WordPress' ), $title ); } else { + $screen_title = $title; + + if ( 'post' === $current_screen->base && 'add' !== $current_screen->action ) { + $post_title = get_the_title(); + if ( ! empty( $post_title ) ) { + $post_type_obj = get_post_type_object( $typenow ); + $screen_title = sprintf( + /* translators: Editor admin screen title. 1: "Edit item" text for the post type, 2: Post title. */ + __( '%1$s “%2$s”' ), + $post_type_obj->labels->edit_item, + $post_title + ); + } + } + /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */ - $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); + $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $screen_title, $admin_title ); } if ( wp_is_recovery_mode() ) { @@ -75,23 +91,21 @@ - taxonomy; } -$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) ); +$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', (float) get_bloginfo( 'version' ) ); $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) ); $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); @@ -192,19 +206,22 @@ $admin_body_class .= ' no-customize-support no-svg'; if ( $current_screen->is_block_editor() ) { - // Default to is-fullscreen-mode to avoid jumps in the UI. - $admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive'; - - if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) { - $admin_body_class .= ' is-dark-theme'; - } + $admin_body_class .= ' block-editor-page wp-embed-responsive'; } +$error_get_last = error_get_last(); + // Print a CSS class to make PHP errors visible. -if ( error_get_last() && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) ) { +if ( $error_get_last && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) + // Don't print the class for PHP notices in wp-config.php, as they happen before WP_DEBUG takes effect, + // and should not be displayed with the `error_reporting` level previously set in wp-load.php. + && ( E_NOTICE !== $error_get_last['type'] || 'wp-config.php' !== wp_basename( $error_get_last['file'] ) ) +) { $admin_body_class .= ' php-error'; } +unset( $error_get_last ); + ?> post_type ) { + if ( 'attachment' !== $post->post_type ) { wp_die( __( 'Invalid post type.' ) ); } - if ( ! current_user_can( 'edit_post', $id ) ) { - wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); - } switch ( $_REQUEST['fetch'] ) { case 3: - $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ); - if ( $thumb_url ) { - echo ''; - } - echo '' . _x( 'Edit', 'media item' ) . ''; - - // Title shouldn't ever be empty, but use filename just in case. - $file = get_attached_file( $post->ID ); - $title = $post->post_title ? $post->post_title : wp_basename( $file ); - echo '
    ' . esc_html( wp_html_excerpt( $title, 60, '…' ) ) . '
    '; + ?> +
    +
    + '; + } + + // Title shouldn't ever be empty, but use filename just in case. + $file = get_attached_file( $post->ID ); + $file_url = wp_get_attachment_url( $post->ID ); + $title = $post->post_title ? $post->post_title : wp_basename( $file ); + ?> +
    + + +
    +
    +
    + + + + + ' . _x( 'Edit', 'media item' ) . ''; + } else { + echo '' . _x( 'Success', 'media item' ) . ''; + } + ?> +
    +
    + $app_name, + 'app_id' => $app_id, + ) + ); + + if ( is_wp_error( $created ) ) { + $error = $created; + } else { + list( $new_password ) = $created; + + if ( $success_url ) { + $redirect = add_query_arg( + array( + 'site_url' => urlencode( site_url() ), + 'user_login' => urlencode( wp_get_current_user()->user_login ), + 'password' => urlencode( $new_password ), + ), + $success_url + ); + } + } + } + + if ( $redirect ) { + // Explicitly not using wp_safe_redirect b/c sends to arbitrary domain. + wp_redirect( $redirect ); + exit; + } +} + +// Used in the HTML title tag. +$title = __( 'Authorize Application' ); + +$app_name = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : ''; +$app_id = ! empty( $_REQUEST['app_id'] ) ? $_REQUEST['app_id'] : ''; +$success_url = ! empty( $_REQUEST['success_url'] ) ? $_REQUEST['success_url'] : null; + +if ( ! empty( $_REQUEST['reject_url'] ) ) { + $reject_url = $_REQUEST['reject_url']; +} elseif ( $success_url ) { + $reject_url = add_query_arg( 'success', 'false', $success_url ); +} else { + $reject_url = null; +} + +$user = wp_get_current_user(); + +$request = compact( 'app_name', 'app_id', 'success_url', 'reject_url' ); +$is_valid = wp_is_authorize_application_password_request_valid( $request, $user ); + +if ( is_wp_error( $is_valid ) ) { + wp_die( + __( 'The Authorize Application request is not allowed.' ) . ' ' . implode( ' ', $is_valid->get_error_messages() ), + __( 'Cannot Authorize Application' ) + ); +} + +if ( wp_is_site_protected_by_basic_auth( 'front' ) ) { + wp_die( + __( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ), + __( 'Cannot Authorize Application' ), + array( + 'response' => 501, + 'link_text' => __( 'Go Back' ), + 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), + ) + ); +} + +if ( ! wp_is_application_passwords_available_for_user( $user ) ) { + if ( wp_is_application_passwords_available() ) { + $message = __( 'Application passwords are not available for your account. Please contact the site administrator for assistance.' ); + } else { + $message = __( 'Application passwords are not available.' ); + } + + wp_die( + $message, + __( 'Cannot Authorize Application' ), + array( + 'response' => 501, + 'link_text' => __( 'Go Back' ), + 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), + ) + ); +} + +wp_enqueue_script( 'auth-app' ); +wp_localize_script( + 'auth-app', + 'authApp', + array( + 'site_url' => site_url(), + 'user_login' => $user->user_login, + 'success' => $success_url, + 'reject' => $reject_url ? $reject_url : admin_url(), + ) +); + +require_once ABSPATH . 'wp-admin/admin-header.php'; + +?> +
    +

    + + +

    get_error_message(); ?>

    + + +
    +

    + +

    + ' . esc_html( $app_name ) . '' + ); + ?> +

    + +

    + + + ID, true ); + $blogs_count = count( $blogs ); + if ( $blogs_count > 1 ) { + ?> +

    + the %2$s site in this installation that you have permissions on.', + 'This will grant access to all %2$s sites in this installation that you have permissions on.', + $blogs_count + ), + admin_url( 'my-sites.php' ), + number_format_i18n( $blogs_count ) + ); + ?> +

    + + + +
    +

    + + +

    +

    +
    + + + +
    + + + + + + +
    + + +
    + + + + 'description-approve', + ) + ); + ?> +

    + ' . esc_html( + add_query_arg( + array( + 'site_url' => site_url(), + 'user_login' => $user->user_login, + 'password' => '[------]', + ), + $success_url + ) + ) . '' + ); + } else { + _e( 'You will be given a password to manually enter into the application in question.' ); + } + ?> +

    + + 'description-reject', + ) + ); + ?> +

    + ' . esc_html( $reject_url ) . '' + ); + } else { + _e( 'You will be returned to the WordPress Dashboard, and no changes will be made.' ); + } + ?> +

    +
    + +
    +
    +comment_post_ID ) ) { + wp_die( + __( 'You can’t edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) + ); + } +} else { + $comment = null; +} + switch ( $action ) { case 'editcomment': + // Used in the HTML title tag. $title = __( 'Edit Comment' ); get_current_screen()->add_help_tab( @@ -60,9 +75,6 @@ wp_enqueue_script( 'comment' ); require_once ABSPATH . 'wp-admin/admin-header.php'; - $comment_id = absint( $_GET['c'] ); - - $comment = get_comment( $comment_id ); if ( ! $comment ) { comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' ' . __( 'Go back' ) . '.', 'javascript:history.go(-1)' ) ); } @@ -71,7 +83,7 @@ comment_footer_die( __( 'Sorry, you are not allowed to edit this comment.' ) ); } - if ( 'trash' == $comment->comment_approved ) { + if ( 'trash' === $comment->comment_approved ) { comment_footer_die( __( 'This comment is in the Trash. Please move it out of the Trash if you want to edit it.' ) ); } @@ -85,11 +97,9 @@ case 'approve': case 'trash': case 'spam': + // Used in the HTML title tag. $title = __( 'Moderate Comment' ); - $comment_id = absint( $_GET['c'] ); - - $comment = get_comment( $comment_id ); if ( ! $comment ) { wp_redirect( admin_url( 'edit-comments.php?error=1' ) ); die(); @@ -101,7 +111,7 @@ } // No need to re-approve/re-trash/re-spam a comment. - if ( str_replace( '1', 'approve', $comment->comment_approved ) == $action ) { + if ( str_replace( '1', 'approve', $comment->comment_approved ) === $action ) { wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); die(); } @@ -109,7 +119,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; $formaction = $action . 'comment'; - $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_'; + $nonce_action = ( 'approve' === $action ) ? 'approve-comment_' : 'delete-comment_'; $nonce_action .= $comment_id; ?> @@ -121,7 +131,7 @@ switch ( $action ) { case 'spam': $caution_msg = __( 'You are about to mark the following comment as spam:' ); - $button = _x( 'Mark as Spam', 'comment' ); + $button = _x( 'Mark as spam', 'comment' ); break; case 'trash': $caution_msg = __( 'You are about to move the following comment to the Trash:' ); @@ -129,15 +139,15 @@ break; case 'delete': $caution_msg = __( 'You are about to delete the following comment:' ); - $button = __( 'Permanently Delete Comment' ); + $button = __( 'Permanently delete comment' ); break; default: $caution_msg = __( 'You are about to approve the following comment:' ); - $button = __( 'Approve Comment' ); + $button = __( 'Approve comment' ); break; } - if ( '0' != $comment->comment_approved ) { // If not unapproved. + if ( '0' !== $comment->comment_approved ) { // If not unapproved. $message = ''; switch ( $comment->comment_approved ) { case '1': @@ -159,23 +169,23 @@ - - + + - - + + - - + + - + - - + + - - + + + - -
    comment_post_ID; @@ -199,17 +209,17 @@ } ?>
    comment_post_ID ) ) { @@ -218,31 +228,32 @@ echo $submitted; } ?> -
    -

    comment_ID}" ); ?>">

    +

    + comment_ID}" ) ); ?>"> +

    - -
    + + +

    - +

    -
    + -
  • + comment_post_ID ) ); @@ -335,7 +346,10 @@ check_admin_referer( 'update-comment_' . $comment_id ); - edit_comment(); + $updated = edit_comment(); + if ( is_wp_error( $updated ) ) { + wp_die( $updated->get_error_message() ); + } $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; @@ -348,9 +362,9 @@ * @param int $comment_id The ID of the comment being edited. */ $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); - wp_redirect( $location ); - exit(); + wp_redirect( $location ); + exit; default: wp_die( __( 'Unknown action.' ) ); diff --git a/src/wp-admin/credits.php b/src/wp-admin/credits.php index 2fdb1266da78d..65eb55792c832 100644 --- a/src/wp-admin/credits.php +++ b/src/wp-admin/credits.php @@ -10,6 +10,7 @@ require_once __DIR__ . '/admin.php'; require_once __DIR__ . '/includes/credits.php'; +// Used in the HTML title tag. $title = __( 'Credits' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); @@ -22,16 +23,13 @@
    -

    - - -

    +

    + +

    -

    - -

    +
    -
    -
    -

    - +
    +

    worldwide team of passionate individuals. Get involved in WordPress.' ), - __( 'https://wordpress.org/about/' ), - __( 'https://make.wordpress.org/' ) + /* translators: 1: https://wordpress.org/about/ */ + __( 'WordPress is created by a worldwide team of passionate individuals.' ), + __( 'https://wordpress.org/about/' ) ); ?> +
    +

    - -

    -

    - Get involved in WordPress.' ), - __( 'https://make.wordpress.org/' ) - ); - ?> + +
    +

    - -
    - -
    -
    +
    diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 0cfca9f165560..e57ded61c7ad8 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -20,19 +20,24 @@ .about__container { /* Section backgrounds */ - --background: #f3f4f5; - --subtle-background: #bde7f0; + --background: transparent; + --subtle-background: #def; + /* Main text color */ - --text: #32373c; - --text-light: #f3f4f5; + --text: #000; + --text-light: #fff; + + /* Accent colors: used in header, on special classes. */ + --accent-1: #3858e9; /* Accent background, link color */ + --accent-2: #2d46ba; /* Header background */ + /* Navigation colors. */ - --nav-background: #216bce; - --nav-border: #1730e5; - --nav-color: #f3f4f5; - /* Reds, used as accents & in header. */ - --accent-1: #1730e5; - --accent-2: #216bce; - --accent-3: #bde7f0; + --nav-background: #fff; + --nav-border: transparent; + --nav-color: var(--text); + --nav-current: var(--accent-1); + + --gap: 2rem; } /*------------------------------------------------------------------------------ @@ -43,14 +48,14 @@ .credits-php, .freedoms-php, .privacy-php { - background: #fff; + background: #f0f7ff; } .about-php #wpcontent, .credits-php #wpcontent, .freedoms-php #wpcontent, .privacy-php #wpcontent { - background: white; + background: linear-gradient(180deg, #fff 50%, #f0f7ff 100%); padding: 0 24px; } @@ -82,46 +87,74 @@ } .about__container .is-vertically-aligned-top { - -ms-grid-row-align: start; align-self: start; } .about__container .is-vertically-aligned-center { - -ms-grid-row-align: center; align-self: center; } .about__container .is-vertically-aligned-bottom { - -ms-grid-row-align: end; align-self: end; } .about__section { - background: #f3f4f5; background: var(--background); clear: both; } .about__container .has-accent-background-color { - color: #f3f4f5; - color: var(--text-light); - background-color: #1730e5; background-color: var(--accent-1); + color: var(--text-light); +} + +.about__container .has-accent-background-color a { + color: var(--text-light); +} + +.about__container .has-transparent-background-color { + background-color: transparent; +} + +.about__container .has-accent-color { + color: var(--accent-1); +} + +.about__container .has-border { + border: 3px solid currentColor; } .about__container .has-subtle-background-color { - background-color: #bde7f0; background-color: var(--subtle-background); } +.about__container .has-background-image { + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + /* 1.1 - Layout */ .about__section { - margin: 0; + margin: 0 0 var(--gap); } .about__section .column { - padding: 32px; + padding: var(--gap); +} + +.about__section + .about__section .column { + padding-top: 0; +} + +.about__section + .about__section .is-section-header { + padding-bottom: var(--gap); +} + +.about__section .column[class*="background-color"], +.about__section .column.has-border { + padding-top: var(--gap); } .about__section .column.is-edge-to-edge { @@ -136,9 +169,18 @@ margin-bottom: 0; } +.about__section .has-text-columns { + columns: 2; + column-gap: calc(var(--gap) * 2); +} + .about__section .is-section-header { margin-bottom: 0; - padding: 32px 32px 0; + padding: var(--gap) var(--gap) 0; +} + +.about__section .is-section-header p:last-child { + margin-bottom: 0; } /* Section header is alone in a container. */ @@ -147,7 +189,7 @@ } .about__section.is-feature { - padding: 32px; + padding: var(--gap); } .about__section.is-feature p { @@ -155,145 +197,240 @@ } .about__section.is-feature p + p { - margin-top: 1rem; + margin-top: calc(var(--gap) / 2); +} + +.about__section.has-1-column { + margin-left: auto; + margin-right: auto; + max-width: 36em; } .about__section.has-2-columns, .about__section.has-3-columns, -.about__section.has-4-columns { - display: -ms-grid; +.about__section.has-4-columns, +.about__section.has-overlap-style { display: grid; } +.about__section.has-gutters { + gap: calc(var(--gap) / 2); +} + .about__section.has-2-columns { - -ms-grid-columns: 1fr 1fr; grid-template-columns: 1fr 1fr; } .about__section.has-2-columns.is-wider-right { - -ms-grid-columns: 1fr 2fr; grid-template-columns: 1fr 2fr; } .about__section.has-2-columns.is-wider-left { - -ms-grid-columns: 2fr 1fr; grid-template-columns: 2fr 1fr; } .about__section.has-2-columns .is-section-header { - -ms-grid-column: 1; grid-column-start: 1; -ms-grid-column-span: 2; grid-column-end: span 2; } .about__section.has-2-columns .column:nth-of-type(2n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about__section.has-2-columns .column:nth-of-type(2n) { - -ms-grid-column: 2; grid-column-start: 2; } .about__section.has-3-columns { - -ms-grid-columns: (1fr)[3]; grid-template-columns: repeat(3, 1fr); } .about__section.has-3-columns .is-section-header { - -ms-grid-column: 1; grid-column-start: 1; -ms-grid-column-span: 3; grid-column-end: span 3; } .about__section.has-3-columns .column:nth-of-type(3n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about__section.has-3-columns .column:nth-of-type(3n+2) { - -ms-grid-column: 2; grid-column-start: 2; } .about__section.has-3-columns .column:nth-of-type(3n) { - -ms-grid-column: 3; grid-column-start: 3; } .about__section.has-4-columns { - -ms-grid-columns: (1fr)[4]; grid-template-columns: repeat(4, 1fr); } .about__section.has-4-columns .is-section-header { - -ms-grid-column: 1; grid-column-start: 1; -ms-grid-column-span: 4; grid-column-end: span 4; } .about__section.has-4-columns .column:nth-of-type(4n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about__section.has-4-columns .column:nth-of-type(4n+2) { - -ms-grid-column: 2; grid-column-start: 2; } .about__section.has-4-columns .column:nth-of-type(4n+3) { - -ms-grid-column: 3; grid-column-start: 3; } .about__section.has-4-columns .column:nth-of-type(4n) { - -ms-grid-column: 4; grid-column-start: 4; } /* Any columns following a section header need to be expicitly put into the second row, for IE support. */ .about__section.has-2-columns .is-section-header ~ .column, .about__section.has-3-columns .is-section-header ~ .column, -.about__section.has-4-columns .is-section-header ~ .column { - -ms-grid-row: 2; +.about__section.has-4-columns .is-section-header ~ .column, +.about__section.has-overlap-style .is-section-header ~ .column { grid-row-start: 2; } +.about__section.has-overlap-style { + grid-template-columns: repeat(7, 1fr); +} + +.about__section.has-overlap-style .column { + grid-row-start: 1; +} + +.about__section.has-overlap-style .column:nth-of-type(2n+1) { + grid-column-start: 2; + -ms-grid-column-span: 3; + grid-column-end: span 3; +} + +.about__section.has-overlap-style .column:nth-of-type(2n) { + grid-column-start: 4; + -ms-grid-column-span: 3; + grid-column-end: span 3; +} + +.about__section.has-overlap-style .column.is-top-layer { + z-index: 1; +} + @media screen and (max-width: 782px) { - .about__section.has-3-columns, - .about__section.has-4-columns { + .about__section.has-2-columns.is-wider-right, + .about__section.has-2-columns.is-wider-left, + .about__section.has-3-columns { display: block; - padding-bottom: 16px; + padding-bottom: calc(var(--gap) / 2); } - .about__section.has-3-columns .column:nth-of-type(n), - .about__section.has-4-columns .column:nth-of-type(n) { - padding-top: 16px; - padding-bottom: 16px; + .about__section.has-2-columns.has-gutters .column, + .about__section.has-2-columns.has-gutters .column, + .about__section.has-3-columns.has-gutters .column { + margin-bottom: calc(var(--gap) / 2); + } + + .about__section.has-2-columns.has-gutters .column:last-child, + .about__section.has-2-columns.has-gutters .column:last-child, + .about__section.has-3-columns.has-gutters .column:last-child { + margin-bottom: 0; + } + + .about__section.has-3-columns .column:nth-of-type(n) { + padding-top: calc(var(--gap) / 2); + padding-bottom: calc(var(--gap) / 2); + } + + .about__section.has-4-columns { + grid-template-columns: repeat(2, 1fr); + } + + .about__section.has-4-columns .column:nth-of-type(2n+1) { + grid-column-start: 1; + } + + .about__section.has-4-columns .column:nth-of-type(2n) { + grid-column-start: 2; + } + + .about__section.has-4-columns .column:nth-of-type(4n+3), + .about__section.has-4-columns .column:nth-of-type(4n) { + grid-row-start: 2; + } + + .about__section.has-4-columns .is-section-header { + -ms-grid-column-span: 2; + grid-column-end: span 2; + } + + .about__section.has-4-columns .is-section-header ~ .column:nth-of-type(4n+3), + .about__section.has-4-columns .is-section-header ~ .column:nth-of-type(4n) { + grid-row-start: 3; + } + + .about__section.has-overlap-style { + grid-template-columns: 1fr; + } + + /* At this size, the two columns fully overlap */ + .about__section.has-overlap-style .column.column { + grid-column-start: 1; + -ms-grid-column-span: 1; + grid-column-end: 2; + grid-row-start: 1; + -ms-grid-row-span: 1; + grid-row-end: 2; } } @media screen and (max-width: 600px) { .about__section.has-2-columns { - display: flex; /* This is flex, not block, so we can use order below. */ - flex-wrap: wrap; - align-content: stretch; - padding-bottom: 16px; + display: block; + padding-bottom: calc(var(--gap) / 2); + } + + .about__section.has-2-columns.has-gutters .column { + margin-bottom: calc(var(--gap) / 2); + } + + .about__section.has-2-columns.has-gutters .column:last-child { + margin-bottom: 0; } .about__section.has-2-columns .column:nth-of-type(n) { - padding-top: 16px; - padding-bottom: 16px; - width: 100%; + padding-top: calc(var(--gap) / 2); + padding-bottom: calc(var(--gap) / 2); + } +} + +@media screen and (max-width: 480px) { + .about__section.is-feature .column { + padding: 0; } - .about__section.has-2-columns .is-edge-to-edge { - order: -1; + .about__section.has-4-columns { + display: block; + padding-bottom: calc(var(--gap) / 2); + } + + .about__section.has-4-columns.has-gutters .column { + margin-bottom: calc(var(--gap) / 2); + } + + .about__section.has-4-columns.has-gutters .column:last-child { + margin-bottom: 0; + } + + .about__section.has-4-columns .column:nth-of-type(n) { + padding-top: calc(var(--gap) / 2); + padding-bottom: calc(var(--gap) / 2); } } @@ -301,26 +438,31 @@ .about__container { line-height: 1.4; + color: var(--text); } .about__container h1 { - margin: 0 0 1em; padding: 0; - font-weight: 600; color: inherit; } .about__container h1, -.about__container h2 { +.about__container h2, +.about__container h3.is-larger-heading { margin-top: 0; - font-size: 1.4em; - line-height: 1.4; + margin-bottom: 0.5em; + font-size: 2em; + line-height: 1.2; + font-weight: 700; } .about__container h3, +.about__container h1.is-smaller-heading, .about__container h2.is-smaller-heading { margin-top: 0; - font-size: 1em; + font-size: 1.6em; + line-height: 1.3; + font-weight: 400; } .about__container p { @@ -329,7 +471,6 @@ } .about__section a { - color: #1730e5; color: var(--accent-1); text-decoration: underline; } @@ -337,6 +478,7 @@ .about__section a:hover, .about__section a:active, .about__section a:focus { + color: var(--accent-1); text-decoration: none; } @@ -352,21 +494,17 @@ .about__container ul { list-style: disc; - margin-left: 16px; + margin-left: calc(var(--gap) / 2); } .about__container img { margin: 0; + max-width: 100%; vertical-align: middle; } .about__container .about__image { - display: -ms-grid; - display: grid; - align-items: center; - justify-content: center; - height: 100%; - overflow: hidden; + margin: 0; } .about__container .about__image img { @@ -375,14 +513,73 @@ height: auto; } +.about__container .about__image figcaption { + margin-top: 0.5em; + text-align: center; +} + +.about__container .about__image .wp-video { + margin-left: auto; + margin-right: auto; +} + +.about__container .about__image-comparison { + position: relative; + display: inline-block; + max-width: 100%; +} + +.about__container .about__image-comparison img { + -webkit-user-select: none; + user-select: none; + width: auto; + max-width: none; + max-height: 100%; +} + +.about__container .about__image-comparison > img { + max-width: 100%; +} + +.about__container .about__image-comparison-resize { + position: absolute !important; /* Needed to override inline style on ResizableBox */ + top: 0; + bottom: 0; + left: 0; + width: 50%; + max-width: 100%; +} + +.about__container .about__image-comparison.no-js .about__image-comparison-resize { + overflow: hidden; + border-right: 2px solid var(--wp-admin-theme-color); +} + +.about__container .about__image-comparison-resize .components-resizable-box__side-handle::before { + width: 4px; + right: calc(50% - 2px); + transition: none; + animation: none; + opacity: 1; +} + +.about__container .about__image + h3 { + margin-top: 1.5em; +} + .about__container hr { margin: 0; - height: 32px; + height: var(--gap); border: none; } .about__container hr.is-small { - height: 8px; + height: calc(var(--gap) / 4); +} + +.about__container hr.is-large { + height: calc(var(--gap) * 2); + margin: calc(var(--gap) / 2) auto; } .about__container div.updated, @@ -397,87 +594,83 @@ .about__section.is-feature { font-size: 1.6em; - font-weight: 600; - text-align: center; } @media screen and (max-width: 480px) { .about__section.is-feature { font-size: 1.4em; - font-weight: 500; + } + + .about__container h1, + .about__container h2, + .about__container h3.is-larger-heading { + font-size: 2em; } } /* 1.3 - Header */ .about__header { - margin-bottom: 32px; - background-color: #f3f4f5; - background-color: var(--background); + margin-bottom: var(--gap); + padding-top: 0; + background-position: center; background-repeat: no-repeat; - background-position: top right; - background-size: contain; - background-image: url('https://s.w.org/images/core/5.4/header-diagonal.svg'); + background-size: cover; + background-image: url('../images/about-header-about.svg'); + background-color: var(--accent-2); + color: var(--text-light); } -.rtl .about__header { - background-image: url('https://s.w.org/images/core/5.4/header-diagonal-rtl.svg'); +.credits-php .about__header { + background-image: url('../images/about-header-credits.svg'); } -.about__header > div { - display: flex; +.freedoms-php .about__header { + background-image: url('../images/about-header-freedoms.svg'); +} + +.privacy-php .about__header { + background-image: url('../images/about-header-privacy.svg'); } -.about__header > div > * { - align-self: flex-end; +.about__header-image { + margin: 0 var(--gap) 3em; } .about__header-title { - min-height: 24em; - max-height: 32em; - height: 80vh; - padding: 0 32px; + padding: 2rem 0 0; + margin: 0 2rem; } -.about__header-title p { - margin: 0; +.about__header-title h1 { + margin: 0 0 0.5rem; padding: 0; - font-size: 4em; + font-size: 4.5rem; line-height: 1; - font-weight: 500; - color: #1730e5; - color: var(--accent-1); -} - -.about__header-title p span { - display: inline-block; - color: #216bce; - color: var(--accent-2); + font-weight: 400; } .about__header-text { - padding: 16px 32px 32px; - font-size: 1.5em; - line-height: 1.4; -} - -.about__header-text p { - margin: 0; + max-width: 42rem; + margin: 0 0 5em; + padding: 0 2rem; + font-size: 2rem; + line-height: 1.15; } .about__header-navigation { + display: flex; + justify-content: center; padding-top: 0; - background: #216bce; background: var(--nav-background); - color: #f3f4f5; color: var(--nav-color); - border-bottom: 3px solid #1730e5; border-bottom: 3px solid var(--nav-border); } .about__header-navigation .nav-tab { margin-left: 0; - padding: 24px 32px; + padding: calc(var(--gap) * 0.75) var(--gap); + float: none; font-size: 1.4em; line-height: 1; border-width: 0 0 3px; @@ -489,23 +682,28 @@ .about__header-navigation .nav-tab:hover, .about__header-navigation .nav-tab:active { - background-color: #1730e5; - background-color: var(--accent-1); + background-color: var(--nav-current); + color: var(--text-light); } .about__header-navigation .nav-tab-active { margin-bottom: -3px; + color: var(--nav-current); border-width: 0 0 6px; - border-color: #bde7f0; - border-color: var(--accent-3); + border-color: var(--nav-current); } .about__header-navigation .nav-tab-active:hover, .about__header-navigation .nav-tab-active:active { - background-color: #1730e5; - background-color: var(--accent-1); - border-color: #bde7f0; - border-color: var(--accent-3); + background-color: var(--nav-current); + color: var(--text-light); + border-color: var(--nav-current); +} + +@media screen and (max-width: 960px){ + .about__header-title h1 { + font-size: 4.8em; + } } @media screen and (max-width: 782px) { @@ -513,34 +711,42 @@ font-size: 1.4em; } - .about__header-title { - min-height: 0; - max-height: none; - height: auto; - /* - * 60% is a "magic" number to create a top offset approx-equal to the height of the background image, - * which scales to match the container width. - */ - padding-top: 60%; + .about__header-container { + display: block; } + .about__header-title, + .about__header-image { + margin-left: calc(var(--gap) / 2); + margin-right: calc(var(--gap) / 2); + } + + .about__header-text, .about__header-navigation .nav-tab { margin-top: 0; margin-right: 0; - padding: 24px 16px; + padding-left: calc(var(--gap) / 2); + padding-right: calc(var(--gap) / 2); } } @media screen and (max-width: 480px) { .about__header-title p { - font-size: 3.2em; + font-size: 2.4em; + } + + .about__header-text { + margin-bottom: 1em; + } + + .about__header-navigation { + display: block; } .about__header-navigation .nav-tab { - float: none; display: block; margin-bottom: 0; - padding: 16px 16px; + padding: calc(var(--gap) / 2); border-left-width: 6px; border-bottom: none; } @@ -556,47 +762,59 @@ 2.0 - Credits Page ------------------------------------------------------------------------------*/ +.about__section .wp-people-group-title { + margin-bottom: calc(var(--gap) * 2); + text-align: center; + +} + .about__section .wp-people-group { margin: 0; + display: flex; + flex-wrap: wrap; } .about__section .wp-person { display: inline-block; vertical-align: top; box-sizing: border-box; - padding: 0 1em 1em 0; - height: 6em; - width: calc( 33% - 4px ); - min-width: 280px; + margin-bottom: var(--gap); + width: 25%; + text-align: center; } .about__section .compact .wp-person { height: auto; - width: calc( 25% - 4px ); - min-width: 220px; - padding-bottom: 0.5em; + width: 20%; } -.about__section .wp-person .gravatar { - float: left; - margin: -4px 0.85em 0.85em 0; - padding: 1px; - width: 80px; - height: 80px; +.about__section .wp-person-avatar { + display: block; + margin: 0 auto calc(var(--gap) / 2); + width: 140px; + height: 140px; border-radius: 100%; + overflow: hidden; + background: var(--accent-1); +} + +.about__section .wp-person .gravatar { + width: 140px; + height: 140px; + filter: grayscale(100%); + mix-blend-mode: screen; } +.about__section .compact .wp-person-avatar, .about__section .compact .wp-person .gravatar { - width: 40px; - height: 40px; + width: 80px; + height: 80px; } .about__section .wp-person .web { font-size: 1.4em; font-weight: 600; text-decoration: none; - color: #32373c; - color: var(--text); } .about__section .wp-person .web:hover { @@ -612,14 +830,39 @@ margin-top: 0.5em; } -@media screen and (max-width: 480px) { +@media screen and (max-width: 782px) { .about__section .wp-person { - min-width: 100%; + width: 33%; } + .about__section .compact .wp-person { + width: 25%; + } + + .about__section .wp-person-avatar, .about__section .wp-person .gravatar { - width: 60px; - height: 60px; + width: 120px; + height: 120px; + } +} + +@media screen and (max-width: 600px) { + .about__section .wp-person { + width: 50%; + } + + .about__section .compact .wp-person { + width: 33%; + } + + .about__section .wp-person .web { + font-size: 1.2em; + } +} + +@media screen and (max-width: 480px) { + .about__section .wp-person { + min-width: 100%; } .about__section .wp-person .web { @@ -636,8 +879,9 @@ 3.0 - Freedoms Page ------------------------------------------------------------------------------*/ -.about__section .column .freedoms-image { - margin-bottom: 1em; +.about__section .column .freedom-image { + margin-bottom: var(--gap); + max-height: 140px; } @@ -795,7 +1039,6 @@ .about-wrap .has-2-columns, .about-wrap .has-3-columns, .about-wrap .has-4-columns { - display: -ms-grid; display: grid; max-width: 800px; margin-top: 40px; @@ -823,72 +1066,58 @@ } .about-wrap .has-2-columns { - -ms-grid-columns: 1fr 1fr; grid-template-columns: 1fr 1fr; } .about-wrap .has-2-columns .column:nth-of-type(2n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about-wrap .has-2-columns .column:nth-of-type(2n) { - -ms-grid-column: 2; grid-column-start: 2; } .about-wrap .has-2-columns.is-wider-right { - -ms-grid-columns: 1fr 2fr; grid-template-columns: 1fr 2fr; } .about-wrap .has-2-columns.is-wider-left { - -ms-grid-columns: 2fr 1fr; grid-template-columns: 2fr 1fr; } .about-wrap .has-3-columns { - -ms-grid-columns: (1fr)[3]; grid-template-columns: repeat(3, 1fr); } .about-wrap .has-3-columns .column:nth-of-type(3n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about-wrap .has-3-columns .column:nth-of-type(3n+2) { - -ms-grid-column: 2; grid-column-start: 2; } .about-wrap .has-3-columns .column:nth-of-type(3n) { - -ms-grid-column: 3; grid-column-start: 3; } .about-wrap .has-4-columns { - -ms-grid-columns: (1fr)[4]; grid-template-columns: repeat(4, 1fr); } .about-wrap .has-4-columns .column:nth-of-type(4n+1) { - -ms-grid-column: 1; grid-column-start: 1; } .about-wrap .has-4-columns .column:nth-of-type(4n+2) { - -ms-grid-column: 2; grid-column-start: 2; } .about-wrap .has-4-columns .column:nth-of-type(4n+3) { - -ms-grid-column: 3; grid-column-start: 3; } .about-wrap .has-4-columns .column:nth-of-type(4n) { - -ms-grid-column: 4; grid-column-start: 4; } @@ -911,17 +1140,14 @@ } .about-wrap .is-vertically-aligned-top { - -ms-grid-row-align: start; align-self: start; } .about-wrap .is-vertically-aligned-center { - -ms-grid-row-align: center; align-self: center; } .about-wrap .is-vertically-aligned-bottom { - -ms-grid-row-align: end; align-self: end; } @@ -979,7 +1205,7 @@ width: 100%; } -/* Return to Dashboard Home link */ +/* Go to Dashboard Home link */ .about-wrap .return-to-dashboard { margin: 30px 0 0 -5px; @@ -1082,7 +1308,7 @@ } .freedoms-php .column .freedoms-image { - background-image: url('https://s.w.org/wp-content/themes/pub/wporg-main/images/freedoms-2x.png'); + background-image: url('../images/freedoms.png'); background-size: 100%; padding-top: 100%; } @@ -1106,38 +1332,29 @@ @media screen and (max-width: 782px) { .about-wrap .has-3-columns, .about-wrap .has-4-columns { - -ms-grid-columns: 1fr 1fr; grid-template-columns: 1fr 1fr; } .about-wrap .has-3-columns .column:nth-of-type(3n+1), .about-wrap .has-4-columns .column:nth-of-type(4n+1) { - -ms-grid-column: 1; grid-column-start: 1; - -ms-grid-row: 1; grid-row-start: 1; } .about-wrap .has-3-columns .column:nth-of-type(3n+2), .about-wrap .has-4-columns .column:nth-of-type(4n+2) { - -ms-grid-column: 2; grid-column-start: 2; - -ms-grid-row: 1; grid-row-start: 1; } .about-wrap .has-3-columns .column:nth-of-type(3n), .about-wrap .has-4-columns .column:nth-of-type(4n+3) { - -ms-grid-column: 1; grid-column-start: 1; - -ms-grid-row: 2; grid-row-start: 2; } .about-wrap .has-4-columns .column:nth-of-type(4n) { - -ms-grid-column: 2; grid-column-start: 2; - -ms-grid-row: 2; grid-row-start: 2; } } @@ -1156,7 +1373,6 @@ .about-wrap .has-2-columns.is-wider-right, .about-wrap .has-2-columns.is-wider-left { - display: -ms-grid; display: grid; } } diff --git a/src/wp-admin/css/admin-menu.css b/src/wp-admin/css/admin-menu.css index bcecf91a60156..243dde7daa3b0 100644 --- a/src/wp-admin/css/admin-menu.css +++ b/src/wp-admin/css/admin-menu.css @@ -3,7 +3,7 @@ #adminmenu, #adminmenu .wp-submenu { width: 160px; - background-color: #23282d; + background-color: #1d2327; } #adminmenuback { @@ -39,7 +39,7 @@ .icon16 { height: 18px; width: 18px; - padding: 6px 6px; + padding: 6px; margin: -6px 0 0 -8px; float: left; } @@ -47,9 +47,9 @@ /* New Menu icons */ .icon16:before { - color: #82878c; /* same as new icons */ + color: #8c8f94; /* same as new icons */ font: normal 20px/1 dashicons; - speak: none; + speak: never; padding: 6px 0; height: 34px; width: 20px; @@ -155,27 +155,24 @@ /* side admin menu */ #adminmenu * { -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } #adminmenu li { margin: 0; padding: 0; - cursor: pointer; } #adminmenu a { display: block; line-height: 1.3; padding: 2px 5px; - color: #eee; + color: #f0f0f1; } #adminmenu .wp-submenu a { - color: #b4b9be; - color: rgba(240, 245, 250, 0.7); + color: #c3c4c7; + color: rgba(240, 246, 252, 0.7); font-size: 13px; line-height: 1.4; margin: 0; @@ -191,7 +188,14 @@ #adminmenu li.menu-top > a:focus, #adminmenu .wp-submenu a:hover, #adminmenu .wp-submenu a:focus { - color: #00b9eb; + color: #72aee6; +} + +#adminmenu a:hover, +#adminmenu a:focus, +.folded #adminmenu .wp-submenu-head:hover { + box-shadow: inset 4px 0 0 0 currentColor; + transition: box-shadow .1s linear; } #adminmenu li.menu-top { @@ -207,14 +211,9 @@ left: 160px; overflow: visible; word-wrap: break-word; -} - -#adminmenu .wp-submenu, -.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, -.folded #adminmenu .wp-has-current-submenu .wp-submenu { padding: 7px 0 8px; z-index: 9999; - background-color: #32373c; + background-color: #2c3338; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); } @@ -225,9 +224,12 @@ top: -1px; } +#adminmenu a.wp-has-current-submenu:focus + .wp-submenu { + top: 0; +} + #adminmenu .wp-has-current-submenu .wp-submenu, .no-js li.wp-has-current-submenu:hover .wp-submenu, -#adminmenu a.wp-has-current-submenu:focus + .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu.sub-open, #adminmenu .wp-has-current-submenu.opensub .wp-submenu { position: relative; @@ -239,7 +241,10 @@ border: 0 none; margin-top: 0; box-shadow: none; - background-color: #32373c; +} + +.folded #adminmenu .wp-has-current-submenu .wp-submenu { + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); } /* ensure that wp-submenu's box shadow doesn't appear on top of the focused menu item's background. */ @@ -247,8 +252,8 @@ #adminmenu li.opensub > a.menu-top, #adminmenu li > a.menu-top:focus { position: relative; - background-color: #191e23; - color: #00b9eb; + background-color: #1d2327; + color: #72aee6; } .folded #adminmenu li.menu-top:hover, @@ -259,12 +264,10 @@ #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.current a.menu-top, -.folded #adminmenu li.wp-has-current-submenu, -.folded #adminmenu li.current.menu-top, #adminmenu .wp-menu-arrow, #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head, #adminmenu .wp-menu-arrow div { - background: #0073aa; + background: #2271b1; color: #fff; } @@ -289,6 +292,7 @@ .folded #adminmenu .wp-has-current-submenu .wp-submenu { min-width: 160px; width: auto; + border-left: 5px solid transparent; } #adminmenu .wp-submenu li.current, @@ -340,13 +344,19 @@ } #adminmenu .wp-menu-image img { - padding: 9px 0 0 0; + padding: 9px 0 0; opacity: 0.6; filter: alpha(opacity=60); } #adminmenu div.wp-menu-name { - padding: 8px 0; + padding: 8px 8px 8px 36px; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + hyphens: auto; } #adminmenu div.wp-menu-image { @@ -364,15 +374,15 @@ } div.wp-menu-image:before { - color: #a0a5aa; - color: rgba(240, 245, 250, 0.6); + color: #a7aaad; + color: rgba(240, 246, 252, 0.6); padding: 7px 0; transition: all .1s ease-in-out; } #adminmenu div.wp-menu-image:before { - color: #a0a5aa; - color: rgba(240, 245, 250, 0.6); + color: #a7aaad; + color: rgba(240, 246, 252, 0.6); } #adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before, @@ -388,12 +398,7 @@ div.wp-menu-image:before { #adminmenu li:hover div.wp-menu-image:before, #adminmenu li a:focus div.wp-menu-image:before, #adminmenu li.opensub div.wp-menu-image:before { - color: #00b9eb; -} - -/* IE8 doesn't redraw the pseudo elements unless you make a change to the content, this restore the initial color after hover */ -.ie8 #adminmenu li.opensub div.wp-menu-image:before { - color: #a0a5aa; + color: #72aee6; } .folded #adminmenu div.wp-menu-image { @@ -407,20 +412,6 @@ div.wp-menu-image:before { height: 34px; } -/* No @font-face support */ -.no-font-face #adminmenu .wp-menu-image { - display: none; -} - -.no-font-face #adminmenu div.wp-menu-name { - padding: 8px 12px; -} - -.no-font-face.auto-fold #adminmenu .wp-menu-name { - margin-left: 0; -} -/* End no @font-face support */ - /* Sticky admin menu */ .sticky-menu #adminmenuwrap { position: fixed; @@ -445,12 +436,13 @@ ul#adminmenu > li.current > a.current:after { width: 0; position: absolute; pointer-events: none; - border-right-color: #f1f1f1; + border-right-color: #f0f0f1; top: 50%; margin-top: -8px; } -.folded ul#adminmenu li:hover a.wp-has-current-submenu:after { +.folded ul#adminmenu li:hover a.wp-has-current-submenu:after, +.folded ul#adminmenu li.wp-has-current-submenu:focus-within a.wp-has-current-submenu:after { display: none; } @@ -461,27 +453,29 @@ ul#adminmenu > li.current > a.current:after { } /* flyout menu arrow */ -#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { +#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after, +#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { right: 0; - border: solid transparent; + border: 8px solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; - border-width: 8px; top: 10px; z-index: 10000; } -.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { +.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after, +.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { border-width: 4px; margin-top: -4px; top: 18px; } -#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { - border-right-color: #32373c; +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after, +#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { + border-right-color: #2c3338; } #adminmenu li.menu-top:hover .wp-menu-image img, @@ -493,7 +487,7 @@ ul#adminmenu > li.current > a.current:after { #adminmenu li.wp-menu-separator { height: 5px; padding: 0; - margin: 0 0 6px 0; + margin: 0 0 6px; cursor: inherit; } @@ -507,8 +501,11 @@ ul#adminmenu > li.current > a.current:after { color: #fff; font-weight: 400; font-size: 14px; - padding: 8px 4px 8px 11px; - margin: -7px 0px 4px; + padding: 5px 4px 5px 11px; + margin: -7px 0 4px -5px; + border-width: 3px 0 3px 5px; + border-style: solid; + border-color: transparent; } #adminmenu li.current, @@ -527,7 +524,7 @@ ul#adminmenu > li.current > a.current:after { min-width: 18px; height: 18px; border-radius: 9px; - background-color: #ca4a1f; + background-color: #d63638; color: #fff; font-size: 11px; line-height: 1.6; @@ -537,7 +534,7 @@ ul#adminmenu > li.current > a.current:after { #adminmenu li.current a .awaiting-mod, #adminmenu li a.wp-has-current-submenu .update-plugins { - background-color: #ca4a1f; + background-color: #d63638; color: #fff; } @@ -555,16 +552,16 @@ ul#adminmenu > li.current > a.current:after { position: relative; overflow: visible; background: none; - color: #aaa; + color: #a7aaad; cursor: pointer; } #collapse-button:hover { - color: #00b9eb; + color: #72aee6; } #collapse-button:focus { - color: #00b9eb; + color: #72aee6; /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; outline-offset: -1px; @@ -603,7 +600,7 @@ ul#adminmenu > li.current > a.current:after { top: 7px; text-align: center; font: normal 20px/1 dashicons !important; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @@ -656,7 +653,7 @@ li#wp-admin-bar-menu-toggle { .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { - top: 0px; + top: 0; left: 36px; } @@ -701,7 +698,7 @@ li#wp-admin-bar-menu-toggle { } .auto-fold #adminmenu a.menu-top { - height: 34px; + min-height: 34px; } .auto-fold #adminmenu li.wp-menu-open { @@ -712,11 +709,13 @@ li#wp-admin-bar-menu-toggle { margin-bottom: 0; } - .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu li:focus-within a.wp-has-current-submenu:after { display: none; } - .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after, + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { border-width: 4px; margin-top: -4px; top: 16px; @@ -802,7 +801,6 @@ li#wp-admin-bar-menu-toggle { /* Restore the menu names */ .auto-fold #adminmenu .wp-menu-name { position: static; - margin-left: 35px; } /* Switch the arrow side */ @@ -812,7 +810,8 @@ li#wp-admin-bar-menu-toggle { margin-top: -8px; } - .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after { + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after, + .auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { display: none; } @@ -844,7 +843,8 @@ li#wp-admin-bar-menu-toggle { display: block; } - .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after { + .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after, + .auto-fold ul#adminmenu li:focus-within a.wp-has-current-submenu:after { display: block; } @@ -856,6 +856,11 @@ li#wp-admin-bar-menu-toggle { top: 0; } + #adminmenu .wp-not-current-submenu .wp-submenu, + .folded #adminmenu .wp-has-current-submenu .wp-submenu { + border-left: none; + } + /* Remove submenu headers and adjust sub meu*/ #adminmenu .wp-submenu .wp-submenu-head { display: none; @@ -885,7 +890,7 @@ li#wp-admin-bar-menu-toggle { } .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { - background: #32373c; + background: #2c3338; } li#wp-admin-bar-menu-toggle { @@ -916,7 +921,7 @@ li#wp-admin-bar-menu-toggle { } .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before { - color: #00b9eb; + color: #72aee6; } } diff --git a/src/wp-admin/css/code-editor.css b/src/wp-admin/css/code-editor.css index 27db1fd33a005..92c39405ba147 100644 --- a/src/wp-admin/css/code-editor.css +++ b/src/wp-admin/css/code-editor.css @@ -34,25 +34,25 @@ } .wp-core-ui .CodeMirror-lint-message-warning { - background-color: #fff8e5; - border-left: 4px solid #ffb900; + background-color: #fcf9e8; + border-left: 4px solid #dba617; } .wrap .CodeMirror-lint-marker-warning:before, .wp-core-ui .CodeMirror-lint-message-warning:before { content: "\f534"; - color: #f6a306; + color: #dba617; } .wp-core-ui .CodeMirror-lint-message-error { - background-color: #fbeaea; - border-left: 4px solid #dc3232; + background-color: #fcf0f1; + border-left: 4px solid #d63638; } .wrap .CodeMirror-lint-marker-error:before, .wp-core-ui .CodeMirror-lint-message-error:before { content: "\f153"; - color: #dc3232; + color: #d63638; } .wp-core-ui .CodeMirror-lint-tooltip { @@ -63,7 +63,7 @@ } .wrap .CodeMirror .CodeMirror-matchingbracket { - background: rgba(255, 150, 0, 0.3); + background: rgba(219, 166, 23, 0.3); color: inherit; } @@ -72,5 +72,5 @@ } .wrap .CodeMirror .CodeMirror-linenumber { - color: #666; + color: #646970; } diff --git a/src/wp-admin/css/color-picker.css b/src/wp-admin/css/color-picker.css index 387883f82878f..89513949579b6 100644 --- a/src/wp-admin/css/color-picker.css +++ b/src/wp-admin/css/color-picker.css @@ -11,16 +11,16 @@ /* Needs higher specificiity. */ .wp-picker-container .wp-color-result.button { min-height: 30px; - margin: 0 6px 6px 0px; + margin: 0 6px 6px 0; padding: 0 0 0 30px; font-size: 11px; } .wp-color-result-text { - background: #f7f7f7; + background: #f6f7f7; border-radius: 0 2px 2px 0; - border-left: 1px solid #ccc; - color: #555; + border-left: 1px solid #c3c4c7; + color: #50575e; display: block; line-height: 2.54545455; /* 28px */ padding: 0 6px; @@ -29,16 +29,16 @@ .wp-color-result:hover, .wp-color-result:focus { - background: #fafafa; - border-color: #999; - color: #23282d; + background: #f6f7f7; + border-color: #8c8f94; + color: #1d2327; } .wp-color-result:hover:after, .wp-color-result:focus:after { - color: #23282d; - border-color: #a0a5aa; - border-left: 1px solid #999; + color: #1d2327; + border-color: #a7aaad; + border-left: 1px solid #8c8f94; } .wp-picker-container { @@ -46,8 +46,8 @@ } .wp-color-result:focus { - border-color: #5b9dd9; - box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); + border-color: #4f94d4; + box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } .wp-color-result:active { @@ -81,12 +81,12 @@ } .wp-picker-container .iris-square-slider .ui-slider-handle:focus { - background-color: #555 + background-color: #50575e } .wp-picker-container .iris-picker { border-radius: 0; - border-color: #ddd; + border-color: #dcdcde; margin-top: 6px; } @@ -102,34 +102,34 @@ } .wp-color-picker::-webkit-input-placeholder { - color: #72777c; + color: #646970; } .wp-color-picker::-moz-placeholder { - color: #72777c; + color: #646970; opacity: 1; } .wp-color-picker:-ms-input-placeholder { - color: #72777c; + color: #646970; } .wp-picker-container input[type="text"].iris-error { - background-color: #ffebe8; - border-color: #c00; + background-color: #fcf0f1; + border-color: #d63638; color: #000; } .iris-picker .ui-square-handle:focus, .iris-picker .iris-strip .ui-slider-handle:focus { - border-color: #007cba; + border-color: #3582c4; border-style: solid; - box-shadow: 0 0 0 1px #007cba; + box-shadow: 0 0 0 1px #3582c4; outline: 2px solid transparent; } .iris-picker .iris-palette:focus { - box-shadow: 0 0 0 2px #007cba; + box-shadow: 0 0 0 2px #3582c4; } @media screen and (max-width: 782px) { diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index ca01267a2437d..449b0a8e279f8 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -31,6 +31,33 @@ span.wp-media-buttons-icon:before { color: currentColor; } +.wp-core-ui .button-link { + color: $link; + + &:hover, + &:active, + &:focus { + color: $link-focus; + } +} + +.media-modal .delete-attachment, +.media-modal .trash-attachment, +.media-modal .untrash-attachment, +.wp-core-ui .button-link-delete { + color: #a00; +} + +.media-modal .delete-attachment:hover, +.media-modal .trash-attachment:hover, +.media-modal .untrash-attachment:hover, +.media-modal .delete-attachment:focus, +.media-modal .trash-attachment:focus, +.media-modal .untrash-attachment:focus, +.wp-core-ui .button-link-delete:hover, +.wp-core-ui .button-link-delete:focus { + color: #dc3232; +} /* Forms */ @@ -113,6 +140,35 @@ textarea:focus { box-shadow: 0 0 0 1px #32373c; } + @if ( $low-contrast-theme != "true" ) { + .button, + .button-secondary { + color: $highlight-color; + border-color: $highlight-color; + } + + .button.hover, + .button:hover, + .button-secondary:hover{ + border-color: darken($highlight-color, 10); + color: darken($highlight-color, 10); + } + + .button.focus, + .button:focus, + .button-secondary:focus { + border-color: lighten($highlight-color, 10); + color: darken($highlight-color, 20);; + box-shadow: 0 0 0 1px lighten($highlight-color, 10); + } + + .button-primary { + &:hover { + color: #fff; + } + } + } + .button-primary { @include button( $button-color ); } @@ -152,11 +208,28 @@ textarea:focus { /* List tables */ +@if $low-contrast-theme == "true" { + .wrap .page-title-action:hover { + color: $menu-text; + background-color: $menu-background; + } +} @else { + .wrap .page-title-action, + .wrap .page-title-action:active { + border: 1px solid $highlight-color; + color: $highlight-color; + } -.wrap .add-new-h2:hover, /* deprecated */ -.wrap .page-title-action:hover { - color: $menu-text; - background-color: $menu-background; + .wrap .page-title-action:hover { + color: darken($highlight-color, 10); + border-color: darken($highlight-color, 10); + } + + .wrap .page-title-action:focus { + border-color: lighten($highlight-color, 10); + color: darken($highlight-color, 20);; + box-shadow: 0 0 0 1px lighten($highlight-color, 10); + } } .view-switch a.current:before { @@ -213,12 +286,12 @@ textarea:focus { #adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, -.folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu { background: $menu-submenu-background; } -#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { +#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after, +#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after { border-right-color: $menu-submenu-background; } @@ -228,7 +301,6 @@ textarea:focus { #adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, -.folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a { color: $menu-submenu-text; @@ -266,12 +338,12 @@ ul#adminmenu > li.current > a.current:after { #adminmenu li.wp-has-current-submenu div.wp-menu-image:before, #adminmenu a.current:hover div.wp-menu-image:before, +#adminmenu li.current div.wp-menu-image:before, #adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before, #adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before, #adminmenu li:hover div.wp-menu-image:before, #adminmenu li a:focus div.wp-menu-image:before, -#adminmenu li.opensub div.wp-menu-image:before, -.ie8 #adminmenu li.opensub div.wp-menu-image:before { +#adminmenu li.opensub div.wp-menu-image:before { color: $menu-current-icon; } @@ -344,7 +416,7 @@ ul#adminmenu > li.current > a.current:after { #wpadminbar:not(.mobile) li:hover .ab-item:before, #wpadminbar:not(.mobile) li:hover .ab-item:after, #wpadminbar:not(.mobile) li:hover #adminbarsearch:before { - color: $menu-highlight-icon; + color: $menu-submenu-focus-text; } @@ -550,6 +622,16 @@ body.more-filters-opened .more-filters:focus:before { color: $menu-highlight-text; } + +/* Nav Menus */ + +.nav-menus-php .item-edit:focus:before { + box-shadow: + 0 0 0 1px lighten($button-color, 10), + 0 0 2px 1px $button-color; +} + + /* Responsive Component */ div#wp-responsive-toggle a:before { @@ -579,3 +661,123 @@ div#wp-responsive-toggle a:before { .mce-container.mce-menu .mce-menu-item-preview.mce-active { background: $highlight-color; } + +/* Customizer */ +.wp-core-ui { + #customize-controls .control-section:hover > .accordion-section-title, + #customize-controls .control-section .accordion-section-title:hover, + #customize-controls .control-section.open .accordion-section-title, + #customize-controls .control-section .accordion-section-title:focus { + color: $link; + border-left-color: $button-color; + } + + .customize-controls-close:focus, + .customize-controls-close:hover, + .customize-controls-preview-toggle:focus, + .customize-controls-preview-toggle:hover { + color: $link; + border-top-color: $button-color; + } + + .customize-panel-back:hover, + .customize-panel-back:focus, + .customize-section-back:hover, + .customize-section-back:focus { + color: $link; + border-left-color: $button-color; + } + + .customize-screen-options-toggle:hover, + .customize-screen-options-toggle:active, + .customize-screen-options-toggle:focus, + .active-menu-screen-options .customize-screen-options-toggle, + #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover, + #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active, + #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus { + color: $link; + } + + .customize-screen-options-toggle:focus:before, + #customize-controls .customize-info .customize-help-toggle:focus:before, + &.wp-customizer button:focus .toggle-indicator:before, + .menu-item-bar .item-delete:focus:before, + #available-menu-items .item-add:focus:before, + #customize-save-button-wrapper .save:focus, + #publish-settings:focus { + box-shadow: + 0 0 0 1px lighten($button-color, 10), + 0 0 2px 1px $button-color; + } + + #customize-controls .customize-info.open .customize-help-toggle, + #customize-controls .customize-info .customize-help-toggle:focus, + #customize-controls .customize-info .customize-help-toggle:hover { + color: $link; + } + + .control-panel-themes .customize-themes-section-title:focus, + .control-panel-themes .customize-themes-section-title:hover { + border-left-color: $button-color; + color: $link; + } + + .control-panel-themes .theme-section .customize-themes-section-title.selected:after { + background: $button-color; + } + + .control-panel-themes .customize-themes-section-title.selected { + color: $link; + } + + #customize-theme-controls .control-section:hover > .accordion-section-title:after, + #customize-theme-controls .control-section .accordion-section-title:hover:after, + #customize-theme-controls .control-section.open .accordion-section-title:after, + #customize-theme-controls .control-section .accordion-section-title:focus:after, + #customize-outer-theme-controls .control-section:hover > .accordion-section-title:after, + #customize-outer-theme-controls .control-section .accordion-section-title:hover:after, + #customize-outer-theme-controls .control-section.open .accordion-section-title:after, + #customize-outer-theme-controls .control-section .accordion-section-title:focus:after { + color: $link; + } + + .customize-control .attachment-media-view .button-add-media:focus { + background-color: #fbfbfc; + border-color: $button-color; + border-style: solid; + box-shadow: 0 0 0 1px $button-color; + outline: 2px solid transparent; + } + + .wp-full-overlay-footer .devices button:focus, + .wp-full-overlay-footer .devices button.active:hover { + border-bottom-color: $button-color; + } + + .wp-full-overlay-footer .devices button:hover:before, + .wp-full-overlay-footer .devices button:focus:before { + color: $button-color; + } + + .wp-full-overlay .collapse-sidebar:hover, + .wp-full-overlay .collapse-sidebar:focus { + color: $button-color; + } + + .wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow, + .wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow { + box-shadow: + 0 0 0 1px lighten($button-color, 10), + 0 0 2px 1px $button-color; + } + + &.wp-customizer .theme-overlay .theme-header .close:focus, + &.wp-customizer .theme-overlay .theme-header .close:hover, + &.wp-customizer .theme-overlay .theme-header .right:focus, + &.wp-customizer .theme-overlay .theme-header .right:hover, + &.wp-customizer .theme-overlay .theme-header .left:focus, + &.wp-customizer .theme-overlay .theme-header .left:hover { + border-bottom-color: $button-color; + color: $link; + } +} diff --git a/src/wp-admin/css/colors/_mixins.scss b/src/wp-admin/css/colors/_mixins.scss index 4d0c079d1f0e1..9744a20a0e321 100644 --- a/src/wp-admin/css/colors/_mixins.scss +++ b/src/wp-admin/css/colors/_mixins.scss @@ -34,14 +34,4 @@ border-color: darken( $button-color, 15% ); box-shadow: inset 0 2px 5px -3px darken( $button-color, 50% ); } - - &[disabled], - &:disabled, - &.button-primary-disabled, - &.disabled { - color: hsl( hue( $button-color ), 10%, 80% ) !important; - background: darken( $button-color, 8% ) !important; - border-color: darken( $button-color, 8% ) !important; - text-shadow: none !important; - } } diff --git a/src/wp-admin/css/colors/_variables.scss b/src/wp-admin/css/colors/_variables.scss index c73ba358db1e9..8287a2320282c 100644 --- a/src/wp-admin/css/colors/_variables.scss +++ b/src/wp-admin/css/colors/_variables.scss @@ -61,3 +61,5 @@ $adminbar-recovery-exit-background: $menu-bubble-background !default; $adminbar-recovery-exit-background-alt: mix(black, $adminbar-recovery-exit-background, 10%) !default; $menu-customizer-text: mix( $base-color, $text-color, 40% ) !default; + +$low-contrast-theme: "false" !default; diff --git a/src/wp-admin/css/colors/coffee/colors.scss b/src/wp-admin/css/colors/coffee/colors.scss index 49bee9be947ae..64de62e4918de 100644 --- a/src/wp-admin/css/colors/coffee/colors.scss +++ b/src/wp-admin/css/colors/coffee/colors.scss @@ -1,6 +1,7 @@ $base-color: #59524c; $highlight-color: #c7a589; $notification-color: #9ea476; +$low-contrast-theme: "true"; $form-checked: $base-color; diff --git a/src/wp-admin/css/colors/light/colors.scss b/src/wp-admin/css/colors/light/colors.scss index ab4230b9dbd78..5a75889a55fd6 100644 --- a/src/wp-admin/css/colors/light/colors.scss +++ b/src/wp-admin/css/colors/light/colors.scss @@ -19,18 +19,6 @@ $menu-collapse-focus-icon: #555; @import "../_admin.scss"; -/* temporary fix for admin-bar hover color */ -#wpadminbar .ab-top-menu > li:hover > .ab-item, -#wpadminbar .ab-top-menu > li.hover > .ab-item, -#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default li:hover span.ab-label, -#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary li.hover span.ab-label, -#wpadminbar .ab-top-menu > li > .ab-item:focus, -#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, -#wpadminbar.nojs .ab-top-menu > li.menupop:hover > .ab-item, -#wpadminbar .ab-top-menu > li.menupop.hover > .ab-item { - color: $text-color; -} - /* Override the theme filter highlight color for this scheme */ .theme-section.current, .theme-filter.current { diff --git a/src/wp-admin/css/colors/modern/colors.scss b/src/wp-admin/css/colors/modern/colors.scss new file mode 100644 index 0000000000000..dc32bf0e4d525 --- /dev/null +++ b/src/wp-admin/css/colors/modern/colors.scss @@ -0,0 +1,9 @@ +$base-color: #1e1e1e; +$highlight-color: #3858e9; +$menu-submenu-focus-text: #33f078; +$notification-color: $highlight-color; + +$link: $highlight-color; +$link-focus: darken($highlight-color, 10%); + +@import "../_admin.scss"; diff --git a/src/wp-admin/css/colors/ocean/colors.scss b/src/wp-admin/css/colors/ocean/colors.scss index d52339c6fe9ac..807d98dccf0ad 100644 --- a/src/wp-admin/css/colors/ocean/colors.scss +++ b/src/wp-admin/css/colors/ocean/colors.scss @@ -2,6 +2,7 @@ $base-color: #738e96; $icon-color: #f2fcff; $highlight-color: #9ebaa0; $notification-color: #aa9d88; +$low-contrast-theme: "true"; $form-checked: $base-color; diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index ab3a4c727fab7..f75d9b55e1ef6 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -26,7 +26,7 @@ padding-bottom: 65px; float: left; width: 100%; - overflow: visible !important; + overflow: visible; } /* inner 2 column liquid layout */ @@ -152,8 +152,8 @@ font-size: 14px; font-weight: 600; padding: 15px 23px 14px; - background: #f1f1f1; - color: #0073aa; + background: #f0f0f1; + color: #2271b1; z-index: 100000; line-height: normal; box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); @@ -190,7 +190,7 @@ p.popular-tags, .feature-filter, .imgedit-group, .comment-ays { - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); } @@ -215,8 +215,8 @@ body { } body { - background: #f1f1f1; - color: #444; + background: #f0f0f1; + color: #3c434a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 13px; line-height: 1.4em; @@ -252,7 +252,7 @@ td { /* Any change to the default link style must be applied to button-link too. */ a { - color: #0073aa; + color: #2271b1; transition-property: border, background, color; transition-duration: .05s; transition-timing-function: ease-in-out; @@ -265,24 +265,20 @@ div { a:hover, a:active { - color: #00a0d2; + color: #135e96; } a:focus, a:focus .media-icon img, .wp-person a:focus .gravatar { - color: #124964; + color: #043959; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); /* Only visible in Windows High Contrast mode */ outline: 1px solid transparent; } -.ie8 a:focus { - outline: #5b9dd9 solid 1px; -} - #adminmenu a:focus { box-shadow: none; /* Only visible in Windows High Contrast mode */ @@ -308,7 +304,8 @@ q:after { content: none; } -p { +p, +.wp-die-message { font-size: 13px; line-height: 1.5; margin: 1em 0; @@ -334,20 +331,20 @@ h6 { } h1 { - color: #23282d; + color: #1d2327; font-size: 2em; margin: .67em 0; } h2, h3 { - color: #23282d; + color: #1d2327; font-size: 1.3em; margin: 1em 0; } .update-core-php h2 { - margin-top: 2em; + margin-top: 4em; } .update-php h2, @@ -420,9 +417,9 @@ code { kbd, code { - padding: 3px 5px 2px 5px; + padding: 3px 5px 2px; margin: 0 1px; - background: #eaeaea; + background: #f0f0f1; background: rgba(0, 0, 0, 0.07); font-size: 13px; } @@ -433,7 +430,7 @@ code { padding: 0; font-size: 13px; float: left; - color: #666; + color: #646970; } .subsubsub a { @@ -444,7 +441,7 @@ code { .subsubsub a .count, .subsubsub a.current .count { - color: #555d66; /* #f1f1f1 background */ + color: #50575e; /* #f1f1f1 background */ font-weight: 400; } @@ -460,12 +457,6 @@ code { white-space: nowrap; } -.wp-die-message { - font-size: 13px; - line-height: 1.5; - margin: 1em 0; -} - /* .widefat - main style for tables */ .widefat { border-spacing: 0; @@ -490,12 +481,12 @@ code { .widefat thead th, .widefat thead td { - border-bottom: 1px solid #ccd0d4; + border-bottom: 1px solid #c3c4c7; } .widefat tfoot th, .widefat tfoot td { - border-top: 1px solid #ccd0d4; + border-top: 1px solid #c3c4c7; border-bottom: none; } @@ -591,7 +582,7 @@ code { font-size: 23px; font-weight: 400; margin: 0; - padding: 9px 0 4px 0; + padding: 9px 0 4px; line-height: 1.3; } @@ -608,12 +599,16 @@ code { .subtitle { margin: 0; padding-left: 25px; - color: #555d66; + color: #50575e; font-size: 14px; font-weight: 400; line-height: 1; } +.subtitle strong { + word-break: break-all; +} + .wrap .add-new-h2, /* deprecated */ .wrap .add-new-h2:active, /* deprecated */ .wrap .page-title-action, @@ -623,14 +618,14 @@ code { position: relative; top: -3px; text-decoration: none; - border: 1px solid #0071a1; + border: 1px solid #2271b1; border-radius: 2px; text-shadow: none; font-weight: 600; font-size: 13px; line-height: normal; /* IE8-IE11 need this for buttons */ - color: #0071a1; /* use the standard color used for buttons */ - background: #f3f5f6; + color: #2271b1; /* use the standard color used for buttons */ + background: #f6f7f7; cursor: pointer; } @@ -640,14 +635,14 @@ code { .wrap .add-new-h2:hover, /* deprecated */ .wrap .page-title-action:hover { - background: #f1f1f1; - border-color: #016087; - color: #016087; + background: #f0f0f1; + border-color: #0a4b78; + color: #0a4b78; } /* lower specificity: color needs to be overridden by :hover and :active */ .page-title-action:focus { - color: #016087; + color: #0a4b78; } /* Dashicon for language options on General Settings and Profile screens */ @@ -657,8 +652,8 @@ code { } .wrap .page-title-action:focus { - border-color: #007cba; - box-shadow: 0 0 0 1px #007cba; + border-color: #3582c4; + box-shadow: 0 0 0 1px #3582c4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } @@ -676,12 +671,12 @@ code { #available-widgets .widget-top:hover, div#widgets-right .widget-top:hover, #widgets-left .widget-top:hover { - border-color: #999; + border-color: #8c8f94; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .sorthelper { - background-color: #ccf3fa; + background-color: #c5d9ed; } .ac_match, @@ -692,47 +687,47 @@ div#widgets-right .widget-top:hover, .striped > tbody > :nth-child(odd), ul.striped > :nth-child(odd), .alternate { - background-color: #f9f9f9; + background-color: #f6f7f7; } .bar { - background-color: #e8e8e8; - border-right-color: #99d; + background-color: #f0f0f1; + border-right-color: #4f94d4; } /* Helper classes for plugins to leverage the active WordPress color scheme */ .highlight { - background-color: #e4f2fd; - color: #000; + background-color: #f0f6fc; + color: #3c434a; } .wp-ui-primary { color: #fff; - background-color: #32373c; + background-color: #2c3338; } .wp-ui-text-primary { - color: #32373c; + color: #2c3338; } .wp-ui-highlight { color: #fff; - background-color: #1e8cbe; + background-color: #2271b1; } .wp-ui-text-highlight { - color: #1e8cbe; + color: #2271b1; } .wp-ui-notification { color: #fff; - background-color: #d54e21; + background-color: #d63638; } .wp-ui-text-notification { - color: #d54e21; + color: #d63638; } .wp-ui-text-icon { - color: #82878c; /* same as new icons */ + color: #8c8f94; /* same as new icons */ } /* For emoji replacement images */ @@ -772,17 +767,16 @@ img.emoji { .widget .widget-top, .menu-item-handle { - background: #fafafa; - color: #23282d; + background: #f6f7f7; + color: #1d2327; } -.postbox .hndle, .stuffbox .hndle { - border-bottom: 1px solid #ccd0d4; + border-bottom: 1px solid #c3c4c7; } .quicktags { - background-color: #ccc; + background-color: #c3c4c7; color: #000; font-size: 12px; } @@ -797,11 +791,11 @@ img.emoji { #bulk-titles div a:before, .notice-dismiss:before { background: none; - color: #72777c; + color: #787c82; content: "\f153"; display: block; font: normal 16px/20px dashicons; - speak: none; + speak: never; height: 20px; text-align: center; width: 20px; @@ -820,7 +814,7 @@ img.emoji { .tagchecklist .ntdelbutton .remove-tag-icon:before { margin-left: 2px; border-radius: 50%; - color: #0073aa; + color: #2271b1; /* vertically center the icon cross browsers */ line-height: 1.28; } @@ -835,13 +829,13 @@ img.emoji { .tagchecklist .ntdelbutton:focus .remove-tag-icon:before, #bulk-titles div a:hover:before, #bulk-titles div a:focus:before { - color: #c00; + color: #d63638; } .tagchecklist .ntdelbutton:focus .remove-tag-icon:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .key-labels label { @@ -859,8 +853,7 @@ strong, b { } .howto { - color: #666; - font-style: italic; + color: #646970; display: block; } @@ -875,8 +868,8 @@ p.install-help { hr { border: 0; - border-top: 1px solid #ddd; - border-bottom: 1px solid #fafafa; + border-top: 1px solid #dcdcde; + border-bottom: 1px solid #f6f7f7; } .row-actions span.delete a, @@ -889,8 +882,10 @@ hr { #media-items a.delete, #media-items a.delete-permanently, #nav-menu-footer .menu-delete, -#delete-link a.delete { - color: #a00; +#delete-link a.delete, +a#remove-post-thumbnail, +.privacy_requests .remove-personal-data .remove-personal-data-handle { + color: #b32d2e; } abbr.required, @@ -906,8 +901,10 @@ span.required, #media-items a.delete:hover, #media-items a.delete-permanently:hover, #nav-menu-footer .menu-delete:hover, -#delete-link a.delete:hover { - color: #dc3232; +#delete-link a.delete:hover, +a#remove-post-thumbnail:hover, +.privacy_requests .remove-personal-data .remove-personal-data-handle:hover { + color: #b32d2e; border: none; } @@ -918,8 +915,8 @@ span.required, #major-publishing-actions { padding: 10px; clear: both; - border-top: 1px solid #ddd; - background: #f5f5f5; + border-top: 1px solid #dcdcde; + background: #f6f7f7; } #delete-action { @@ -962,7 +959,7 @@ span.required, } #minor-publishing-actions { - padding: 10px 10px 0 10px; + padding: 10px 10px 0; text-align: right; } @@ -1008,9 +1005,9 @@ th.action-links { padding: 0 10px; width: 100%; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; background: #fff; - color: #555; + color: #50575e; font-size: 13px; } @@ -1031,7 +1028,7 @@ th.action-links { top: -1px; padding: 4px 10px; border-radius: 30px; - background: #72777c; + background: #646970; color: #fff; font-size: 14px; font-weight: 600; @@ -1064,21 +1061,21 @@ th.action-links { margin: 0 10px; padding: 15px 0; border-bottom: 4px solid #fff; - color: #666; + color: #646970; cursor: pointer; } .filter-links .current { box-shadow: none; - border-bottom: 4px solid #666; - color: #23282d; + border-bottom: 4px solid #646970; + color: #1d2327; } .filter-links li > a:hover, .filter-links li > a:focus, .show-filters .filter-links a.current:hover, .show-filters .filter-links a.current:focus { - color: #00a0d2; + color: #135e96; } .wp-filter .search-form { @@ -1096,8 +1093,24 @@ th.action-links { margin: 0; } +/* Use flexbox only on the plugins install page. The `filter-links` and search form children will become flex items. */ +.plugin-install-php .wp-filter { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; +} + .wp-filter .search-form.search-plugins { + /* This element is a flex item: the inherited float won't have any effect. */ + margin-top: 0; +} + +.wp-filter .search-form.search-plugins select, +.wp-filter .search-form.search-plugins .wp-filter-search { display: inline-block; + margin-top: 10px; + vertical-align: top; } .wp-filter .button.drawer-toggle { @@ -1105,7 +1118,7 @@ th.action-links { padding: 0 10px 0 6px; border-color: transparent; background-color: transparent; - color: #666; + color: #646970; vertical-align: baseline; box-shadow: none; } @@ -1113,7 +1126,7 @@ th.action-links { .wp-filter .drawer-toggle:before { content: "\f111"; margin: 0 5px 0 0; - color: #72777c; + color: #646970; font: normal 16px/1 dashicons; vertical-align: text-bottom; -webkit-font-smoothing: antialiased; @@ -1125,7 +1138,7 @@ th.action-links { .wp-filter .button.drawer-toggle:focus, .wp-filter .drawer-toggle:focus:before { background-color: transparent; - color: #00a0d2; + color: #135e96; } .wp-filter .button.drawer-toggle:hover, @@ -1134,7 +1147,7 @@ th.action-links { } .wp-filter .button.drawer-toggle:focus { - border-color: #5b9dd9; + border-color: #4f94d4; } .wp-filter .button.drawer-toggle:active { @@ -1152,8 +1165,8 @@ th.action-links { display: none; margin: 0 -10px 0 -20px; padding: 20px; - border-top: 1px solid #eee; - background: #fafafa; + border-top: 1px solid #f0f0f1; + background: #f6f7f7; overflow: hidden; } @@ -1168,13 +1181,13 @@ th.action-links { .show-filters .wp-filter .button.drawer-toggle { border-radius: 2px; - background: #72777c; + background: #646970; color: #fff; } .show-filters .wp-filter .drawer-toggle:hover, .show-filters .wp-filter .drawer-toggle:focus { - background: rgb(46, 162, 204); + background: #2271b1; } .show-filters .wp-filter .drawer-toggle:before { @@ -1189,7 +1202,7 @@ th.action-links { padding: 20px 10px 10px; width: 24%; background: #fff; - border: 1px solid #e5e5e5; + border: 1px solid #dcdcde; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); } @@ -1221,7 +1234,7 @@ th.action-links { .filter-group .filter-group-feature label { display: block; - margin: 14px 0px 14px 23px; + margin: 14px 0 14px 23px; } .filter-drawer .buttons { @@ -1271,7 +1284,7 @@ th.action-links { .filtered-by .tag { margin: 0 5px; padding: 4px 8px; - border: 1px solid #e5e5e5; + border: 1px solid #dcdcde; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; font-size: 11px; @@ -1280,7 +1293,7 @@ th.action-links { .filters-applied .filter-group, .filters-applied .filter-drawer .buttons, .filters-applied .filter-drawer br { - display: none !important; + display: none; } .filters-applied .filtered-by { @@ -1311,7 +1324,7 @@ th.action-links { @media only screen and (max-width: 1120px) { .filter-drawer { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #f0f0f1; } .filter-group { @@ -1369,9 +1382,9 @@ th.action-links { div.updated, div.error { background: #fff; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-left-width: 4px; - box-shadow: 0 1px 1px rgba(0,0,0,.04); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); margin: 5px 15px 2px; padding: 1px 12px; } @@ -1407,7 +1420,7 @@ div.error p, .notice-title { display: inline-block; - color: #23282d; + color: #1d2327; font-size: 18px; } @@ -1424,59 +1437,55 @@ div.error p, margin: 0; padding: 9px; background: none; - color: #72777c; + color: #787c82; cursor: pointer; } .notice-dismiss:hover:before, .notice-dismiss:active:before, .notice-dismiss:focus:before { - color: #c00; + color: #d63638; } .notice-dismiss:focus { outline: none; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); -} - -.ie8 .notice-dismiss:focus { - outline: 1px solid #5b9dd9; + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .notice-success, div.updated { - border-left-color: #46b450; + border-left-color: #00a32a; } .notice-success.notice-alt { - background-color: #ecf7ed; + background-color: #edfaef; } .notice-warning { - border-left-color: #ffb900; + border-left-color: #dba617; } .notice-warning.notice-alt { - background-color: #fff8e5; + background-color: #fcf9e8; } .notice-error, div.error { - border-left-color: #dc3232; + border-left-color: #d63638; } .notice-error.notice-alt { - background-color: #fbeaea; + background-color: #fcf0f1; } .notice-info { - border-left-color: #00a0d2; + border-left-color: #72aee6; } .notice-info.notice-alt { - background-color: #e5f5fa; + background-color: #f0f6fc; } .update-message p:before, @@ -1524,7 +1533,7 @@ div.error { .import-php .updating-message:before, .button.updating-message:before, .button.installing:before { - color: #f56e28; + color: #d63638; content: "\f463"; } @@ -1532,21 +1541,38 @@ div.error { .updating-message p:before, .import-php .updating-message:before, .button.updating-message:before, -.button.installing:before { +.button.installing:before, +.plugins .column-auto-updates .dashicons-update.spin, +.theme-overlay .theme-autoupdate .dashicons-update.spin { animation: rotation 2s infinite linear; } +@media (prefers-reduced-motion: reduce) { + .updating-message p:before, + .import-php .updating-message:before, + .button.updating-message:before, + .button.installing:before, + .plugins .column-auto-updates .dashicons-update.spin, + .theme-overlay .theme-autoupdate .dashicons-update.spin { + animation: none; + } +} + +.theme-overlay .theme-autoupdate .dashicons-update.spin { + margin-right: 3px; +} + /* Updated icon (check mark). */ .updated-message p:before, .installed p:before, .button.updated-message:before { - color: #79ba49; + color: #68de7c; content: "\f147"; } /* Error icon. */ .update-message.notice-error p:before { - color: #dc3232; + color: #d63638; content: "\f534"; } @@ -1562,11 +1588,7 @@ div.error { line-height: 1.4; padding: 11px 15px; font-size: 14px; - text-align: left; margin: 25px 20px 0 2px; - background-color: #fff; - border-left: 4px solid #ffba00; - box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); } ul#dismissed-updates { @@ -1589,7 +1611,7 @@ form.upgrade { form.upgrade .hint { font-style: italic; font-size: 85%; - margin: -0.5em 0 2em 0; + margin: -0.5em 0 2em; } .update-php .spinner { @@ -1597,6 +1619,19 @@ form.upgrade .hint { margin: -4px 0; } +h2.wp-current-version { + margin-bottom: .3em; +} + +p.update-last-checked { + margin-top: 0; +} + +p.auto-update-status { + margin-top: 2em; + line-height: 1.8; +} + #ajax-loading, .ajax-loading, .ajax-feedback, @@ -1621,7 +1656,7 @@ form.upgrade .hint { } .button-primary.updated-message:before { - color: #66c6e4; + color: #9ec2e6; } .button.updated-message { @@ -1635,7 +1670,7 @@ form.upgrade .hint { .button.installing:before, .button.installed:before, .update-message p:before { - speak: none; + speak: never; } } @@ -1663,7 +1698,7 @@ form.upgrade .hint { #contextual-help-wrap { overflow: auto; - margin-left: 0 !important; + margin-left: 0; } #screen-meta-links { @@ -1674,10 +1709,10 @@ form.upgrade .hint { /* screen options and help tabs revert */ #screen-meta { display: none; - margin: 0 20px -1px 0px; + margin: 0 20px -1px 0; position: relative; background-color: #fff; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-top: none; box-shadow: 0 0 0 transparent; } @@ -1694,14 +1729,14 @@ form.upgrade .hint { } #screen-meta-links .show-settings { - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-top: none; height: auto; margin-bottom: 0; padding: 3px 6px 3px 16px; background: #fff; border-radius: 0 0 4px 4px; - color: #72777c; + color: #646970; line-height: 1.7; box-shadow: 0 0 0 transparent; transition: box-shadow 0.1s linear; @@ -1710,12 +1745,12 @@ form.upgrade .hint { #screen-meta-links .show-settings:hover, #screen-meta-links .show-settings:active, #screen-meta-links .show-settings:focus { - color: #32373c; + color: #2c3338; } #screen-meta-links .show-settings:focus { - border-color: #5b9dd9; - box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); + border-color: #4f94d4; + box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); } #screen-meta-links .show-settings:active { @@ -1726,7 +1761,7 @@ form.upgrade .hint { right: 0; content: "\f140"; font: normal 20px/1 dashicons; - speak: none; + speak: never; display: inline-block; padding: 0 5px 0 0; bottom: 2px; @@ -1734,8 +1769,7 @@ form.upgrade .hint { vertical-align: bottom; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - text-decoration: none !important; - color: #72777c; + text-decoration: none; } #screen-meta-links .screen-meta-active:after { @@ -1766,10 +1800,6 @@ form.upgrade .hint { font-weight: 600; } -.ie8 #screen-options-wrap legend { - color: inherit; -} - .metabox-prefs label { display: inline-block; padding-right: 15px; @@ -1843,10 +1873,10 @@ form.upgrade .hint { bottom: 0; left: 150px; right: 170px; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-top: none; border-bottom: none; - background: #f6fbfd; + background: #f0f6fc; } #contextual-help-wrap.no-sidebar #contextual-help-back { @@ -1884,20 +1914,20 @@ form.upgrade .hint { } .contextual-help-tabs a:hover { - color: #32373c; + color: #2c3338; } .contextual-help-tabs .active { padding: 0; margin: 0 -1px 0 0; - border-left: 2px solid #00a0d2; - background: #f6fbfd; + border-left: 2px solid #72aee6; + background: #f0f6fc; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.02); } .contextual-help-tabs .active a { - border-color: #ccd0d4; - color: #32373c; + border-color: #c3c4c7; + color: #2c3338; } .contextual-help-tabs-wrap { @@ -1934,11 +1964,12 @@ form.upgrade .hint { html.wp-toolbar { padding-top: 32px; box-sizing: border-box; + -ms-overflow-style: scrollbar; /* See ticket #48545 */ } .widefat th, .widefat td { - color: #555; + color: #50575e; } .widefat th, @@ -1951,7 +1982,7 @@ html.wp-toolbar { .widefat thead tr td, .widefat tfoot tr th, .widefat tfoot tr td { - color: #32373c; + color: #2c3338; } .widefat td p { @@ -1961,7 +1992,7 @@ html.wp-toolbar { .widefat p, .widefat ol, .widefat ul { - color: #32373c; + color: #2c3338; } .widefat .column-comment p { @@ -1986,37 +2017,12 @@ html.wp-toolbar { padding-top: 10px; } -.metabox-holder .postbox-container .empty-container { - border: 3px dashed #b4b9be; - height: 250px; +.metabox-holder .postbox-container .meta-box-sortables { + /* The jQuery UI Sortables need some initial height to work properly. */ + min-height: 1px; position: relative; } -.metabox-holder .postbox-container .empty-container:after { - content: attr(data-emptystring); - margin: auto; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - height: 1em; - width: 200px; - text-align: center; - color: #ccc; - font-size: 18px; - display: none; -} - -.metabox-holder.columns-1 .postbox-container .empty-container, -.columns-2 #postbox-container-3 .empty-container, -.columns-2 #postbox-container-4 .empty-container, -.columns-3 #postbox-container-4 .empty-container { - border: 0 none; - height: 0; - min-height: 0; -} - #post-body-content { width: 100%; min-width: 463px; @@ -2036,7 +2042,7 @@ html.wp-toolbar { /* one column on the dash */ @media only screen and (max-width: 799px) { #wpbody-content .metabox-holder .postbox-container .empty-container { - border: 0 none; + outline: none; height: 0; min-height: 0; } @@ -2052,14 +2058,35 @@ html.wp-toolbar { cursor: auto; } +/* Configurable dashboard widgets "Configure" edit-box link. */ .hndle a { - font-size: 11px; + font-size: 12px; font-weight: 400; } +.postbox-header { + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #c3c4c7; +} + +.postbox-header .hndle { + flex-grow: 1; + /* Handle the alignment for the configurable dashboard widgets "Configure" edit-box link. */ + display: flex; + justify-content: space-between; + align-items: center; +} + +.postbox-header .handle-actions { + flex-shrink: 0; +} + +/* Post box order and toggle buttons. */ +.postbox .handle-order-higher, +.postbox .handle-order-lower, .postbox .handlediv { - display: none; - float: right; width: 36px; height: 36px; margin: 0; @@ -2069,12 +2096,28 @@ html.wp-toolbar { cursor: pointer; } -.js .postbox .handlediv { - display: block; +.postbox .handle-order-higher, +.postbox .handle-order-lower { + color: #787c82; + width: 1.62rem; +} + +/* Post box order buttons in the block editor meta boxes area. */ +.edit-post-meta-boxes-area .postbox .handle-order-higher, +.edit-post-meta-boxes-area .postbox .handle-order-lower { + width: 44px; + height: 44px; + color: #1d2327 +} + +.postbox .handle-order-higher[aria-disabled="true"], +.postbox .handle-order-lower[aria-disabled="true"] { + cursor: default; + color: #a7aaad; } .sortable-placeholder { - border: 1px dashed #b4b9be; + border: 1px dashed #c3c4c7; margin-bottom: 20px; } @@ -2085,12 +2128,14 @@ html.wp-toolbar { line-height: 1; } +.postbox.closed { + border-bottom: 0; +} + /* user-select is not a part of the CSS standard - may change behavior in the future */ .postbox .hndle, .stuffbox .hndle { -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -2131,7 +2176,7 @@ html.wp-toolbar { } .temp-border { - border: 1px dotted #ccc; + border: 1px dotted #c3c4c7; } .columns-prefs label { @@ -2166,7 +2211,7 @@ html.wp-toolbar { left: 0; right: 0; padding: 10px 20px; - color: #555d66; + color: #50575e; } #wpfooter p { @@ -2185,15 +2230,15 @@ html.wp-toolbar { .nav-tab { float: left; - border: 1px solid #ccc; + border: 1px solid #c3c4c7; border-bottom: none; margin-left: 0.5em; /* half the font size so set the font size properly */ padding: 5px 10px; font-size: 14px; line-height: 1.71428571; font-weight: 600; - background: #e5e5e5; - color: #555; + background: #dcdcde; + color: #50575e; text-decoration: none; white-space: nowrap; } @@ -2208,7 +2253,7 @@ h3 .nav-tab, /* Back-compat for pre-4.4 */ .nav-tab:hover, .nav-tab:focus { background-color: #fff; - color: #444; + color: #3c434a; } .nav-tab-active, @@ -2218,22 +2263,22 @@ h3 .nav-tab, /* Back-compat for pre-4.4 */ .nav-tab-active { margin-bottom: -1px; - color: #444; + color: #3c434a; } .nav-tab-active, .nav-tab-active:hover, .nav-tab-active:focus, .nav-tab-active:focus:active { - border-bottom: 1px solid #f1f1f1; - background: #f1f1f1; + border-bottom: 1px solid #f0f0f1; + background: #f0f0f1; color: #000; } h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */ .wrap h2.nav-tab-wrapper, /* higher specificity to override .wrap > h2:first-child */ .nav-tab-wrapper { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; margin: 0; padding-top: 9px; padding-bottom: 0; @@ -2247,13 +2292,6 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */ clear: both; } -.ie8 .nav-tab-wrapper { - /* contain floats establishing a new block formatting context */ - display: inline-block; - width: 100%; - vertical-align: top; -} - /*------------------------------------------------------------------------------ 26.0 - Misc ------------------------------------------------------------------------------*/ @@ -2324,7 +2362,7 @@ table .column-rating { .attention, .error-message { - color: #dc3232; + color: #d63638; font-weight: 600; } @@ -2350,7 +2388,7 @@ body.iframe { } .media-icon img { - border: 1px solid #e5e5e5; + border: 1px solid #dcdcde; border: 1px solid rgba(0, 0, 0, 0.07); } @@ -2393,7 +2431,7 @@ body.iframe { .importer-action { line-height: 1.55; /* Same as with .updating-message */ - color: #555; + color: #50575e; margin-bottom: 1em; } @@ -2403,8 +2441,8 @@ body.iframe { } .edit-comment-author { - color: #222; - border-bottom: 1px solid #eee; + color: #1d2327; + border-bottom: 1px solid #f0f0f1; } #namediv h3 label, /* Back-compat for pre-4.4 */ @@ -2422,17 +2460,13 @@ body.iframe { } #namediv input { - width: 98%; + width: 100%; } #namediv p { margin: 10px 0; } -#submitdiv h3 { - margin-bottom: 0 !important; -} - /* - Used - but could/should be deprecated with a CSS reset ------------------------------------------------------------------------------*/ .zerosize { @@ -2504,7 +2538,7 @@ div.star-holder .star-rating { vertical-align: top; transition: color .1s ease-in; text-align: center; - color: #ffb900; + color: #dba617; } .star-rating .star-full:before { @@ -2548,7 +2582,7 @@ div.action-links { #plugin-information-title { padding: 0 26px; - background: #f5f5f5; + background: #f6f7f7; font-size: 22px; font-weight: 600; line-height: 2.4; @@ -2583,7 +2617,7 @@ div.action-links { padding: 0 15px; margin-top: 174px; color: #fff; - background: rgba(30, 30, 30, 0.9); + background: rgba(29, 35, 39, 0.9); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); box-shadow: 0 0 30px rgba(255, 255, 255, 0.1); border-radius: 8px; @@ -2612,8 +2646,8 @@ div.action-links { min-height: 36px; font-size: 0; z-index: 1; - border-bottom: 1px solid #ddd; - background: #f3f3f3; + border-bottom: 1px solid #dcdcde; + background: #f6f7f7; } #plugin-information-tabs a { @@ -2631,10 +2665,10 @@ div.action-links { #plugin-information-tabs a.current { margin: 0 -1px -1px; background: #fff; - border: 1px solid #ddd; + border: 1px solid #dcdcde; border-bottom-color: #fff; padding-top: 8px; - color: #32373c; + color: #2c3338; } #plugin-information-tabs.with-banner a.current { @@ -2672,9 +2706,8 @@ div.action-links { left: 0; margin-top: 10px; margin-right: 250px; /* FYI box */ - padding: 10px 26px; - margin-bottom: -99939px; /* 60px less than the padding below to accommodate footer */ - padding-bottom: 99999px; /* equal height column trick */ + padding: 10px 26px 99999px; /* equal height column trick */ + margin-bottom: -99932px; /* 67px less than the padding below to accommodate footer height */ } #section-holder .notice { @@ -2690,24 +2723,23 @@ div.action-links { position: relative; top: 0; right: 0; - padding: 16px; - margin-bottom: -99939px; /* 60px less than the padding below to accommodate footer */ - padding-bottom: 99999px; /* equal height column trick */ + padding: 16px 16px 99999px; /* equal height column trick */ + margin-bottom: -99932px; /* 67px less than the padding below to accommodate footer height */ width: 217px; - border-left: 1px solid #ddd; - background: #f3f3f3; - color: #666; + border-left: 1px solid #dcdcde; + background: #f6f7f7; + color: #646970; } #plugin-information .fyi strong { - color: #444; + color: #3c434a; } #plugin-information .fyi h3 { font-weight: 600; text-transform: uppercase; font-size: 12px; - color: #666; + color: #646970; margin: 24px 0 8px; } @@ -2744,13 +2776,13 @@ div.action-links { #plugin-information .counter-back { height: 17px; width: 92px; - background-color: #e5e5e5; + background-color: #dcdcde; float: left; } #plugin-information .counter-bar { height: 17px; - background-color: #ffc733; /* slightly lighter than stars due to larger expanse */ + background-color: #f0c33c; /* slightly lighter than stars due to larger expanse */ float: left; } @@ -2785,9 +2817,9 @@ div.action-links { right: 0; bottom: 0; left: 0; - height: 33px; /* 33+13+13+1=60 */ - border-top: 1px solid #ddd; - background: #f3f3f3; + height: 40px; /* actual height: 40+13+13+1=67 */ + border-top: 1px solid #dcdcde; + background: #f6f7f7; } /* rtl:ignore */ @@ -2831,12 +2863,12 @@ div.action-links { #plugin-information pre { padding: 7px; overflow: auto; - border: 1px solid #ccc; + border: 1px solid #c3c4c7; } #plugin-information blockquote { - border-left: 2px solid #ddd; - color: #666; + border-left: 2px solid #dcdcde; + color: #646970; font-style: italic; margin: 1em 0; padding: 0 0 0 1em; @@ -2847,7 +2879,7 @@ div.action-links { overflow: hidden; /* clearfix */ width: 100%; margin-bottom: 20px; - border-bottom: 1px solid #e5e5e5; + border-bottom: 1px solid #dcdcde; } #plugin-information .review-title-section { @@ -2928,7 +2960,7 @@ div.action-links { #plugin-information .fyi { float: none; - border: 1px solid #ddd; + border: 1px solid #dcdcde; position: static; width: auto; margin: 26px 26px 0; @@ -2954,7 +2986,7 @@ div.action-links { /* Thickbox for the Plugin details modal. */ #TB_window.plugin-details-modal { - background: #fcfcfc; + background: #fff; } #TB_window.plugin-details-modal.thickbox-loading:before { @@ -2967,7 +2999,7 @@ div.action-links { top: 50%; z-index: -1; margin: -10px 0 0 -10px; - background: #fcfcfc url(../images/spinner.gif) no-repeat center; + background: #fff url(../images/spinner.gif) no-repeat center; background-size: 20px 20px; transform: translateZ(0); } @@ -2993,12 +3025,12 @@ div.action-links { .plugin-details-modal #TB_closeWindowButton { left: auto; right: -30px; - color: #eee; + color: #f0f0f1; } .plugin-details-modal #TB_closeWindowButton:hover, .plugin-details-modal #TB_closeWindowButton:focus { - color: #00a0d2; + color: #135e96; outline: none; box-shadow: none; } @@ -3010,7 +3042,7 @@ div.action-links { .plugin-details-modal #TB_closeWindowButton:after { content: "\f335"; font: normal 32px/29px 'dashicons'; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @@ -3029,52 +3061,83 @@ img { } /* Metabox collapse arrow indicators */ -.sidebar-name .toggle-indicator:before, -.js .meta-box-sortables .postbox .toggle-indicator:before, -.bulk-action-notice .toggle-indicator:before, -.privacy-text-box .toggle-indicator:before { +.sidebar-name .toggle-indicator::before, +.meta-box-sortables .postbox .toggle-indicator::before, +.meta-box-sortables .postbox .order-higher-indicator::before, +.meta-box-sortables .postbox .order-lower-indicator::before, +.bulk-action-notice .toggle-indicator::before, +.privacy-text-box .toggle-indicator::before { content: "\f142"; display: inline-block; font: normal 20px/1 dashicons; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - text-decoration: none !important; + text-decoration: none; } -.js .widgets-holder-wrap.closed .toggle-indicator:before, -.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before, -.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before, -.privacy-text-box.closed .toggle-indicator:before { +.js .widgets-holder-wrap.closed .toggle-indicator::before, +.meta-box-sortables .postbox.closed .handlediv .toggle-indicator::before, +.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator::before, +.privacy-text-box.closed .toggle-indicator::before { content: "\f140"; } -.js .postbox .handlediv .toggle-indicator:before { - margin-top: 4px; +.postbox .handle-order-higher .order-higher-indicator::before { + content: "\f343"; + color: inherit; +} + +.postbox .handle-order-lower .order-lower-indicator::before { + content: "\f347"; + color: inherit; +} + +.postbox .handle-order-higher .order-higher-indicator::before, +.postbox .handle-order-lower .order-lower-indicator::before { + position: relative; + top: 0.11rem; + width: 20px; + height: 20px; +} + +.postbox .handlediv .toggle-indicator::before { width: 20px; border-radius: 50%; - text-indent: -1px; /* account for the dashicon alignment */ } -.rtl.js .postbox .handlediv .toggle-indicator:before { - text-indent: 1px; /* account for the dashicon alignment */ +.postbox .handlediv .toggle-indicator::before { + position: relative; + top: 0.05rem; + text-indent: -1px; /* account for the dashicon glyph uneven horizontal alignment */ +} + +.rtl .postbox .handlediv .toggle-indicator::before { + text-indent: 1px; /* account for the dashicon glyph uneven horizontal alignment */ } -.bulk-action-notice .toggle-indicator:before { +.bulk-action-notice .toggle-indicator::before { line-height: 16px; vertical-align: top; - color: #72777c; + color: #787c82; } -.js .postbox .handlediv:focus { - box-shadow: none; - outline: none; +.postbox .handle-order-higher:focus, +.postbox .handle-order-lower:focus, +.postbox .handlediv:focus { + box-shadow: + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } -.js .postbox .handlediv:focus .toggle-indicator:before { - box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); +.postbox .handle-order-higher:focus .order-higher-indicator::before, +.postbox .handle-order-lower:focus .order-lower-indicator::before, +.postbox .handlediv:focus .toggle-indicator::before { + box-shadow: none; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } /* @todo: appears to be Press This only and overridden */ @@ -3090,7 +3153,7 @@ img { #template textarea { font-family: Consolas, Monaco, monospace; font-size: 13px; - background: #f9f9f9; + background: #f6f7f7; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; @@ -3101,7 +3164,7 @@ img { width: 100%; min-height: 60vh; height: calc( 100vh - 295px ); - border: 1px solid #ddd; + border: 1px solid #dcdcde; box-sizing: border-box; } @@ -3123,8 +3186,8 @@ img { padding: 0; min-height: 60vh; height: calc(100vh - 295px); - background-color: #f7f7f7; - border: 1px solid #ddd; + background-color: #f6f7f7; + border: 1px solid #dcdcde; border-left: none; } #templateside ul ul { @@ -3168,14 +3231,14 @@ img { outline: 0; } [role="treeitem"] .folder-label.focus { - color: #124964; + color: #043959; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } [role="treeitem"].hover, [role="treeitem"] .folder-label.hover { - background-color: #eaeaea; + background-color: #f0f0f1; } .tree-folder { @@ -3192,7 +3255,7 @@ img { display: block; position: absolute; left: 2px; - border-left: 1px solid #ccc; + border-left: 1px solid #c3c4c7; top: -13px; bottom: 10px; } @@ -3200,18 +3263,18 @@ img { content: ""; position: absolute; display: block; - border-left: 1px solid #ccc; + border-left: 1px solid #c3c4c7; left: 2px; top: -5px; height: 18px; width: 7px; - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; } .tree-folder > li::after { content: ""; position: absolute; display: block; - border-left: 1px solid #ccc; + border-left: 1px solid #c3c4c7; left: 2px; bottom: -7px; top: 0; @@ -3224,7 +3287,7 @@ img { .tree-folder > .current-file::before { left: 4px; height: 15px; - width: 0px; + width: 0; border-left: none; top: 3px; } @@ -3241,11 +3304,15 @@ img { display: none; } +#theme-plugin-editor-selector, +#theme-plugin-editor-label, +#documentation label { + font-weight: 600; +} #theme-plugin-editor-label { display: inline-block; margin-bottom: 1em; - font-weight: 600; } /* rtl:ignore */ @@ -3315,7 +3382,7 @@ img { } #templateside li.howto { - padding: 6px 12px 12px 12px; + padding: 6px 12px 12px; } .theme-editor-php .highlight { @@ -3328,7 +3395,7 @@ img { } .nonessential { - color: #666; + color: #646970; font-size: 11px; font-style: italic; padding-left: 12px; @@ -3341,7 +3408,6 @@ img { #documentation label { line-height: 1.8; vertical-align: baseline; - font-weight: 600; } .fileedit-sub { @@ -3360,15 +3426,15 @@ img { .accordion-section-title:after { content: "\f140"; font: normal 20px/1 dashicons; - speak: none; + speak: never; display: block; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - text-decoration: none !important; + text-decoration: none; } .widget-top .widget-action .toggle-indicator:before { - padding: 1px 2px 1px 0px; + padding: 1px 2px 1px 0; border-radius: 50%; } @@ -3377,11 +3443,11 @@ img { .item-edit, .toggle-indicator, .accordion-section-title:after { - color: #72777c; + color: #787c82; } .widget-action { - color: #555d66; /* #fafafa background in the Widgets screen */ + color: #50575e; /* #fafafa background in the Widgets screen */ } .widget-top:hover .widget-action, @@ -3394,13 +3460,15 @@ img { .item-edit:focus, .sidebar-name:hover .toggle-indicator, .accordion-section-title:hover:after { - color: #23282d; + color: #1d2327; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } .widget-top .widget-action:focus .toggle-indicator:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .control-section .accordion-section-title:after, @@ -3433,7 +3501,7 @@ img { /* Accordion */ .accordion-section { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; margin: 0; } @@ -3443,7 +3511,7 @@ img { } .accordion-section.open:hover { - border-bottom-color: #ddd; + border-bottom-color: #dcdcde; } .accordion-section-content { @@ -3457,11 +3525,9 @@ img { margin: 0; padding: 12px 15px 15px; position: relative; - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; + border-left: 1px solid #dcdcde; + border-right: 1px solid #dcdcde; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -3477,12 +3543,15 @@ img { } .accordion-section-title:focus { - outline: none; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } .accordion-section-title:hover:after, .accordion-section-title:focus:after { - border-color: #a0a5aa transparent; + border-color: #a7aaad transparent; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } .cannot-expand .accordion-section-title { @@ -3511,13 +3580,13 @@ img { .js .control-section .accordion-section-title:hover, .js .control-section.open .accordion-section-title, .js .control-section .accordion-section-title:focus { - color: #23282d; - background: #f5f5f5; + color: #1d2327; + background: #f6f7f7; } .control-section.open .accordion-section-title { /* When expanded */ - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } /* Edit Site */ @@ -3557,7 +3626,7 @@ img { position: absolute; top: 0; right: 0; - background: #ccc; + background: #c3c4c7; } } @@ -3577,7 +3646,7 @@ img { } .my-sites li:nth-of-type(4n+1), .my-sites li:nth-of-type(4n+2) { - background-color: #f9f9f9; + background-color: #f6f7f7; } } @@ -3594,7 +3663,7 @@ img { .my-sites li:nth-of-type(6n+1), .my-sites li:nth-of-type(6n+2), .my-sites li:nth-of-type(6n+3) { - background-color: #f9f9f9; + background-color: #f6f7f7; } } @@ -3615,7 +3684,7 @@ img { .my-sites li:nth-of-type(8n+2), .my-sites li:nth-of-type(8n+3), .my-sites li:nth-of-type(8n+4) { - background-color: #f9f9f9; + background-color: #f6f7f7; } } @@ -3637,7 +3706,7 @@ img { .my-sites li:nth-of-type(10n+3), .my-sites li:nth-of-type(10n+4), .my-sites li:nth-of-type(10n+5) { - background-color: #f9f9f9; + background-color: #f6f7f7; } } @@ -3660,7 +3729,7 @@ img { .my-sites li:nth-of-type(12n+4), .my-sites li:nth-of-type(12n+5), .my-sites li:nth-of-type(12n+6) { - background-color: #f9f9f9; + background-color: #f6f7f7; } } @@ -3688,23 +3757,6 @@ img { background-image: url(../images/spinner-2x.gif); } - /* @todo: evaluate - most of these were likely replaced by dashicons */ - .curtime #timestamp, - #screen-meta-links a.show-settings, - .widget-top .widget-action, - .widget-top .widget-action:hover, - .sidebar-name .toggle-indicator, - .sidebar-name:hover .toggle-indicator, - .meta-box-sortables .postbox:hover .handlediv, - #bulk-titles div a, - #bulk-titles div a:hover { - background: none !important; - } - -} - -@-ms-viewport { - width: device-width; } @media screen and (max-width: 782px) { @@ -3777,7 +3829,7 @@ img { .wrap div.updated, .wrap div.error, .media-upload-form div.error { - margin: 20px 0 10px 0; + margin: 20px 0 10px; padding: 5px 10px; font-size: 14px; line-height: 175%; @@ -3841,7 +3893,7 @@ img { } #templateside > ul { - border-left: 1px solid #ddd; + border-left: 1px solid #dcdcde; } #templateside li { @@ -3887,7 +3939,7 @@ img { left: -8px; } .tree-folder > li::before { - top: 0px; + top: 0; height: 13px; } .tree-folder > .current-file::before { @@ -4008,6 +4060,11 @@ img { .wp-filter .search-form input[type="search"] { font-size: 1rem; } + + .wp-filter .search-form.search-plugins { + /* This element is a flex item. */ + min-width: 100%; + } } /* Smartphone */ @@ -4046,13 +4103,13 @@ img { h3 .nav-tab, nav .nav-tab { margin: 10px 10px 0 0; - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; } .nav-tab-active:hover, .nav-tab-active:focus, .nav-tab-active:focus:active { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; } .wp-filter .search-form input[type="search"] { diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 99333735c1927..bdd28880c19f0 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -61,7 +61,7 @@ body { } #customize-controls .description { - color: #555d66; + color: #50575e; } #customize-save-button-wrapper { @@ -80,7 +80,7 @@ body:not(.ready) #customize-save-button-wrapper .save { } #customize-save-button-wrapper .save:focus, #publish-settings:focus { - box-shadow: 0 1px 0 #0073aa, 0 0 2px 1px #33b3db; /* This is default box shadow for focus */ + box-shadow: 0 1px 0 #2271b1, 0 0 2px 1px #72aee6; /* This is default box shadow for focus */ } #customize-save-button-wrapper .save.has-next-sibling { @@ -98,13 +98,19 @@ body:not(.ready) #customize-save-button-wrapper .save { width: 100%; margin: 0; z-index: -1; - background: #eee; + background: #f0f0f1; transition: left .18s; - border-right: 1px solid #ddd; - border-left: 1px solid #ddd; + border-right: 1px solid #dcdcde; + border-left: 1px solid #dcdcde; height: 100%; } +@media (prefers-reduced-motion: reduce) { + #customize-sidebar-outer-content { + transition: none; + } +} + #customize-theme-controls .control-section-outer { display: none !important; } @@ -123,6 +129,12 @@ body:not(.ready) #customize-save-button-wrapper .save { transition: left .18s; } +@media (prefers-reduced-motion: reduce) { + .outer-section-open .wp-full-overlay.expanded #customize-sidebar-outer-content { + transition: none; + } +} + .customize-outer-pane-parent { margin: 0; } @@ -179,7 +191,7 @@ body.trashing #publish-settings { } #customize-header-actions { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } #customize-controls .wp-full-overlay-sidebar-content { @@ -188,19 +200,19 @@ body.trashing #publish-settings { } .outer-section-open #customize-controls .wp-full-overlay-sidebar-content { - background: #eee; + background: #f0f0f1; } #customize-controls .customize-info { border: none; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; margin-bottom: 15px; } #customize-control-changeset_status .customize-inside-control-row, #customize-control-changeset_preview_link input { - background-color: #ffffff; - border-bottom: 1px solid #ddd; + background-color: #fff; + border-bottom: 1px solid #dcdcde; box-sizing: content-box; width: 100%; margin-left: -12px; @@ -226,7 +238,7 @@ body.trashing #publish-settings { } #customize-controls .date-input:invalid { - border-color: #dc3232; + border-color: #d63638; } #customize-control-changeset_status .customize-inside-control-row { @@ -236,7 +248,7 @@ body.trashing #publish-settings { } #customize-control-changeset_status .customize-inside-control-row:first-of-type { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } #customize-control-changeset_status .customize-control-title { @@ -268,7 +280,7 @@ body.trashing #publish-settings { content: ""; height: 28px; position: absolute; - background: #ffffff; + background: #fff; top: -1px; } @@ -286,7 +298,7 @@ body.trashing #publish-settings { #customize-control-changeset_preview_link input { line-height: 2.85714286; /* 40px */ - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; border-left: none; border-right: none; text-indent: -999px; @@ -315,7 +327,7 @@ body.trashing #publish-settings { #customize-control-changeset_preview_link a.disabled:active, #customize-control-changeset_preview_link a.disabled:focus, #customize-control-changeset_preview_link a.disabled:visited { - color: black; + color: #000; opacity: 0.4; cursor: default; outline: none; @@ -376,8 +388,8 @@ body.trashing #publish-settings { width: 100%; margin-left: -12px; padding: 12px; - background: #ffffff; - border-bottom: 1px solid #ddd; + background: #fff; + border-bottom: 1px solid #dcdcde; margin-bottom: 0; } @@ -409,7 +421,7 @@ body.trashing #publish-settings { #customize-controls .customize-info .accordion-section-title { background: #fff; - color: #555d66; + color: #50575e; border-left: none; border-right: none; border-bottom: none; @@ -419,7 +431,7 @@ body.trashing #publish-settings { #customize-controls .customize-info.open .accordion-section-title:after, #customize-controls .customize-info .accordion-section-title:hover:after, #customize-controls .customize-info .accordion-section-title:focus:after { - color: #32373c; + color: #2c3338; } #customize-controls .customize-info .accordion-section-title:after { @@ -462,7 +474,7 @@ body.trashing #publish-settings { box-shadow: none; -webkit-appearance: none; background: transparent; - color: #555d66; + color: #50575e; border: none; } @@ -475,18 +487,18 @@ body.trashing #publish-settings { #customize-controls .customize-info.open .customize-help-toggle, #customize-controls .customize-info .customize-help-toggle:focus, #customize-controls .customize-info .customize-help-toggle:hover { - color: #0073aa; + color: #2271b1; } #customize-controls .customize-info .customize-panel-description, #customize-controls .customize-info .customize-section-description, #customize-outer-theme-controls .customize-info .customize-section-description, #customize-controls .no-widget-areas-rendered-notice { - color: #555d66; + color: #50575e; display: none; background: #fff; padding: 12px 15px; - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } #customize-controls .customize-info .customize-panel-description.open + .no-widget-areas-rendered-notice { @@ -527,9 +539,9 @@ body.trashing #publish-settings { #customize-theme-controls .accordion-section-title, #customize-outer-theme-controls .accordion-section-title { - color: #555d66; + color: #50575e; background-color: #fff; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; border-left: 4px solid #fff; transition: .15s color ease-in-out, @@ -537,8 +549,15 @@ body.trashing #publish-settings { .15s border-color ease-in-out; } +@media (prefers-reduced-motion: reduce) { + #customize-theme-controls .accordion-section-title, + #customize-outer-theme-controls .accordion-section-title { + transition: none; + } +} + #customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title { - color: #555; + color: #50575e; background-color: #fff; border-left: 4px solid #fff; } @@ -546,12 +565,12 @@ body.trashing #publish-settings { #customize-theme-controls .accordion-section-title:after, #customize-outer-theme-controls .accordion-section-title:after { content: "\f345"; - color: #a0a5aa; + color: #a7aaad; } #customize-theme-controls .accordion-section-content, #customize-outer-theme-controls .accordion-section-content { - color: #555d66; + color: #50575e; background: transparent; } @@ -559,20 +578,20 @@ body.trashing #publish-settings { #customize-controls .control-section .accordion-section-title:hover, #customize-controls .control-section.open .accordion-section-title, #customize-controls .control-section .accordion-section-title:focus { - color: #0073aa; - background: #f3f3f5; - border-left-color: #0073aa; + color: #2271b1; + background: #f6f7f7; + border-left-color: #2271b1; } #accordion-section-themes + .control-section { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } .js .control-section:hover .accordion-section-title, .js .control-section .accordion-section-title:hover, .js .control-section.open .accordion-section-title, .js .control-section .accordion-section-title:focus { - background: #f3f3f5; + background: #f6f7f7; } #customize-theme-controls .control-section:hover > .accordion-section-title:after, @@ -583,27 +602,27 @@ body.trashing #publish-settings { #customize-outer-theme-controls .control-section .accordion-section-title:hover:after, #customize-outer-theme-controls .control-section.open .accordion-section-title:after, #customize-outer-theme-controls .control-section .accordion-section-title:focus:after { - color: #0073aa; + color: #2271b1; } #customize-theme-controls .control-section.open { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #f0f0f1; } #customize-theme-controls .control-section.open .accordion-section-title, #customize-outer-theme-controls .control-section.open .accordion-section-title { - border-bottom-color: #eee !important; + border-bottom-color: #f0f0f1 !important; } #customize-theme-controls .control-section:last-of-type.open, #customize-theme-controls .control-section:last-of-type > .accordion-section-title { - border-bottom-color: #ddd; + border-bottom-color: #dcdcde; } #customize-theme-controls .control-panel-content:not(.control-panel-nav_menus) .control-section:nth-child(2), #customize-theme-controls .control-panel-nav_menus .control-section-nav_menu, #customize-theme-controls .control-section-nav_menu_locations .accordion-section-title { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } #customize-theme-controls .control-panel-nav_menus .control-section-nav_menu + .control-section-nav_menu { @@ -635,6 +654,14 @@ body.trashing #publish-settings { transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1); /* easeInOutCubic */ } +@media (prefers-reduced-motion: reduce) { + #customize-info, + #customize-theme-controls .customize-pane-parent, + #customize-theme-controls .customize-pane-child { + transition: none; + } +} + #customize-theme-controls .customize-pane-child.skip-transition { transition: none; } @@ -716,8 +743,8 @@ body.trashing #publish-settings { } .customize-section-title { - margin: -12px -12px 0 -12px; - border-bottom: 1px solid #ddd; + margin: -12px -12px 0; + border-bottom: 1px solid #dcdcde; background: #fff; } @@ -738,12 +765,12 @@ div.customize-section-description p:last-child { } #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child { - border-bottom: 1px solid #ddd; - padding: 12px 12px 12px 12px; + border-bottom: 1px solid #dcdcde; + padding: 12px; } .ios #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child { - padding: 12px 12px 13px 12px; + padding: 12px 12px 13px; } .customize-section-title h3, @@ -751,7 +778,7 @@ h3.customize-section-title { padding: 10px 10px 12px 14px; margin: 0; line-height: 21px; - color: #555d66; + color: #50575e; } .accordion-sub-container.control-panel-content { @@ -777,11 +804,11 @@ h3.customize-section-title { width: 45px; height: 41px; padding: 0 2px 0 0; - background: #eee; + background: #f0f0f1; border: none; - border-top: 4px solid #eee; - border-right: 1px solid #ddd; - color: #444; + border-top: 4px solid #f0f0f1; + border-right: 1px solid #dcdcde; + color: #3c434a; text-align: left; cursor: pointer; transition: @@ -801,7 +828,7 @@ h3.customize-section-title { margin: 0; background: #fff; border: none; - border-right: 1px solid #ddd; + border-right: 1px solid #dcdcde; border-left: 4px solid #fff; box-shadow: none; cursor: pointer; @@ -831,7 +858,7 @@ h3.customize-section-title { #customize-controls .panel-meta.customize-info .accordion-section-title:hover, #customize-controls .cannot-expand:hover .accordion-section-title { background: #fff; - color: #555d66; + color: #50575e; border-left-color: #fff; } @@ -840,22 +867,30 @@ h3.customize-section-title { .customize-controls-preview-toggle:focus, .customize-controls-preview-toggle:hover { background: #fff; - color: #0073aa; - border-top-color: #0073aa; - outline: none; + color: #2271b1; + border-top-color: #2271b1; box-shadow: none; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } +#customize-theme-controls .accordion-section-title:focus .customize-action { + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; + outline-offset: 1px; +} .customize-panel-back:hover, .customize-panel-back:focus, .customize-section-back:hover, .customize-section-back:focus { - color: #0073aa; - background: #f3f3f5; - border-left-color: #0073aa; - outline: none; + color: #2271b1; + background: #f6f7f7; + border-left-color: #2271b1; box-shadow: none; + /* Only visible in Windows High Contrast mode */ + outline: 2px solid transparent; + outline-offset: -2px; } .customize-controls-close:before { @@ -875,7 +910,7 @@ h3.customize-section-title { } .wp-full-overlay-sidebar .wp-full-overlay-header { - background-color: #eee; + background-color: #f0f0f1; transition: padding ease-in-out .18s; } @@ -901,11 +936,6 @@ p.customize-section-description { text-align: right; } -.section-description-buttons button.button-link { - color: #0073aa; - text-decoration: underline; -} - .customize-control { width: 100%; float: left; @@ -919,7 +949,8 @@ p.customize-section-description { .customize-control input[type="number"], .customize-control input[type="search"], .customize-control input[type="tel"], -.customize-control input[type="url"] { +.customize-control input[type="url"], +.customize-control input[type="range"] { width: 100%; margin: 0; } @@ -1059,7 +1090,7 @@ p.customize-section-description { position: absolute; bottom: 0; z-index: 10; - background: #eee; + background: #f0f0f1; display: flex; } @@ -1081,7 +1112,7 @@ p.customize-section-description { } .customize-control-dropdown-pages .new-content-item .create-item-input.invalid { - border: 1px solid #dc3232; + border: 1px solid #d63638; } .customize-control-dropdown-pages .add-new-toggle { @@ -1100,8 +1131,8 @@ p.customize-section-description { } .wp-full-overlay-sidebar { - background: #eee; - border-right: 1px solid #ddd; + background: #f0f0f1; + border-right: 1px solid #dcdcde; } @@ -1110,20 +1141,20 @@ p.customize-section-description { */ #customize-controls .customize-control-notifications-container { /* Scoped to #customize-controls for specificity over notification styles in common.css. */ - margin: 4px 0 8px 0; + margin: 4px 0 8px; padding: 0; cursor: default; } #customize-controls .customize-control-widget_form.has-error .widget .widget-top, .customize-control-nav_menu_item.has-error .menu-item-bar .menu-item-handle { - box-shadow: inset 0 0 0 2px #dc3232; + box-shadow: inset 0 0 0 2px #d63638; transition: .15s box-shadow linear; } #customize-controls .customize-control-notifications-container li.notice { list-style: none; - margin: 0 0 6px 0; + margin: 0 0 6px; padding: 9px 14px; overflow: hidden; } @@ -1144,14 +1175,14 @@ p.customize-section-description { } .customize-control-text.has-error input { - outline: 2px solid #dc3232; + outline: 2px solid #d63638; } #customize-controls #customize-notifications-area { position: absolute; top: 46px; width: 100%; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; display: block; padding: 0; margin: 0; @@ -1179,7 +1210,7 @@ p.customize-section-description { } #customize-controls .panel-meta > .customize-control-notifications-container, #customize-controls .customize-section-title > .customize-control-notifications-container { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } #customize-controls #customize-notifications-area .notice, #customize-controls .panel-meta > .customize-control-notifications-container .notice, @@ -1216,7 +1247,7 @@ p.customize-section-description { /* Note: Styles for this are also defined in themes.css */ #customize-controls #customize-notifications-area .notice.notification-overlay .notification-message { clear: both; - color: #191e23; + color: #1d2327; font-size: 18px; font-style: normal; margin: 0; @@ -1260,10 +1291,8 @@ p.customize-section-description { line-height: 16px; margin-right: 16px; padding: 4px 5px; - border: 2px solid #eee; + border: 2px solid #f0f0f1; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -1274,13 +1303,13 @@ p.customize-section-description { bottom: 0; right: 0; width: 20px; - background: #eee; + background: #f0f0f1; } .customize-control .dropdown-arrow:after { content: "\f140"; font: normal 20px/1 dashicons; - speak: none; + speak: never; display: block; padding: 0; text-indent: 0; @@ -1289,12 +1318,12 @@ p.customize-section-description { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none !important; - color: #32373c; + color: #2c3338; } .customize-control .dropdown-status { - color: #32373c; - background: #eee; + color: #2c3338; + background: #f0f0f1; display: none; max-width: 112px; } @@ -1305,7 +1334,7 @@ p.customize-section-description { } .customize-control-color .dropdown .dropdown-content { - background-color: #555d66; + background-color: #50575e; border: 1px solid rgba(0, 0, 0, 0.15); } @@ -1374,7 +1403,7 @@ p.customize-section-description { position: relative; text-align: center; cursor: default; - border: 1px dashed #b4b9be; + border: 1px dashed #c3c4c7; box-sizing: border-box; padding: 9px 0; line-height: 1.6; @@ -1382,19 +1411,20 @@ p.customize-section-description { .customize-control .attachment-media-view .button-add-media { cursor: pointer; - background-color: #edeff0; - color: #32373c; + background-color: #f0f0f1; + color: #2c3338; } .customize-control .attachment-media-view .button-add-media:hover { - background-color: #fbfbfc; + background-color: #fff; } .customize-control .attachment-media-view .button-add-media:focus { - background-color: #fbfbfc; - border-color: #007cba; + background-color: #fff; + border-color: #3582c4; border-style: solid; - box-shadow: 0 0 0 1px #007cba; + box-shadow: 0 0 0 1px #3582c4; + /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } @@ -1402,7 +1432,7 @@ p.customize-section-description { display: none; position: absolute; width: 100%; - color: #555d66; + color: #50575e; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; @@ -1426,7 +1456,7 @@ p.customize-section-description { } .customize-control-header .header-view:last-child { - margin-bottom: 0px; + margin-bottom: 0; } /* Convoluted, but 'outline' support isn't good enough yet */ @@ -1446,7 +1476,7 @@ p.customize-section-description { left: 0; bottom: 0; right: 0; - border: 4px solid #00a0d2; + border: 4px solid #72aee6; border-radius: 2px; } @@ -1459,7 +1489,7 @@ p.customize-section-description { .customize-control-header .uploaded .header-view .close { font-size: 20px; color: #fff; - background: #555d66; + background: #50575e; background: rgba(0, 0, 0, 0.5); position: absolute; top: 10px; @@ -1477,7 +1507,7 @@ p.customize-section-description { } .customize-control-header .header-view .close:focus { - outline: 1px solid #5b9dd9; + outline: 1px solid #4f94d4; } /* Header control: randomiz(s)er */ @@ -1539,8 +1569,8 @@ p.customize-section-description { .customize-control-header .choice:focus { outline: none; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 3px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 3px 1px rgba(79, 148, 212, 0.8); } .customize-control-header .uploaded div:last-child > .choice { @@ -1657,12 +1687,12 @@ p.customize-section-description { #customize-theme-controls .control-panel-themes > .accordion-section-title { cursor: default; background: #fff; - color: #555d66; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; + color: #50575e; + border-top: 1px solid #dcdcde; + border-bottom: 1px solid #dcdcde; border-left: none; border-right: none; - margin: 0 0 15px 0; + margin: 0 0 15px; padding-right: 100px; /* Space for the button */ } @@ -1717,10 +1747,16 @@ p.customize-section-description { overflow-y: scroll; width: calc(100% - 300px); height: calc(100% - 96px); - background: #eee; + background: #f0f0f1; z-index: 20; } +@media (prefers-reduced-motion: reduce) { + .control-panel-themes .customize-themes-full-container { + transition: none; + } +} + @media screen and (min-width: 1670px) { .control-panel-themes .customize-themes-full-container { width: 82%; @@ -1754,7 +1790,7 @@ p.customize-section-description { } .wp-full-overlay.in-themes-panel { - background: #eee; /* Prevents a black flash when fading in the panel */ + background: #f0f0f1; /* Prevents a black flash when fading in the panel */ } .in-themes-panel #customize-save-button-wrapper, @@ -1792,8 +1828,8 @@ p.customize-section-description { } .themes-filter-bar .feature-filter-toggle.open { - background: #eee; - border-color: #999; + background: #f0f0f1; + border-color: #8c8f94; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } @@ -1810,8 +1846,8 @@ p.customize-section-description { padding: 25px 0 25px 25px; border-top: 0; margin: 0; - background: #eee; - border-bottom: 1px solid #ddd; + background: #f0f0f1; + border-bottom: 1px solid #dcdcde; } .filter-drawer .filter-group { @@ -1850,7 +1886,7 @@ p.customize-section-description { .control-panel-themes .filter-themes-count .themes-displayed { font-weight: 600; - color: #555d66; + color: #50575e; } .customize-themes-notifications { @@ -1858,7 +1894,7 @@ p.customize-section-description { } .control-panel-themes .customize-themes-notifications .notice { - margin: 0 0 25px 0; + margin: 0 0 25px; } .customize-themes-full-container .customize-themes-section { @@ -1872,10 +1908,10 @@ p.customize-section-description { .control-section .customize-section-text-before { padding: 0 0 8px 15px; - margin: 15px 0 0 0; + margin: 15px 0 0; line-height: 16px; - border-bottom: 1px solid #ddd; - color: #555d66; + border-bottom: 1px solid #dcdcde; + color: #50575e; } .control-panel-themes .customize-themes-section-title { @@ -1884,7 +1920,7 @@ p.customize-section-description { box-shadow: none; outline: none; border-top: none; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; border-left: 4px solid #fff; border-right: none; cursor: pointer; @@ -1893,12 +1929,12 @@ p.customize-section-description { text-align: left; font-size: 14px; font-weight: 600; - color: #555d66; + color: #50575e; text-shadow: none; } .control-panel-themes #accordion-section-installed_themes { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } .control-panel-themes .theme-section { @@ -1908,9 +1944,9 @@ p.customize-section-description { .control-panel-themes .customize-themes-section-title:focus, .control-panel-themes .customize-themes-section-title:hover { - border-left-color: #0073aa; - color: #0073aa; - background: #f5f5f5; + border-left-color: #2271b1; + color: #2271b1; + background: #f6f7f7; } .customize-themes-section-title:not(.selected):after { @@ -1922,7 +1958,7 @@ p.customize-section-description { width: 18px; height: 18px; border-radius: 100%; - border: 1px solid #ccc; + border: 1px solid #c3c4c7; background: #fff; } @@ -1937,12 +1973,12 @@ p.customize-section-description { position: absolute; top: 9px; right: 15px; - background: #0073aa; + background: #2271b1; color: #fff; } .control-panel-themes .customize-themes-section-title.selected { - color: #0073aa; + color: #2271b1; } #customize-theme-controls .themes.accordion-section-content { @@ -1976,7 +2012,7 @@ p.customize-section-description { .customize-control-theme .theme { width: 100%; margin: 0; - border: 1px solid #ddd; + border: 1px solid #dcdcde; background: #fff; } @@ -2053,11 +2089,11 @@ p.customize-section-description { left: 300px; width: calc(100% - 300px); height: 46px; - background: #eee; + background: #f0f0f1; z-index: 10; padding: 6px 25px; box-sizing: border-box; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } @media screen and (min-width: 1670px) { @@ -2093,7 +2129,7 @@ p.customize-section-description { position: relative; left: 0; width: 100%; - margin: 0 0 25px 0; + margin: 0 0 25px; } .filter-drawer { top: 46px; @@ -2178,8 +2214,8 @@ p.customize-section-description { position: fixed; top: 0; left: 0; - background: #eee; - color: #444; + background: #f0f0f1; + color: #3c434a; border-radius: 0; box-shadow: none; border: none; @@ -2188,7 +2224,7 @@ p.customize-section-description { z-index: 10; text-align: left; text-shadow: none; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; border-left: 4px solid transparent; margin: 0; padding: 0; @@ -2203,17 +2239,19 @@ p.customize-section-description { width: 26px; display: block; line-height: 2.3; - padding: 0 8px 0 8px; - border-right: 1px solid #ddd; + padding: 0 8px; + border-right: 1px solid #dcdcde; } .wp-customizer .showing-themes .control-panel-themes .customize-themes-mobile-back:hover, .wp-customizer .showing-themes .control-panel-themes .customize-themes-mobile-back:focus { - color: #0073aa; - background: #f3f3f5; - border-left-color: #0073aa; - outline: none; + color: #2271b1; + background: #f6f7f7; + border-left-color: #2271b1; box-shadow: none; + /* Only visible in Windows High Contrast mode */ + outline: 2px solid transparent; + outline-offset: -2px; } .showing-themes #customize-header-actions { @@ -2252,7 +2290,7 @@ p.customize-section-description { } .wp-customizer .theme-overlay .theme-backdrop { - background: rgba(238, 238, 238, 0.75); + background: rgba(240, 240, 241, 0.75); position: fixed; z-index: 110; } @@ -2277,8 +2315,8 @@ p.customize-section-description { .wp-customizer .theme-overlay .theme-actions { text-align: right; /* Because there're only one or two actions, match the UI pattern of media modals and right-align the action. */ padding: 10px 25px; - background: #eee; - border-top: 1px solid #ddd; + background: #f0f0f1; + border-top: 1px solid #dcdcde; } .wp-customizer .theme-overlay .theme-actions .theme-install.preview { @@ -2297,12 +2335,12 @@ p.customize-section-description { } .wp-customizer .theme-header { - background: #eee; + background: #f0f0f1; } .wp-customizer .theme-overlay .theme-header button, .wp-customizer .theme-overlay .theme-header .close:before { - color: #444; + color: #3c434a; } .wp-customizer .theme-overlay .theme-header .close:focus, @@ -2312,13 +2350,13 @@ p.customize-section-description { .wp-customizer .theme-overlay .theme-header .left:focus, .wp-customizer .theme-overlay .theme-header .left:hover { background: #fff; - border-bottom: 4px solid #0073aa; - color: #0073aa; + border-bottom: 4px solid #2271b1; + color: #2271b1; } .wp-customizer .theme-overlay .theme-header .close:focus:before, .wp-customizer .theme-overlay .theme-header .close:hover:before { - color: #0073aa; + color: #2271b1; } .wp-customizer .theme-overlay .theme-header button.disabled, @@ -2326,7 +2364,7 @@ p.customize-section-description { .wp-customizer .theme-overlay .theme-header button.disabled:focus { border-bottom: none; background: transparent; - color: #ccc; + color: #c3c4c7; } /* Small Screens */ @@ -2348,22 +2386,22 @@ body.cheatin { font-size: medium; height: auto; background: #fff; + border: 1px solid #c3c4c7; margin: 50px auto 2em; padding: 1em 2em; max-width: 700px; min-width: 0; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); } body.cheatin h1 { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; clear: both; - color: #555d66; + color: #50575e; font-size: 24px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - margin: 30px 0 0 0; - padding: 0; - padding-bottom: 7px; + margin: 30px 0 0; + padding: 0 0 7px; } body.cheatin p { @@ -2381,12 +2419,9 @@ body.cheatin p { #customize-theme-controls .add-new-menu-item { cursor: pointer; float: right; - margin: 0; - margin-left: 10px; + margin: 0 0 0 10px; transition: all 0.2s; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; outline: none; } @@ -2441,7 +2476,7 @@ body.cheatin p { display: block; width: 33px; /* was 42px for mobile */ height: 43px; - color: #82878c; + color: #8c8f94; text-indent: -9999px; cursor: pointer; outline: none; @@ -2474,8 +2509,8 @@ body.cheatin p { .widget-reorder-nav span:focus, .menu-item-reorder-nav button:hover, .menu-item-reorder-nav button:focus { - color: #191e23; - background: #eee; + color: #1d2327; + background: #f0f0f1; } .move-widget-down:before, @@ -2494,7 +2529,7 @@ body.cheatin p { .move-down-disabled .menus-move-down, .move-right-disabled .menus-move-right, .move-left-disabled .menus-move-left { - color: #d5d5d5; + color: #dcdcde; background-color: #fff; cursor: default; pointer-events: none; @@ -2515,9 +2550,9 @@ body.adding-widget .add-new-widget:hover, .adding-menu-items .add-new-menu-item:hover, .add-menu-toggle.open, .add-menu-toggle.open:hover { - background: #eee; - border-color: #929793; - color: #32373c; + background: #f0f0f1; + border-color: #8c8f94; + color: #2c3338; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); } @@ -2539,9 +2574,9 @@ body.adding-widget .add-new-widget:before, width: 300px; margin: 0; z-index: 4; - background: #eee; + background: #f0f0f1; transition: left .18s; - border-right: 1px solid #ddd; + border-right: 1px solid #dcdcde; } #available-widgets .customize-section-title, @@ -2555,7 +2590,7 @@ body.adding-widget .add-new-widget:before, overflow: auto; bottom: 0; width: 100%; - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } .no-widgets-found #available-widgets-list { @@ -2567,7 +2602,7 @@ body.adding-widget .add-new-widget:before, top: 0; z-index: 1; width: 300px; - background: #eee; + background: #f0f0f1; } /* search field container */ @@ -2600,7 +2635,7 @@ body.adding-widget .add-new-widget:before, height: 30px; line-height: 2.1; text-align: center; - color: #72777c; + color: #646970; } #available-widgets-filter .clear-results, @@ -2614,7 +2649,7 @@ body.adding-widget .add-new-widget:before, border: 0; cursor: pointer; background: none; - color: #a00; + color: #d63638; text-decoration: none; outline: 0; } @@ -2643,14 +2678,14 @@ body.adding-widget .add-new-widget:before, #available-widgets-filter .clear-results:focus, #available-menu-items-search .clear-results:hover, #available-menu-items-search .clear-results:focus { - color: #dc3232; + color: #d63638; } #available-widgets-filter .clear-results:focus, #available-menu-items-search .clear-results:focus { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } #available-menu-items-search .search-icon:after, @@ -2668,7 +2703,7 @@ body.adding-widget .add-new-widget:before, top: 7px; left: 26px; z-index: 1; - color: #72777c; + color: #646970; height: 30px; width: 30px; line-height: 2; @@ -2700,7 +2735,7 @@ body.adding-widget .add-new-widget:before, position: relative; padding: 15px 15px 15px 60px; background: #fff; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; border-left: 4px solid #fff; transition: .15s color ease-in-out, @@ -2814,15 +2849,16 @@ body.adding-widget .add-new-widget:before, position: absolute; top: 0; left: 48px; - line-height: 3.2; + line-height: 2.6; font-size: 14px; - padding: 0 12px; + padding: 0 12px 4px; margin: 0; height: 45px; - background: #eee; + background: #f0f0f1; border: 0; - border-right: 1px solid #ddd; - color: #555d66; + border-right: 1px solid #dcdcde; + border-top: 4px solid #f0f0f1; + color: #50575e; cursor: pointer; transition: color .1s ease-in-out, background .1s ease-in-out; } @@ -2897,7 +2933,7 @@ body.adding-widget .add-new-widget:before, padding: 9px 10px 12px 14px; margin: 0; line-height: 24px; - color: #555d66; + color: #50575e; display: block; overflow: hidden; white-space: nowrap; diff --git a/src/wp-admin/css/customize-nav-menus.css b/src/wp-admin/css/customize-nav-menus.css index 145938252e704..46ac3066efd1d 100644 --- a/src/wp-admin/css/customize-nav-menus.css +++ b/src/wp-admin/css/customize-nav-menus.css @@ -4,14 +4,14 @@ } #customize-theme-controls #accordion-section-menu_locations > .accordion-section-title { - border-bottom-color: #ddd; + border-bottom-color: #dcdcde; margin-top: 15px; } #customize-theme-controls .customize-section-title-nav_menus-heading, #customize-theme-controls .customize-section-title-menu_locations-heading, #customize-theme-controls .customize-section-title-menu_locations-description { - padding: 0 12px 0 12px; + padding: 0 12px; } #customize-theme-controls .customize-control-description.customize-section-title-menu_locations-description { @@ -29,7 +29,7 @@ #customize-controls .theme-location-set, #customize-controls .control-section .accordion-section-title:focus .menu-in-location, #customize-controls .control-section .accordion-section-title:hover .menu-in-location { - color: #555; + color: #50575e; } /* The `edit-menu` and `create-menu` buttons also use the `button-link` class. */ @@ -65,6 +65,7 @@ .wp-customizer .menu-item-bar .menu-item-handle { width: 100%; + max-width: 100%; background: #fff; } @@ -83,7 +84,7 @@ } .customize-control-nav_menu_item.has-notifications .menu-item-handle { - border-left: 4px solid #00a0d2; + border-left: 4px solid #72aee6; } .wp-customizer .menu-item-settings { @@ -91,15 +92,15 @@ overflow: hidden; z-index: 8; padding: 10px; - background: #eee; - border: 1px solid #999; + background: #f0f0f1; + border: 1px solid #8c8f94; border-top: none; } .wp-customizer .menu-item-settings .description-thin { width: 100%; height: auto; - margin: 0 0 8px 0; + margin: 0 0 8px; } .wp-customizer .menu-item-settings input[type="text"] { @@ -184,7 +185,7 @@ } .wp-customizer .menu-settings dl { - margin: 12px 0 0 0; + margin: 12px 0 0; padding: 0; } @@ -193,7 +194,7 @@ } .wp-customizer .menu-settings .menu-theme-locations { - border-top: 1px solid #ccc; + border-top: 1px solid #c3c4c7; } .wp-customizer .menu-settings { @@ -208,7 +209,7 @@ .wp-customizer .control-section-nav_menu .menu-location-settings { margin-top: 24px; - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } .wp-customizer .control-section-nav_menu .menu-location-settings, @@ -233,14 +234,14 @@ } #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle { - color: #555; + color: #50575e; } /* Screen Options */ .customize-screen-options-toggle { background: none; border: none; - color: #555; + color: #50575e; cursor: pointer; margin: 0; padding: 20px; @@ -264,12 +265,13 @@ #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover, #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active, #customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus { - color: #0073aa; + color: #2271b1; } .customize-screen-options-toggle:focus, #customize-controls .customize-info .customize-help-toggle:focus { - outline: none; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } .customize-screen-options-toggle:before { @@ -295,7 +297,7 @@ .wp-customizer #screen-options-wrap { display: none; background: #fff; - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; padding: 4px 15px 15px; } @@ -320,10 +322,10 @@ #available-menu-items .accordion-section-title .toggle-indicator:before { content: "\f140"; display: block; - padding: 1px 2px 1px 0px; - speak: none; + padding: 1px 2px 1px 0; + speak: never; border-radius: 50%; - color: #72777c; + color: #787c82; font: normal 20px/1 dashicons; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -429,7 +431,7 @@ max-width: calc(100% - 2px); float: left; display: list-item; - border-color: #a0a5aa; + border-color: #a7aaad; } .menu-item-transport li.customize-control { @@ -454,7 +456,7 @@ } .menu-item-bar .item-delete { - color: #a00; + color: #d63638; position: absolute; top: 2px; right: -19px; @@ -475,15 +477,11 @@ -moz-osx-font-smoothing: grayscale; } -.ie8 .menu-item-bar .item-delete:before { - top: -10px; -} - .menu-item-bar .item-delete:hover, .menu-item-bar .item-delete:focus { box-shadow: none; outline: none; - color: #dc3232; + color: #d63638; } .adding-menu-items .menu-item-bar .item-edit { @@ -514,14 +512,12 @@ transition: background-color 0.15s; /* Reset the value inherited from the base .accordion-section-title style. Ticket #37589. */ -webkit-user-select: auto; - -moz-user-select: auto; - -ms-user-select: auto; user-select: auto; } #available-menu-items .open .accordion-section-title, #available-menu-items #available-menu-items-search .accordion-section-title { - background: #eee; + background: #f0f0f1; } /* rework the arrow indicator implementation for NVDA bug see #32715 */ @@ -532,12 +528,12 @@ #available-menu-items .accordion-section-title:hover .toggle-indicator:before, #available-menu-items .button-link:hover .toggle-indicator:before, #available-menu-items .button-link:focus .toggle-indicator:before { - color: #23282d; + color: #1d2327; } #available-menu-items .open .accordion-section-title .toggle-indicator:before { content: "\f142"; - color: #23282d; + color: #1d2327; } #available-menu-items .available-menu-items-list { @@ -571,7 +567,7 @@ #available-menu-items .cannot-expand .accordion-section-title .no-items { float: right; - color: #555d66; + color: #50575e; font-weight: 400; margin-left: 5px; } @@ -585,8 +581,8 @@ } #available-menu-items .accordion-section-content .available-menu-items-list { - margin: 0 0 45px 0; - padding: 1px 15px 15px 15px; + margin: 0 0 45px; + padding: 1px 15px 15px; } #available-menu-items .accordion-section-content .available-menu-items-list:only-child { /* Types that do not support new items for the current user */ @@ -594,7 +590,7 @@ } #new-custom-menu-item .accordion-section-content { - padding: 0 15px 15px 15px; + padding: 0 15px 15px; } #available-menu-items .menu-item-tpl { @@ -608,7 +604,7 @@ .menu-name-field.invalid:focus, #available-menu-items .new-content-item .create-item-input.invalid, #available-menu-items .new-content-item .create-item-input.invalid:focus { - border: 1px solid #dc3232; + border: 1px solid #d63638; } #available-menu-items .menu-item-handle .item-type { @@ -641,7 +637,7 @@ position: absolute; top: 1px; left: 1px; - color: #82878c; + color: #8c8f94; width: 30px; height: 38px; box-shadow: none; @@ -651,7 +647,7 @@ } #available-menu-items .menu-item-handle .item-add:focus { - color: #23282d; + color: #1d2327; } #available-menu-items .item-add:before { @@ -669,7 +665,7 @@ #available-menu-items .menu-item-handle.item-added .item-title, #available-menu-items .menu-item-handle.item-added:hover .item-add, #available-menu-items .menu-item-handle.item-added .item-add:focus { - color: #82878c; + color: #8c8f94; } #available-menu-items .menu-item-handle.item-added .item-add:before { @@ -694,7 +690,7 @@ position: absolute; left: 0; top: 60px; /* below title div / search input */ - bottom: 0px; /* 100% height that still triggers lazy load */ + bottom: 0; /* 100% height that still triggers lazy load */ max-height: none; width: 100%; padding: 1px 15px 15px; @@ -764,7 +760,7 @@ body.adding-menu-items #customize-preview iframe { cursor: default; opacity: .5; background: #fff; - color: #727773; + color: #787c82; } .added-menu-item .menu-item-handle { @@ -776,7 +772,7 @@ body.adding-menu-items #customize-preview iframe { /* Add/delete Menus */ #customize-theme-controls .control-panel-content .control-section-nav_menu:nth-last-child(2) .accordion-section-title { - border-bottom-color: #ddd; + border-bottom-color: #dcdcde; } /* @todo update selector */ @@ -799,7 +795,7 @@ body.adding-menu-items #customize-preview iframe { #create-new-menu-submit { float: right; - margin: 0 0 12px 0; + margin: 0 0 12px; } .menu-delete-item { @@ -809,7 +805,7 @@ body.adding-menu-items #customize-preview iframe { } .assigned-menu-locations-title p { - margin: 0 0 8px 0; + margin: 0 0 8px; } li.assigned-to-menu-location .menu-delete-item { @@ -830,17 +826,17 @@ li.assigned-to-menu-location .add-new-menu-item { .menu-item-handle:hover { position: relative; z-index: 10; - color: #0073aa; + color: #2271b1; } .menu-item-handle:hover .item-type, .menu-item-handle:hover .item-edit, #available-menu-items .menu-item-handle:hover .item-add { - color: #0073aa; + color: #2271b1; } .menu-item-edit-active .menu-item-handle { - border-color: #999; + border-color: #8c8f94; border-bottom: none; } @@ -869,8 +865,8 @@ li.assigned-to-menu-location .add-new-menu-item { .menu-item-bar .item-delete:focus:before, #available-menu-items .item-add:focus:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } diff --git a/src/wp-admin/css/customize-widgets.css b/src/wp-admin/css/customize-widgets.css index 2b9c254823e47..3bd7a46b28e33 100644 --- a/src/wp-admin/css/customize-widgets.css +++ b/src/wp-admin/css/customize-widgets.css @@ -25,12 +25,12 @@ } .customize-control .widget-action { - color: #72777c; + color: #787c82; } .customize-control .widget-top:hover .widget-action, .customize-control .widget-action:focus { - color: #23282d; + color: #1d2327; } .customize-control-widget_form:not(.widget-rendered) .widget-top { @@ -53,9 +53,7 @@ .customize-control-widget_form.widget-form-disabled .widget-content { opacity: 0.7; pointer-events: none; - -moz-user-select: none; -webkit-user-select: none; - -ms-user-select: none; user-select: none; } @@ -67,7 +65,7 @@ position: fixed; left: 299px; top: 25%; - border: 1px solid rgb(229, 229, 229); + border: 1px solid #dcdcde; overflow: auto; } .customize-control-widget_form.wide-widget-control .widget-inside > .form { @@ -79,11 +77,11 @@ } .customize-control-widget_form.wide-widget-control.expanding .widget-top, .customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top { - background-color: rgb(227, 227, 227); + background-color: #dcdcde; } .widget-inside { - padding: 1px 10px 10px 10px; + padding: 1px 10px 10px; border-top: none; line-height: 1.23076923; } @@ -112,7 +110,7 @@ .control-section.accordion-section.highlighted > .accordion-section-title, .customize-control-widget_form.highlighted { outline: none; - box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); + box-shadow: 0 0 2px rgba(79, 148, 212, 0.8); position: relative; z-index: 1; } @@ -128,7 +126,7 @@ #customize-theme-controls .widget-reorder-nav { display: none; float: right; - background-color: #fafafa; + background-color: #f6f7f7; } .move-widget:before { @@ -138,7 +136,7 @@ #customize-theme-controls .move-widget-area { display: none; background: #fff; - border: 1px solid #ddd; + border: 1px solid #c3c4c7; border-top: none; cursor: auto; } @@ -163,12 +161,10 @@ position: relative; margin: 0; padding: 13px 15px 15px 42px; - color: #555; - border-top: 1px solid #eee; + color: #50575e; + border-top: 1px solid #c3c4c7; cursor: pointer; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -184,13 +180,12 @@ } #customize-theme-controls .widget-area-select li:last-child { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #c3c4c7; } #customize-theme-controls .widget-area-select .selected { color: #fff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); - background: #00a0d2; + background: #2271b1; } #customize-theme-controls .widget-area-select .selected:before { @@ -246,10 +241,10 @@ #available-widgets .widget-tpl:hover, #available-widgets .widget-tpl.selected { - background: #f3f3f5; - border-bottom-color: #ccc; - color: #0073aa; - border-left: 4px solid #0073aa; + background: #f6f7f7; + border-bottom-color: #c3c4c7; + color: #2271b1; + border-left: 4px solid #2271b1; } #customize-controls .widget-title h3 { @@ -263,7 +258,7 @@ #available-widgets .widget .widget-description { padding: 0; - color: #72777c; + color: #646970; } #customize-preview { @@ -302,7 +297,7 @@ body.adding-widget #customize-preview { margin-right: 20px; width: 20px; height: 20px; - color: #32373c; + color: #2c3338; font: normal 20px/1 dashicons; text-align: center; box-sizing: border-box; diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 2784b804d0d7a..1f42793ac1dba 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -38,24 +38,6 @@ border: none !important; } -.ie8 #wpbody-content #dashboard-widgets .postbox-container { - width: 49.5%; -} - -.ie8 #wpbody-content #dashboard-widgets #postbox-container-2, -.ie8 #wpbody-content #dashboard-widgets #postbox-container-3, -.ie8 #wpbody-content #dashboard-widgets #postbox-container-4 { - float: right; - width: 50.5%; -} - -.ie8 #dashboard-widgets #postbox-container-3 .empty-container, -.ie8 #dashboard-widgets #postbox-container-4 .empty-container { - border: 0 none; - height: 0; - min-height: 0; -} - #dashboard-widgets-wrap { overflow: hidden; margin: 0 -8px; @@ -66,10 +48,41 @@ } #dashboard-widgets .meta-box-sortables { - margin: 0 8px; + display: flow-root; /* avoid margin collapsing between parent and first/last child elements */ + /* Required min-height to make the jQuery UI Sortable drop zone work. */ min-height: 100px; + margin: 0 8px 20px; +} + +#dashboard-widgets .postbox-container .empty-container { + outline: 3px dashed #c3c4c7; + height: 250px; } +/* Only highlight drop zones when dragging and only in the 2 columns layout. */ +.is-dragging-metaboxes #dashboard-widgets .meta-box-sortables { + outline: 3px dashed #646970; + /* Prevent margin on the child from collapsing with margin on the parent. */ + display: flow-root; +} + +#dashboard-widgets .postbox-container .empty-container:after { + content: attr(data-emptystring); + margin: auto; + position: absolute; + top: 50%; + left: 0; + right: 0; + transform: translateY( -50% ); + padding: 0 2em; + text-align: center; + color: #646970; + font-size: 16px; + line-height: 1.5; + display: none; +} + + /* @todo: this was originally in this section, but likely belongs elsewhere */ #the-comment-list td.comment p.comment-author { margin-top: 0; @@ -103,7 +116,7 @@ overflow: auto; margin: 16px 0; padding: 23px 10px 0; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; font-size: 13px; @@ -127,7 +140,7 @@ } .welcome-panel p { - color: #72777c; + color: #646970; } .welcome-panel li a { @@ -180,10 +193,6 @@ float: left; } -.ie8 .welcome-panel .welcome-panel-column { - min-width: 230px; -} - .welcome-panel .welcome-panel-column:first-child { width: 36%; } @@ -194,7 +203,7 @@ .welcome-panel-column p { margin-top: 7px; - color: #444; + color: #3c434a; } .welcome-panel .welcome-widgets-menus { @@ -219,10 +228,11 @@ .welcome-panel .welcome-icon:before, #dashboard_right_now li a:before, -#dashboard_right_now li span:before { - color: #606a73; +#dashboard_right_now li span:before, +#dashboard_right_now .search-engines-info:before { + color: #646970; font: normal 20px/1 dashicons; - speak: none; + speak: never; display: inline-block; padding: 0 10px 0 0; position: relative; @@ -282,6 +292,7 @@ /* Right Now specific Icons styles */ +#dashboard_right_now .search-engines-info:before, #dashboard_right_now li a:before, #dashboard_right_now li > span:before { /* get only the first level span to exclude screen-reader-text in mu-storage */ content: "\f159"; /* generic icon for items added by CPTs ? */ @@ -314,6 +325,10 @@ content: "\f153"; } +#dashboard_right_now .search-engines-info:before { + content: "\f348"; +} + /* Dashboard WordPress events */ .community-events-errors { @@ -339,7 +354,7 @@ .community-events-errors [aria-hidden="true"], .community-events-loading[aria-hidden="true"], .community-events[aria-hidden="true"], -.community-events [aria-hidden="true"] { +.community-events form[aria-hidden="true"] { display: none; } @@ -361,7 +376,11 @@ } .community-events li.event-none { - border-left: 4px solid #00a0d2; + border-left: 4px solid #72aee6; +} + +#dashboard-widgets .community-events li.event-none a { + text-decoration: underline; } .community-events-form label { @@ -395,7 +414,7 @@ } .community-events ul { - background-color: #fafafa; + background-color: #f6f7f7; padding-left: 0; padding-right: 0; padding-bottom: 0; @@ -404,18 +423,18 @@ .community-events li { margin: 0; padding: 8px 12px; - color: #32373c; + color: #2c3338; } .community-events li:first-child { - border-top: 1px solid #eee; + border-top: 1px solid #f0f0f1; } .community-events li ~ li { - border-top: 1px solid #eee; + border-top: 1px solid #f0f0f1; } .community-events .activity-block.last { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #f0f0f1; padding-top: 0; margin-top: -1px; } @@ -432,7 +451,7 @@ } .event-icon:before { - color: #606a73; + color: #646970; font-size: 18px; } .event-meetup .event-icon:before { @@ -456,8 +475,8 @@ margin-top: 0; margin-bottom: 0; padding: 12px; - border-top: 1px solid #eee; - color: #ddd; + border-top: 1px solid #f0f0f1; + color: #dcdcde; } /* Safari 10 + VoiceOver specific: without this, the hidden text gets read out before the link. */ @@ -493,13 +512,13 @@ body #dashboard-widgets .postbox form .submit { } .rssSummary { - color: #72777c; + color: #646970; margin-top: 4px; } #dashboard_primary .rss-widget { font-size: 13px; - padding: 0 12px 0; + padding: 0 12px; } #dashboard_primary .rss-widget:last-child { @@ -513,7 +532,7 @@ body #dashboard-widgets .postbox form .submit { #dashboard_primary .rss-widget span, #dashboard_primary .rss-widget span.rss-date { - color: #72777c; + color: #646970; } #dashboard_primary .rss-widget span.rss-date { @@ -559,6 +578,10 @@ body #dashboard-widgets .postbox form .submit { margin-left: 5px; } +#dashboard_right_now p.search-engines-info { + margin: 1em 0; +} + .mu-storage { overflow: hidden; } @@ -573,14 +596,14 @@ body #dashboard-widgets .postbox form .submit { /* Dashboard right now - Colors */ #dashboard_right_now .sub { - color: #555d66; - background: #f5f5f5; - border-top: 1px solid #eee; - padding: 10px 12px 6px 12px; + color: #50575e; + background: #f6f7f7; + border-top: 1px solid #f0f0f1; + padding: 10px 12px 6px; } #dashboard_right_now .sub h3 { - color: #555; + color: #50575e; } #dashboard_right_now .sub p { @@ -589,7 +612,7 @@ body #dashboard-widgets .postbox form .submit { #dashboard_right_now .warning a:before, #dashboard_right_now .warning span:before { - color: #d54e21; + color: #d63638; } /* Dashboard Quick Draft */ @@ -601,7 +624,7 @@ body #dashboard-widgets .postbox form .submit { #dashboard_quick_press div.updated { margin-bottom: 10px; - border: 1px solid #eee; + border: 1px solid #f0f0f1; border-width: 1px 1px 1px 0; } @@ -646,7 +669,7 @@ body #dashboard-widgets .postbox form .submit { /* Dashboard Quick Draft - Drafts list */ .js #dashboard_quick_press .drafts { - border-top: 1px solid #eee; + border-top: 1px solid #f0f0f1; } #dashboard_quick_press .drafts abbr { @@ -670,7 +693,7 @@ body #dashboard-widgets .postbox form .submit { margin-bottom: 1em; } #dashboard_quick_press .drafts li time { - color: #72777c; + color: #646970; } #dashboard_quick_press .drafts p { @@ -696,7 +719,7 @@ body #dashboard-widgets .postbox form .submit { padding: 0; font-size: 14px; font-weight: 400; - color: #23282d; + color: #1d2327; } #dashboard_quick_press .drafts h2 { @@ -733,20 +756,20 @@ body #dashboard-widgets .postbox form .submit { } #dashboard_activity .no-activity p { - color: #72777c; + color: #646970; font-size: 16px; } #dashboard_activity .subsubsub { float: none; - border-top: 1px solid #eee; + border-top: 1px solid #f0f0f1; margin: 0 -12px; padding: 8px 12px 4px; } #dashboard_activity .subsubsub a .count, #dashboard_activity .subsubsub a.current .count { - color: #72777c; /* white background on the dashboard but #f1f1f1 on list tables */ + color: #646970; /* white background on the dashboard but #f0f0f1 on list tables */ } #future-posts ul, @@ -765,11 +788,11 @@ body #dashboard-widgets .postbox form .submit { display: inline-block; margin-right: 5px; min-width: 150px; - color: #72777c; + color: #646970; } .activity-block { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #f0f0f1; margin: 0 -12px; padding: 8px 12px 4px; } @@ -779,7 +802,7 @@ body #dashboard-widgets .postbox form .submit { } .activity-block .subsubsub li { - color: #ddd; + color: #dcdcde; } /* Dashboard activity widget - Comments */ @@ -793,7 +816,7 @@ body #dashboard-widgets .postbox form .submit { } #activity-widget #the-comment-list .comment-item { - background: #fafafa; + background: #f6f7f7; padding: 12px; position: relative; } @@ -812,15 +835,15 @@ body #dashboard-widgets .postbox form .submit { } #activity-widget #the-comment-list .comment-item p.row-actions { - margin: 4px 0 0 0; + margin: 4px 0 0; } #activity-widget #the-comment-list .comment-item:first-child { - border-top: 1px solid #eeeeee; + border-top: 1px solid #f0f0f1; } #activity-widget #the-comment-list .unapproved { - background-color: #fef7f1; + background-color: #fcf9e8; } #activity-widget #the-comment-list .unapproved:before { @@ -830,7 +853,7 @@ body #dashboard-widgets .postbox form .submit { left: 0; top: 0; bottom: 0; - background: #d54e21; + background: #d63638; width: 4px; } @@ -932,7 +955,7 @@ body #dashboard-widgets .postbox form .submit { #latest-comments #the-comment-list .comment-meta { line-height: 1.5; margin: 0; - color: #666; + color: #646970; } #latest-comments #the-comment-list .comment-meta cite { @@ -972,7 +995,7 @@ a.rsswidget { } .rss-widget span.rss-date { - color: #72777c; + color: #646970; font-size: 13px; margin-left: 3px; } @@ -1003,33 +1026,23 @@ a.rsswidget { } #dashboard_browser_nag p.browser-update-nag.has-browser-icon { - padding-right: 125px; + padding-right: 128px; } #dashboard_browser_nag .browser-icon { - margin-top: -35px; -} - -#dashboard_browser_nag.postbox.browser-insecure { - background-color: #ac1b1b; - border-color: #ac1b1b; + margin-top: -32px; } #dashboard_browser_nag.postbox { - background-color: #e29808; + background-color: #b32d2e; background-image: none; - border-color: #edc048; + border-color: #b32d2e; color: #fff; box-shadow: none; } -#dashboard_browser_nag.postbox.browser-insecure h2 { - border-bottom-color: #cd5a5a; - color: #fff; -} - #dashboard_browser_nag.postbox h2 { - border-bottom-color: #f6e2ac; + border-bottom-color: transparent; background: transparent none; color: #fff; box-shadow: none; @@ -1039,6 +1052,10 @@ a.rsswidget { color: #fff; } +#dashboard_browser_nag.postbox .postbox-header { + border-color: transparent; +} + #dashboard_browser_nag h2.hndle { border: none; font-weight: 600; @@ -1058,12 +1075,16 @@ a.rsswidget { /* PHP Nag */ #dashboard_php_nag .dashicons-warning { - color: #ffb900; + color: #dba617; padding-right: 6px; } #dashboard_php_nag.php-insecure .dashicons-warning { - color: #df3232; + color: #d63638; +} + +#dashboard_php_nag h2 { + display: inline-block; } #dashboard_php_nag p { @@ -1086,6 +1107,18 @@ a.rsswidget { #wpbody-content #dashboard-widgets .postbox-container { width: 100%; } + + #dashboard-widgets .meta-box-sortables { + min-height: 0; + } + + .is-dragging-metaboxes #dashboard-widgets .meta-box-sortables { + min-height: 100px; + } + + #dashboard-widgets .meta-box-sortables.empty-container { + margin-bottom: 0; + } } /* two columns on the dash, but keep the setting if one is selected */ @@ -1103,9 +1136,10 @@ a.rsswidget { #dashboard-widgets #postbox-container-3 .empty-container, #dashboard-widgets #postbox-container-4 .empty-container { - border: 0 none; + outline: none; height: 0; min-height: 0; + margin-bottom: 0; } #dashboard-widgets #postbox-container-3 .empty-container:after, @@ -1117,10 +1151,11 @@ a.rsswidget { width: 100%; } - #wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container { - border: 0 none; + #wpbody #dashboard-widgets .metabox-holder.columns-1 .postbox-container .empty-container { + outline: none; height: 0; min-height: 0; + margin-bottom: 0; } /* show the radio buttons for column prefs only for one or two columns */ @@ -1134,7 +1169,7 @@ a.rsswidget { display: none; } - .metabox-holder .postbox-container .empty-container:after { + #dashboard-widgets .postbox-container .empty-container:after { display: block; } } @@ -1155,16 +1190,24 @@ a.rsswidget { } #dashboard-widgets #postbox-container-4 .empty-container { - border: 0 none; + outline: none; height: 0; min-height: 0; + margin-bottom: 0; } #dashboard-widgets #postbox-container-4 .empty-container:after { display: none; } - .metabox-holder .postbox-container .empty-container:after { + #dashboard-widgets .postbox-container .empty-container:after { + display: block; + } +} + +/* Always show the "Drag boxes here" CSS generated content on large screens. */ +@media only screen and (min-width: 1801px) { + #dashboard-widgets .postbox-container .empty-container:after { display: block; } } diff --git a/src/wp-admin/css/deprecated-media.css b/src/wp-admin/css/deprecated-media.css index 22d7a9f56bee1..359fc59e3c3b5 100644 --- a/src/wp-admin/css/deprecated-media.css +++ b/src/wp-admin/css/deprecated-media.css @@ -5,8 +5,8 @@ div#media-upload-header { padding: 5px 5px 0; font-weight: 600; position: relative; - border-bottom: 1px solid #ddd; - background: #f9f9f9; + border-bottom: 1px solid #dcdcde; + background: #f6f7f7; } #sidemenu { @@ -27,9 +27,9 @@ div#media-upload-header { display: block; float: left; line-height: 28px; - border-top: 1px solid #f9f9f9; - border-bottom: 1px solid #ddd; - background-color: #f9f9f9; + border-top: 1px solid #f6f7f7; + border-bottom: 1px solid #dcdcde; + background-color: #f6f7f7; text-decoration: none; transition: none; } @@ -48,9 +48,9 @@ div#media-upload-header { font-weight: 400; padding-left: 6px; padding-right: 6px; - border: 1px solid #ddd; - border-bottom-color: #f1f1f1; - background-color: #f1f1f1; + border: 1px solid #dcdcde; + border-bottom-color: #f0f0f1; + background-color: #f0f0f1; color: #000; } @@ -61,7 +61,7 @@ div#media-upload-header { } #media-upload .slidetoggle { - border-top-color: #ddd; + border-top-color: #dcdcde; } #media-upload input[type="radio"] { @@ -70,7 +70,7 @@ div#media-upload-header { .media-upload-form label.form-help, td.help { - color: #72777c; + color: #646970; } form { @@ -100,7 +100,7 @@ th { width: 100%; border: none; text-align: justify; - margin: 0 0 1em 0; + margin: 0 0 1em; padding: 0; } @@ -218,8 +218,8 @@ span.required { #media-upload .tablenav-pages a { min-width: 17px; - border: 1px solid #ccc; - background: #f7f7f7; + border: 1px solid #c3c4c7; + background: #f6f7f7; } #filter .tablenav select { @@ -242,7 +242,7 @@ span.required { } .menu_order_input { - border: 1px solid #ddd; + border: 1px solid #dcdcde; font-size: 10px; padding: 1px; width: 23px; @@ -250,7 +250,7 @@ span.required { .ui-sortable-helper { background-color: #fff; - border: 1px solid #a0a5aa; + border: 1px solid #a7aaad; opacity: 0.6; filter: alpha(opacity=60); } @@ -291,7 +291,7 @@ span.required { clear: both; padding: 0 0 3px; font-size: 1.6em; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } h3.media-title { @@ -299,7 +299,7 @@ h3.media-title { } h4.media-sub-title { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; font-size: 1.3em; margin: 12px; padding: 0 0 3px; @@ -310,7 +310,7 @@ h3.media-title, h4.media-sub-title { font-family: Georgia,"Times New Roman",Times,serif; font-weight: 400; - color: #5A5A5A; + color: #50575e; } #gallery-settings .describe td { @@ -343,7 +343,7 @@ h4.media-sub-title { #gallery-settings label, #gallery-settings legend { font-size: 13px; - color: #444; + color: #3c434a; margin-right: 15px; } @@ -352,7 +352,7 @@ h4.media-sub-title { } #gallery-settings p.ml-submit { - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; } #gallery-settings select#columns { diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 1c2b3336ca242..44a444b7140c6 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -68,7 +68,7 @@ } #titlediv #title-prompt-text { - color: #72777c; + color: #646970; position: absolute; font-size: 1.7em; padding: 10px; @@ -77,7 +77,7 @@ input#link_description, input#link_url { - width: 98%; + width: 100%; } #pending { @@ -94,7 +94,7 @@ input#link_url { min-height: 25px; margin-top: 5px; padding: 0 10px; - color: #666; + color: #646970; } #edit-slug-box .cancel { @@ -147,14 +147,26 @@ body.post-new-php .submitbox .submitdelete { } /* Post Screen */ -#post-body #normal-sortables { - min-height: 50px; + +/* Only highlight drop zones when dragging and only in the 2 columns layout. */ +.is-dragging-metaboxes .metabox-holder .postbox-container .meta-box-sortables { + outline: 3px dashed #646970; + /* Prevent margin on the child from collapsing with margin on the parent. */ + display: flow-root; + /* + * This min-height is meant to limit jumpiness while dragging. It's equivalent + * to the minimum height of the sortable-placeholder which is given by the height + * of a collapsed post box (36px + 1px top and bottom borders) + the placeholder + * bottom margin (20px) + 2 additional pixels to compensate browsers rounding. + */ + min-height: 60px; + margin-bottom: 20px; } .postbox { position: relative; min-width: 255px; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; } @@ -206,7 +218,7 @@ ul.category-tabs li, .wp-tab-bar .wp-tab-active a, #post-body ul.category-tabs li.tabs a, #post-body ul.add-menu-item-tabs li.tabs a { - color: #32373c; + color: #2c3338; } .category-tabs { @@ -258,9 +270,9 @@ ul.add-menu-item-tabs li { ul.category-tabs li.tabs, ul.add-menu-item-tabs li.tabs, .wp-tab-active { - border: 1px solid #ddd; - border-bottom-color: #fdfdfd; - background-color: #fdfdfd; + border: 1px solid #dcdcde; + border-bottom-color: #fff; + background-color: #fff; } ul.category-tabs li, @@ -279,7 +291,7 @@ ul.wp-tab-bar li { height: auto; width: auto; vertical-align: top; - background-image: linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4); + background-image: linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7), linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7); background-position: 0 0, 10px 10px; background-size: 20px 20px; } @@ -310,9 +322,9 @@ form#tags-filter { #post-status-info { width: 100%; border-spacing: 0; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-top: none; - background-color: #f7f7f7; + background-color: #f6f7f7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); z-index: 999; } @@ -351,7 +363,6 @@ form#tags-filter { } #wp-word-count { - display: block; padding: 2px 10px; } @@ -361,7 +372,7 @@ form#tags-filter { .wp-editor-expand #wp-content-editor-tools { z-index: 1000; - border-bottom: 1px solid #ccd0d4; + border-bottom: 1px solid #c3c4c7; } .wp-editor-expand #wp-content-editor-container { @@ -378,7 +389,7 @@ form#tags-filter { } .wp-editor-expand #post-status-info { - border-top: 1px solid #ccd0d4; + border-top: 1px solid #c3c4c7; } .wp-editor-expand div.mce-toolbar-grp { @@ -410,7 +421,7 @@ form#tags-filter { /* End TinyMCE native fullscreen mode override */ #wp-content-editor-tools { - background-color: #f1f1f1; + background-color: #f0f0f1; padding-top: 20px; } @@ -439,7 +450,7 @@ form#tags-filter { } .curtime #timestamp { - padding: 2px 0 1px 0; + padding: 2px 0 1px; display: inline !important; height: auto !important; } @@ -447,20 +458,24 @@ form#tags-filter { #post-body .misc-pub-post-status:before, #post-body #visibility:before, .curtime #timestamp:before, +#post-body .misc-pub-uploadedby:before, +#post-body .misc-pub-uploadedto:before, #post-body .misc-pub-revisions:before, #post-body .misc-pub-response-to:before, #post-body .misc-pub-comment-status:before { - color: #82878c; + color: #8c8f94; } #post-body .misc-pub-post-status:before, #post-body #visibility:before, .curtime #timestamp:before, +#post-body .misc-pub-uploadedby:before, +#post-body .misc-pub-uploadedto:before, #post-body .misc-pub-revisions:before, #post-body .misc-pub-response-to:before, #post-body .misc-pub-comment-status:before { font: normal 20px/1 dashicons; - speak: none; + speak: never; display: inline-block; margin-left: -1px; padding-right: 3px; @@ -484,6 +499,18 @@ form#tags-filter { top: -1px; } +#post-body .misc-pub-uploadedby:before { + content: "\f110"; + position: relative; + top: -1px; +} + +#post-body .misc-pub-uploadedto:before { + content: "\f318"; + position: relative; + top: -1px; +} + #post-body .misc-pub-revisions:before { content: "\f321"; } @@ -619,11 +646,16 @@ form#tags-filter { } #poststuff .stuffbox > h2 { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #f0f0f1; } #poststuff .inside { - margin: 6px 0 0 0; + margin: 6px 0 0; +} + +.link-php #poststuff .inside, +.link-add-php #poststuff .inside { + margin-top: 12px; } #poststuff .stuffbox .inside { @@ -635,11 +667,6 @@ form#tags-filter { max-width: 100%; } -.ie8 #poststuff .inside #parent_id, -.ie8 #poststuff .inside #page_template { - width: 250px; -} - .post-attributes-label-wrapper { margin-bottom: 0.5em; } @@ -672,145 +699,345 @@ form#tags-filter { min-height: 1.6923em; } -/* Suggested text for privacy policy */ -.wp-privacy-policy-guide { - max-width: 1000px; +/** +* Privacy Settings section +* +* Note: This section includes selectors from +* Site Health where duplicate styling is used. +*/ + +/* General */ +.privacy-settings #wpcontent, +.privacy-settings.auto-fold #wpcontent, +.site-health #wpcontent, +.site-health.auto-fold #wpcontent { + padding-left: 0; +} + +/* Emulates .wrap h1 styling */ +.privacy-settings-header h1, +.health-check-header h1 { + display: inline-block; + font-weight: 600; + margin: 0 0.8rem 1rem; + font-size: 23px; + padding: 9px 0 4px; + line-height: 1.3; } -.privacy-text-box { - width: calc(100% - 260px); +/* Header */ +.privacy-settings-header, +.health-check-header { + text-align: center; + margin: 0 0 1rem; + background: #fff; + border-bottom: 1px solid #dcdcde; } -.privacy-text-box-toc { - float: right; - width: 250px; - background-color: #fff; +.privacy-settings-title-section, +.health-check-title-section { + display: flex; + align-items: center; + justify-content: center; + clear: both; + padding-top: 8px; } -.privacy-text-box-toc p { - margin: 0; - padding: 0.7em 1em; - border-bottom: 1px solid #eee; +.privacy-settings-tabs-wrapper { + /* IE 11 */ + display: -ms-inline-grid; + -ms-grid-columns: 1fr 1fr; + vertical-align: top; + /* modern browsers */ + display: inline-grid; + grid-template-columns: 1fr 1fr; } -.privacy-text-box-toc ol { - margin-left: 2em; +.privacy-settings-tab { + display: block; /* IE 11 */ + text-decoration: none; + color: inherit; + padding: 0.5rem 1rem 1rem; + margin: 0 1rem; + transition: box-shadow 0.5s ease-in-out; } -.wp-privacy-policy-guide h3 { - font-size: 1.2em; - margin: 1em 0 0.5em; +.privacy-settings-tab:nth-child(1), +.health-check-tab:nth-child(1) { + -ms-grid-column: 1; /* IE 11 */ } -.privacy-text-section .privacy-text-copy { - float: right; +.privacy-settings-tab:nth-child(2), +.health-check-tab:nth-child(2) { + -ms-grid-column: 2; /* IE 11 */ } -.privacy-text-section { +.privacy-settings-tab:focus, +.health-check-tab:focus { + color: #1d2327; + outline: 1px solid #787c82; + box-shadow: none; +} + +.privacy-settings-tab.active, +.health-check-tab.active { + box-shadow: inset 0 -3px #3582c4; + font-weight: 600; +} + +/* Body */ +.privacy-settings-body, +.health-check-body { + max-width: 800px; + margin: 0 auto; +} + +.tools-privacy-policy-page th { + min-width: 230px; +} + +.hr-separator { + margin-top: 20px; + margin-bottom: 15px; +} + +/* Accordions */ +.privacy-settings-accordion, +.health-check-accordion { + border: 1px solid #c3c4c7; +} + +.privacy-settings-accordion-heading, +.health-check-accordion-heading { + margin: 0; + border-top: 1px solid #c3c4c7; + font-size: inherit; + line-height: inherit; + font-weight: 600; + color: inherit; +} + +.privacy-settings-accordion-heading:first-child, +.health-check-accordion-heading:first-child { + border-top: none; +} + +.privacy-settings-accordion-trigger, +.health-check-accordion-trigger { + background: #fff; + border: 0; + color: #2c3338; + cursor: pointer; + display: flex; + font-weight: 400; + margin: 0; + padding: 1em 3.5em 1em 1.5em; + min-height: 46px; position: relative; - border-top: 1px solid #e3e3e3; + text-align: left; + width: 100%; + align-items: center; + justify-content: space-between; + -webkit-user-select: auto; + user-select: auto; } -.privacy-text-box-head, -.privacy-text-section.text-removed { - padding-bottom: 12px; +.privacy-settings-accordion-trigger:hover, +.privacy-settings-accordion-trigger:active, +.health-check-accordion-trigger:hover, +.health-check-accordion-trigger:active { + background: #f6f7f7; } -.text-removed .policy-text { - font-style: italic; - color: #666; +.privacy-settings-accordion-trigger:focus, +.health-check-accordion-trigger:focus { + color: #1d2327; + border: none; + box-shadow: none; + outline-offset: -1px; + outline: 2px solid #2271b1; + background-color: #f6f7f7; +} + +.privacy-settings-accordion-trigger .title, +.health-check-accordion-trigger .title { + pointer-events: none; font-weight: 600; + flex-grow: 1; } -.privacy-text-actions { - height: 32px; - line-height: 2.46153846; - padding-bottom: 6px; +.privacy-settings-accordion-trigger .icon, +.privacy-settings-view-read .icon, +.health-check-accordion-trigger .icon, +.site-health-view-passed .icon { + border: solid #50575e; + border-width: 0 2px 2px 0; + height: 0.5rem; + pointer-events: none; + position: absolute; + right: 1.5em; + top: 50%; + transform: translateY(-70%) rotate(45deg); + width: 0.5rem; } -.privacy-text-actions .success { - display: none; - color: #40860a; - float: right; - padding-right: 1em; +.privacy-settings-accordion-trigger .badge, +.health-check-accordion-trigger .badge { + padding: 0.1rem 0.5rem 0.15rem; + color: #2c3338; + font-weight: 600; } -.privacy-text-actions .success.visible { - display: inline-block; - height: 32px; +.privacy-settings-accordion-trigger .badge { + margin-left: 0.5rem; } -.wp-privacy-policy-guide .policy-text h2 { - margin: 1.2em 0 1em; - padding: 0; +.privacy-settings-accordion-trigger .badge.blue, +.health-check-accordion-trigger .badge.blue { + border: 1px solid #72aee6; } -.suggested-policy-content { - font-style: italic; +.privacy-settings-accordion-trigger .badge.orange, +.health-check-accordion-trigger .badge.orange { + border: 1px solid #dba617; } -.privacy-text-section a.return-to-top { - float: right; - margin-right: -250px; - margin-top: 6px; +.privacy-settings-accordion-trigger .badge.red, +.health-check-accordion-trigger .badge.red { + border: 1px solid #e65054; } -.hide-privacy-policy-tutorial { - background-color: #fff; +.privacy-settings-accordion-trigger .badge.green, +.health-check-accordion-trigger .badge.green { + border: 1px solid #00ba37; } -.hide-privacy-policy-tutorial .wp-policy-help, /* For back-compat, see #49282 */ -.hide-privacy-policy-tutorial .privacy-policy-tutorial { - display: none; +.privacy-settings-accordion-trigger .badge.purple, +.health-check-accordion-trigger .badge.purple { + border: 1px solid #2271b1; } -.policy-text { - margin-bottom: 1em; +.privacy-settings-accordion-trigger .badge.gray, +.health-check-accordion-trigger .badge.gray { + border: 1px solid #c3c4c7; } -.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help), -.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) { - background-color: #fff; +.privacy-settings-accordion-trigger[aria-expanded="true"] .icon, +.privacy-settings-view-passed[aria-expanded="true"] .icon, +.health-check-accordion-trigger[aria-expanded="true"] .icon, +.site-health-view-passed[aria-expanded="true"] .icon { + transform: translateY(-30%) rotate(-135deg) +} + +.privacy-settings-accordion-panel, +.health-check-accordion-panel { margin: 0; - padding: 1em; + padding: 1em 1.5em; + background: #fff; } -.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help), -.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) { - padding-top: 0; +.privacy-settings-accordion-panel[hidden], +.health-check-accordion-panel[hidden] { + display: none; } -.hide-privacy-policy-tutorial > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) { - margin: 1em 0; - padding: 0; +.privacy-settings-accordion-panel a .dashicons, +.health-check-accordion-panel a .dashicons { + text-decoration: none; } -.policy-text ul li, -.policy-text ol li { - margin-left: 2em; +.privacy-settings-accordion-actions { + text-align: right; + display: block; +} + +.privacy-settings-accordion-actions .success { + display: none; + color: #008a20; + padding-right: 1em; + padding-top: 6px; +} + +.privacy-settings-accordion-actions .success.visible { + display: inline-block; } -.policy-text ul { - list-style: disc; +/* Suggested text for privacy policy */ +.privacy-settings-accordion-panel.hide-privacy-policy-tutorial .wp-policy-help, /* For back-compat, see #49282 */ +.privacy-settings-accordion-panel.hide-privacy-policy-tutorial .privacy-policy-tutorial, +.privacy-settings-accordion-panel.hide-privacy-policy-tutorial .privacy-text-copy { + display: none; } -strong.wp-policy-help, /* For back-compat, see #49282 */ -strong.privacy-policy-tutorial { +.privacy-settings-accordion-panel strong.wp-policy-help, /* For back-compat, see #49282 */ +.privacy-settings-accordion-panel strong.privacy-policy-tutorial { display: block; margin: 0 0 1em; } -.notice.wp-pp-notice { - margin: 15px 0 3px; +.privacy-text-copy span { + pointer-events: none; } +.privacy-settings-accordion-panel .wp-suggested-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help):not(.privacy-text-copy):not(span.success):not(.notice p), +.privacy-settings-accordion-panel .wp-suggested-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help):not(.privacy-text-copy):not(span.success):not(.notice p), +.privacy-settings-accordion-panel > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help):not(.privacy-text-copy):not(span.success):not(.notice p), +.privacy-settings-accordion-panel div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help):not(.privacy-text-copy):not(span.success):not(.notice p) { + margin: 0; + padding: 1em; + border-left: 2px solid #787c82; +} + +/* Media queries */ +@media screen and (max-width: 782px) { + + .privacy-settings-body, + .health-check-body { + margin: 0 12px; + width: auto; + } + + .privacy-settings .notice, + .site-health .notice { + margin: 5px 10px 15px; + } + + .privacy-settings .update-nag, + .site-health .update-nag { + margin-right: 10px; + margin-left: 10px; + } + + input#create-page { + margin-top: 10px; + } + + .wp-core-ui button.privacy-text-copy { + white-space: normal; + line-height: 1.8; + } +} + +@media only screen and (max-width: 1004px) { + + .privacy-settings-body, + .health-check-body { + margin: 0 22px; + width: auto; + } +} + +/** +* End Privacy Settings section +*/ + /*------------------------------------------------------------------------------ 11.1 - Custom Fields ------------------------------------------------------------------------------*/ #postcustomstuff thead th { padding: 5px 8px 8px; - background-color: #f1f1f1; + background-color: #f0f0f1; } #postcustom #postcustomstuff .submit { @@ -837,9 +1064,9 @@ strong.privacy-policy-tutorial { #postcustomstuff table { margin: 0; width: 100%; - border: 1px solid #ddd; + border: 1px solid #dcdcde; border-spacing: 0; - background-color: #f9f9f9; + background-color: #f6f7f7; } #postcustomstuff tr { @@ -932,15 +1159,15 @@ strong.privacy-policy-tutorial { width: 20px; margin-top: -4px; margin-right: 7px; - color: #ddd; + color: #dcdcde; font: normal 20px/1 dashicons; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } a.post-format-icon:hover:before { - color: #00a0d2; + color: #135e96; } #post-formats-select { @@ -1026,8 +1253,8 @@ label.post-format-icon { max-height: 200px; overflow: auto; padding: 0 0.9em; - border: solid 1px #ddd; - background-color: #fdfdfd; + border: solid 1px #dcdcde; + background-color: #fff; } div.tabs-panel-active { @@ -1039,7 +1266,7 @@ div.tabs-panel-inactive { } div.tabs-panel-active:focus { - box-shadow: inset 0 0 0 1px #5b9dd9, inset 0 0 2px 1px rgba(30, 140, 190, 0.8); + box-shadow: inset 0 0 0 1px #4f94d4, inset 0 0 2px 1px rgba(79, 148, 212, 0.8); outline: 0 none; } @@ -1095,7 +1322,7 @@ ul.categorychecklist li { p.description, .form-wrap p { margin: 2px 0 5px; - color: #666; + color: #646970; } p.help, @@ -1103,7 +1330,6 @@ p.description, span.description, .form-wrap p { font-size: 13px; - font-style: italic; } p.description code { @@ -1137,7 +1363,7 @@ p.description code { } #poststuff .tagsdiv .howto { - margin: 1em 0 6px 0; + margin: 1em 0 6px; } .ajaxtag .newtag { @@ -1184,7 +1410,7 @@ p.popular-tags a { #poststuff .inside .the-tagcloud { margin: 5px 0 10px; padding: 8px; - border: 1px solid #ddd; + border: 1px solid #dcdcde; line-height: 1.2; word-spacing: 3px; } @@ -1197,7 +1423,7 @@ p.popular-tags a { display: inline-block; } -/* Suggest.js autocomplete, no more used by core. */ +/* Back-compat styles from deprecated jQuery.suggest, see ticket #40260. */ .ac_results { display: none; margin: -1px 0 0; @@ -1205,7 +1431,7 @@ p.popular-tags a { list-style: none; position: absolute; z-index: 10000; - border: 1px solid #5b9dd9; + border: 1px solid #4f94d4; background-color: #fff; } @@ -1222,7 +1448,7 @@ p.popular-tags a { .ac_results .ac_over, .ac_over .ac_match { - background-color: #0073aa; + background-color: #2271b1; color: #fff; cursor: pointer; } @@ -1264,7 +1490,7 @@ p.popular-tags a { content: "(" attr( href ) ")"; display: inline-block; padding: 0 4px; - color: #72777C; + color: #646970; font-size: 13px; word-break: break-all; } @@ -1451,7 +1677,10 @@ table.links-table { } } -/* one column on the attachment editor screen */ +/* + * The edit attachment screen auto-switches to one column layout when the + * viewport is smaller than 1200 pixels. + */ @media only screen and (max-width: 1200px) { .post-type-attachment #poststuff { min-width: 0; @@ -1468,7 +1697,7 @@ table.links-table { .post-type-attachment #poststuff #postbox-container-1 .empty-container, .post-type-attachment #poststuff #postbox-container-1 #side-sortables:empty { - border: 0 none; + outline: none; height: 0; min-height: 0; } @@ -1478,6 +1707,12 @@ table.links-table { width: auto; } + .is-dragging-metaboxes.post-type-attachment #post-body .meta-box-sortables { + outline: none; + min-height: 0; + margin-bottom: 0; + } + /* hide the radio buttons for column prefs */ .post-type-attachment .screen-layout, .post-type-attachment .columns-prefs { @@ -1502,7 +1737,6 @@ table.links-table { #poststuff #postbox-container-1 .empty-container, #poststuff #postbox-container-1 #side-sortables:empty { - border: 0 none; height: 0; min-height: 0; } @@ -1512,6 +1746,15 @@ table.links-table { width: auto; } + /* Increase min-height while dragging for the #side-sortables and any potential sortables area with custom ID. */ + .is-dragging-metaboxes #poststuff #postbox-container-1 .empty-container, + .is-dragging-metaboxes #poststuff #postbox-container-1 #side-sortables:empty, + .is-dragging-metaboxes #poststuff #post-body.columns-2 #side-sortables, + .is-dragging-metaboxes #poststuff #post-body.columns-2 .meta-box-sortables { + height: auto; + min-height: 60px; + } + /* hide the radio buttons for column prefs */ .screen-layout, .columns-prefs { @@ -1529,7 +1772,7 @@ table.links-table { } #titlediv #title-prompt-text { - padding: 10px 10px; + padding: 10px; } #poststuff .stuffbox .inside { @@ -1666,10 +1909,7 @@ table.links-table { } .wp_themeSkin .mceSplitButton td a.mceAction { - padding-top: 6px; - padding-bottom: 6px; - padding-left: 6px; - padding-right: 3px; + padding: 6px 3px 6px 6px; } .wp_themeSkin .mceSplitButton td a.mceOpen, @@ -1715,7 +1955,7 @@ table.links-table { } .misc-pub-section { - padding: 20px 10px 20px; + padding: 20px 10px; } .misc-pub-section > a { @@ -1753,6 +1993,10 @@ table.links-table { padding: 10px 0; } + .edit-term-notes { + display: none; + } + .privacy-text-box { width: auto; } @@ -1765,8 +2009,7 @@ table.links-table { flex-direction: column; } - .privacy-text-section a.return-to-top { - float: none; - margin: 0; + .privacy-text-section .return-to-top { + margin: 2em 0 0; } } diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index b86fe8370e7ff..7893915d6d9aa 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -32,7 +32,7 @@ select { } textarea.code { - padding: 4px 6px 1px 6px; + padding: 4px 6px 1px; } input[type="text"], @@ -53,9 +53,9 @@ select, textarea { box-shadow: 0 0 0 transparent; border-radius: 4px; - border: 1px solid #7e8993; + border: 1px solid #8c8f94; background-color: #fff; - color: #32373c; + color: #2c3338; } input[type="text"], @@ -101,8 +101,8 @@ input[type="checkbox"]:focus, input[type="radio"]:focus, select:focus, textarea:focus { - border-color: #007cba; - box-shadow: 0 0 0 1px #007cba; + border-color: #2271b1; + box-shadow: 0 0 0 1px #2271b1; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } @@ -115,10 +115,10 @@ input[type="url"] { input[type="checkbox"], input[type="radio"] { - border: 1px solid #7e8993; + border: 1px solid #8c8f94; border-radius: 4px; background: #fff; - color: #555; + color: #50575e; clear: none; cursor: pointer; display: inline-block; @@ -137,12 +137,12 @@ input[type="radio"] { } input[type="radio"]:checked + label:before { - color: #82878c; + color: #8c8f94; } .wp-core-ui input[type="reset"]:hover, .wp-core-ui input[type="reset"]:active { - color: #00a0d2; + color: #135e96; } td > input[type="checkbox"], @@ -172,14 +172,14 @@ input[type="radio"]:checked::before { display: inline-block; vertical-align: middle; width: 1rem; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } input[type="checkbox"]:checked::before { /* Use the "Yes" SVG Dashicon */ - content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%231e8cbe%27%2F%3E%3C%2Fsvg%3E"); + content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%233582c4%27%2F%3E%3C%2Fsvg%3E"); margin: -0.1875rem 0 0 -0.25rem; height: 1.3125rem; width: 1.3125rem; @@ -191,7 +191,7 @@ input[type="radio"]:checked::before { width: 0.5rem; /* 8px */ height: 0.5rem; /* 8px */ margin: 0.1875rem; /* 3px */ - background-color: #1e8cbe; + background-color: #3582c4; /* 16px not sure if still necessary, comes from the MP6 redesign in r26072 */ line-height: 1.14285714; } @@ -222,34 +222,36 @@ input.readonly, input[readonly], textarea.readonly, textarea[readonly] { - background-color: #eee; + background-color: #f0f0f1; } ::-webkit-input-placeholder { - color: #72777c; + color: #646970; } ::-moz-placeholder { - color: #72777c; + color: #646970; opacity: 1; } :-ms-input-placeholder { - color: #72777c; + color: #646970; } -.form-invalid input, -.form-invalid input:focus, -.form-invalid select, -.form-invalid select:focus { - border-color: #dc3232 !important; - box-shadow: 0 0 2px rgba(204, 0, 0, 0.8); +.form-invalid .form-required, +.form-invalid .form-required:focus, +.form-invalid.form-required input, +.form-invalid.form-required input:focus, +.form-invalid.form-required select, +.form-invalid.form-required select:focus { + border-color: #d63638 !important; + box-shadow: 0 0 2px rgba(214, 54, 56, 0.8); } .form-table .form-required.form-invalid td:after { content: "\f534"; font: normal 20px/1 dashicons; - color: #dc3232; + color: #d63638; margin-left: -25px; vertical-align: middle; } @@ -262,13 +264,13 @@ textarea[readonly] { .form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after { content: "\f534"; font: normal 20px/1 dashicons; - color: #dc3232; + color: #d63638; margin: 0 6px 0 -29px; vertical-align: middle; } .form-input-tip { - color: #666; + color: #646970; } input:disabled, @@ -278,9 +280,9 @@ select.disabled, textarea:disabled, textarea.disabled { background: rgba(255, 255, 255, 0.5); - border-color: rgba(222, 222, 222, 0.75); + border-color: rgba(220, 220, 222, 0.75); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04); - color: rgba(51, 51, 51, 0.5); + color: rgba(44, 51, 56, 0.5); } input[type="file"]:disabled, @@ -311,8 +313,8 @@ input[type="radio"].disabled:checked:before { .wp-core-ui select { font-size: 14px; line-height: 2; /* 28px */ - color: #32373c; - border-color: #7e8993; + color: #2c3338; + border-color: #8c8f94; box-shadow: none; border-radius: 3px; padding: 0 24px 0 8px; @@ -324,28 +326,28 @@ input[type="radio"].disabled:checked:before { background-size: 16px 16px; cursor: pointer; vertical-align: middle; -}e +} .wp-core-ui select:hover { - color: #007cba; + color: #2271b1; } .wp-core-ui select:focus { - border-color: #007cba; - color: #016087; - box-shadow: 0 0 0 1px #007cba; + border-color: #2271b1; + color: #0a4b78; + box-shadow: 0 0 0 1px #2271b1; } .wp-core-ui select:active { - border-color: #999; + border-color: #8c8f94; box-shadow: none; } .wp-core-ui select.disabled, .wp-core-ui select:disabled { - color: #a0a5aa; - border-color: #ddd; - background-color: #f7f7f7; + color: #a7aaad; + border-color: #dcdcde; + background-color: #f6f7f7; /* The SVG is arrow-down-alt2 from Dashicons. */ background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23a0a5aa%22%2F%3E%3C%2Fsvg%3E'); box-shadow: none; @@ -358,26 +360,26 @@ input[type="radio"].disabled:checked:before { /* This ruleset overrides the color change on :focus thus needs to be after select:focus. */ .wp-core-ui select:-moz-focusring { color: transparent; - text-shadow: 0 0 0 #016087; + text-shadow: 0 0 0 #0a4b78; } /* Remove background focus style from IE11 while keeping focus style available on option elements. */ .wp-core-ui select::-ms-value { background: transparent; - color: #555; + color: #50575e; } .wp-core-ui select:hover::-ms-value { - color: #007cba; + color: #2271b1; } .wp-core-ui select:focus::-ms-value { - color: #016087; + color: #0a4b78; } .wp-core-ui select.disabled::-ms-value, .wp-core-ui select:disabled::-ms-value { - color: #a0a5aa; + color: #a7aaad; } /* Hide the native down arrow for select element on IE. */ @@ -466,6 +468,10 @@ input.small-text { padding: 0 6px; } +label input.small-text { + margin-top: -4px; +} + input[type="number"].small-text { width: 65px; padding-right: 0; @@ -486,6 +492,16 @@ input[type="number"].tiny-text { margin: 0 8px 0 0; } +/* @since 5.7.0 secondary bulk action controls require JS. */ +.no-js label[for="bulk-action-selector-bottom"], +.no-js select#bulk-action-selector-bottom, +.no-js input#doaction2, +.no-js label[for="new_role2"], +.no-js select#new_role2, +.no-js input#changeit2 { + display: none; +} + .tablenav .actions select { float: left; margin-right: 6px; @@ -529,14 +545,22 @@ fieldset label, margin: 0 0 1em; } +.wp-generate-pw { + margin-top: 1em; +} + +.wp-pwd { + margin-top: 1em; +} + #misc-publishing-actions label { vertical-align: baseline; } #pass-strength-result { - background-color: #eee; - border: 1px solid #ddd; - color: #23282d; + background-color: #f0f0f1; + border: 1px solid #dcdcde; + color: #1d2327; margin: -1px 1px 5px; padding: 3px 5px; text-align: center; @@ -546,43 +570,47 @@ fieldset label, } #pass-strength-result.short { - background-color: #f1adad; - border-color: #e35b5b; + background-color: #ffabaf; + border-color: #e65054; opacity: 1; } #pass-strength-result.bad { - background-color: #fbc5a9; - border-color: #f78b53; + background-color: #facfd2; + border-color: #f86368; opacity: 1; } #pass-strength-result.good { - background-color: #ffe399; - border-color: #ffc733; + background-color: #f5e6ab; + border-color: #f0c33c; opacity: 1; } #pass-strength-result.strong { - background-color: #c1e1b9; - border-color: #83c373; + background-color: #b8e6bf; + border-color: #68de7c; opacity: 1; } +.password-input-wrapper input { + font-family: Consolas, Monaco, monospace; +} + #pass1.short, #pass1-text.short { - border-color: #e35b5b; + border-color: #e65054; } #pass1.bad, #pass1-text.bad { - border-color: #f78b53; + border-color: #f86368; } #pass1.good, #pass1-text.good { - border-color: #ffc733; + border-color: #f0c33c; } #pass1.strong, #pass1-text.strong { - border-color: #83c373; + border-color: #68de7c; } .pw-weak { @@ -661,8 +689,8 @@ ul#add-to-blog-users { list-style: none; position: absolute; z-index: 10000; - border: 1px solid #5b9dd9; - box-shadow: 0 1px 2px rgba(30, 140, 190, 0.8); + border: 1px solid #4f94d4; + box-shadow: 0 1px 2px rgba(79, 148, 212, 0.8); background-color: #fff; } @@ -676,13 +704,16 @@ ul#add-to-blog-users { /* Colors for the wplink toolbar autocomplete. */ .ui-autocomplete .ui-state-focus { - background-color: #ddd; + background-color: #dcdcde; } /* Colors for the tags autocomplete. */ -.wp-tags-autocomplete .ui-state-focus { - background-color: #0073aa; +.wp-tags-autocomplete .ui-state-focus, +.wp-tags-autocomplete [aria-selected="true"] { + background-color: #2271b1; color: #fff; + /* Only visible in Windows High Contrast mode */ + outline: 2px solid transparent; } /*------------------------------------------------------------------------------ @@ -712,7 +743,7 @@ ul#add-to-blog-users { .form-table th, .form-wrap label { - color: #23282d; + color: #1d2327; font-weight: 400; text-shadow: none; vertical-align: baseline; @@ -748,10 +779,14 @@ ul#add-to-blog-users { } .form-table td fieldset label { - margin: 0.25em 0 0.5em !important; + margin: 0.35em 0 0.5em !important; display: inline-block; } +.form-table td fieldset p label { + margin-top: 0 !important; +} + .form-table td fieldset label, .form-table td fieldset p, .form-table td fieldset li { @@ -815,7 +850,7 @@ table.form-table td .updated p { .color-option:hover, .color-option.selected { - background: #ddd; + background: #dcdcde; } .color-palette { @@ -833,6 +868,37 @@ table.form-table td .updated p { cursor: pointer; } +.create-application-password .form-field { + max-width: 25em; +} + +.create-application-password label { + font-weight: 600; +} + +.create-application-password p.submit { + margin-bottom: 0; + padding-bottom: 0; + display: block; +} + +#application-passwords-section .notice { + margin-top: 20px; + margin-bottom: 0; +} + +.application-password-display input.code { + width: 19em; +} + +.auth-app-card.card { + max-width: 768px; +} + +.authorize-application-php .form-wrap p { + display: block; +} + /*------------------------------------------------------------------------------ 19.0 - Tools ------------------------------------------------------------------------------*/ @@ -864,7 +930,7 @@ table.form-table td .updated p { padding: 0.7em 2em 1em; min-width: 255px; max-width: 520px; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; box-sizing: border-box; @@ -899,10 +965,10 @@ table.form-table td .updated p { display: inline-block; position: relative; cursor: move; - color: #32373c; - background: #e5e5e5; + color: #2c3338; + background: #dcdcde; border-radius: 5px; - border: 1px solid #b4b9be; + border: 1px solid #c3c4c7; font-style: normal; line-height: 16px; font-size: 14px; @@ -933,12 +999,12 @@ table.form-table td .updated p { .pressthis-bookmarklet span { display: inline-block; - margin: 0px 0 0; - padding: 0px 12px 8px 9px; + margin: 0; + padding: 0 12px 8px 9px; } .pressthis-bookmarklet span:before { - color: #72777c; + color: #787c82; font: normal 20px/1 dashicons; content: "\f157"; position: relative; @@ -964,7 +1030,7 @@ table.form-table td .updated p { .pressthis-js-toggle .dashicons { margin: 5px 8px 6px 7px; - color: #555d66; + color: #50575e; } /*------------------------------------------------------------------------------ @@ -1141,7 +1207,7 @@ table.form-table td .updated p { } .request-filesystem-credentials-dialog .ftp-password em { - color: #888; + color: #8c8f94; } .request-filesystem-credentials-dialog label { @@ -1159,7 +1225,7 @@ table.form-table td .updated p { } .request-filesystem-credentials-form .notice { - margin: 0 0 20px 0; + margin: 0 0 20px; clear: both; } @@ -1170,11 +1236,14 @@ table.form-table td .updated p { margin-bottom: 1.3em; } -.tools-privacy-policy-page input.button, -.tools-privacy-policy-page select { +.tools-privacy-policy-page input.button { margin: 0 1px 0 6px; } +.tools-privacy-policy-page select { + margin: 0 1px 0.5em 6px; +} + .tools-privacy-edit { margin: 1.5em 0; } @@ -1203,7 +1272,7 @@ table.form-table td .updated p { } .privacy_requests .row-actions { - color: #72777c; + color: #787c82; } .privacy_requests .row-actions.processing { @@ -1234,14 +1303,14 @@ table.form-table td .updated p { .privacy_requests .status-request-confirmed th, .privacy_requests .status-request-confirmed td { - background-color: #f7fcfe; - border-left-color: #00a0d2; + background-color: #fff; + border-left-color: #72aee6; } .privacy_requests .status-request-failed th, .privacy_requests .status-request-failed td { - background-color: #fef7f1; - border-left-color: #d64d21; + background-color: #f6f7f7; + border-left-color: #d63638; } .privacy_requests .export_personal_data_failed a { @@ -1255,11 +1324,11 @@ table.form-table td .updated p { .status-label.status-request-pending { font-weight: 400; font-style: italic; - color: #6c7781; + color: #646970; } .status-label.status-request-failed { - color: #aa0000; + color: #d63638; font-weight: 600; } @@ -1271,13 +1340,6 @@ table.form-table td .updated p { margin: 1.5em 0; } -.wp-privacy-request-form label { - font-weight: 600; - line-height: 1.5; - padding-bottom: .5em; - display: block; -} - .wp-privacy-request-form input { margin: 0; } @@ -1286,20 +1348,20 @@ table.form-table td .updated p { display: inline-block; font: normal 20px/1 dashicons; margin: 3px 5px 0 -2px; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; vertical-align: top; } .email-personal-data--sending::before { - color: #f56e28; + color: #d63638; content: "\f463"; animation: rotation 2s infinite linear; } .email-personal-data--sent::before { - color: #79ba49; + color: #68de7c; content: "\f147"; } @@ -1500,13 +1562,13 @@ table.form-table td .updated p { } .form-table th { - padding: 10px 0 0 0; + padding: 10px 0 0; border-bottom: 0; } .form-table td { margin-bottom: 0; - padding: 4px 0 6px 0; + padding: 4px 0 6px; } .form-table.permalink-structure td code { diff --git a/src/wp-admin/css/ie.css b/src/wp-admin/css/ie.css deleted file mode 100644 index 00853ab7c8d9f..0000000000000 --- a/src/wp-admin/css/ie.css +++ /dev/null @@ -1,764 +0,0 @@ -/* Fixes for IE 7 bugs */ - -#dashboard-widgets form .input-text-wrap input, -#dashboard-widgets form .textarea-wrap textarea { - width: 99%; -} - -#dashboard-widgets form #title { - width: 98%; -} - -#wpbody-content #dashboard-widgets .postbox-container { - width: 49.5%; -} - -#wpbody-content #dashboard-widgets #postbox-container-2, -#wpbody-content #dashboard-widgets #postbox-container-3, -#wpbody-content #dashboard-widgets #postbox-container-4 { - float: right; - width: 50.5%; -} - -#dashboard-widgets #postbox-container-3 .empty-container, -#dashboard-widgets #postbox-container-4 .empty-container { - border: 0 none; - height: 0; - min-height: 0; -} - -.wp-editor-wrap .wp-editor-tools, -.wp-editor-wrap .wp-switch-editor, -.wp-editor-wrap .wp-editor-tabs, -.wp-editor-wrap .wp-editor-container { - zoom: 100%; -} - -.wp-editor-wrap .wp-editor-container textarea.wp-editor-area { - width: 97%; -} - -#post-body.columns-2 #postbox-container-1 { - padding-left: 19px; -} - -.welcome-panel .wp-badge { - position: absolute; -} - -.welcome-panel .welcome-panel-column:first-child { - width: 35%; -} - -#adminmenuback { - left: 0; - background-image: none; -} - -#adminmenuwrap { - position: static; -} - -#adminmenu { - position: relative; -} - -#adminmenu, -#adminmenu a { - cursor: pointer; -} - -#adminmenu li.wp-menu-separator, -#adminmenu li.wp-menu-separator-last { - font-size: 1px; - line-height: 1; -} - -#adminmenu a.menu-top { - border-bottom: 0 none; - border-top: 1px solid #ddd; -} - -#adminmenu .separator { - font-size: 1px; - line-height: 1px; -} - -#adminmenu .wp-submenu { - left: 110px; -} - -#adminmenu .wp-submenu ul { - margin: 0; -} - -.folded #wpcontent, -.folded #wpfooter { - margin-left: 170px; -} - -.folded #adminmenuback, -.folded #adminmenuwrap, -.folded #adminmenu, -.folded #adminmenu li.menu-top { - width: 150px; -} - -.folded #adminmenu .wp-submenu { - border-top-color: transparent; -} - -.folded #adminmenu .wp-menu-name { - display: block; -} - -.folded #adminmenu .wp-submenu.sub-open, -.folded #adminmenu .opensub .wp-submenu { - left: 110px; -} - -.folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, -.folded #adminmenu .wp-has-current-submenu .wp-submenu { - top: -1px; - position: relative; -} - -.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { - background-color: transparent; -} - -#adminmenu .wp-submenu .wp-submenu-head { - border-top-color: #ddd; -} - -.folded #adminmenu .wp-submenu ul { - margin-left: 5px; -} - -#adminmenu li.menu-top { - margin-bottom: -2px; -} - -#adminmenu .wp-menu-arrow { - display: none !important; -} - -.js.folded #adminmenu li.menu-top { - display: block; - zoom: 100%; -} - -ul#adminmenu { - z-index: 99; -} - -#adminmenu li.menu-top a.menu-top { - min-width: auto; - width: auto; -} - -#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu { - font-style: normal; -} - -#wpcontent #adminmenu .wp-submenu li { - padding: 0; -} - -#adminmenu li.wp-has-current-submenu .wp-submenu { - left: -40px; -} - -#adminmenu .wp-menu-image { - display: none !important; -} - -#adminmenu a.menu-top .wp-menu-name { - padding-left: 8px; -} - -#collapse-menu { - line-height: 23px; -} - -#wpadminbar .ab-comments-icon { - padding-top: 7px; -} - - -.theme-browser .theme { - width: 30%; - margin: 0 3% 4% 0; - cursor: auto; -} - -.theme-browser .theme:hover, -.theme-browser .theme:focus { - cursor: auto; -} - -.theme-browser .theme .theme-screenshot { - height: 180px; -} - -.theme-browser .theme .theme-actions { - position: static; - background-color: #e8e8e8; -} - -.theme-browser .theme .more-details { - display: none; -} - -.plugins td, -.plugins th { - border-top: 1px solid #ddd; -} - -table.fixed th, -table.fixed td { - border-top: 1px solid #ddd; -} - -#wpbody-content input.button, -#wpbody-content input.button-primary { - overflow: visible; -} - -#dashboard-widgets h3 a { - height: 14px; - line-height: 14px; -} - -#dashboard_browser_nag { - color: #fff; -} - -#dashboard_browser_nag .browser-icon { - position: relative; -} - -.tablenav-pages .current-page { - vertical-align: middle; -} - -#wpbody-content .postbox { - border: 1px solid #ddd; -} - -#wpbody-content .postbox .hndle { - margin-bottom: -1px; -} - -.major-publishing-actions, -.wp-submenu, -.wp-submenu li, -#template, -#template div, -#editcat, -#addcat { - zoom: 100%; -} - -.wp-menu-arrow { - height: 28px; -} - -.submitbox { - margin-top: 10px; -} - -/* Inline Editor */ -#wpbody-content .quick-edit-row-post .inline-edit-col-left { - width: 39%; -} - -#wpbody-content .inline-edit-row-post .inline-edit-col-center { - width: 19%; -} - -#wpbody-content .quick-edit-row-page .inline-edit-col-left { - width: 49%; -} - -#wpbody-content .bulk-edit-row .inline-edit-col-left { - width: 29%; -} - -.inline-edit-row .submit { - zoom: 100%; -} - -.inline-edit-row fieldset label span.title { - display: block; - float: left; - width: 5em; -} - -.inline-edit-row fieldset label span.input-text-wrap { - margin-left: 0; - zoom: 100%; -} - -#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input { - line-height: 130%; -} - -#wpbody-content .inline-edit-row .input-text-wrap input { - width: 95%; -} - -#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input { - width: 8em; -} -/* end Inline Editor */ - -#titlediv #title { - width: 98%; -} - -.button, -input[type="reset"], -input[type="button"], -input[type="submit"] { - padding: 0 8px; - line-height: 20px; - height: auto; -} - -.button.button-large, -input[type="reset"].button-large, -input[type="button"].button-large, -input[type="submit"].button-large { - padding: 0 10px; - line-height: 24px; - height: auto; -} - -.button.button-small, -input[type="reset"].button-small, -input[type="button"].button-small, -input[type="submit"].button-small { - padding: 0 6px; - line-height: 16px; - height: auto; -} - -a.button { - margin: 1px; - padding: 1px 9px 2px; -} - -a.button.button-large { - padding: 1px 11px 2px; -} - -a.button.button-small { - padding: 1px 7px 2px; -} - -#screen-options-wrap { - overflow: hidden; -} - -#the-comment-list .comment-item, -#post-status-info, -#wpwrap, -#wrap, -#postdivrich, -#postdiv, -#poststuff, -.metabox-holder, -#titlediv, -#post-body, -#editorcontainer, -.tablenav, -.widget-liquid-left, -.widget-liquid-right, -#widgets-left, -.widgets-sortables, -#dragHelper, -.widget .widget-top, -.widget-control-actions, -.tagchecklist, -#col-container, -#col-left, -#col-right, -.fileedit-sub { - display: block; - zoom: 100%; -} - -p.search-box { - position: static; - float: right; - margin: -3px 0 4px; -} - -#widget-list .widget { - display: inline; -} - -#editorcontainer #content { - overflow: auto; - margin: auto; - width: 98%; -} - -form#template div { - width: 100%; -} - -.wp-editor-container .quicktags-toolbar input { - overflow: visible; - padding: 0 4px; -} - -#poststuff h2 { - font-size: 1.6em; -} - -#poststuff .inside #parent_id, -#poststuff .inside #page_template, -.inline-edit-row #post_parent, -.inline-edit-row select[name="page_template"] { - width: 250px; -} - -#submitdiv input, -#submitdiv select, -#submitdiv a.button { - position: relative; -} - -#bh { - margin: 7px 10px 0 0; - float: right; -} - -/* without this dashboard widgets appear in one column for some screen widths */ -div#dashboard-widgets { - padding-right: 1px; -} - -.tagchecklist > li, .tagchecklist .ntdelbutton { - display: inline-block; - display: block; -} - -.tagchecklist .ntdelbutton:focus .remove-tag-icon:before { - outline: 1px solid #5b9dd9; -} - -.tablenav .button, -.nav .button { - padding-top: 2px; - padding-bottom: 2px; -} - -.tablenav select { - font-size: 13px; - display: inline-block; - vertical-align: top; - margin-top: 2px; -} - -.tablenav .actions select { - width: 155px; -} - -.subsubsub li { - display: inline; -} - -table.ie-fixed { - table-layout: fixed; -} - -.widefat tr, -.widefat th, -.widefat thead td, -.widefat tfoot td { - margin-bottom: 0; - border-spacing: 0; -} - -.widefat th input, -.widefat thead td input, -.widefat tfoot td input { - margin: 0 0 0 5px; -} - -.widefat thead .check-column, -.widefat tfoot .check-column { - padding-top: 6px; -} - -.widefat tbody th.check-column, -.media.widefat tbody th.check-column { - padding: 4px 0 0; -} - -.widefat { - empty-cells: show; - border-collapse: collapse; -} - -.tablenav a.button { - display: inline-block; - padding: 2px 5px; -} - -.inactive-sidebar .widgets-sortables { - padding-bottom: 8px; -} - -#available-widgets .widget-holder { - padding-bottom: 65px; -} - -#widgets-left .inactive { - padding-bottom: 10px; -} - -.widget-liquid-right .widget, -.inactive-sidebar .widget { - position: relative; -} - -.inactive-sidebar .widget { - display: block; - float: left; -} - -#wpcontent .button-primary-disabled { - color: #9FD0D5; - background: #298CBA; -} - -#the-comment-list .unapproved tr, -#the-comment-list .unapproved td { - background-color: #ffffe0; -} - -.imgedit-submit { - width: 300px; -} - -#nav-menus-frame, -#wpbody, -.menu li { - zoom: 100%; -} - -#update-nav-menu #post-body { - overflow: hidden; -} - -.menu li { - min-width: 100%; -} - -.menu li.sortable-placeholder { - min-width: 400px; -} - -.available-theme { - display: inline; -} - -.available-theme ul { - margin: 0; -} - -.available-theme .action-links li { - padding-right: 7px; - margin-right: 7px; -} - -.about-wrap .three-col.about-updates .col-2 { - width: 15%; -} - -.about-wrap .about-password-meter input { - width: 98%; -} - -.revisions-tickmarks, -.revisions-tooltip { - display: none !important; -} - -.revisions.pinned .revisions-controls { - position: relative; -} - -input[type="password"], -.login form .input { - font-family: sans-serif; -} - -/* TinyMCE icons */ -.mce-btn i.mce-i-bold, -.mce-btn i.mce-i-italic, -.mce-btn i.mce-i-bullist, -.mce-btn i.mce-i-numlist, -.mce-btn i.mce-i-blockquote, -.mce-btn i.mce-i-alignleft, -.mce-btn i.mce-i-aligncenter, -.mce-btn i.mce-i-alignright, -.mce-btn i.mce-i-link, -.mce-btn i.mce-i-unlink, -.mce-btn i.mce-i-wp_more, -.mce-btn i.mce-i-strikethrough, -.mce-btn i.mce-i-spellchecker, -.mce-btn i.mce-i-fullscreen, -.mce-btn i.mce-i-wp_fullscreen, -.mce-btn i.mce-i-wp_adv, -.mce-btn i.mce-i-underline, -.mce-btn i.mce-i-alignjustify, -.mce-btn i.mce-i-forecolor, -.mce-btn i.mce-i-pastetext, -.mce-btn i.mce-i-pasteword, -.mce-btn i.mce-i-removeformat, -.mce-btn i.mce-i-charmap, -.mce-btn i.mce-i-outdent, -.mce-btn i.mce-i-indent, -.mce-btn i.mce-i-undo, -.mce-btn i.mce-i-redo, -.mce-btn i.mce-i-help, -.mce-btn i.mce-i-wp_help, -.mce-btn i.mce-i-wp-media-library, -.mce-btn i.mce-i-ltr, -.mce-btn i.mce-i-wp_page, -.mce-btn i.mce-i-hr, -.mce-close { - font-family: tinymce, Arial; - font-style: normal; - font-weight: 400; - font-variant: normal; - font-size: 16px; - margin-left: 0; - padding-right: 0; -} - -.mce-btn i.mce-i-wp_fullscreen, -.qt-fullscreen { - -ie7-icon: "\e023"; -} - -.mce-btn i.mce-i-wp_more, -.mce-btn i.mce-i-wp_page { - -ie7-icon: "\e027"; -} - -.mce-btn i.mce-i-wp_adv { - background-color: #a0a5aa; -} - -.mce-btn i.mce-i-help, -.mce-btn i.mce-i-wp_help { - -ie7-icon: "\e016"; -} - - -/* IE6 leftovers */ -* html .row-actions { - visibility: visible; -} - -* html div.widget-liquid-left, -* html div.widget-liquid-right { - display: block; - position: relative; -} - -* html #editorcontainer { - padding: 0; -} - -* html #poststuff h2 { - margin-left: 0; -} - -* html .stuffbox, -* html .stuffbox input, -* html .stuffbox textarea { - border: 1px solid #ddd; -} - -* html div.widget-liquid-left { - width: 99%; -} - -* html .widgets-sortables { - height: 50px; -} - -* html a#content_resize { - right: -2px; -} - -* html .widget-title h4 { - width: 205px; -} - -* html #removing-widget .in-widget-title { - display: none; -} - -* html .media-item .pinkynail { - height: 32px; - width: 40px; -} - -* html .describe .field input.text, -* html .describe .field textarea { - width: 440px; -} - -* html input { - border: 1px solid #ddd; -} - -* html .edit-box { - display: inline; -} - -* html .postbox-container .meta-box-sortables { - height: 300px; -} - -* html #wpbody-content #screen-options-link-wrap { - display: inline-block; - width: 150px; - text-align: center; -} - -* html #wpbody-content #contextual-help-link-wrap { - display: inline-block; - width: 100px; - text-align: center; -} - -* html #adminmenu { - margin-left: -80px; -} - -* html .folded #adminmenu { - margin-left: -22px; -} - -* html #wpcontent #adminmenu li.menu-top { - display: inline; - padding: 0; - margin: 0; -} - -* html #wpfooter { - margin: 0; -} - -* html #adminmenu div.wp-menu-image { - height: 29px; -} diff --git a/src/wp-admin/css/install.css b/src/wp-admin/css/install.css index df9eaca5a49c3..62a596f0fe1fa 100644 --- a/src/wp-admin/css/install.css +++ b/src/wp-admin/css/install.css @@ -1,46 +1,42 @@ html { - background: #f1f1f1; + background: #f0f0f1; margin: 0 20px; } body { background: #fff; - color: #444; + border: 1px solid #c3c4c7; + color: #3c434a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; margin: 140px auto 25px; - padding: 20px 20px 10px 20px; + padding: 20px 20px 10px; max-width: 700px; -webkit-font-smoothing: subpixel-antialiased; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); } a { - color: #0073aa; + color: #2271b1; } a:hover, a:active { - color: #00a0d2; + color: #135e96; } a:focus { - color: #124964; + color: #043959; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); -} - -.ie8 a:focus { - outline: #5b9dd9 solid 1px; + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } h1, h2 { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; clear: both; - color: #666; + color: #646970; font-size: 24px; - padding: 0; - padding-bottom: 7px; + padding: 0 0 7px; font-weight: 400; } @@ -82,7 +78,7 @@ label { #logo { margin: -130px auto 25px; - padding: 0 0 25px 0; + padding: 0 0 25px; width: 84px; height: 84px; overflow: hidden; @@ -91,7 +87,7 @@ label { background-size: 84px; background-position: center top; background-repeat: no-repeat; - color: #444; /* same as login.css */ + color: #3c434a; /* same as login.css */ font-size: 20px; font-weight: 400; line-height: 1.3em; @@ -112,7 +108,7 @@ label { font-size: 14px; } textarea { - border: 1px solid #ddd; + border: 1px solid #dcdcde; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; width: 100%; box-sizing: border-box; @@ -145,7 +141,7 @@ textarea { } .form-table p { - margin: 4px 0 0 0; + margin: 4px 0 0; font-size: 11px; } @@ -153,8 +149,6 @@ textarea { line-height: 1.33333333; font-size: 15px; padding: 3px 5px; - border: 1px solid #ddd; - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); } input, @@ -205,9 +199,9 @@ submit { } .message { - border-left: 4px solid #dc3232; + border-left: 4px solid #d63638; padding: .7em .6em; - background-color: #fbeaea; + background-color: #fcf0f1; } /* rtl:ignore */ @@ -313,24 +307,24 @@ body.language-chooser { padding: 8px; width: 100%; display: block; - border: 1px solid #ddd; + border: 1px solid #dcdcde; background: #fff; - color: #32373c; + color: #2c3338; font-size: 16px; font-family: Arial, sans-serif; font-weight: 400; } .language-chooser select:focus { - color: #32373c; + color: #2c3338; } .language-chooser select option:hover, .language-chooser select option:focus { - color: #016087; + color: #0a4b78; } -.language-chooser p { +.language-chooser .step { text-align: right; } diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index 3e55bb2d0e323..a39a3b725cd34 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -55,20 +55,13 @@ min-width: 24px; height: 2em; border-radius: 5px; - background-color: #72777c; + background-color: #646970; color: #fff; font-size: 11px; line-height: 1.90909090; text-align: center; } -.ie8 .column-response .comment-count-no-comments, -.ie8 .column-response .comment-count-approved, -.ie8 .column-comments .comment-count-no-comments, -.ie8 .column-comments .comment-count-approved { - min-width: 0; -} - .column-response .post-com-count-no-comments:after, .column-response .post-com-count-approved:after, .column-comments .post-com-count-no-comments:after, @@ -78,22 +71,22 @@ margin-left: 8px; width: 0; height: 0; - border-top: 5px solid #72777c; + border-top: 5px solid #646970; border-right: 5px solid transparent; } -.column-response .post-com-count-approved:hover .comment-count-approved, -.column-response .post-com-count-approved:focus .comment-count-approved, -.column-comments .post-com-count-approved:hover .comment-count-approved, -.column-comments .post-com-count-approved:focus .comment-count-approved { - background: #0073aa; +.column-response a.post-com-count-approved:hover .comment-count-approved, +.column-response a.post-com-count-approved:focus .comment-count-approved, +.column-comments a.post-com-count-approved:hover .comment-count-approved, +.column-comments a.post-com-count-approved:focus .comment-count-approved { + background: #2271b1; } -.column-response .post-com-count-approved:hover:after, -.column-response .post-com-count-approved:focus:after, -.column-comments .post-com-count-approved:hover:after, -.column-comments .post-com-count-approved:focus:after { - border-top-color: #0073aa; +.column-response a.post-com-count-approved:hover:after, +.column-response a.post-com-count-approved:focus:after, +.column-comments a.post-com-count-approved:hover:after, +.column-comments a.post-com-count-approved:focus:after { + border-top-color: #2271b1; } /* @todo: consider to use a single rule for these counters and the admin menu counters. */ @@ -106,7 +99,7 @@ height: 17px; border: 2px solid #fff; border-radius: 11px; - background: #ca4a1f; + background: #d63638; color: #fff; font-size: 9px; line-height: 1.88888888; @@ -123,7 +116,7 @@ .commentlist li { padding: 1em 1em .2em; margin: 0; - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; } .commentlist li li { @@ -138,7 +131,7 @@ #submitted-on, .submitted-on { - color: #555d66; + color: #50575e; } /* reply to comments */ @@ -210,8 +203,8 @@ } #replyerror { - border-color: #ddd; - background-color: #f9f9f9; + border-color: #dcdcde; + background-color: #f6f7f7; } /* @todo: is this used? */ @@ -221,16 +214,16 @@ #the-comment-list tr.undo, #the-comment-list div.undo { - background-color: #f5f5f5; + background-color: #f6f7f7; } #the-comment-list .unapproved th, #the-comment-list .unapproved td { - background-color: #fef7f1; + background-color: #fcf9e8; } #the-comment-list .unapproved th.check-column { - border-left: 4px solid #d54e21; + border-left: 4px solid #d63638; } #the-comment-list .unapproved th.check-column input { @@ -238,11 +231,11 @@ } #the-comment-list .approve a { - color: #006505; + color: #007017; } #the-comment-list .unapprove a { - color: #d98500; + color: #996800; } #the-comment-list th, @@ -264,7 +257,7 @@ .vim-current, .vim-current th, .vim-current td { - background-color: #e4f2fd !important; + background-color: #f0f6fc !important; } th .comment-grey-bubble { @@ -275,7 +268,7 @@ th .comment-grey-bubble { th .comment-grey-bubble:before { content: "\f101"; font: normal 20px/.5 dashicons; - speak: none; + speak: never; display: inline-block; padding: 0; top: 4px; @@ -285,7 +278,7 @@ th .comment-grey-bubble:before { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none !important; - color: #444; + color: #3c434a; } /*------------------------------------------------------------------------------ @@ -302,7 +295,6 @@ table.fixed { } .fixed .column-posts, -.fixed .column-date, .fixed .column-parent, .fixed .column-links, .fixed .column-author, @@ -310,6 +302,10 @@ table.fixed { width: 10%; } +.fixed .column-date { + width: 14%; +} + .column-date span[title] { -webkit-text-decoration: dotted underline; text-decoration: dotted underline; @@ -319,6 +315,12 @@ table.fixed { width: 74px; } +.fixed .column-role, +.fixed .column-posts { + -webkit-hyphens: auto; + hyphens: auto; +} + .fixed .column-comment .comment-author { display: none; } @@ -397,10 +399,6 @@ table.media .column-title .filename { width: 20%; } -#comments-form .fixed .column-date { - width: 14%; -} - #commentsdiv.postbox .inside { margin: 0; padding: 0; @@ -458,19 +456,19 @@ table.media .column-title .filename { .sorting-indicator:before { content: "\f142"; font: normal 20px/1 dashicons; - speak: none; + speak: never; display: inline-block; padding: 0; top: -4px; left: -8px; - color: #444; + color: #3c434a; line-height: 0.5; position: relative; vertical-align: top; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none !important; - color: #444; + color: #3c434a; } .column-comments .sorting-indicator:before { @@ -509,12 +507,8 @@ th.asc a:focus span.sorting-indicator:before { .wp-list-table .toggle-row:focus:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); -} - -.ie8 .wp-list-table .toggle-row:focus:before { - outline: #5b9dd9 solid 1px; + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .wp-list-table .toggle-row:active { @@ -528,13 +522,13 @@ th.asc a:focus span.sorting-indicator:before { border-radius: 50%; display: block; padding: 1px 2px 1px 0; - color: #444; /* same as table headers sort arrows */ + color: #3c434a; /* same as table headers sort arrows */ content: "\f140"; font: normal 20px/1 dashicons; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - speak: none; + speak: never; } .wp-list-table .is-expanded .toggle-row:before { @@ -549,11 +543,11 @@ th.asc a:focus span.sorting-indicator:before { } .locked-indicator-icon:before { - color: #82878c; + color: #8c8f94; content: "\f160"; display: inline-block; font: normal 20px/1 dashicons; - speak: none; + speak: never; vertical-align: middle; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -718,10 +712,10 @@ th.asc a:focus span.sorting-indicator { } .view-switch a:before { - color: #b4b9be; + color: #c3c4c7; display: inline-block; font: normal 20px/1 dashicons; - speak: none; + speak: never; vertical-align: middle; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -729,11 +723,11 @@ th.asc a:focus span.sorting-indicator { .view-switch a:hover:before, .view-switch a:focus:before { - color: #727272; + color: #787c82; } .view-switch a.current:before { - color: #0073aa; + color: #2271b1; } .view-switch .view-list:before { @@ -803,7 +797,7 @@ p.pagenav { } .row-actions { - color: #ddd; + color: #a7aaad; font-size: 13px; padding: 2px 0 0; position: relative; @@ -1039,7 +1033,7 @@ tr.inline-edit-row td, ul.cat-checklist { height: 12em; - border: solid 1px #ddd; + border: solid 1px #dcdcde; overflow-y: scroll; padding: 0 5px; margin: 0; @@ -1049,7 +1043,7 @@ ul.cat-checklist { #bulk-titles { display: block; height: 12em; - border: 1px solid #ddd; + border: 1px solid #dcdcde; overflow-y: scroll; padding: 0 5px; margin: 0 0 5px; @@ -1080,11 +1074,6 @@ ul.cat-checklist { max-width: 80%; } -.ie8 .inline-edit-row #post_parent, -.ie8 .inline-edit-row select[name="page_template"] { - width: 250px; -} - .quick-edit-row-post fieldset label.inline-edit-status { float: left; } @@ -1181,7 +1170,7 @@ ul.cat-checklist { .plugins .active td, .plugins .active th { - background-color: #f7fcfe; + background-color: #f0f6fc; } .plugins .update th, @@ -1204,7 +1193,7 @@ ul.cat-checklist { .plugins tr.active + tr.inactive th, .plugins tr.active + tr.inactive td { border-top: 1px solid rgba(0, 0, 0, 0.03); - box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02), inset 0 -1px 0 #e1e1e1; + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02), inset 0 -1px 0 #dcdcde; } .plugins .update td, @@ -1222,7 +1211,7 @@ ul.cat-checklist { .plugins .active th.check-column, .plugin-update-tr.active td { - border-left: 4px solid #00a0d2; + border-left: 4px solid #72aee6; } .wp-list-table.plugins .plugin-title, @@ -1241,10 +1230,10 @@ ul.cat-checklist { .plugins .plugin-title .dashicons:before { padding: 2px; - background-color: #eee; - box-shadow: inset 0 0 10px rgba(160, 165, 170, 0.15); + background-color: #f0f0f1; + box-shadow: inset 0 0 10px rgba(167, 170, 173, 0.15); font-size: 60px; - color: #B4B9BE; + color: #c3c4c7; } #update-themes-table .plugin-title img, @@ -1252,6 +1241,10 @@ ul.cat-checklist { width: 85px; } +.plugins .column-auto-updates { + width: 14.2em; +} + .plugins .inactive .plugin-title strong { font-weight: 400; } @@ -1261,6 +1254,11 @@ ul.cat-checklist { padding: 0 0 5px; } +.plugins .row-actions { + white-space: normal; + min-width: 12em; +} + .plugins .update .second, .plugins .update .row-actions, .plugins .updated .second, @@ -1296,36 +1294,36 @@ ul.cat-checklist { } .plugins tr.paused th.check-column { - border-left: 4px solid #d54e21; + border-left: 4px solid #d63638; } .plugins tr.paused th, .plugins tr.paused td { - background-color: #fef7f1; + background-color: #f6f7f7; } .plugins tr.paused .plugin-title, .plugins .paused .dashicons-warning { - color: #dc3232; + color: #d63638; } .plugins .paused .error-display p, .plugins .paused .error-display code { font-size: 90%; - color: rgba( 0, 0, 0, 0.7 ); + color: rgba(0, 0, 0, 0.7); } .plugins .resume-link { - color: #dc3232; + color: #d63638; } .plugin-card .update-now:before { - color: #f56e28; + color: #d63638; content: "\f463"; display: inline-block; font: normal 20px/1 dashicons; margin: 3px 5px 0 -2px; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; vertical-align: top; @@ -1346,7 +1344,7 @@ ul.cat-checklist { } .plugin-card .updated-message:before { - color: #79ba49; + color: #68de7c; content: "\f147"; } @@ -1378,7 +1376,7 @@ ul.cat-checklist { width: 48.5%; width: calc( 50% - 8px ); background-color: #fff; - border: 1px solid #ddd; + border: 1px solid #dcdcde; box-sizing: border-box; } @@ -1461,7 +1459,7 @@ div.action-links, .plugin-card .name, .plugin-card .desc { margin-left: 148px; /* icon + margin */ - margin-right: 120px; /* action links */ + margin-right: 128px; /* action links + margin */ } .plugin-card .action-links { @@ -1474,7 +1472,6 @@ div.action-links, .plugin-action-buttons { clear: right; float: right; - margin-left: 2em; margin-bottom: 1em; text-align: right; } @@ -1486,8 +1483,8 @@ div.action-links, .plugin-card-bottom { clear: both; padding: 12px 20px; - background-color: #fafafa; - border-top: 1px solid #ddd; + background-color: #f6f7f7; + border-top: 1px solid #dcdcde; overflow: hidden; } @@ -1502,7 +1499,7 @@ div.action-links, .plugin-card-update-failed .notice-error { margin: 0; padding-left: 16px; - box-shadow: 0 -1px 0 #ddd; + box-shadow: 0 -1px 0 #dcdcde; } .plugin-card-update-failed .plugin-card-bottom { @@ -1536,7 +1533,7 @@ div.action-links, .plugin-card .column-compatibility span:before { font: normal 20px/.5 dashicons; - speak: none; + speak: never; display: inline-block; padding: 0; top: 4px; @@ -1546,21 +1543,21 @@ div.action-links, -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none !important; - color: #444; + color: #3c434a; } .plugin-card .column-compatibility .compatibility-incompatible:before { content: "\f158"; - color: #c62d2d; + color: #d63638; } .plugin-card .column-compatibility .compatibility-compatible:before { content: "\f147"; - color: #31843f; + color: #007017; } .plugin-card .notice { - margin: 20px 20px 0 20px; + margin: 20px 20px 0; } .plugin-icon { @@ -1573,7 +1570,7 @@ div.action-links, } .no-plugin-results { - color: #666; /* same as no themes and no media */ + color: #646970; /* same as no themes and no media */ font-size: 18px; font-style: normal; margin: 0; @@ -1584,20 +1581,16 @@ div.action-links, /* ms */ /* Background Color for Site Status */ .wp-list-table .site-deleted, -.wp-list-table tr.site-deleted { - background: #ff8573; -} -.wp-list-table .site-spammed, -.wp-list-table tr.site-spammed { - background: #faafaa; -} +.wp-list-table tr.site-deleted, .wp-list-table .site-archived, .wp-list-table tr.site-archived { - background: #ffebe8; + background: #fcf0f1; } +.wp-list-table .site-spammed, +.wp-list-table tr.site-spammed, .wp-list-table .site-mature, .wp-list-table tr.site-mature { - background: #fecac2; + background: #fcf9e8; } .sites.fixed .column-lastupdated, @@ -1646,10 +1639,6 @@ div.action-links, .plugin-card .desc p:first-of-type { margin-top: 0; } - - .fixed .column-date { - width: 14%; - } } @media screen and (max-width: 782px) { @@ -1659,7 +1648,7 @@ div.action-links, } .tablenav.top { - margin: 20px 0 5px 0; + margin: 20px 0 5px; } .tablenav.bottom { @@ -1714,7 +1703,7 @@ div.action-links, } .tablenav.bottom .tablenav-pages.one-page { - margin: 15px 0 0 0; + margin-top: 15px; height: 0; } @@ -1871,7 +1860,7 @@ div.action-links, border: none; border-radius: 0; background: none; - color: #bb2a2a; + color: #b32d2e; font-size: inherit; line-height: inherit; text-align: left; @@ -1879,7 +1868,7 @@ div.action-links, .column-response .post-com-count-pending:hover, .column-comments .post-com-count-pending:hover { - color: #dc3232; + color: #d63638; } .widefat thead td.check-column, @@ -1887,23 +1876,24 @@ div.action-links, padding-top: 10px; } + .row-actions { + margin-left: -8px; + margin-right: -8px; + padding-top: 4px; + } + /* Make row actions more easy to select on mobile */ body:not(.plugins-php) .row-actions { - display: -ms-grid; - display: grid; - -ms-grid-columns: auto auto auto; - grid-template-columns: auto auto auto; + display: flex; + flex-wrap: wrap; + gap: 8px; color: transparent; } - .row-actions span { - padding: 4px 0; - } - .row-actions span a, .row-actions span .button-link { display: inline-block; - padding: 4px 0; + padding: 4px 8px; line-height: 1.5; } @@ -2084,11 +2074,6 @@ div.action-links, display: table-cell; } - .plugins .active.update + .plugin-update-tr:before { - border-left: 4px solid #d54e21; - background-color: #fef7f1; - } - .plugins #the-list .plugin-update-tr .plugin-update { border-left: none; } @@ -2097,9 +2082,10 @@ div.action-links, margin-left: 0; } - .plugins .active.update + .plugin-update-tr:before { - background-color: #f7fcfe; - border-left: 4px solid #00a0d2; + .plugins .active.update + .plugin-update-tr:before, + .plugins .active.updated + .plugin-update-tr:before { + background-color: #f0f6fc; + border-left: 4px solid #72aee6; } .plugins .plugin-update-tr .update-message { @@ -2112,6 +2098,16 @@ div.action-links, line-height: 1.5; } + .plugins tbody th.check-column { + padding: 8px 0 0 5px; + } + + .plugins thead td.check-column, + .plugins tfoot td.check-column, + .plugins .inactive th.check-column { + padding-left: 9px; + } + /* Add New plugins page */ table.plugin-install .column-name, table.plugin-install .column-version, @@ -2147,6 +2143,11 @@ div.action-links, margin-right: 0; width: 100%; } + + table.media .column-title .has-media-icon ~ .row-actions { + margin-left: 0; + clear: both; + } } @media screen and (max-width: 480px) { @@ -2154,10 +2155,16 @@ div.action-links, margin: 0; } - /* Drop row actions to two columns on a small screen */ - .row-actions:not(.plugins-php) { - -ms-grid-columns: auto auto; - grid-template-columns: auto auto; + .tablenav.bottom .displaying-num { + position: relative; + top: 0; + display: block; + text-align: right; + padding-bottom: 0.5em; + } + + .tablenav.bottom .tablenav-pages.one-page { + height: auto; } .tablenav-pages .tablenav-paging-text { diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index f0261a6819274..3c795ebab5c42 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -6,16 +6,16 @@ body { } body { - background: #f1f1f1; + background: #f0f0f1; min-width: 0; - color: #444; + color: #3c434a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 13px; line-height: 1.4; } a { - color: #0073aa; + color: #2271b1; transition-property: border, background, color; transition-duration: .05s; transition-timing-function: ease-in-out; @@ -27,14 +27,14 @@ a { a:hover, a:active { - color: #00a0d2; + color: #135e96; } a:focus { - color: #124964; + color: #043959; box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } p { @@ -44,7 +44,7 @@ p { .login .message, .login .success, .login #login_error { - border-left: 4px solid #00a0d2; + border-left: 4px solid #72aee6; padding: 12px; margin-left: 0; margin-bottom: 20px; @@ -53,11 +53,11 @@ p { } .login .success { - border-left-color: #46b450; + border-left-color: #00a32a; } .login #login_error { - border-left-color: #dc3232; + border-left-color: #d63638; } #loginform p.submit, @@ -102,8 +102,8 @@ p { .login .button.wp-hide-pw:focus { background: transparent; - border-color: #007cba; - box-shadow: 0 0 0 1px #007cba; + border-color: #3582c4; + box-shadow: 0 0 0 1px #3582c4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } @@ -131,11 +131,11 @@ p { .login form { margin-top: 20px; margin-left: 0; - padding: 26px 24px 46px; + padding: 26px 24px 34px; font-weight: 400; overflow: hidden; background: #fff; - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); } @@ -157,13 +157,25 @@ p { } } +@media (prefers-reduced-motion: reduce) { + .login form.shake { + animation: none; + transform: none; + } +} + .login-action-confirm_admin_email #login { width: 60vw; + max-width: 650px; margin-top: -2vh; } @media screen and (max-width: 782px) { .login-action-confirm_admin_email #login { + box-sizing: border-box; + margin-top: 0; + padding-left: 4vw; + padding-right: 4vw; width: 100vw; } } @@ -178,6 +190,18 @@ p { float: right; } +.login .reset-pass-submit { + display: flex; + flex-flow: row wrap; + justify-content: space-between; +} + +.login .reset-pass-submit .button { + display: inline-block; + float: none; + margin-bottom: 6px; +} + .login .admin-email-confirm-form .submit { text-align: center; } @@ -191,8 +215,8 @@ p { } .login h1.admin-email__heading { - border-bottom: 1px rgb(241, 241, 241) solid; - color: rgb(95, 95, 95); + border-bottom: 1px #f0f0f1 solid; + color: #50575e; font-weight: normal; padding-bottom: 0.5em; text-align: left; @@ -240,7 +264,7 @@ p { background-size: 84px; background-position: center top; background-repeat: no-repeat; - color: #444; + color: #3c434a; height: 84px; font-size: 20px; font-weight: 400; @@ -264,33 +288,34 @@ p { .login #nav, .login #backtoblog { font-size: 13px; - padding: 0 24px 0; + padding: 0 24px; } .login #nav { - margin: 24px 0 0 0; + margin: 24px 0 0; } #backtoblog { margin: 16px 0; + word-break: break-word; } .login #nav a, .login #backtoblog a { text-decoration: none; - color: #555d66; + color: #50575e; } .login #nav a:hover, .login #backtoblog a:hover, .login h1 a:hover { - color: #00a0d2; + color: #135e96; } .login #nav a:focus, .login #backtoblog a:focus, .login h1 a:focus { - color: #124964; + color: #043959; } .login .privacy-policy-page-link { @@ -312,6 +337,10 @@ p { max-height: none; } +.login input.password-input { + font-family: Consolas, Monaco, monospace; +} + .js.login input.password-input, .js.login-action-rp form .input, .js.login-action-rp input[type="text"] { @@ -321,7 +350,7 @@ p { .login form .input, .login input[type="text"], .login form input[type="checkbox"] { - background: #fbfbfb; + background: #fff; } .js.login-action-rp input[type="text"], @@ -380,10 +409,6 @@ input::-ms-reveal { display: none; } -@-ms-viewport { - width: device-width; -} - @media screen and (max-height: 550px) { #login { padding: 20px 0; diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 3857baaf01529..5aaf859ad4cfb 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -5,7 +5,7 @@ .media-item .describe { border-collapse: collapse; width: 100%; - border-top: 1px solid #ddd; + border-top: 1px solid #dcdcde; clear: both; cursor: default; } @@ -51,6 +51,14 @@ max-width: 128px; } +.media-list-subtitle { + display: block; +} + +.media-list-title { + display: block; +} + #wpbody-content #async-upload-wrap a { display: none; } @@ -96,7 +104,6 @@ padding: 0 0 0 5px; } -.media-item .edit-attachment, .describe-toggle-on, .describe-toggle-off { display: block; @@ -105,6 +112,39 @@ margin-right: 10px; } +.media-item-wrapper { + display: grid; + grid-template-columns: 1fr 1fr; +} + +.media-item .attachment-tools { + display: flex; + justify-content: flex-end; + align-items: center; +} + +.media-item .edit-attachment { + padding: 14px 0; + display: block; + margin-right: 10px; +} + +.media-item .edit-attachment.copy-to-clipboard-container { + margin-top: 0; +} + +.media-item-copy-container .success { + line-height: 0; +} + +.media-item button .copy-attachment-url { + margin-top: 14px; +} + +.media-item .copy-to-clipboard-container { + margin-top: 7px; +} + .media-item .describe-toggle-off, .media-item.open .describe-toggle-on { display: none; @@ -115,7 +155,7 @@ } .media-upload-form .media-item { - min-height: 36px; + min-height: 70px; margin-bottom: 1px; position: relative; width: 100%; @@ -124,7 +164,7 @@ .media-upload-form .media-item, .media-upload-form .media-item .error { - box-shadow: 0 1px 0 #ddd; + box-shadow: 0 1px 0 #dcdcde; } #media-items:empty { @@ -132,16 +172,16 @@ } .media-item .filename { - line-height: 2.76923076; + padding: 14px 0; overflow: hidden; margin-left: 6px; } .media-item .pinkynail { float: left; - margin: 2px 10px 0 3px; - max-width: 40px; - max-height: 32px; + margin: 0 10px 0 0; + max-height: 70px; + max-width: 70px; } .media-item .startopen, @@ -163,7 +203,7 @@ padding: 0; overflow: hidden; border-radius: 22px; - background: #ddd; + background: #dcdcde; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } @@ -173,7 +213,7 @@ height: 100%; margin-top: -22px; border-radius: 22px; - background-color: #0073aa; + background-color: #2271b1; box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3); } @@ -201,14 +241,19 @@ display: block; } +#html-upload-ui #async-upload { + font-size: 1em; +} + .media-upload-form .media-item.error, .media-upload-form .media-item .error { width: auto; - margin: 0 0 1px 0; + margin: 0 0 1px; } .media-upload-form .media-item .error { padding: 10px 0 10px 14px; + min-height: 50px; } .media-item .error-div button.dismiss { @@ -234,8 +279,8 @@ } .find-box-head { - background: #fcfcfc; - border-bottom: 1px solid #ddd; + background: #fff; + border-bottom: 1px solid #dcdcde; height: 36px; font-size: 18px; font-weight: 600; @@ -301,18 +346,18 @@ cursor: pointer; text-align: center; background: none; - color: #666; + color: #646970; } #find-posts-close:hover, #find-posts-close:focus { - color: #00a0d2; + color: #135e96; } #find-posts-close:focus { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -2px; @@ -321,7 +366,7 @@ #find-posts-close:before { font: normal 20px/36px dashicons; vertical-align: top; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: "\f158"; @@ -329,8 +374,8 @@ .find-box-buttons { padding: 8px 16px; - background: #fcfcfc; - border-top: 1px solid #ddd; + background: #fff; + border-top: 1px solid #dcdcde; position: absolute; bottom: 0; left: 0; @@ -369,7 +414,7 @@ } .drag-drop #drag-drop-area { - border: 4px dashed #b4b9be; + border: 4px dashed #c3c4c7; height: 200px; } @@ -403,7 +448,7 @@ } border color while dragging a file over the uploader drop area */ .drag-drop.drag-over #drag-drop-area { - border-color: #83b4d8; + border-color: #9ec2e6; } #plupload-upload-ui { @@ -416,7 +461,8 @@ border color while dragging a file over the uploader drop area */ .media-frame.mode-grid, .media-frame.mode-grid .media-frame-content, -.media-frame.mode-grid .attachments-browser .attachments, +.media-frame.mode-grid .attachments-browser:not(.has-load-more) .attachments, +.media-frame.mode-grid .attachments-browser.has-load-more .attachments-wrapper, .media-frame.mode-grid .uploader-inline-content { position: static; } @@ -438,7 +484,7 @@ border color while dragging a file over the uploader drop area */ width: auto; margin-top: 12px; padding: 0 16px; - border-left: 4px solid #dd3d36; + border-left: 4px solid #d63638; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); background-color: #fff; } @@ -471,12 +517,12 @@ border color while dragging a file over the uploader drop area */ content: "\f153"; display: block; font: normal 16px/1 dashicons; - color: #72777c; + color: #787c82; } .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before, .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before { - color: #c00; + color: #d63638; } .upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2 { @@ -491,10 +537,11 @@ border color while dragging a file over the uploader drop area */ bottom: auto; padding-top: 0; margin-top: 20px; - border: 4px dashed #b4b9be; + border: 4px dashed #c3c4c7; } -.media-frame.mode-select .attachments-browser.fixed .attachments { +.media-frame.mode-select .attachments-browser.fixed:not(.has-load-more) .attachments, +.media-frame.mode-select .attachments-browser.has-load-more.fixed .attachments-wrapper { position: relative; top: 94px; /* prevent jumping up when the toolbar becomes fixed */ padding-bottom: 94px; /* offset for above so the bottom doesn't get cut off */ @@ -504,8 +551,8 @@ border color while dragging a file over the uploader drop area */ .media-frame.mode-grid .selected.attachment:focus, .media-frame.mode-grid .attachment.details:focus { box-shadow: - inset 0 0 2px 3px #f1f1f1, - inset 0 0 0 7px #5b9dd9; + inset 0 0 2px 3px #f0f0f1, + inset 0 0 0 7px #4f94d4; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -6px; @@ -513,14 +560,14 @@ border color while dragging a file over the uploader drop area */ .media-frame.mode-grid .selected.attachment { box-shadow: - inset 0 0 0 5px #f1f1f1, - inset 0 0 0 7px #ccc; + inset 0 0 0 5px #f0f0f1, + inset 0 0 0 7px #c3c4c7; } .media-frame.mode-grid .attachment.details { box-shadow: - inset 0 0 0 3px #f1f1f1, - inset 0 0 0 7px #1e8cbe; + inset 0 0 0 3px #f0f0f1, + inset 0 0 0 7px #4f94d4; } .media-frame.mode-grid.mode-select .attachment .thumbnail { @@ -585,7 +632,7 @@ border color while dragging a file over the uploader drop area */ } .media-frame.mode-grid .attachments-browser .no-media { - color: #666; /* same as no plugins and no themes */ + color: #646970; /* same as no plugins and no themes */ font-size: 18px; font-style: normal; margin: 0; @@ -616,7 +663,7 @@ border color while dragging a file over the uploader drop area */ .edit-attachment-frame .edit-media-header .left, .edit-attachment-frame .edit-media-header .right { cursor: pointer; - color: #72777c; + color: #787c82; background-color: transparent; height: 50px; width: 50px; @@ -624,7 +671,7 @@ border color while dragging a file over the uploader drop area */ position: absolute; text-align: center; border: 0; - border-left: 1px solid #ddd; + border-left: 1px solid #dcdcde; transition: color .1s ease-in-out, background .1s ease-in-out; } @@ -659,8 +706,8 @@ border color while dragging a file over the uploader drop area */ .edit-attachment-frame .edit-media-header .right:hover, .edit-attachment-frame .edit-media-header .left:focus, .edit-attachment-frame .edit-media-header .right:focus { - background: #ddd; - border-color: #ccc; + background: #dcdcde; + border-color: #c3c4c7; color: #000; outline: none; box-shadow: none; @@ -689,7 +736,7 @@ border color while dragging a file over the uploader drop area */ .edit-attachment-frame .edit-media-header [disabled], .edit-attachment-frame .edit-media-header [disabled]:hover { - color: #ccc; + color: #c3c4c7; background: inherit; cursor: default; } @@ -712,7 +759,7 @@ border color while dragging a file over the uploader drop area */ bottom: 0; right: 0; left: 0; - box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 4px 4px -4px rgba(0, 0, 0, 0.1); } .edit-attachment-frame .attachment-media-view { @@ -733,7 +780,7 @@ border color while dragging a file over the uploader drop area */ max-width: 100%; max-height: 90%; max-height: calc( 100% - 42px ); /* leave space for actions underneath */ - background-image: linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4); + background-image: linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7), linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7); background-position: 0 0, 10px 10px; background-size: 20px 20px; } @@ -763,10 +810,10 @@ border color while dragging a file over the uploader drop area */ padding: 12px 16px 0; width: 35%; height: 100%; - box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 4px 4px -4px rgba(0, 0, 0, 0.1); border-bottom: 0; - border-left: 1px solid #ddd; - background: #f3f3f3; + border-left: 1px solid #dcdcde; + background: #f6f7f7; } .edit-attachment-frame .attachment-info .details, @@ -776,12 +823,12 @@ border color while dragging a file over the uploader drop area */ float: none; margin-bottom: 15px; padding-bottom: 15px; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } .edit-attachment-frame .attachment-info .filename { font-weight: 400; - color: #666; + color: #646970; } .edit-attachment-frame .attachment-info .thumbnail { @@ -797,6 +844,21 @@ border color while dragging a file over the uploader drop area */ text-decoration: none; } +.copy-to-clipboard-container { + display: flex; + align-items: center; + margin-top: 8px; + clear: both; +} + +.copy-to-clipboard-container .copy-attachment-url { + white-space: normal; +} + +.copy-to-clipboard-container .success { + color: #008a20; + margin-left: 8px; +} /*------------------------------------------------------------------------------ 14.2 - Image Editor @@ -899,7 +961,7 @@ border color while dragging a file over the uploader drop area */ .imgedit-settings .disabled { /* WCAG 1.4.3 Text or images of text that are part of an inactive user interface component ... have no contrast requirement. */ - color: #a0a5aa; + color: #a7aaad; } .A1B1 { @@ -943,7 +1005,7 @@ border color while dragging a file over the uploader drop area */ .imgedit-menu .button:before { font: normal 16px/1 dashicons; margin-right: 8px; - speak: none; + speak: never; vertical-align: middle; position: relative; top: -2px; @@ -952,9 +1014,9 @@ border color while dragging a file over the uploader drop area */ } .imgedit-menu .button.disabled { - color: #a0a5aa; - border-color: #ddd; - background: #f7f7f7; + color: #a7aaad; + border-color: #dcdcde; + background: #f6f7f7; box-shadow: none; text-shadow: 0 1px 0 #fff; cursor: default; @@ -994,7 +1056,7 @@ border color while dragging a file over the uploader drop area */ } .imgedit-crop-wrap img { - background-image: linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4); + background-image: linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7), linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7); background-position: 0 0, 10px 10px; background-size: 20px 20px; } @@ -1045,7 +1107,7 @@ border color while dragging a file over the uploader drop area */ #poststuff .imgedit-group-top .button-link { text-decoration: none; - color: #23282d; + color: #1d2327; } .imgedit-applyto .imgedit-label { @@ -1070,7 +1132,7 @@ border color while dragging a file over the uploader drop area */ margin: -1px 0 0 -1px; padding: 0; background: transparent; - color: #0074a2; + color: #2271b1; font-size: 20px; line-height: 1; cursor: pointer; @@ -1079,9 +1141,9 @@ border color while dragging a file over the uploader drop area */ } .image-editor .imgedit-settings .imgedit-help-toggle:focus { - color: #0074a2; - border-color: #5b9dd9; - box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); + color: #2271b1; + border-color: #4f94d4; + box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; } @@ -1105,7 +1167,7 @@ border color while dragging a file over the uploader drop area */ } span.imgedit-scale-warn { - color: #dc3232; + color: #d63638; font-size: 20px; font-style: normal; visibility: hidden; @@ -1142,7 +1204,7 @@ span.imgedit-scale-warn { width: 7px; text-align: center; font-size: 13px; - color: #444; + color: #3c434a; } .imgedit-settings .imgedit-scale-button-wrapper { @@ -1159,15 +1221,19 @@ audio, video { max-width: 100%; } -.mejs-container { +.wp-core-ui .mejs-container { width: 100%; max-width: 100%; } -.mejs-container .mejs-controls { +.wp-core-ui .mejs-container * { box-sizing: border-box; } +.wp-core-ui .mejs-time { + box-sizing: content-box; +} + /* =Media Queries -------------------------------------------------------------- */ @@ -1214,6 +1280,17 @@ audio, video { float: none; width: auto; max-width: none; + padding-bottom: 16px; + } + + .copy-to-clipboard-container .success { + font-size: 14px; + } +} + +@media only screen and (max-width: 600px) { + .media-item-wrapper { + grid-template-columns: 1fr; } } diff --git a/src/wp-admin/css/nav-menus.css b/src/wp-admin/css/nav-menus.css index 8b68ac5400237..086ceafad807f 100644 --- a/src/wp-admin/css/nav-menus.css +++ b/src/wp-admin/css/nav-menus.css @@ -65,15 +65,8 @@ ul.add-menu-item-tabs li { position: relative; } -.blank-slate .menu-settings { - border: none; - margin-top: 0; - padding-top: 0; - overflow: hidden; -} - .is-submenu { - color: #555d66; /* #fafafa background */ + color: #50575e; /* #fafafa background */ font-style: italic; font-weight: 400; margin-left: 4px; @@ -83,7 +76,7 @@ ul.add-menu-item-tabs li { margin-top: 23px; padding: 10px; overflow: hidden; - background: #fbfbfb; + background: #fff; } .manage-menus .selected-menu, @@ -104,8 +97,107 @@ ul.add-menu-item-tabs li { margin: 1em 0 10px; } +#nav-menu-bulk-actions-top { + margin: 1em 0; +} + +#nav-menu-bulk-actions-bottom { + margin: 1em 0; + margin: calc( 1em + 9px ) 0 ; +} + +.bulk-actions input.button { + margin-right: 12px; +} + +.bulk-select-button { + position: relative; + display: inline-block; + padding: 0 10px; + font-size: 13px; + line-height: 2.15384615; + height: auto; + min-height: 30px; + background: #f6f7f7; + vertical-align: top; + border: 1px solid #dcdcde; + margin: 0; + cursor: pointer; + border-radius: 3px; + white-space: nowrap; + box-sizing: border-box; +} + +.bulk-selection .bulk-select-button { + color: #2271b1; + border-color: #2271b1; + background: #f6f7f7; + vertical-align: top; +} + +#pending-menu-items-to-delete { + display: none; +} + +.bulk-selection #pending-menu-items-to-delete { + display: block; + margin-top: 1em; +} + +#pending-menu-items-to-delete p { + margin-bottom: 0; +} + +#pending-menu-items-to-delete ul { + margin-top: 0; + list-style: none; +} + +#pending-menu-items-to-delete ul li { + display: inline; +} + +input.bulk-select-switcher + .bulk-select-button-label { + vertical-align: inherit; +} + +label.bulk-select-button:hover, +label.bulk-select-button:active, +label.bulk-select-button:focus-within { + background: #f0f0f1; + border-color: #0a4b78; + color: #0a4b78; +} + +input.bulk-select-switcher:focus + .bulk-select-button-label{ + color: #0a4b78; +} + +.bulk-actions input.menu-items-delete { + -webkit-appearance: none; + appearance: none; + font-size: inherit; + border: 0; + line-height: 2.1em; + background: none; + cursor: pointer; + text-decoration: underline; + color: #b32d2e; +} + +.bulk-actions input.menu-items-delete:hover { + color: #b32d2e; + border: none; +} + +.bulk-actions input.menu-items-delete.disabled { + cursor: default; + color: #a7aaad; + box-shadow: none; +} + .menu-settings { - border-top: 1px solid #eee; + border-top: 1px solid #f0f0f1; margin-top: 2em; } @@ -142,7 +234,7 @@ ul.add-menu-item-tabs li { } .theme-location-set { - color: #72777c; + color: #646970; font-size: 11px; } @@ -170,18 +262,18 @@ ul.add-menu-item-tabs li { .nav-menus-php #post-body { padding: 0 10px; border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; background: #fff; } #nav-menu-header, #nav-menu-footer { padding: 0 10px; - background: #f5f5f5; + background: #f6f7f7; } #nav-menu-header { - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; margin-bottom: 0; } @@ -189,7 +281,6 @@ ul.add-menu-item-tabs li { display: inline-block; vertical-align: middle; margin-right: 7px; - font-style: italic; } .nav-menus-php #post-body div.updated, @@ -212,7 +303,7 @@ ul.add-menu-item-tabs li { #select-nav-menu-container { text-align: right; - padding: 0 10px 3px 10px; + padding: 0 10px 3px; margin-bottom: 5px; } @@ -259,7 +350,7 @@ ul.add-menu-item-tabs li { .locations-edit-menu-link { padding-right: 3px; - border-right: 1px solid #ccc; + border-right: 1px solid #c3c4c7; } #menu-management .inside { @@ -342,7 +433,7 @@ ul.add-menu-item-tabs li { } #manage-menu .inside { - padding: 0px 0px; + padding: 0; } /* Custom Links */ @@ -394,8 +485,7 @@ ul.add-menu-item-tabs li { /* Listings */ .nav-menus-php .list li { display: none; - margin: 0; - margin-bottom: 5px; + margin: 0 0 5px; } .nav-menus-php .list li .menu-item-title { @@ -448,24 +538,24 @@ ul.add-menu-item-tabs li { } .menu-item-bar .menu-item-handle { - border: 1px solid #ddd; + border: 1px solid #dcdcde; position: relative; padding: 10px 15px; height: auto; min-height: 20px; - width: 382px; + max-width: 382px; line-height: 2.30769230; overflow: hidden; word-wrap: break-word; } .menu-item-bar .menu-item-handle:hover { - border-color: #999; + border-color: #8c8f94; } #menu-to-edit .menu-item-invalid .menu-item-handle { - background: #f6c9cc; - border-color: #f1acb1; + background: #fcf0f1; + border-color: #d63638; } .no-js .menu-item-edit-active .item-edit { @@ -478,7 +568,7 @@ ul.add-menu-item-tabs li { .menu li.deleting .menu-item-handle { background-image: none; - background-color: #f66; + background-color: #f86368; } .menu-item-handle .item-title { @@ -490,8 +580,17 @@ ul.add-menu-item-tabs li { margin-right: 13em; } +.menu-item-handle .menu-item-checkbox { + display: none; +} + +.bulk-selection .menu-item-handle .menu-item-checkbox { + display: inline-block; + margin-right: 6px; +} + .menu-item-handle .menu-item-title.no-title { - color: #72777c; + color: #646970; } /* Sortables */ @@ -515,7 +614,7 @@ li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar { } /* WARNING: The factor of 30px is hardcoded into the nav-menus JavaScript. */ -.menu-item-depth-0 { margin-left: 0px; } +.menu-item-depth-0 { margin-left: 0; } .menu-item-depth-1 { margin-left: 30px; } .menu-item-depth-2 { margin-left: 60px; } .menu-item-depth-3 { margin-left: 90px; } @@ -528,7 +627,7 @@ li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar { .menu-item-depth-10 { margin-left: 300px; } .menu-item-depth-11 { margin-left: 330px; } -.menu-item-depth-0 .menu-item-transport { margin-left: 0px; } +.menu-item-depth-0 .menu-item-transport { margin-left: 0; } .menu-item-depth-1 .menu-item-transport { margin-left: -30px; } .menu-item-depth-2 .menu-item-transport { margin-left: -60px; } .menu-item-depth-3 .menu-item-transport { margin-left: -90px; } @@ -558,7 +657,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; } .item-type { display: inline-block; padding: 12px 16px; - color: #666; + color: #646970; font-size: 12px; line-height: 1.5; } @@ -599,7 +698,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; } height: auto; margin: 12px -10px 12px 0; padding: 0; - color: #0073aa; + color: #2271b1; text-decoration: underline; font-size: 12px; line-height: 1.5; @@ -636,8 +735,8 @@ body.menu-max-depth-11 { min-width: 1280px !important; } .nav-menus-php .item-edit:focus:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } /* Menu editing */ @@ -647,11 +746,11 @@ body.menu-max-depth-11 { min-width: 1280px !important; } .menu-item-settings { display: block; - width: 402px; - padding: 10px 0 10px 10px; + max-width: 392px; + padding: 10px; position: relative; z-index: 10; /* Keep .item-title's shadow from appearing on top of .menu-item-settings */ - border: 1px solid #ccd0d4; + border: 1px solid #c3c4c7; border-top: none; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); } @@ -664,13 +763,11 @@ body.menu-max-depth-11 { min-width: 1280px !important; } .field-move-visual-label { float: left; margin-right: 4px; - font-style: italic; } .menu-item-settings .field-move .button-link { display: none; margin: 0 2px; - font-style: italic; } .menu-item-edit-active .menu-item-settings { @@ -699,10 +796,9 @@ body.menu-max-depth-11 { min-width: 1280px !important; } display: block; margin: 0 0 15px; padding: 3px 5px 5px; - border: 1px solid #ddd; - color: #72777c; + border: 1px solid #dcdcde; + color: #646970; font-size: 12px; - font-style: italic; } .link-to-original a { @@ -721,11 +817,15 @@ body.menu-max-depth-11 { min-width: 1280px !important; } } .description-thin { - width: 190px; + width: calc(50% - 5px); +} + +.menu-item-settings .description-thin + .description-thin { + margin-right: 0; } .description-wide { - width: 390px; + width: 100%; } .menu-item-actions { @@ -749,10 +849,6 @@ body.menu-max-depth-11 { min-width: 1280px !important; } float: right; } -.nav-menus-php .blank-slate .menu-settings { - display: none; -} - /* Same as the Publish Meta Box #delete-action */ .nav-menus-php .delete-action { float: left; @@ -774,22 +870,18 @@ body.menu-max-depth-11 { min-width: 1280px !important; } /* =Media Queries -------------------------------------------------------------- */ -@media only screen and (min-width: 769px) and (max-width: 1000px){ +@media only screen and (min-width: 769px) and (max-width: 1000px) { body.menu-max-depth-0 { min-width: 0 !important; } - #menu-management-liquid{ + #menu-management-liquid { width: 100%; } - .nav-menus-php #post-body-content{ + .nav-menus-php #post-body-content { min-width: 0; } - - .menu-item-bar .menu-item-handle{ - width: 90%; - } } @media screen and (max-width: 782px) { @@ -874,6 +966,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; } .menu-settings-group { padding-left: 0; + overflow: visible; } .menu-settings-group-name { @@ -896,11 +989,31 @@ body.menu-max-depth-11 { min-width: 1280px !important; } margin: 0.5em 0; } + .wp-core-ui .manage-menus .button { + margin-bottom: 0; + } + .widefat .menu-locations .menu-location-title { padding-top: 16px; } } +@media only screen and (min-width: 783px) { + @supports (position: sticky) and (scroll-margin-bottom: 130px) { + + #nav-menu-footer { + position: sticky; + bottom: 0; + z-index: 10; + box-shadow: 0 -1px 0 0 #ddd; + } + + #save_menu_header { + display: none; + } + } +} + @media only screen and (max-width: 768px) { /* menu locations */ #menu-locations-wrap .widefat { diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css index 16b8278aa305f..e523ee431ce93 100644 --- a/src/wp-admin/css/revisions.css +++ b/src/wp-admin/css/revisions.css @@ -42,7 +42,7 @@ .revisions-tickmarks > div { position: absolute; height: 100%; - border-left: 1px solid #a0a5aa; + border-left: 1px solid #a7aaad; box-sizing: border-box; } @@ -79,7 +79,6 @@ top: 50%; top: calc( 50% - 10px ); transition: opacity 0.5s; - filter: alpha(opacity=0); /* ie8 and earlier */ } body.folded .revisions .loading-indicator { @@ -94,7 +93,6 @@ body.folded .revisions .loading-indicator { .revisions.loading .loading-indicator { opacity: 1; - filter: alpha(opacity=100); /* ie8 and earlier */ } .revisions .diff { @@ -103,7 +101,6 @@ body.folded .revisions .loading-indicator { .revisions.loading .diff { opacity: 0.5; - filter: alpha(opacity=50); /* ie8 and earlier */ } .revisions.diff-error .diff { @@ -134,11 +131,11 @@ body.folded .revisions .loading-indicator { } .revisions-controls .author-card .date { - color: #72777c; + color: #646970; } .revisions-controls .author-card.autosave { - color: #d54e21; + color: #d63638; } .revisions-controls .author-card .author-name { @@ -189,10 +186,6 @@ body.folded .revisions .loading-indicator { vertical-align: middle; } -table.diff tbody tr td:nth-child(2) { - width: 4%; -} - table.diff { table-layout: fixed; width: 100%; @@ -245,16 +238,16 @@ table.diff .diff-addedline ins { table.diff .diff-deletedline { position: relative; - background-color: #ffe9e9; + background-color: #fcf0f1; } table.diff .diff-deletedline del { - background-color: #faa; + background-color: #ffabaf; } table.diff .diff-addedline { position: relative; - background-color: #e9ffe9; + background-color: #edfaef; } table.diff .diff-deletedline .dashicons, @@ -274,7 +267,7 @@ table.diff .diff-addedline .dashicons { } table.diff .diff-addedline ins { - background-color: #afa; + background-color: #68de7c; } .diff-meta { @@ -385,19 +378,9 @@ table.diff .diff-addedline ins { right: 20px; } -.ie8 .revisions-tooltip-arrow > span { - left: 15px; - top: -25px; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; -} - -.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow > span { - right: 25px; -} - .revisions-tooltip, .revisions-tooltip-arrow > span { - border: 1px solid #ddd; + border: 1px solid #dcdcde; background-color: #fff; } @@ -458,7 +441,7 @@ div.revisions-controls > .wp-slider > .ui-slider-handle { /* jQuery UI Slider */ .wp-slider.ui-slider { position: relative; - border: 1px solid #ddd; + border: 1px solid #dcdcde; text-align: left; cursor: pointer; } @@ -477,21 +460,21 @@ div.revisions-controls > .wp-slider > .ui-slider-handle { .wp-slider .ui-slider-handle, .wp-slider .ui-slider-handle.focus { - background: #f7f7f7; - border: 1px solid #ccc; - box-shadow: 0 1px 0 #cccccc; + background: #f6f7f7; + border: 1px solid #c3c4c7; + box-shadow: 0 1px 0 #c3c4c7; } .wp-slider .ui-slider-handle:hover, .wp-slider .ui-slider-handle.ui-state-hover { - background: #fafafa; - border-color: #999; + background: #f6f7f7; + border-color: #8c8f94; } .wp-slider .ui-slider-handle:active, .wp-slider .ui-slider-handle.ui-state-active { - background: #eee; - border-color: #999; + background: #f0f0f1; + border-color: #8c8f94; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); transform: translateY(1px); } @@ -501,17 +484,17 @@ div.revisions-controls > .wp-slider > .ui-slider-handle { position: absolute; top: 2px; left: 2px; - color: #555; + color: #50575e; content: "\f229"; font: normal 18px/1 dashicons; - speak: none; + speak: never; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wp-slider .ui-slider-handle:hover:before, .wp-slider .ui-slider-handle.ui-state-hover:before { - color: #23282d; + color: #1d2327; } .wp-slider .ui-slider-handle.from-handle:before, diff --git a/src/wp-admin/css/site-health.css b/src/wp-admin/css/site-health.css index 6efc630fa1ca9..ed539d33ae279 100644 --- a/src/wp-admin/css/site-health.css +++ b/src/wp-admin/css/site-health.css @@ -1,20 +1,8 @@ -.site-health #wpcontent, -.site-health.auto-fold #wpcontent { - padding-left: 0; -} - -/* Emulates .wrap h1 styling */ -.health-check-header h1 { - display: inline-block; - font-weight: 600; - margin: 0 0.8rem 1rem; - font-size: 23px; - padding: 9px 0 4px 0; - line-height: 1.3; -} +/* Note: Any Site Health selectors that use +duplicate styling from the Privacy settings screen +are styled in the Privacy section of edit.css */ .health-check-body h2 { - padding: 1rem 0; line-height: 1.4; } @@ -23,18 +11,8 @@ font-weight: 400; } -.health-check-header { +.health-check-widget-title-section { text-align: center; - margin: 0 0 1rem; - background: #fff; - border-bottom: 1px solid #e2e4e7; -} - -.health-check-title-section { - display: flex; - align-items: center; - justify-content: center; - clear: both; } .site-health-progress-wrapper { @@ -68,34 +46,34 @@ .loading .site-health-progress svg #bar { stroke-dashoffset: 0; - stroke: #adc5d2; + stroke: #c3c4c7; animation: loadingPulse 3s infinite ease-in-out; } .site-health-progress svg circle { stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; - stroke: #ccc; + stroke: #c3c4c7; stroke-width: 2em; } .site-health-progress svg #bar { stroke-dashoffset: 565; - stroke: #dc3232; + stroke: #d63638; } .green .site-health-progress #bar { - stroke: #46b450; + stroke: #00a32a; } .green .site-health-progress .site-health-progress-label { - color: #46b450; + color: #00a32a; } .orange .site-health-progress #bar { - stroke: #ffb900; + stroke: #dba617; } .orange .site-health-progress .site-health-progress-label { - color: #ffb900; + color: #dba617; } .site-health-progress-label { @@ -106,25 +84,35 @@ @keyframes loadingPulse { 0% { - stroke: #adc5d2; + stroke: #c3c4c7; } 50% { - stroke: #00a0d2; + stroke: #72aee6; } 100% { - stroke: #adc5d2; + stroke: #c3c4c7; } } .health-check-tabs-wrapper { /* IE 11 */ display: -ms-inline-grid; - -ms-grid-columns: 1fr 1fr; + -ms-grid-columns: 1fr 1fr 1fr 1fr; vertical-align: top; /* modern browsers */ display: inline-grid; + grid-template-columns: 1fr 1fr 1fr 1fr; +} + +.health-check-tabs-wrapper.tab-count-1 { + grid-template-columns: 1fr; +} +.health-check-tabs-wrapper.tab-count-2 { grid-template-columns: 1fr 1fr; } +.health-check-tabs-wrapper.tab-count-3 { + grid-template-columns: 1fr 1fr 1fr; +} .health-check-tab { display: block; /* IE 11 */ @@ -135,22 +123,45 @@ transition: box-shadow 0.5s ease-in-out; } -.health-check-tab:nth-child(1) { - -ms-grid-column: 1; /* IE 11 */ +.health-check-offscreen-nav-wrapper { + position: relative; + background: transparent; + border: none; +} +.health-check-offscreen-nav-wrapper:focus .health-check-offscreen-nav { + left: initial; } -.health-check-tab:nth-child(2) { - -ms-grid-column: 2; /* IE 11 */ +.health-check-offscreen-nav { + display: none; + position: absolute; + padding-top: 10px; + right: 0; + top: 100%; + width: 13rem; +} +.health-check-offscreen-nav-wrapper.visible .health-check-offscreen-nav { + display: inline-block; +} +.health-check-offscreen-nav:before { + position: absolute; + content: ""; + width: 0; + height: 0; + border-style: solid; + border-width: 0 10px 5px; + border-color: transparent transparent #ffffff; + right: 20px; + top: 5px; } -.health-check-tab:focus { - color: #191e23; - outline: 1px solid #6c7781; - box-shadow: none; +.health-check-offscreen-nav .health-check-tab { + background: #fff; + box-shadow: 0 2px 5px 0 rgba( 0, 0, 0, 0.75 ); } -.health-check-tab.active { - box-shadow: inset 0 -3px #007cba; +.health-check-offscreen-nav .health-check-tab.active { + box-shadow: inset 3px 0 #3582c4; font-weight: 600; } @@ -179,23 +190,23 @@ .health-check-body .pass::before, .health-check-body .good::before { content: "\f147"; - color: #46b450; + color: #00a32a; } .health-check-body .warning::before { content: "\f460"; - color: #ffb900; + color: #dba617; } .health-check-body .info::before { content: "\f348"; - color: #00a0d2; + color: #72aee6; } .health-check-body .fail::before, .health-check-body .error::before { content: "\f335"; - color: #dc3232; + color: #d63638; } .site-health-copy-buttons { @@ -203,22 +214,16 @@ } .site-health-copy-buttons .copy-button-wrapper { + display: inline-flex; + align-items: center; margin: 0.5rem 0 1rem; } .site-health-copy-buttons .success { - display: none; - color: #40860a; - line-height: 1.8; + color: #008a20; margin-left: 0.5rem; } -.site-health-copy-buttons .success.visible { - display: inline-block; - height: 30px; - line-height: 2.30769231; -} - .site-status-has-issues.hide { display: none; } @@ -244,12 +249,12 @@ text-align: center; height: 100%; width: 100%; - margin-top: 0; + margin: 0 0 3rem; } @media all and (min-width: 784px) { .site-status-all-clear { - margin: 5rem 0; + margin: 2rem 0 5rem; } } @@ -259,7 +264,8 @@ .site-status-all-clear .dashicons { font-size: 150px; - height: 130px; + height: 150px; + margin-bottom: 2rem; width: 150px; } @@ -272,128 +278,12 @@ margin: 0; } -.health-check-accordion { - border: 1px solid #ccd0d4; -} - -.health-check-accordion-heading { - margin: 0; - border-top: 1px solid #ccd0d4; - font-size: inherit; - line-height: inherit; - font-weight: 600; - color: inherit; -} - -.health-check-accordion-heading:first-child { - border-top: none; -} - -.health-check-accordion-trigger { - background: #fff; - border: 0; - color: #32373c; - cursor: pointer; - display: flex; - font-weight: 400; - margin: 0; - padding: 1em 3.5em 1em 1.5em; - min-height: 46px; - position: relative; - text-align: left; - width: 100%; - align-items: center; - justify-content: space-between; -} - .wp-core-ui .button.site-health-view-passed { position: relative; padding-right: 40px; padding-left: 20px; } -.health-check-accordion-trigger:hover, -.health-check-accordion-trigger:active { - background: #f8f9f9; -} - -.health-check-accordion-trigger:focus { - color: #191e23; - border: none; - box-shadow: none; - outline-offset: -1px; - outline: 2px solid #0071a1; - background-color: #f8f9f9; -} - -.health-check-accordion-trigger .title { - pointer-events: none; - font-weight: 600; - flex-grow: 1; -} - -.health-check-accordion-trigger .icon, -.site-health-view-passed .icon { - border: solid #555d66; - border-width: 0 2px 2px 0; - height: 0.5rem; - pointer-events: none; - position: absolute; - right: 1.5em; - top: 50%; - transform: translateY(-70%) rotate(45deg); - width: 0.5rem; -} - -.health-check-accordion-trigger .badge { - padding: 0.1rem 0.5rem 0.15rem; - color: #32373c; - font-weight: 600; - margin-left: 0.5rem; -} - -.health-check-accordion-trigger .badge.blue { - border: 1px solid #bfe7f3; -} - -.health-check-accordion-trigger .badge.orange { - border: 1px solid #ffb900; -} - -.health-check-accordion-trigger .badge.red { - border: 1px solid #dc3232; -} - -.health-check-accordion-trigger .badge.green { - border: 1px solid #46b450; -} - -.health-check-accordion-trigger .badge.purple { - border: 1px solid #826eb4; -} - -.health-check-accordion-trigger .badge.gray { - border: 1px solid #ccd0d4; -} - -.health-check-accordion-trigger[aria-expanded="true"] .icon, -.site-health-view-passed[aria-expanded="true"] .icon { - transform: translateY(-30%) rotate(-135deg) -} - -.health-check-accordion-panel { - margin: 0; - padding: 1em 1.5em; - background: #fff; -} - -.health-check-accordion-panel[hidden] { - display: none; -} - -.health-check-accordion-panel a .dashicons { - text-decoration: none; -} /* Better position for the WordPress admin notices and update nag. */ .site-health .notice { @@ -412,20 +302,29 @@ flex-shrink: 0; } -@media screen and (max-width: 782px) { - .health-check-body { - margin: 0 12px; - width: auto; - } +/* Styling unique to the dashboard widget. */ +#dashboard_site_health .site-health-details { + padding-left: 16px; +} - .site-health .notice { - margin: 5px 10px 15px; - } +#dashboard_site_health .health-check-widget { + display: grid; + grid-template-columns: 1fr 2fr; + grid-auto-rows: minmax(64px, auto); + column-gap: 16px; + align-items: center; +} +#dashboard_site_health .site-health-progress-label { + margin-left: 0; +} - .site-health .update-nag { - margin-right: 10px; - margin-left: 10px; +@media screen and (max-width: 480px) { + #dashboard_site_health .health-check-widget { + grid-template-columns: 100%; } +} + +@media screen and (max-width: 782px) { .site-health-issues-wrapper .health-check-accordion-trigger { flex-direction: column; @@ -452,12 +351,9 @@ padding-bottom: 0; font-weight: 600; } -} -/* The breakpoint is usually at 960px, the additional space is to allow for the margin. */ -@media only screen and (max-width: 1004px) { - .health-check-body { - margin: 0 22px; - width: auto; + .wp-core-ui .site-health-copy-buttons .copy-button { + margin-bottom: 0; } } + diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index 606b61d163a13..04bfdd00f7f7d 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -56,22 +56,17 @@ body.js .theme-browser.search-loading { margin: 0 4% 4% 0; position: relative; width: 30.6%; - border: 1px solid #ddd; + border: 1px solid #dcdcde; box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1); box-sizing: border-box; } -.ie8 .theme-browser .theme { - width: 30%; - margin: 0 3% 4% 0; -} - .theme-browser .theme:nth-child(3n) { margin-right: 0; } .theme-browser .theme:hover, -.theme-browser .theme:focus { +.theme-browser .theme.focus { cursor: pointer; } @@ -95,13 +90,12 @@ body.js .theme-browser.search-loading { opacity: 0; transition: opacity 0.1s ease-in-out; height: auto; - background: rgba(244, 244, 244, 0.7); + background: rgba(246, 247, 247, 0.7); border-left: 1px solid rgba(0, 0, 0, 0.05); } .theme-browser .theme:hover .theme-actions, -.theme-browser .theme.focus .theme-actions, -.theme-browser .theme:focus .theme-actions { +.theme-browser .theme.focus .theme-actions { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; opacity: 1; } @@ -145,12 +139,12 @@ body.js .theme-browser.search-loading { } .theme-browser .theme:hover .theme-screenshot, -.theme-browser .theme:focus .theme-screenshot { +.theme-browser .theme.focus .theme-screenshot { background: #fff; } .theme-browser.rendered .theme:hover .theme-screenshot img, -.theme-browser.rendered .theme:focus .theme-screenshot img { +.theme-browser.rendered .theme.focus .theme-screenshot img { opacity: 0.4; } @@ -161,7 +155,8 @@ body.js .theme-browser.search-loading { top: 35%; right: 20%; left: 20%; - background: #23282d; + width: 60%; + background: #1d2327; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 15px; @@ -171,25 +166,30 @@ body.js .theme-browser.search-loading { padding: 15px 12px; text-align: center; border-radius: 3px; + border: none; transition: opacity 0.1s ease-in-out; } -.theme-browser .theme:focus { - border-color: #5b9dd9; - box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); +.theme-browser .theme .more-details:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1; } -.theme-browser .theme:focus .more-details { +.theme-browser .theme.focus { + border-color: #4f94d4; + box-shadow: 0 0 2px rgba(79, 148, 212, 0.8); +} + +.theme-browser .theme.focus .more-details { opacity: 1; } /* Current theme needs to have its action always on view */ -.theme-browser .theme.active:focus .theme-actions { +.theme-browser .theme.active.focus .theme-actions { display: block; } .theme-browser.rendered .theme:hover .more-details, -.theme-browser.rendered .theme:focus .more-details { +.theme-browser.rendered .theme.focus .more-details { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; opacity: 1; } @@ -198,7 +198,7 @@ body.js .theme-browser.search-loading { * The currently active theme */ .theme-browser .theme.active .theme-name { - background: #23282d; + background: #1d2327; color: #fff; padding-right: 110px; font-weight: 300; @@ -214,7 +214,7 @@ body.js .theme-browser.search-loading { } .theme-browser .theme.active .theme-actions { - background: rgba(49, 49, 49, 0.7); + background: rgba(44, 51, 56, 0.7); border-left: none; opacity: 1; } @@ -238,8 +238,8 @@ body.js .theme-browser.search-loading { } .theme-browser .theme .theme-author { - background: #23282d; - color: #eee; + background: #1d2327; + color: #f0f0f1; display: none; font-size: 14px; margin: 0 10px; @@ -254,7 +254,6 @@ body.js .theme-browser.search-loading { .theme-browser .theme.display-author .theme-author a { color: inherit; - text-decoration: none; } /** @@ -284,14 +283,14 @@ body.js .theme-browser.search-loading { bottom: 0; padding: 0; text-shadow: none; - border: 5px dashed #d5d2ca; + border: 5px dashed #dcdcde; border: 5px dashed rgba(0, 0, 0, 0.1); box-sizing: border-box; } .theme-browser .theme.add-new-theme span:after { - background: #e5e5e5; - background: rgba(153, 153, 153, 0.1); + background: #dcdcde; + background: rgba(140, 143, 148, 0.1); border-radius: 50%; display: inline-block; content: "\f132"; @@ -301,7 +300,7 @@ body.js .theme-browser.search-loading { height: 100px; vertical-align: middle; text-align: center; - color: rgb(153, 153, 153); + color: #8c8f94; position: absolute; top: 30%; left: 50%; @@ -324,14 +323,14 @@ body.js .theme-browser.search-loading { .theme-browser .theme.add-new-theme a:hover span:after, .theme-browser .theme.add-new-theme a:focus span:after { background: #fff; - color: #0073aa; + color: #2271b1; } .theme-browser .theme.add-new-theme a:hover:after, .theme-browser .theme.add-new-theme a:focus:after { border-color: transparent; color: #fff; - background: #0073aa; + background: #2271b1; content: ""; } @@ -363,8 +362,8 @@ body.js .theme-browser.search-loading { right: 0; top: 0; bottom: 0; - background: #f1f1f1; - background: rgba(238, 238, 238, 0.9); + background: #f0f0f1; + background: rgba(240, 240, 241, 0.9); z-index: 10000; /* Over WP Pointers. */ } @@ -374,7 +373,7 @@ body.js .theme-browser.search-loading { left: 0; right: 0; height: 48px; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #dcdcde; } .theme-overlay .theme-header button { @@ -388,14 +387,14 @@ body.js .theme-browser.search-loading { text-align: center; float: right; border: 0; - border-left: 1px solid #ddd; + border-left: 1px solid #dcdcde; background-color: transparent; transition: color .1s ease-in-out, background .1s ease-in-out; } .theme-overlay .theme-header .close:before { font: normal 22px/50px dashicons !important; - color: #72777c; + color: #787c82; display: inline-block; content: "\f335"; font-weight: 300; @@ -405,14 +404,14 @@ body.js .theme-browser.search-loading { .theme-overlay .theme-header .right, .theme-overlay .theme-header .left { cursor: pointer; - color: #72777c; + color: #787c82; background-color: transparent; height: 48px; width: 54px; float: left; text-align: center; border: 0; - border-right: 1px solid #ddd; + border-right: 1px solid #dcdcde; transition: color .1s ease-in-out, background .1s ease-in-out; } @@ -422,8 +421,8 @@ body.js .theme-browser.search-loading { .theme-overlay .theme-header .right:hover, .theme-overlay .theme-header .left:focus, .theme-overlay .theme-header .left:hover { - background: #ddd; - border-color: #ccc; + background: #dcdcde; + border-color: #c3c4c7; color: #000; } @@ -443,7 +442,7 @@ body.js .theme-browser.search-loading { .theme-overlay .theme-header .right.disabled, .theme-overlay .theme-header .left.disabled:hover, .theme-overlay .theme-header .right.disabled:hover { - color: #ccc; + color: #c3c4c7; background: inherit; cursor: inherit; } @@ -498,14 +497,10 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { left: 0; right: 0; padding: 10px 25px 5px; - background: #f3f3f3; + background: #f6f7f7; z-index: 30; box-sizing: border-box; - border-top: 1px solid #eee; -} - -.ie8 .theme-overlay .theme-actions { - border: 1px solid #eee; + border-top: 1px solid #f0f0f1; } .theme-overlay .theme-actions a { @@ -521,7 +516,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .broken-themes a.delete-theme, .theme-overlay .theme-actions .delete-theme { - color: #a00; + color: #d63638; text-decoration: none; border-color: transparent; box-shadow: none; @@ -538,9 +533,9 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .broken-themes a.delete-theme:focus, .theme-overlay .theme-actions .delete-theme:hover, .theme-overlay .theme-actions .delete-theme:focus { - background: #d54e21; + background: #d63638; color: #fff; - border-color: #d54e21; + border-color: #d63638; } .theme-overlay .theme-actions .active-theme, @@ -598,8 +593,8 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { /* Other screenshots, shown small and square */ .theme-overlay .screenshot.thumb { - background: #ccc; - border: 1px solid #eee; + background: #c3c4c7; + border: 1px solid #f0f0f1; float: none; display: inline-block; margin: 10px 5px 0; @@ -626,7 +621,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .theme-overlay .screenshot.selected { background: transparent; - border: 2px solid #00a0d2; + border: 2px solid #72aee6; } .theme-overlay .screenshot.selected img { @@ -648,7 +643,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { } .theme-overlay .current-label { - background: #32373c; + background: #2c3338; color: #fff; font-size: 11px; display: inline-block; @@ -656,13 +651,11 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { border-radius: 2px; margin: 0 0 -10px; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } .theme-overlay .theme-name { - color: #23282d; + color: #1d2327; font-size: 32px; font-weight: 100; margin: 10px 0 0; @@ -672,7 +665,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { } .theme-overlay .theme-version { - color: #72777c; + color: #646970; font-size: 13px; font-weight: 400; float: none; @@ -682,43 +675,56 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .theme-overlay .theme-author { margin: 15px 0 25px; - color: #72777c; + color: #646970; font-size: 16px; font-weight: 400; line-height: inherit; } -.theme-overlay .theme-author a { +.theme-overlay .toggle-auto-update { + /* Better align spin icon and text. */ + display: inline-flex; + align-items: center; + /* Prevents content after the auto-update toggler from jumping down and up. */ + min-height: 20px; /* Same height as the spinning dashicon. */ + vertical-align: top; +} + +.theme-overlay .theme-autoupdate .toggle-auto-update { text-decoration: none; } +.theme-overlay .theme-autoupdate .toggle-auto-update .label { + text-decoration: underline; +} + .theme-overlay .theme-description { - color: #555; + color: #50575e; font-size: 15px; font-weight: 400; line-height: 1.5; - margin: 30px 0 0 0; + margin: 30px 0 0; } .theme-overlay .theme-tags { - border-top: 3px solid #eee; - color: #82878c; + border-top: 3px solid #f0f0f1; + color: #646970; font-size: 13px; font-weight: 400; - margin: 30px 0 0 0; + margin: 30px 0 0; padding-top: 20px; } .theme-overlay .theme-tags span { - color: #444; + color: #3c434a; font-weight: 600; margin-right: 5px; } .theme-overlay .parent-theme { - background: #f7fcfe; - border: 1px solid #eee; - border-left: 4px solid #00a0d2; + background: #fff; + border: 1px solid #f0f0f1; + border-left: 4px solid #72aee6; font-size: 14px; font-weight: 400; margin-top: 30px; @@ -859,7 +865,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { } .theme-browser .theme .theme-actions { - padding: 5px 10px 4px 10px; + padding: 5px 10px 4px; } .theme-overlay.small-screenshot .theme-screenshots { @@ -876,12 +882,12 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .theme:not(.active):hover .theme-actions, .theme:not(.active):focus .theme-actions, .theme:hover .more-details, - .theme:focus .more-details { + .theme.focus .more-details { display: none; } .theme-browser.rendered .theme:hover .theme-screenshot img, - .theme-browser.rendered .theme:focus .theme-screenshot img { + .theme-browser.rendered .theme.focus .theme-screenshot img { opacity: 1.0; } } @@ -932,7 +938,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { } .theme-overlay .theme-author { - margin: 5px 0 15px 0; + margin: 5px 0 15px; } .theme-overlay .current-label { @@ -945,7 +951,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { clear: both; left: 0; right: 0; - margin: -5px 0 20px 0; + margin: -5px 0 20px; width: 100%; max-width: 280px; } @@ -992,12 +998,17 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { 16.2 - Install Themes ------------------------------------------------------------------------------*/ +.update-php .wrap { + max-width: 40rem; +} + /* Already installed theme */ .theme-browser .theme .theme-installed { - background: #0073aa; + background: #2271b1; } + .theme-browser .theme .notice-success p:before { - color: #79ba49; + color: #68de7c; content: "\f147"; display: inline-block; font: normal 20px/1 'dashicons'; @@ -1038,10 +1049,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { overflow: hidden; position: relative; top: 10px; -} - -.upload-plugin-wrap { - display: none; + text-align: center; } .show-upload-view .upload-theme, @@ -1053,19 +1061,23 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { .upload-theme .wp-upload-form, .upload-plugin .wp-upload-form { - background: #fafafa; - border: 1px solid #ccd0d4; + background: #f6f7f7; + border: 1px solid #c3c4c7; padding: 30px; margin: 30px auto; - max-width: 380px; - display: flex; + display: inline-flex; justify-content: space-between; align-items: center; } +.upload-theme .wp-upload-form input[type="file"], +.upload-plugin .wp-upload-form input[type="file"] { + margin-right: 10px; +} + .upload-theme .install-help, .upload-plugin .install-help { - color: #555d66; /* #f1f1f1 background */ + color: #50575e; /* #f1f1f1 background */ font-size: 18px; font-style: normal; margin: 0; @@ -1076,7 +1088,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { p.no-themes, p.no-themes-local { clear: both; - color: #666; + color: #646970; font-size: 18px; font-style: normal; margin: 0; @@ -1101,7 +1113,6 @@ p.no-themes-local { .upload-theme .install-help { font-size: 15px; padding: 20px 0 0; - text-align: left; } } @@ -1116,7 +1127,7 @@ p.no-themes-local { .theme-details .num-ratings, .theme-details .no-rating { font-size: 11px; - color: #72777c; + color: #646970; } .theme-details .no-rating { @@ -1124,12 +1135,49 @@ p.no-themes-local { line-height: 1.9; } +.update-from-upload-comparison { + border-top: 1px solid #dcdcde; + border-bottom: 1px solid #dcdcde; + text-align: left; + margin: 1rem 0 1.4rem; + border-collapse: collapse; + width: 100%; +} + +.update-from-upload-comparison tr:last-child td { + height: 1.4rem; + vertical-align: top; +} + +.update-from-upload-comparison tr:first-child th { + font-weight: bold; + height: 1.4rem; + vertical-align: bottom; +} + +.update-from-upload-comparison td.name-label { + text-align: right; +} + +.update-from-upload-comparison td, +.update-from-upload-comparison th { + padding: 0.4rem 1.4rem; +} + +.update-from-upload-comparison td.warning { + color: #d63638; +} + +.update-from-upload-actions { + margin-top: 1.4rem; +} + /*------------------------------------------------------------------------------ 16.3 - Custom Header Screen ------------------------------------------------------------------------------*/ .appearance_page_custom-header #headimg { - border: 1px solid #ddd; + border: 1px solid #dcdcde; overflow: hidden; width: 100%; } @@ -1165,7 +1213,7 @@ p.no-themes-local { div#custom-background-image { min-height: 100px; - border: 1px solid #ddd; + border: 1px solid #dcdcde; } div#custom-background-image img { @@ -1174,16 +1222,16 @@ div#custom-background-image img { } .background-position-control input[type="radio"]:checked ~ .button { - background: #eee; - border-color: #999; + background: #f0f0f1; + border-color: #8c8f94; box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); z-index: 1; } .background-position-control input[type="radio"]:focus ~ .button { - border-color: #5b9dd9; - box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5), 0 0 3px rgba(0, 115, 170, 0.8); - color: #23282d; + border-color: #4f94d4; + box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5), 0 0 3px rgba(34, 113, 177, 0.8); + color: #1d2327; } .background-position-control .background-position-center-icon, @@ -1202,7 +1250,7 @@ div#custom-background-image img { } .background-position-control .background-position-center-icon:before { - background-color: #555; + background-color: #50575e; border-radius: 50%; content: ""; height: 12px; @@ -1211,7 +1259,7 @@ div#custom-background-image img { .background-position-control .button:hover .background-position-center-icon:before, .background-position-control input[type="radio"]:focus ~ .button .background-position-center-icon:before { - background-color: #23282d; + background-color: #1d2327; } .background-position-control .button-group { @@ -1236,7 +1284,7 @@ div#custom-background-image img { } .background-position-control .button-group:last-child .button { - box-shadow: 0 1px 0 #ccc; + box-shadow: 0 1px 0 #c3c4c7; } .background-position-control .button-group > label { @@ -1268,7 +1316,7 @@ div#custom-background-image img { } .background-position-control .button-group:last-child > label:last-child .button { - border-radius: 0 0 3px 0; + border-radius: 0 0 3px; } .background-position-control .button-group:last-child > label:last-child .dashicons { @@ -1319,7 +1367,7 @@ body.full-overlay-active { padding: 0; margin: 0; z-index: 10; - background: #eee; + background: #f0f0f1; border-right: none; } @@ -1426,9 +1474,9 @@ body.full-overlay-active { float: left; width: 45px; height: 45px; - background: #eee; - border-right: 1px solid #ddd; - color: #444; + background: #f0f0f1; + border-right: 1px solid #dcdcde; + color: #3c434a; cursor: pointer; text-decoration: none; transition: color .1s ease-in-out, background .1s ease-in-out; @@ -1440,8 +1488,8 @@ body.full-overlay-active { .theme-install-overlay .previous-theme:focus, .theme-install-overlay .next-theme:hover, .theme-install-overlay .next-theme:focus { - background: #ddd; - border-color: #ccc; + background: #dcdcde; + border-color: #c3c4c7; color: #000; outline: none; box-shadow: none; @@ -1477,8 +1525,8 @@ body.full-overlay-active { .theme-install-overlay .previous-theme.disabled:focus, .theme-install-overlay .next-theme.disabled:hover, .theme-install-overlay .next-theme.disabled:focus { - color: #b4b9be; - background: #eee; + color: #c3c4c7; + background: #f0f0f1; cursor: default; pointer-events: none; } @@ -1505,7 +1553,7 @@ body.full-overlay-active { left: 0; padding: 9px 0 9px 10px; height: 45px; - color: #656a6f; + color: #646970; outline: 0; line-height: 1; background-color: transparent !important; @@ -1516,7 +1564,7 @@ body.full-overlay-active { .wp-core-ui .wp-full-overlay .collapse-sidebar:hover, .wp-core-ui .wp-full-overlay .collapse-sidebar:focus { - color: #0073aa; + color: #2271b1; } .wp-full-overlay .collapse-sidebar-arrow, @@ -1537,8 +1585,8 @@ body.full-overlay-active { .wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow, .wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .wp-full-overlay .collapse-sidebar-label { @@ -1552,9 +1600,9 @@ body.full-overlay-active { .wp-full-overlay .collapse-sidebar-arrow:before { display: block; content: "\f148"; - background: #eee; + background: #f0f0f1; font: normal 20px/1 dashicons; - speak: none; + speak: never; padding: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -1586,11 +1634,11 @@ body.full-overlay-active { /* Device/preview size toggles */ .wp-full-overlay { - background: #191e23; + background: #1d2327; } .wp-full-overlay-main { - background-color: #f1f1f1; + background-color: #f0f0f1; } .expanded .wp-full-overlay-footer { @@ -1602,8 +1650,8 @@ body.full-overlay-active { width: 18%; width: calc( 18% - 1px ); height: 45px; - border-top: 1px solid #ddd; - background: #eee; + border-top: 1px solid #dcdcde; + background: #f0f0f1; } .wp-full-overlay-footer .devices-wrapper { @@ -1612,8 +1660,8 @@ body.full-overlay-active { .wp-full-overlay-footer .devices { position: relative; - background: #eee; - box-shadow: -20px 0 10px -5px #eee; + background: #f0f0f1; + box-shadow: -20px 0 10px -5px #f0f0f1; } .wp-full-overlay-footer .devices button { @@ -1644,11 +1692,11 @@ body.full-overlay-active { vertical-align: top; margin: 3px 0; padding: 4px 8px; - color: #656a6f; + color: #646970; } .wp-full-overlay-footer .devices button.active { - border-bottom-color: #191e23; + border-bottom-color: #1d2327; } .wp-full-overlay-footer .devices button:hover, @@ -1658,16 +1706,16 @@ body.full-overlay-active { .wp-full-overlay-footer .devices button:focus, .wp-full-overlay-footer .devices button.active:hover { - border-bottom-color: #0073aa; + border-bottom-color: #2271b1; } .wp-full-overlay-footer .devices button.active:before { - color: #191e23; + color: #1d2327; } .wp-full-overlay-footer .devices button:hover:before, .wp-full-overlay-footer .devices button:focus:before { - color: #0073aa; + color: #2271b1; } .wp-full-overlay-footer .devices .preview-desktop:before { @@ -1726,7 +1774,7 @@ body.full-overlay-active { #customize-container, #customize-controls .notice.notification-overlay { - background: #eee; + background: #f0f0f1; z-index: 500000; position: fixed; overflow: visible; @@ -1798,7 +1846,7 @@ body.full-overlay-active { .install-theme-info .theme-screenshot { margin: 15px 0; width: 258px; - border: 1px solid #ccc; + border: 1px solid #c3c4c7; } .install-theme-info .theme-details { @@ -1811,7 +1859,7 @@ body.full-overlay-active { .theme-details .theme-description { float: left; - color: #72777c; + color: #646970; line-height: 1.6; max-width: 100%; } @@ -1819,29 +1867,27 @@ body.full-overlay-active { .theme-install-overlay .wp-full-overlay-header .button { float: right; margin: 8px 10px 0 0; - /* For when .theme-install is a span rather than a.button-primary (already installed theme) */ - line-height: 2; } .theme-install-overlay .wp-full-overlay-sidebar { - background: #eee; - border-right: 1px solid #ddd; + background: #f0f0f1; + border-right: 1px solid #dcdcde; } .theme-install-overlay .wp-full-overlay-sidebar-content { background: #fff; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; + border-top: 1px solid #dcdcde; + border-bottom: 1px solid #dcdcde; } .theme-install-overlay .wp-full-overlay-main { position: absolute; z-index: 0; - background-color: #f1f1f1; + background-color: #f0f0f1; } .customize-loading #customize-container { - background-color: #f1f1f1; + background-color: #f0f0f1; } #customize-preview.wp-full-overlay-main:before, @@ -1905,9 +1951,10 @@ body.full-overlay-active { width: 100%; } - .theme-install-overlay .wp-full-overlay-header .theme-install { - margin-top: 6px; - line-height: normal; + .theme-install-overlay .wp-full-overlay-header .button { + font-size: 13px; + line-height: 2.15384615; + min-height: 30px; } .theme-browser .theme .theme-actions .button { @@ -1931,6 +1978,6 @@ body.full-overlay-active { .theme-info .updating-message:before, .theme-info .updated-message:before, .theme-install.updating-message:before { - speak: none; + speak: never; } } diff --git a/src/wp-admin/css/widgets.css b/src/wp-admin/css/widgets.css index b6b912a8ccd1a..9d64f979702b4 100644 --- a/src/wp-admin/css/widgets.css +++ b/src/wp-admin/css/widgets.css @@ -16,7 +16,7 @@ .widget-top { font-size: 13px; font-weight: 600; - background: #f7f7f7; + background: #f6f7f7; } .widget-top .widget-action { @@ -25,7 +25,6 @@ padding: 10px; background: none; cursor: pointer; - outline: none; } .widget-title h3, @@ -38,22 +37,15 @@ white-space: nowrap; text-overflow: ellipsis; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } .widgets-holder-wrap .widget-inside { border-top: none; - padding: 1px 15px 15px 15px; + padding: 1px 15px 15px; line-height: 1.23076923; } -.widgets-holder-wrap .widget-inside label { - margin: 0.25em 0 0.5em; - display: inline-block; -} - .widget.widget-dirty .widget-control-close-wrapper { display: none; } @@ -61,12 +53,12 @@ .in-widget-title, #widgets-right a.widget-control-edit, #available-widgets .widget-description { - color: #666; + color: #646970; } .deleting .widget-title, .deleting .widget-top .widget-action .toggle-indicator:before { - color: #a0a5aa; + color: #a7aaad; } /* Media Widgets */ @@ -98,7 +90,7 @@ .media-widget-control .attachment-media-view .button-add-media, .media-widget-control .placeholder { - border: 1px dashed #b4b9be; + border: 1px dashed #c3c4c7; box-sizing: border-box; cursor: pointer; line-height: 1.6; @@ -110,19 +102,19 @@ .media-widget-control .attachment-media-view .button-add-media { cursor: pointer; - background-color: #edeff0; - color: #32373c; + background-color: #f0f0f1; + color: #2c3338; } .media-widget-control .attachment-media-view .button-add-media:hover { - background-color: #fbfbfc; + background-color: #fff; } .media-widget-control .attachment-media-view .button-add-media:focus { - background-color: #fbfbfc; + background-color: #fff; border-style: solid; - border-color: #5b9dd9; - box-shadow: 0 0 3px rgba( 0, 115, 170, .8 ); + border-color: #4f94d4; + box-shadow: 0 0 3px rgba(34, 113, 177, 0.8); /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; outline-offset: -2px; @@ -145,7 +137,7 @@ .media-widget-control .media-widget-preview img { max-width: 100%; vertical-align: middle; - background-image: linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4); + background-image: linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7), linear-gradient(45deg, #c3c4c7 25%, transparent 25%, transparent 75%, #c3c4c7 75%, #c3c4c7); background-position: 0 0, 10px 10px; background-size: 20px 20px; } @@ -175,7 +167,7 @@ display: inline-block; min-height: 132px; width: 100%; - background: black; + background: #000; } .media-widget-video-link .dashicons { @@ -183,7 +175,7 @@ position: relative; width: 100%; top: -90px; - color: white; + color: #fff; text-decoration: none; } @@ -193,7 +185,7 @@ .media-frame #embed-url-field.invalid, .media-widget-image-link > .link:invalid { - border: 1px solid #dc3232; + border: 1px solid #d63638; } .media-widget-image-link { @@ -213,7 +205,7 @@ } .media-widget-preview .placeholder { - background: #f1f1f1; + background: #f0f0f1; } .media-widget-gallery-preview .gallery-item { @@ -265,7 +257,7 @@ .media-widget-gallery-preview .gallery-icon-placeholder-text { font-weight: 600; font-size: 2em; - color: white; + color: #fff; } @@ -279,7 +271,7 @@ } .widget-placeholder { - border: 1px dashed #b4b9be; + border: 1px dashed #c3c4c7; margin: 0 auto 10px; height: 45px; width: 100%; @@ -324,7 +316,8 @@ .sidebar-name .handlediv:focus { box-shadow: none; - outline: none; + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; } #widgets-left .sidebar-name .toggle-indicator { @@ -344,8 +337,8 @@ .sidebar-name .handlediv:focus .toggle-indicator:before { box-shadow: - 0 0 0 1px #5b9dd9, - 0 0 2px 1px rgba(30, 140, 190, 0.8); + 0 0 0 1px #4f94d4, + 0 0 2px 1px rgba(79, 148, 212, 0.8); } .sidebar-name h2, @@ -360,12 +353,12 @@ padding: 0 0 15px; margin: 0; font-style: normal; - color: #72777c; + color: #646970; } .widget-holder .description, .inactive-sidebar .description { - color: #555d66; + color: #50575e; } #widgets-right .widgets-holder-wrap .description { @@ -429,7 +422,6 @@ div#widgets-left .widget-holder { word-wrap: break-word; -ms-word-break: break-all; word-break: break-word; - -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } @@ -444,7 +436,7 @@ div#widgets-left .widget-holder { width: 100%; background: transparent; padding: 0; - margin: 0 0 20px 0; + margin: 0 0 20px; border: none; box-shadow: none; } @@ -479,7 +471,7 @@ div#widgets-right .sidebars-column-2 { } div#widgets-right .widgets-holder-wrap { - margin: 10px 0 0 0; + margin: 10px 0 0; } div#widgets-right .sidebar-description { @@ -518,7 +510,7 @@ div#widgets-right .closed .widgets-sortables { /* Dragging a widget over a closed sidebar */ #widgets-right .widgets-holder-wrap.widget-hover { - border-color: #72777c; + border-color: #787c82; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } @@ -540,7 +532,7 @@ div#widgets-right .closed .widgets-sortables { .widgets_access #widgets-left .widget .widget-top:hover, .widgets_access #widgets-right .widget .widget-top:hover { - border-color: #ddd; + border-color: #dcdcde; } #available-widgets .widget-control-edit .edit, @@ -554,26 +546,24 @@ div#widgets-right .closed .widgets-sortables { .widget-control-edit { display: block; - color: #666; - background: #EEE; + color: #646970; + background: #f0f0f1; padding: 0 15px; line-height: 3.30769230; - border-left: 1px solid #DDD; + border-left: 1px solid #dcdcde; } #widgets-left .widget-control-edit:hover, #widgets-right .widget-control-edit:hover { color: #fff; - background: #444; + background: #3c434a; border-left: 0; - outline: 1px solid #444; + outline: 1px solid #3c434a; } .widgets-holder-wrap .sidebar-name, .widgets-holder-wrap .sidebar-description { -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; } @@ -623,11 +613,11 @@ div#widgets-right .closed .widgets-sortables { padding-left: 15px; font-size: 12px; line-height: 1; - color: black; + color: #000; } .js #removing-widget { - color: #00a0d2; + color: #72aee6; } .widget-control-noform, @@ -679,7 +669,7 @@ div#widgets-right .closed .widgets-sortables { #available-widgets .widget-top:hover, div#widgets-right .widget-top:hover, #widgets-left .widget-top:hover { - border-color: #999; + border-color: #8c8f94; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } @@ -695,11 +685,11 @@ div#widgets-right .widget-top:hover, } .widgets-chooser ul { - border: 1px solid #ccc; + border: 1px solid #c3c4c7; } .widgets-chooser li { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #c3c4c7; background: #fff; margin: 0; position: relative; @@ -728,7 +718,7 @@ div#widgets-right .widget-top:hover, } .widgets-chooser .widgets-chooser-selected .widgets-chooser-button { - background: #0073aa; + background: #2271b1; color: #fff; } @@ -744,7 +734,7 @@ div#widgets-right .widget-top:hover, } .widgets-chooser .widgets-chooser-actions { - padding: 10px 0 12px 0; + padding: 10px 0 12px; text-align: center; } @@ -780,7 +770,7 @@ div#widgets-right .widget-top:hover, } .custom-html-widget-fields > p > .CodeMirror { - border: 1px solid #e5e5e5; + border: 1px solid #dcdcde; } .custom-html-widget-fields code { padding-top: 1px; @@ -796,6 +786,15 @@ ul.CodeMirror-hints { /* =Media Queries -------------------------------------------------------------- */ +@media screen and (max-width: 782px) { + .widgets-holder-wrap .widget-inside input[type="checkbox"], + .widgets-holder-wrap .widget-inside input[type="radio"], + .editwidget .widget-inside input[type="checkbox"], /* Selectors for the "accessibility mode" page. */ + .editwidget .widget-inside input[type="radio"] { + margin: 0.25rem 0.25rem 0.25rem 0; + } +} + @media screen and (max-width: 480px) { div.widget-liquid-left { width: 100%; @@ -827,7 +826,7 @@ ul.CodeMirror-hints { .widget-access-link { float: none; - margin: 15px 0 0 0; + margin: 15px 0 0; } } diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index a8b62f4195fb7..0dd548d43a380 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -132,10 +132,7 @@ if ( wp_is_mobile() ) : $body_class .= ' mobile'; - - ?> - - is_ios() ) { @@ -147,6 +144,10 @@ } $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); +if ( wp_use_widgets_block_editor() ) { + $body_class .= ' wp-embed-responsive'; +} + $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) ); ?> @@ -171,17 +172,43 @@ * @since 3.4.0 */ do_action( 'customize_controls_print_scripts' ); + +/** + * Fires in head section of Customizer controls. + * + * @since 5.5.0 + */ +do_action( 'customize_controls_head' ); ?>
    - is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?> -
    - - -
    + theme()->get( 'RequiresWP' ) ); + $compatible_php = is_php_version_compatible( $wp_customize->theme()->get( 'RequiresPHP' ) ); + $fse_safe = true; + + // Check if the theme requires the Gutenberg plugin to work correctly. + $theme_tags = $wp_customize->theme()->get( 'Tags' ); + + if ( ! empty( $theme_tags ) && in_array( 'full-site-editing', $theme_tags, true ) && ! function_exists( 'gutenberg_is_fse_theme' ) ) { + $fse_safe = false; + } + ?> + + is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?> +
    + + +
    + + +
    + +
    + @@ -227,7 +254,7 @@
    - + '; } + ?>
    -
    +
    'true' ), $redirect ); + } elseif ( 'disable-auto-update' === $action ) { + $auto_updates = array_diff( $auto_updates, array( $plugin ) ); + $redirect = add_query_arg( array( 'disabled-auto-update' => 'true' ), $redirect ); + } else { + $plugins = (array) wp_unslash( $_POST['checked'] ); + + if ( 'enable-auto-update-selected' === $action ) { + $new_auto_updates = array_merge( $auto_updates, $plugins ); + $new_auto_updates = array_unique( $new_auto_updates ); + $query_args = array( 'enabled-auto-update-multi' => 'true' ); + } else { + $new_auto_updates = array_diff( $auto_updates, $plugins ); + $query_args = array( 'disabled-auto-update-multi' => 'true' ); + } + + // Return early if all selected plugins already have auto-updates enabled or disabled. + // Must use non-strict comparison, so that array order is not treated as significant. + if ( $new_auto_updates == $auto_updates ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + wp_redirect( $redirect ); + exit; + } + $auto_updates = $new_auto_updates; + $redirect = add_query_arg( $query_args, $redirect ); + } + + /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ + $all_items = apply_filters( 'all_plugins', get_plugins() ); + + // Remove plugins that don't exist or have been deleted since the option was last updated. + $auto_updates = array_intersect( $auto_updates, array_keys( $all_items ) ); + + update_site_option( 'auto_update_plugins', $auto_updates ); + + wp_redirect( $redirect ); + exit; default: if ( isset( $_POST['checked'] ) ) { check_admin_referer( 'bulk-plugins' ); @@ -466,9 +566,27 @@ ) ); +$help_sidebar_autoupdates = ''; + +if ( current_user_can( 'update_plugins' ) && wp_is_auto_update_enabled_for_type( 'plugin' ) ) { + get_current_screen()->add_help_tab( + array( + 'id' => 'plugins-themes-auto-updates', + 'title' => __( 'Auto-updates' ), + 'content' => + '

    ' . __( 'Auto-updates can be enabled or disabled for each individual plugin. Plugins with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

    ' . + '

    ' . __( 'Auto-updates are only available for plugins recognized by WordPress.org, or that include a compatible update system.' ) . '

    ' . + '

    ' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

    ', + ) + ); + + $help_sidebar_autoupdates = '

    ' . __( 'Learn more: Auto-updates documentation' ) . '

    '; +} + get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . '

    ' . __( 'Documentation on Managing Plugins' ) . '

    ' . + $help_sidebar_autoupdates . '

    ' . __( 'Support' ) . '

    ' ); @@ -480,6 +598,7 @@ ) ); +// Used in the HTML title tag. $title = __( 'Plugins' ); $parent_file = 'plugins.php'; @@ -498,9 +617,7 @@ echo '

    '; } } -?> -fatal error.' ); } + ?>

    'error_scrape', @@ -533,17 +654,19 @@ ), admin_url( 'plugins.php' ) ); + ?> - +
    @@ -562,7 +685,7 @@

    - +

    @@ -579,10 +702,18 @@

    - +

    + +

    + +

    + +

    + +

    @@ -600,8 +731,13 @@ } if ( strlen( $s ) ) { - /* translators: %s: Search query. */ - printf( '' . __( 'Search results for “%s”' ) . '', esc_html( urldecode( $s ) ) ); + echo ''; + printf( + /* translators: %s: Search query. */ + __( 'Search results for: %s' ), + '' . esc_html( urldecode( $s ) ) . '' + ); + echo ''; } ?> diff --git a/src/wp-admin/post-new.php b/src/wp-admin/post-new.php index 9074bedb5f38e..521ef9ef7cd14 100644 --- a/src/wp-admin/post-new.php +++ b/src/wp-admin/post-new.php @@ -25,10 +25,10 @@ } $post_type_object = get_post_type_object( $post_type ); -if ( 'post' == $post_type ) { +if ( 'post' === $post_type ) { $parent_file = 'edit.php'; $submenu_file = 'post-new.php'; -} elseif ( 'attachment' == $post_type ) { +} elseif ( 'attachment' === $post_type ) { if ( wp_redirect( admin_url( 'media-new.php' ) ) ) { exit; } diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index 355ce1aca9a50..a1113ed35f7d6 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -49,7 +49,7 @@ if ( isset( $_POST['deletepost'] ) ) { $action = 'delete'; -} elseif ( isset( $_POST['wp-preview'] ) && 'dopreview' == $_POST['wp-preview'] ) { +} elseif ( isset( $_POST['wp-preview'] ) && 'dopreview' === $_POST['wp-preview'] ) { $action = 'preview'; } @@ -57,7 +57,7 @@ if ( ! $sendback || false !== strpos( $sendback, 'post.php' ) || false !== strpos( $sendback, 'post-new.php' ) ) { - if ( 'attachment' == $post_type ) { + if ( 'attachment' === $post_type ) { $sendback = admin_url( 'upload.php' ); } else { $sendback = admin_url( 'edit.php' ); @@ -111,16 +111,16 @@ case 'postajaxpost': case 'post': check_admin_referer( 'add-' . $post_type ); - $post_id = 'postajaxpost' == $action ? edit_post() : write_post(); + $post_id = 'postajaxpost' === $action ? edit_post() : write_post(); redirect_post( $post_id ); - exit(); + exit; case 'edit': $editing = true; if ( empty( $post_id ) ) { wp_redirect( admin_url( 'post.php' ) ); - exit(); + exit; } if ( ! $post ) { @@ -139,7 +139,7 @@ wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); } - if ( 'trash' == $post->post_status ) { + if ( 'trash' === $post->post_status ) { wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) ); } @@ -147,15 +147,15 @@ check_admin_referer( 'lock-post_' . $post_id ); wp_set_post_lock( $post_id ); wp_redirect( get_edit_post_link( $post_id, 'url' ) ); - exit(); + exit; } $post_type = $post->post_type; - if ( 'post' == $post_type ) { + if ( 'post' === $post_type ) { $parent_file = 'edit.php'; $submenu_file = 'edit.php'; $post_new_file = 'post-new.php'; - } elseif ( 'attachment' == $post_type ) { + } elseif ( 'attachment' === $post_type ) { $parent_file = 'upload.php'; $submenu_file = 'upload.php'; $post_new_file = 'media-new.php'; @@ -233,7 +233,7 @@ redirect_post( $post_id ); // Send user on their way while we keep working. - exit(); + exit; case 'trash': check_admin_referer( 'trash-post_' . $post_id ); @@ -258,7 +258,7 @@ } if ( ! wp_trash_post( $post_id ) ) { - wp_die( __( 'Error in moving to Trash.' ) ); + wp_die( __( 'Error in moving the item to Trash.' ) ); } wp_redirect( @@ -270,7 +270,7 @@ $sendback ) ); - exit(); + exit; case 'untrash': check_admin_referer( 'untrash-post_' . $post_id ); @@ -288,11 +288,18 @@ } if ( ! wp_untrash_post( $post_id ) ) { - wp_die( __( 'Error in restoring from Trash.' ) ); + wp_die( __( 'Error in restoring the item from Trash.' ) ); } - wp_redirect( add_query_arg( 'untrashed', 1, $sendback ) ); - exit(); + $sendback = add_query_arg( + array( + 'untrashed' => 1, + 'ids' => $post_id, + ), + $sendback + ); + wp_redirect( $sendback ); + exit; case 'delete': check_admin_referer( 'delete-post_' . $post_id ); @@ -312,16 +319,16 @@ if ( 'attachment' === $post->post_type ) { $force = ( ! MEDIA_TRASH ); if ( ! wp_delete_attachment( $post_id, $force ) ) { - wp_die( __( 'Error in deleting.' ) ); + wp_die( __( 'Error in deleting the attachment.' ) ); } } else { if ( ! wp_delete_post( $post_id, true ) ) { - wp_die( __( 'Error in deleting.' ) ); + wp_die( __( 'Error in deleting the item.' ) ); } } wp_redirect( add_query_arg( 'deleted', 1, $sendback ) ); - exit(); + exit; case 'preview': check_admin_referer( 'update-post_' . $post_id ); @@ -329,10 +336,10 @@ $url = post_preview(); wp_redirect( $url ); - exit(); + exit; case 'toggle-custom-fields': - check_admin_referer( 'toggle-custom-fields' ); + check_admin_referer( 'toggle-custom-fields', 'toggle-custom-fields-nonce' ); $current_user_id = get_current_user_id(); if ( $current_user_id ) { @@ -341,7 +348,7 @@ } wp_safe_redirect( wp_get_referer() ); - exit(); + exit; default: /** @@ -356,7 +363,7 @@ do_action( "post_action_{$action}", $post_id ); wp_redirect( admin_url( 'edit.php' ) ); - exit(); + exit; } // End switch. require_once ABSPATH . 'wp-admin/admin-footer.php'; diff --git a/src/wp-admin/privacy-policy-guide.php b/src/wp-admin/privacy-policy-guide.php index 566f3f14cdad2..6581bb412a621 100644 --- a/src/wp-admin/privacy-policy-guide.php +++ b/src/wp-admin/privacy-policy-guide.php @@ -10,24 +10,81 @@ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_privacy_options' ) ) { - wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) ); + wp_die( __( 'Sorry, you are not allowed to manage privacy options on this site.' ) ); } if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { include_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php'; } -$title = __( 'Privacy Policy Guide' ); +add_filter( + 'admin_body_class', + static function( $body_class ) { + $body_class .= ' privacy-settings '; + + return $body_class; + } +); wp_enqueue_script( 'privacy-tools' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -
    -

    +
    +
    +

    + +

    +
    + + +
    -
    +
    + +
    +

    +
    + +
    +

    +

    +

    +

    +

    +

    +
    +

    + +

    + +
    +
    +

    +
    diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php index 2ef4258e333db..0eda132a9fe5e 100644 --- a/src/wp-admin/privacy.php +++ b/src/wp-admin/privacy.php @@ -9,6 +9,7 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; +// Used in the HTML title tag. $title = __( 'Privacy' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); @@ -19,16 +20,13 @@
    -

    - - -

    +

    + +

    -

    - -

    +
    -
    -
    -

    - +
    +
    + +
    +

    @@ -59,7 +58,7 @@ WordPress.org/about/privacy.' ), + __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit our Privacy Policy.' ), __( 'https://wordpress.org/about/privacy/' ) ); ?> diff --git a/src/wp-admin/revision.php b/src/wp-admin/revision.php index b1590ee6d7be5..96268eaaa4c71 100644 --- a/src/wp-admin/revision.php +++ b/src/wp-admin/revision.php @@ -47,20 +47,31 @@ break; } - // Restore if revisions are enabled or this is an autosave. + // Don't restore if revisions are disabled and this is not an autosave. if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { $redirect = 'edit.php?post_type=' . $post->post_type; break; } - // Don't allow revision restore when post is locked. + // Don't restore if the post is locked. if ( wp_check_post_lock( $post->ID ) ) { break; } check_admin_referer( "restore-post_{$revision->ID}" ); + /* + * Ensure the global $post remains the same after revision is restored. + * Because wp_insert_post() and wp_transition_post_status() are called + * during the process, plugins can unexpectedly modify $post. + */ + $backup_global_post = clone $post; + wp_restore_post_revision( $revision->ID ); + + // Restore the global $post as it was before. + $post = $backup_global_post; + $redirect = add_query_arg( array( 'message' => 5, @@ -86,7 +97,7 @@ break; } - // Revisions disabled and we're not looking at an autosave. + // Bail if revisions are disabled and this is not an autosave. if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { $redirect = 'edit.php?post_type=' . $post->post_type; break; @@ -96,8 +107,9 @@ $post_title = '' . _draft_or_post_title() . ''; /* translators: %s: Post title. */ $h1 = sprintf( __( 'Compare Revisions of “%s”' ), $post_title ); - $return_to_post = '' . __( '← Return to editor' ) . ''; - $title = __( 'Revisions' ); + $return_to_post = '' . __( '← Go to editor' ) . ''; + // Used in the HTML title tag. + $title = __( 'Revisions' ); $redirect = false; break; diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index 36eee674512cb..881398ff570bc 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -89,10 +89,7 @@ * @ignore * @since 2.3.0 * - * @global string $wp_local_package Locale code of the package. - * @global WP_Locale $wp_locale WordPress date and time locale object. - * - * @param string|array $body_classes + * @param string|string[] $body_classes Class attribute values for the body tag. */ function setup_config_display_header( $body_classes = array() ) { $body_classes = (array) $body_classes; @@ -106,7 +103,7 @@ function setup_config_display_header( $body_classes = array() ) { header( 'Content-Type: text/html; charset=utf-8' ); ?> -> +> @@ -195,7 +192,7 @@ function setup_config_display_header( $body_classes = array() ) { ); ?>

    -

    +

    $line ) { - if ( '$table_prefix =' == substr( $line, 0, 15 ) ) { + if ( '$table_prefix =' === substr( $line, 0, 15 ) ) { $config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; continue; } @@ -426,33 +423,63 @@ function setup_config_display_header( $body_classes = array() ) { })(); + $error_message = ''; + $handle = fopen( $path_to_wp_config, 'w' ); + /* + * Why check for the absence of false instead of checking for resource with is_resource()? + * To future-proof the check for when fopen returns object instead of resource, i.e. a known + * change coming in PHP. + */ + if ( false !== $handle ) { + foreach ( $config_file as $line ) { + fwrite( $handle, $line ); + } + fclose( $handle ); + } else { + $wp_config_perms = fileperms( $path_to_wp_config ); + if ( ! empty( $wp_config_perms ) && ! is_writable( $path_to_wp_config ) ) { + $error_message = sprintf( + /* translators: 1: wp-config.php, 2: Documentation URL. */ + __( 'You need to make the file %1$s writable before you can save your changes. See Changing File Permissions for more information.' ), + 'wp-config.php', + __( 'https://wordpress.org/support/article/changing-file-permissions/' ) + ); + } else { + $error_message = sprintf( + /* translators: %s: wp-config.php */ + __( 'Unable to write to %s file.' ), + 'wp-config.php' + ); + } + } + + chmod( $path_to_wp_config, 0666 ); + setup_config_display_header(); + + if ( false !== $handle ) : + ?>

    - %s

    ', $error_message ); + endif; + endif; break; -} +} // End of the steps switch. ?> diff --git a/src/wp-admin/site-health-info.php b/src/wp-admin/site-health-info.php index 53b336074d6ea..7676a8dc90f6c 100644 --- a/src/wp-admin/site-health-info.php +++ b/src/wp-admin/site-health-info.php @@ -6,18 +6,10 @@ * @subpackage Administration */ -/** WordPress Administration Bootstrap */ -require_once __DIR__ . '/admin.php'; - -$title = __( 'Site Health Info' ); - -if ( ! current_user_can( 'view_site_health_checks' ) ) { - wp_die( __( 'Sorry, you are not allowed to access the debug data.' ), '', 403 ); +if ( ! defined( 'ABSPATH' ) ) { + die(); } -wp_enqueue_style( 'site-health' ); -wp_enqueue_script( 'site-health' ); - if ( ! class_exists( 'WP_Debug_Data' ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-debug-data.php'; } @@ -26,46 +18,7 @@ } $health_check_site_status = WP_Site_Health::get_instance(); - -require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -
    -
    -

    - -

    -
    - -
    -
    - -
    -
    - -
    -
    - - -
    - -

    @@ -99,7 +52,7 @@ - +
    @@ -122,7 +75,10 @@ @@ -179,6 +135,3 @@
    - - _x( 'Status', 'Site Health' ), + /* translators: Tab heading for Site Health Info page. */ + 'debug' => _x( 'Info', 'Site Health' ), +); + +/** + * An associated array of extra tabs for the Site Health navigation bar. + * + * Add a custom page to the Site Health screen, based on a tab slug and label. + * The label you provide will also be used as part of the site title. + * + * @since 5.8.0 + * + * @param array $tabs An associated array of tab slugs and their label. + */ +$tabs = apply_filters( 'site_health_navigation_tabs', $tabs ); + +$wrapper_classes = array( + 'health-check-tabs-wrapper', + 'hide-if-no-js', + 'tab-count-' . count( $tabs ), +); + +$current_tab = ( isset( $_GET['tab'] ) ? $_GET['tab'] : '' ); + +$title = sprintf( + // translators: %s: The currently displayed tab. + __( 'Site Health - %s' ), + ( isset( $tabs[ $current_tab ] ) ? esc_html( $tabs[ $current_tab ] ) : esc_html( reset( $tabs ) ) ) +); if ( ! current_user_can( 'view_site_health_checks' ) ) { wp_die( __( 'Sorry, you are not allowed to access site health information.' ), '', 403 ); @@ -27,6 +55,23 @@ require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php'; } +if ( 'update_https' === $action ) { + check_admin_referer( 'wp_update_https' ); + + if ( ! current_user_can( 'update_https' ) ) { + wp_die( __( 'Sorry, you are not allowed to update this site to HTTPS.' ), 403 ); + } + + if ( ! wp_is_https_supported() ) { + wp_die( __( 'It looks like HTTPS is not supported for your website at this point.' ) ); + } + + $result = wp_update_urls_to_https(); + + wp_redirect( add_query_arg( 'https_updated', (int) $result, wp_get_referer() ) ); + exit; +} + $health_check_site_status = WP_Site_Health::get_instance(); // Start by checking if this is a special request checking for the existence of certain filters. @@ -41,6 +86,20 @@
    + +

    + +

    + +
    -

    + +

    -
    +

    - +

    @@ -144,7 +265,9 @@

    @@ -158,5 +281,6 @@
    -' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '

    ' ); } +// Used in the HTML title tag. $title = __( 'Edit Themes' ); $parent_file = 'themes.php'; @@ -69,13 +70,12 @@ wp_die( __( 'The requested theme does not exist.' ) ); } -if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() ) { +if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) { wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() ); } $allowed_files = array(); $style_files = array(); -$has_templates = false; $file_types = wp_get_theme_file_editable_extensions( $theme ); @@ -83,7 +83,6 @@ switch ( $type ) { case 'php': $allowed_files += $theme->get_files( 'php', -1 ); - $has_templates = ! empty( $allowed_files ); break; case 'css': $style_files = $theme->get_files( 'css', -1 ); @@ -162,7 +161,7 @@ $f = fopen( $file, 'r' ); $content = fread( $f, filesize( $file ) ); - if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) { + if ( '.php' === substr( $file, strrpos( $file, '.' ) ) ) { $functions = wp_doc_link_parse( $content ); $docs_select = ' null ) ) as $a_stylesheet => $a_theme ) { - if ( $a_theme->errors() && 'theme_no_stylesheet' == $a_theme->errors()->get_error_code() ) { + if ( $a_theme->errors() && 'theme_no_stylesheet' === $a_theme->errors()->get_error_code() ) { continue; } - $selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : ''; + $selected = ( $a_stylesheet === $stylesheet ) ? ' selected="selected"' : ''; echo "\n\t" . ''; } ?> @@ -252,7 +251,7 @@

      - parent() ) && $theme->parent() ) : ?> + parent() ) : ?>
    • - get_stylesheet() == get_template() ) : ?> + get_stylesheet() === get_template() ) : ?>

      - + @@ -311,13 +310,13 @@

      - +

      -

      +

      -

      +

    @@ -344,10 +343,12 @@ $excluded_referer_basenames = array( 'theme-editor.php', 'wp-login.php' ); - if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) { - $return_url = $referer; - } else { - $return_url = admin_url( '/' ); + $return_url = admin_url( '/' ); + if ( $referer ) { + $referer_path = parse_url( $referer, PHP_URL_PATH ); + if ( is_string( $referer_path ) && ! in_array( basename( $referer_path ), $excluded_referer_basenames, true ) ) { + $return_url = $referer; + } } ?>
    $features ) { + // Use the core list, rather than the .org API, due to inconsistencies + // and to ensure tags are translated. + $feature_list = get_theme_feature_list( false ); + + foreach ( $feature_list as $feature_group => $features ) { echo '
    '; - $feature_name = esc_html( $feature_name ); - echo '' . $feature_name . ''; + echo '' . esc_html( $feature_group ) . ''; echo '
    '; foreach ( $features as $feature => $feature_name ) { $feature = esc_attr( $feature ); echo ' '; - echo ''; + echo ''; } echo '
    '; echo '
    '; @@ -247,8 +258,16 @@ * Fires at the top of each of the tabs on the Install Themes page. * * The dynamic portion of the hook name, `$tab`, refers to the current - * theme installation tab. Possible values are 'dashboard', 'search', 'upload', - * 'featured', 'new', or 'updated'. + * theme installation tab. + * + * Possible hook names include: + * + * - `install_themes_dashboard` + * - `install_themes_featured` + * - `install_themes_new` + * - `install_themes_search` + * - `install_themes_updated` + * - `install_themes_upload` * * @since 2.8.0 * @@ -267,6 +286,66 @@ <# } else { #>
    <# } #> + + <# if ( data.installed ) { #> +

    + <# } #> + + <# if ( ! data.compatible_wp || ! data.compatible_php ) { #> +

    + <# if ( ! data.compatible_wp && ! data.compatible_php ) { #> + Please update WordPress, and then learn more about updating PHP.' ), + self_admin_url( 'update-core.php' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

    ', '' ); + } elseif ( current_user_can( 'update_core' ) ) { + printf( + /* translators: %s: URL to WordPress Updates screen. */ + ' ' . __( 'Please update WordPress.' ), + self_admin_url( 'update-core.php' ) + ); + } elseif ( current_user_can( 'update_php' ) ) { + printf( + /* translators: %s: URL to Update PHP page. */ + ' ' . __( 'Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

    ', '' ); + } + ?> + <# } else if ( ! data.compatible_wp ) { #> + Please update WordPress.' ), + self_admin_url( 'update-core.php' ) + ); + } + ?> + <# } else if ( ! data.compatible_php ) { #> + Learn more about updating PHP.' ), + esc_url( wp_get_update_php_url() ) + ); + wp_update_php_annotation( '

    ', '' ); + } + ?> + <# } #> +

    + <# } #> +
    <# if ( data.installed ) { #> - - <# if ( data.activate_url ) { #> - - <# } #> - <# if ( data.customize_url ) { #> - + <# if ( data.compatible_wp && data.compatible_php ) { #> + + <# if ( data.activate_url ) { #> + <# if ( ! data.active ) { #> + + <# } else { #> + + <# } #> + <# } #> + <# if ( data.customize_url ) { #> + <# if ( ! data.active ) { #> + + <# } else { #> + + <# } #> + <# } else { #> + + <# } #> <# } else { #> - + + <# if ( data.activate_url ) { #> + + <# } #> + <# if ( data.customize_url ) { #> + + <# } else { #> + + <# } #> <# } #> <# } else { #> - - - + <# if ( data.compatible_wp && data.compatible_php ) { #> + + + + <# } else { #> + + + + <# } #> <# } #>
    - - <# if ( data.installed ) { #> -

    - <# } #> + + + + + + user_email; + $new_user_email = array(); $redirect = 'user-new.php'; $username = $user_details->user_login; $user_id = $user_details->ID; @@ -100,7 +100,7 @@ $role = $roles[ $_REQUEST['role'] ]; /** - * Fires immediately after a user is invited to join a site, but before the notification is sent. + * Fires immediately after an existing user is invited to join the site, but before the notification is sent. * * @since 4.4.0 * @@ -123,20 +123,46 @@ %4$s' ); + $new_user_email['to'] = $user_details->user_email; + $new_user_email['subject'] = sprintf( + /* translators: Joining confirmation notification email subject. %s: Site title. */ + __( '[%s] Joining Confirmation' ), + wp_specialchars_decode( get_option( 'blogname' ) ) + ); + $new_user_email['message'] = sprintf( + $message, + get_option( 'blogname' ), + home_url(), + wp_specialchars_decode( translate_user_role( $role['name'] ) ), + home_url( "/newbloguser/$newuser_key/" ) + ); + $new_user_email['headers'] = ''; + + /** + * Filters the contents of the email sent when an existing user is invited to join the site. + * + * @since 5.6.0 + * + * @param array $new_user_email { + * Used to build wp_mail(). + * + * @type string $to The email address of the invited user. + * @type string $subject The subject of the email. + * @type string $message The content of the email. + * @type string $headers Headers. + * } + * @param int $user_id The invited user's ID. + * @param array $role Array containing role information for the invited user. + * @param string $newuser_key The key of the invitation. + * + */ + $new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key ); + wp_mail( - $new_user_email, - sprintf( - /* translators: Joining confirmation notification email subject. %s: Site title. */ - __( '[%s] Joining Confirmation' ), - wp_specialchars_decode( get_option( 'blogname' ) ) - ), - sprintf( - $message, - get_option( 'blogname' ), - home_url(), - wp_specialchars_decode( translate_user_role( $role['name'] ) ), - home_url( "/newbloguser/$newuser_key/" ) - ) + $new_user_email['to'], + $new_user_email['subject'], + $new_user_email['message'], + $new_user_email['headers'] ); if ( $switched_locale ) { @@ -148,7 +174,7 @@ } wp_redirect( $redirect ); die(); -} elseif ( isset( $_REQUEST['action'] ) && 'createuser' == $_REQUEST['action'] ) { +} elseif ( isset( $_REQUEST['action'] ) && 'createuser' === $_REQUEST['action'] ) { check_admin_referer( 'create-user', '_wpnonce_create-user' ); if ( ! current_user_can( 'create_users' ) ) { @@ -219,6 +245,7 @@ } } +// Used in the HTML title tag. $title = __( 'Add New User' ); $parent_file = 'users.php'; @@ -331,7 +358,7 @@ break; } } else { - if ( 'add' == $_GET['update'] ) { + if ( 'add' === $_GET['update'] ) { $messages[] = __( 'User added.' ); } } @@ -534,8 +561,8 @@ - -
    + +
    @@ -544,10 +571,6 @@ -
    @@ -555,7 +578,8 @@ - + +

    @@ -575,18 +599,20 @@ + + diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php index 04164d7179b4c..c3450dfd4b62f 100644 --- a/src/wp-admin/users.php +++ b/src/wp-admin/users.php @@ -20,8 +20,10 @@ $wp_list_table = _get_list_table( 'WP_Users_List_Table' ); $pagenum = $wp_list_table->get_pagenum(); -$title = __( 'Users' ); -$parent_file = 'users.php'; + +// Used in the HTML title tag. +$title = __( 'Users' ); +$parent_file = 'users.php'; add_screen_option( 'per_page' ); @@ -53,9 +55,9 @@ '
  • ' . __( 'Edit takes you to the editable profile screen for that user. You can also reach that screen by clicking on the username.' ) . '
  • '; if ( is_multisite() ) { - $help .= '
  • ' . __( 'Remove allows you to remove a user from your site. It does not delete their content. You can also remove multiple users at once by using Bulk Actions.' ) . '
  • '; + $help .= '
  • ' . __( 'Remove allows you to remove a user from your site. It does not delete their content. You can also remove multiple users at once by using bulk actions.' ) . '
  • '; } else { - $help .= '
  • ' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their content. You can also delete multiple users at once by using Bulk Actions.' ) . '
  • '; + $help .= '
  • ' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their content. You can also delete multiple users at once by using bulk actions.' ) . '
  • '; } $help .= ''; @@ -108,21 +110,25 @@ if ( empty( $_REQUEST['users'] ) ) { wp_redirect( $redirect ); - exit(); + exit; } $editable_roles = get_editable_roles(); - $role = false; - if ( ! empty( $_REQUEST['new_role2'] ) ) { - $role = $_REQUEST['new_role2']; - } elseif ( ! empty( $_REQUEST['new_role'] ) ) { - $role = $_REQUEST['new_role']; - } + $role = $_REQUEST['new_role']; + + // Mocking the `none` role so we are able to save it to the database + $editable_roles['none'] = array( + 'name' => __( '— No role for this site —' ), + ); if ( ! $role || empty( $editable_roles[ $role ] ) ) { wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 ); } + if ( 'none' === $role ) { + $role = ''; + } + $userids = $_REQUEST['users']; $update = 'promote'; foreach ( $userids as $id ) { @@ -153,7 +159,7 @@ } wp_redirect( add_query_arg( 'update', $update, $redirect ) ); - exit(); + exit; case 'dodelete': if ( is_multisite() ) { @@ -164,7 +170,7 @@ if ( empty( $_REQUEST['users'] ) ) { wp_redirect( $redirect ); - exit(); + exit; } $userids = array_map( 'intval', (array) $_REQUEST['users'] ); @@ -211,7 +217,47 @@ $redirect ); wp_redirect( $redirect ); - exit(); + exit; + + case 'resetpassword': + check_admin_referer( 'bulk-users' ); + if ( ! current_user_can( 'edit_users' ) ) { + $errors = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to edit users.' ) ); + } + if ( empty( $_REQUEST['users'] ) ) { + wp_redirect( $redirect ); + exit(); + } + $userids = array_map( 'intval', (array) $_REQUEST['users'] ); + + $reset_count = 0; + + foreach ( $userids as $id ) { + if ( ! current_user_can( 'edit_user', $id ) ) { + wp_die( __( 'Sorry, you are not allowed to edit this user.' ) ); + } + + if ( $id === $current_user->ID ) { + $update = 'err_admin_reset'; + continue; + } + + // Send the password reset link. + $user = get_userdata( $id ); + if ( retrieve_password( $user->user_login ) ) { + ++$reset_count; + } + } + + $redirect = add_query_arg( + array( + 'reset_count' => $reset_count, + 'update' => 'resetpassword', + ), + $redirect + ); + wp_redirect( $redirect ); + exit; case 'delete': if ( is_multisite() ) { @@ -222,7 +268,7 @@ if ( empty( $_REQUEST['users'] ) && empty( $_REQUEST['user'] ) ) { wp_redirect( $redirect ); - exit(); + exit; } if ( ! current_user_can( 'delete_users' ) ) { @@ -230,7 +276,7 @@ } if ( empty( $_REQUEST['users'] ) ) { - $userids = array( intval( $_REQUEST['user'] ) ); + $userids = array( (int) $_REQUEST['user'] ); } else { $userids = array_map( 'intval', (array) $_REQUEST['users'] ); } @@ -247,8 +293,8 @@ * * @since 5.2.0 * - * @param boolean $users_have_additional_content Whether the users have additional content. Default false. - * @param int[] $userids Array of IDs for users being deleted. + * @param bool $users_have_additional_content Whether the users have additional content. Default false. + * @param int[] $userids Array of IDs for users being deleted. */ $users_have_content = (bool) apply_filters( 'users_have_additional_content', false, $userids ); @@ -278,7 +324,7 @@
    - +

    @@ -393,7 +439,7 @@ if ( empty( $_REQUEST['users'] ) && empty( $_REQUEST['user'] ) ) { wp_redirect( $redirect ); - exit(); + exit; } if ( ! current_user_can( 'remove_users' ) ) { @@ -401,7 +447,7 @@ } if ( empty( $_REQUEST['users'] ) ) { - $userids = array( intval( $_REQUEST['user'] ) ); + $userids = array( (int) $_REQUEST['user'] ); } else { $userids = $_REQUEST['users']; } @@ -415,7 +461,7 @@

    - +

    @@ -511,6 +557,16 @@ $messages[] = '

    ' . $message . '

    '; break; + case 'resetpassword': + $reset_count = isset( $_GET['reset_count'] ) ? (int) $_GET['reset_count'] : 0; + if ( 1 === $reset_count ) { + $message = __( 'Password reset link sent.' ); + } else { + /* translators: %s: Number of users. */ + $message = _n( 'Password reset links sent to %s user.', 'Password reset links sent to %s users.', $reset_count ); + } + $messages[] = '

    ' . sprintf( $message, number_format_i18n( $reset_count ) ) . '

    '; + break; case 'promote': $messages[] = '

    ' . __( 'Changed roles.' ) . '

    '; break; @@ -563,15 +619,20 @@ - + - + ' . __( 'Search results for “%s”' ) . '', esc_html( $usersearch ) ); + echo ''; + printf( + /* translators: %s: Search query. */ + __( 'Search results for: %s' ), + '' . esc_html( $usersearch ) . '' + ); + echo ''; } ?> @@ -590,7 +651,7 @@ display(); ?> -
    +
    is_block_editor( true ); + +$block_editor_context = new WP_Block_Editor_Context(); + +$preload_paths = array( + array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ), + '/wp/v2/sidebars?context=edit&per_page=-1', + '/wp/v2/widgets?context=edit&per_page=-1&_embed=about', +); +block_editor_rest_api_preload( $preload_paths, $block_editor_context ); + +$editor_settings = get_block_editor_settings( + array_merge( get_legacy_widget_block_editor_settings(), array( 'styles' => get_block_editor_theme_styles() ) ), + $block_editor_context +); + +// The widgets editor does not support the Block Directory, so don't load any of +// its assets. This also prevents 'wp-editor' from being enqueued which we +// cannot load in the widgets screen because many widget scripts rely on `wp.editor`. +remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); + +wp_add_inline_script( + 'wp-edit-widgets', + sprintf( + 'wp.domReady( function() { + wp.editWidgets.initialize( "widgets-editor", %s ); + } );', + wp_json_encode( $editor_settings ) + ) +); + +// Preload server-registered block schemas. +wp_add_inline_script( + 'wp-blocks', + 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' +); + +wp_add_inline_script( + 'wp-blocks', + sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ), + 'after' +); + +wp_enqueue_script( 'wp-edit-widgets' ); +wp_enqueue_script( 'admin-widgets' ); +wp_enqueue_style( 'wp-edit-widgets' ); + +/** This action is documented in wp-admin/edit-form-blocks.php */ +do_action( 'enqueue_block_editor_assets' ); + +/** This action is documented in wp-admin/widgets-form.php */ +do_action( 'sidebar_admin_setup' ); + +require_once ABSPATH . 'wp-admin/admin-header.php'; + +/** This action is documented in wp-admin/widgets-form.php */ +do_action( 'widgets_admin_page' ); +?> + +
    + +add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => + '

    ' . __( 'Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.' ) . '

    +

    ' . __( 'The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.' ) . '

    ', + ) +); +get_current_screen()->add_help_tab( + array( + 'id' => 'removing-reusing', + 'title' => __( 'Removing and Reusing' ), + 'content' => + '

    ' . __( 'If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.' ) . '

    +

    ' . __( 'Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.' ) . '

    +

    ' . __( 'Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.' ) . '

    ', + ) +); +get_current_screen()->add_help_tab( + array( + 'id' => 'missing-widgets', + 'title' => __( 'Missing Widgets' ), + 'content' => + '

    ' . __( 'Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.' ) . '

    ' . + '

    ' . __( 'When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.' ) . '

    ', + ) +); + +get_current_screen()->set_help_sidebar( + '

    ' . __( 'For more information:' ) . '

    ' . + '

    ' . __( 'Documentation on Widgets' ) . '

    ' . + '

    ' . __( 'Support' ) . '

    ' +); + +// These are the widgets grouped by sidebar. +$sidebars_widgets = wp_get_sidebars_widgets(); + +if ( empty( $sidebars_widgets ) ) { + $sidebars_widgets = wp_get_widget_defaults(); +} + +foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { + if ( 'wp_inactive_widgets' === $sidebar_id ) { + continue; + } + + if ( ! is_registered_sidebar( $sidebar_id ) ) { + if ( ! empty( $widgets ) ) { // Register the inactive_widgets area as sidebar. + register_sidebar( + array( + 'name' => __( 'Inactive Sidebar (not used)' ), + 'id' => $sidebar_id, + 'class' => 'inactive-sidebar orphan-sidebar', + 'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + ) + ); + } else { + unset( $sidebars_widgets[ $sidebar_id ] ); + } + } +} + +// Register the inactive_widgets area as sidebar. +register_sidebar( + array( + 'name' => __( 'Inactive Widgets' ), + 'id' => 'wp_inactive_widgets', + 'class' => 'inactive-sidebar', + 'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + ) +); + +retrieve_widgets(); + +// We're saving a widget without JS. +if ( isset( $_POST['savewidget'] ) || isset( $_POST['removewidget'] ) ) { + $widget_id = $_POST['widget-id']; + check_admin_referer( "save-delete-widget-$widget_id" ); + + $number = isset( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : ''; + if ( $number ) { + foreach ( $_POST as $key => $val ) { + if ( is_array( $val ) && preg_match( '/__i__|%i%/', key( $val ) ) ) { + $_POST[ $key ] = array( $number => array_shift( $val ) ); + break; + } + } + } + + $sidebar_id = $_POST['sidebar']; + $position = isset( $_POST[ $sidebar_id . '_position' ] ) ? (int) $_POST[ $sidebar_id . '_position' ] - 1 : 0; + + $id_base = $_POST['id_base']; + $sidebar = isset( $sidebars_widgets[ $sidebar_id ] ) ? $sidebars_widgets[ $sidebar_id ] : array(); + + // Delete. + if ( isset( $_POST['removewidget'] ) && $_POST['removewidget'] ) { + + if ( ! in_array( $widget_id, $sidebar, true ) ) { + wp_redirect( admin_url( 'widgets.php?error=0' ) ); + exit; + } + + $sidebar = array_diff( $sidebar, array( $widget_id ) ); + $_POST = array( + 'sidebar' => $sidebar_id, + 'widget-' . $id_base => array(), + 'the-widget-id' => $widget_id, + 'delete_widget' => '1', + ); + + /** + * Fires immediately after a widget has been marked for deletion. + * + * @since 4.4.0 + * + * @param string $widget_id ID of the widget marked for deletion. + * @param string $sidebar_id ID of the sidebar the widget was deleted from. + * @param string $id_base ID base for the widget. + */ + do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); + } + + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + if ( $name !== $id_base || ! is_callable( $control['callback'] ) ) { + continue; + } + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + + break; + } + + $sidebars_widgets[ $sidebar_id ] = $sidebar; + + // Remove old position. + if ( ! isset( $_POST['delete_widget'] ) ) { + foreach ( $sidebars_widgets as $key => $sb ) { + if ( is_array( $sb ) ) { + $sidebars_widgets[ $key ] = array_diff( $sb, array( $widget_id ) ); + } + } + array_splice( $sidebars_widgets[ $sidebar_id ], $position, 0, $widget_id ); + } + + wp_set_sidebars_widgets( $sidebars_widgets ); + wp_redirect( admin_url( 'widgets.php?message=0' ) ); + exit; +} + +// Remove inactive widgets without JS. +if ( isset( $_POST['removeinactivewidgets'] ) ) { + check_admin_referer( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); + + if ( $_POST['removeinactivewidgets'] ) { + foreach ( $sidebars_widgets['wp_inactive_widgets'] as $key => $widget_id ) { + $pieces = explode( '-', $widget_id ); + $multi_number = array_pop( $pieces ); + $id_base = implode( '-', $pieces ); + $widget = get_option( 'widget_' . $id_base ); + unset( $widget[ $multi_number ] ); + update_option( 'widget_' . $id_base, $widget ); + unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] ); + } + + wp_set_sidebars_widgets( $sidebars_widgets ); + } + + wp_redirect( admin_url( 'widgets.php?message=0' ) ); + exit; +} + +// Output the widget form without JS. +if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) { + $widget_id = $_GET['editwidget']; + + if ( isset( $_GET['addnew'] ) ) { + // Default to the first sidebar. + $keys = array_keys( $wp_registered_sidebars ); + $sidebar = reset( $keys ); + + if ( isset( $_GET['base'] ) && isset( $_GET['num'] ) ) { // Multi-widget. + // Copy minimal info from an existing instance of this widget to a new instance. + foreach ( $wp_registered_widget_controls as $control ) { + if ( $_GET['base'] === $control['id_base'] ) { + $control_callback = $control['callback']; + $multi_number = (int) $_GET['num']; + $control['params'][0]['number'] = -1; + $control['id'] = $control['id_base'] . '-' . $multi_number; + $widget_id = $control['id']; + $wp_registered_widget_controls[ $control['id'] ] = $control; + break; + } + } + } + } + + if ( isset( $wp_registered_widget_controls[ $widget_id ] ) && ! isset( $control ) ) { + $control = $wp_registered_widget_controls[ $widget_id ]; + $control_callback = $control['callback']; + } elseif ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) && isset( $wp_registered_widgets[ $widget_id ] ) ) { + $name = esc_html( strip_tags( $wp_registered_widgets[ $widget_id ]['name'] ) ); + } + + if ( ! isset( $name ) ) { + $name = esc_html( strip_tags( $control['name'] ) ); + } + + if ( ! isset( $sidebar ) ) { + $sidebar = isset( $_GET['sidebar'] ) ? $_GET['sidebar'] : 'wp_inactive_widgets'; + } + + if ( ! isset( $multi_number ) ) { + $multi_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : ''; + } + + $id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id']; + + // Show the widget form. + $width = ' style="width:' . max( $control['width'], 350 ) . 'px"'; + $key = isset( $_GET['key'] ) ? (int) $_GET['key'] : 0; + + require_once ABSPATH . 'wp-admin/admin-header.php'; ?> +
    +

    +
    > +

    + +

    + +
    +
    + ' . __( 'There are no options for this widget.' ) . "

    \n"; + } + ?> +
    + +

    +
    + + $sbvalue ) { + echo "\t\t\n"; + } + ?> +
    "; + if ( 'wp_inactive_widgets' === $sbname || 'orphaned_widgets' === substr( $sbname, 0, 16 ) ) { + echo ' '; + } else { + if ( ! isset( $sidebars_widgets[ $sbname ] ) || ! is_array( $sidebars_widgets[ $sbname ] ) ) { + $j = 1; + $sidebars_widgets[ $sbname ] = array(); + } else { + $j = count( $sidebars_widgets[ $sbname ] ); + if ( isset( $_GET['addnew'] ) || ! in_array( $widget_id, $sidebars_widgets[ $sbname ], true ) ) { + $j++; + } + } + $selected = ''; + echo "\t\t\n"; + } + echo "
    +
    + +
    +
    + + + + | + + + + +
    +
    + + + + + +
    +
    +
    + +
    +
    +
    + + +
    +

    + +

    + +%2$s', + esc_url( + add_query_arg( + array( + array( 'autofocus' => array( 'panel' => 'widgets' ) ), + 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), + ), + admin_url( 'customize.php' ) + ) + ), + __( 'Manage with Live Preview' ) + ); +} + +$nonce = wp_create_nonce( 'widgets-access' ); +?> + + +
    + + +

    + + +

    + + + + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + + $registered_sidebar ) { + if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) { + $wrap_class = 'widgets-holder-wrap'; + if ( ! empty( $registered_sidebar['class'] ) ) { + $wrap_class .= ' ' . $registered_sidebar['class']; + } + + $is_inactive_widgets = 'wp_inactive_widgets' === $registered_sidebar['id']; + ?> +
    +
    + + + +
    +
    +

    + 'inactive-widgets-control-remove' ); + + if ( empty( $sidebars_widgets['wp_inactive_widgets'] ) ) { + $attributes['disabled'] = ''; + } + + submit_button( __( 'Clear Inactive Widgets' ), 'delete', 'removeinactivewidgets', false, $attributes ); + ?> + +

    + +
    +
    + +
    + +

    + +
    + +
    +
    + 1 ) { + $split = (int) ceil( $sidebars_count / 2 ); +} else { + $single_sidebar_class = ' single-sidebar'; +} + +?> +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
      +
      + + +
      +
      + +add_help_tab( - array( - 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => - '

      ' . __( 'Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.' ) . '

      -

      ' . __( 'The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.' ) . '

      ', - ) -); -get_current_screen()->add_help_tab( - array( - 'id' => 'removing-reusing', - 'title' => __( 'Removing and Reusing' ), - 'content' => - '

      ' . __( 'If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.' ) . '

      -

      ' . __( 'Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.' ) . '

      -

      ' . __( 'Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.' ) . '

      ', - ) -); -get_current_screen()->add_help_tab( - array( - 'id' => 'missing-widgets', - 'title' => __( 'Missing Widgets' ), - 'content' => - '

      ' . __( 'Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.' ) . '

      ' . - '

      ' . __( 'When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.' ) . '

      ', - ) -); - -get_current_screen()->set_help_sidebar( - '

      ' . __( 'For more information:' ) . '

      ' . - '

      ' . __( 'Documentation on Widgets' ) . '

      ' . - '

      ' . __( 'Support' ) . '

      ' -); - if ( ! current_theme_supports( 'widgets' ) ) { wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); } -// These are the widgets grouped by sidebar. -$sidebars_widgets = wp_get_sidebars_widgets(); - -if ( empty( $sidebars_widgets ) ) { - $sidebars_widgets = wp_get_widget_defaults(); -} - -foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { - if ( 'wp_inactive_widgets' === $sidebar_id ) { - continue; - } - - if ( ! is_registered_sidebar( $sidebar_id ) ) { - if ( ! empty( $widgets ) ) { // Register the inactive_widgets area as sidebar. - register_sidebar( - array( - 'name' => __( 'Inactive Sidebar (not used)' ), - 'id' => $sidebar_id, - 'class' => 'inactive-sidebar orphan-sidebar', - 'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ), - 'before_widget' => '', - 'after_widget' => '', - 'before_title' => '', - 'after_title' => '', - ) - ); - } else { - unset( $sidebars_widgets[ $sidebar_id ] ); - } - } -} - -// Register the inactive_widgets area as sidebar. -register_sidebar( - array( - 'name' => __( 'Inactive Widgets' ), - 'id' => 'wp_inactive_widgets', - 'class' => 'inactive-sidebar', - 'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ), - 'before_widget' => '', - 'after_widget' => '', - 'before_title' => '', - 'after_title' => '', - ) -); - -retrieve_widgets(); - -// We're saving a widget without JS. -if ( isset( $_POST['savewidget'] ) || isset( $_POST['removewidget'] ) ) { - $widget_id = $_POST['widget-id']; - check_admin_referer( "save-delete-widget-$widget_id" ); - - $number = isset( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : ''; - if ( $number ) { - foreach ( $_POST as $key => $val ) { - if ( is_array( $val ) && preg_match( '/__i__|%i%/', key( $val ) ) ) { - $_POST[ $key ] = array( $number => array_shift( $val ) ); - break; - } - } - } - - $sidebar_id = $_POST['sidebar']; - $position = isset( $_POST[ $sidebar_id . '_position' ] ) ? (int) $_POST[ $sidebar_id . '_position' ] - 1 : 0; - - $id_base = $_POST['id_base']; - $sidebar = isset( $sidebars_widgets[ $sidebar_id ] ) ? $sidebars_widgets[ $sidebar_id ] : array(); - - // Delete. - if ( isset( $_POST['removewidget'] ) && $_POST['removewidget'] ) { - - if ( ! in_array( $widget_id, $sidebar, true ) ) { - wp_redirect( admin_url( 'widgets.php?error=0' ) ); - exit; - } - - $sidebar = array_diff( $sidebar, array( $widget_id ) ); - $_POST = array( - 'sidebar' => $sidebar_id, - 'widget-' . $id_base => array(), - 'the-widget-id' => $widget_id, - 'delete_widget' => '1', - ); - - /** - * Fires immediately after a widget has been marked for deletion. - * - * @since 4.4.0 - * - * @param string $widget_id ID of the widget marked for deletion. - * @param string $sidebar_id ID of the sidebar the widget was deleted from. - * @param string $id_base ID base for the widget. - */ - do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); - } - - $_POST['widget-id'] = $sidebar; - - foreach ( (array) $wp_registered_widget_updates as $name => $control ) { - if ( $name !== $id_base || ! is_callable( $control['callback'] ) ) { - continue; - } - - ob_start(); - call_user_func_array( $control['callback'], $control['params'] ); - ob_end_clean(); - - break; - } - - $sidebars_widgets[ $sidebar_id ] = $sidebar; - - // Remove old position. - if ( ! isset( $_POST['delete_widget'] ) ) { - foreach ( $sidebars_widgets as $key => $sb ) { - if ( is_array( $sb ) ) { - $sidebars_widgets[ $key ] = array_diff( $sb, array( $widget_id ) ); - } - } - array_splice( $sidebars_widgets[ $sidebar_id ], $position, 0, $widget_id ); - } - - wp_set_sidebars_widgets( $sidebars_widgets ); - wp_redirect( admin_url( 'widgets.php?message=0' ) ); - exit; -} - -// Remove inactive widgets without JS. -if ( isset( $_POST['removeinactivewidgets'] ) ) { - check_admin_referer( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); - - if ( $_POST['removeinactivewidgets'] ) { - foreach ( $sidebars_widgets['wp_inactive_widgets'] as $key => $widget_id ) { - $pieces = explode( '-', $widget_id ); - $multi_number = array_pop( $pieces ); - $id_base = implode( '-', $pieces ); - $widget = get_option( 'widget_' . $id_base ); - unset( $widget[ $multi_number ] ); - update_option( 'widget_' . $id_base, $widget ); - unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] ); - } - - wp_set_sidebars_widgets( $sidebars_widgets ); - } - - wp_redirect( admin_url( 'widgets.php?message=0' ) ); - exit; -} - -// Output the widget form without JS. -if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) { - $widget_id = $_GET['editwidget']; - - if ( isset( $_GET['addnew'] ) ) { - // Default to the first sidebar. - $keys = array_keys( $wp_registered_sidebars ); - $sidebar = reset( $keys ); - - if ( isset( $_GET['base'] ) && isset( $_GET['num'] ) ) { // Multi-widget. - // Copy minimal info from an existing instance of this widget to a new instance. - foreach ( $wp_registered_widget_controls as $control ) { - if ( $_GET['base'] === $control['id_base'] ) { - $control_callback = $control['callback']; - $multi_number = (int) $_GET['num']; - $control['params'][0]['number'] = -1; - $control['id'] = $control['id_base'] . '-' . $multi_number; - $widget_id = $control['id']; - $wp_registered_widget_controls[ $control['id'] ] = $control; - break; - } - } - } - } - - if ( isset( $wp_registered_widget_controls[ $widget_id ] ) && ! isset( $control ) ) { - $control = $wp_registered_widget_controls[ $widget_id ]; - $control_callback = $control['callback']; - } elseif ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) && isset( $wp_registered_widgets[ $widget_id ] ) ) { - $name = esc_html( strip_tags( $wp_registered_widgets[ $widget_id ]['name'] ) ); - } - - if ( ! isset( $name ) ) { - $name = esc_html( strip_tags( $control['name'] ) ); - } - - if ( ! isset( $sidebar ) ) { - $sidebar = isset( $_GET['sidebar'] ) ? $_GET['sidebar'] : 'wp_inactive_widgets'; - } - - if ( ! isset( $multi_number ) ) { - $multi_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : ''; - } - - $id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id']; - - // Show the widget form. - $width = ' style="width:' . max( $control['width'], 350 ) . 'px"'; - $key = isset( $_GET['key'] ) ? (int) $_GET['key'] : 0; - - require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -
      -

      -
      > -

      - -

      - -
      -
      - ' . __( 'There are no options for this widget.' ) . "

      \n"; - } - ?> -
      - -

      -
      - - $sbvalue ) { - echo "\t\t\n"; - } - ?> -
      "; - if ( 'wp_inactive_widgets' === $sbname || 'orphaned_widgets' === substr( $sbname, 0, 16 ) ) { - echo ' '; - } else { - if ( ! isset( $sidebars_widgets[ $sbname ] ) || ! is_array( $sidebars_widgets[ $sbname ] ) ) { - $j = 1; - $sidebars_widgets[ $sbname ] = array(); - } else { - $j = count( $sidebars_widgets[ $sbname ] ); - if ( isset( $_GET['addnew'] ) || ! in_array( $widget_id, $sidebars_widgets[ $sbname ], true ) ) { - $j++; - } - } - $selected = ''; - echo "\t\t\n"; - } - echo "
      -
      - -
      - - - - - - - -
      -
      -
      -
      -
      - - -
      -

      - -

      - -%2$s', - esc_url( - add_query_arg( - array( - array( 'autofocus' => array( 'panel' => 'widgets' ) ), - 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), - ), - admin_url( 'customize.php' ) - ) - ), - __( 'Manage with Live Preview' ) - ); -} - -$nonce = wp_create_nonce( 'widgets-access' ); -?> - - -
      - - -

      - - -

      - - - - -
      -
      -
      - -
      - -
      - -
      -
      -
      -
      -
      - - $registered_sidebar ) { - if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) { - $wrap_class = 'widgets-holder-wrap'; - if ( ! empty( $registered_sidebar['class'] ) ) { - $wrap_class .= ' ' . $registered_sidebar['class']; - } - - $is_inactive_widgets = 'wp_inactive_widgets' === $registered_sidebar['id']; - ?> -
      -
      - - - -
      -
      -

      - 'inactive-widgets-control-remove' ); - - if ( empty( $sidebars_widgets['wp_inactive_widgets'] ) ) { - $attributes['disabled'] = ''; - } - - submit_button( __( 'Clear Inactive Widgets' ), 'delete', 'removeinactivewidgets', false, $attributes ); - ?> - -

      - -
      -
      - -
      - -

      - -
      - -
      -
      - 1 ) { - $split = (int) ceil( $sidebars_count / 2 ); +if ( wp_use_widgets_block_editor() ) { + require ABSPATH . 'wp-admin/widgets-form-blocks.php'; } else { - $single_sidebar_class = ' single-sidebar'; -} - -?> -
      -
      - -
      -
      -
      - -
      -
      -
      - -
      -
        -
        - - -
        -
        - -get_error_data() ); + $data = (int) $comment->get_error_data(); if ( ! empty( $data ) ) { wp_die( '

        ' . $comment->get_error_message() . '

        ', @@ -50,14 +50,14 @@ * * @param WP_Comment $comment Comment object. * @param WP_User $user Comment author's user object. The user may not exist. - * @param boolean $cookies_consent Comment author's consent to store cookies. + * @param bool $cookies_consent Comment author's consent to store cookies. */ do_action( 'set_comment_cookies', $comment, $user, $cookies_consent ); $location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID; -// Add specific query arguments to display the awaiting moderation message. -if ( 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) { +// If user didn't consent to cookies, add specific query arguments to display the awaiting moderation message. +if ( ! $cookies_consent && 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) { $location = add_query_arg( array( 'unapproved' => $comment->comment_ID, diff --git a/src/wp-content/themes/twentyeleven/404.php b/src/wp-content/themes/twentyeleven/404.php index 8e2e05ed7ba34..2dc9998c1dcdf 100644 --- a/src/wp-content/themes/twentyeleven/404.php +++ b/src/wp-content/themes/twentyeleven/404.php @@ -42,8 +42,8 @@
        ' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '

        '; + /* translators: %s: Smilie. */ + $archive_content = '

        ' . sprintf( __( 'Try looking in the monthly archives. %s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '

        '; the_widget( 'WP_Widget_Archives', array( diff --git a/src/wp-content/themes/twentyeleven/author.php b/src/wp-content/themes/twentyeleven/author.php index 5751e33410740..2a53f6c14f0bc 100644 --- a/src/wp-content/themes/twentyeleven/author.php +++ b/src/wp-content/themes/twentyeleven/author.php @@ -53,7 +53,7 @@
        ' . get_the_title() . '' diff --git a/src/wp-content/themes/twentyeleven/content-featured.php b/src/wp-content/themes/twentyeleven/content-featured.php index adaadcbf0a560..3ba761dc19daa 100644 --- a/src/wp-content/themes/twentyeleven/content-featured.php +++ b/src/wp-content/themes/twentyeleven/content-featured.php @@ -32,24 +32,26 @@
        permalink.', 'twentyeleven' ); } else { /* translators: 1: Category list, 3: Post permalink, 4: Post title. */ $utility_text = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'twentyeleven' ); } - printf( - $utility_text, - /* translators: Used between list items, there is a space after the comma. */ - get_the_category_list( __( ', ', 'twentyeleven' ) ), - $tag_list, - esc_url( get_permalink() ), - the_title_attribute( 'echo=0' ) - ); - ?> + + printf( + $utility_text, + /* translators: Used between list items, there is a space after the comma. */ + get_the_category_list( __( ', ', 'twentyeleven' ) ), + $tags_list, + esc_url( get_permalink() ), + the_title_attribute( 'echo=0' ) + ); + ?> ', '' ); ?>
        diff --git a/src/wp-content/themes/twentyeleven/content-gallery.php b/src/wp-content/themes/twentyeleven/content-gallery.php index b9dcfc30977ec..317bf63fc6a17 100644 --- a/src/wp-content/themes/twentyeleven/content-gallery.php +++ b/src/wp-content/themes/twentyeleven/content-gallery.php @@ -70,9 +70,11 @@
        + @@ -83,10 +85,12 @@ ?> + | diff --git a/src/wp-content/themes/twentyeleven/content-image.php b/src/wp-content/themes/twentyeleven/content-image.php index 5f681ac23f95f..8de498a1408e8 100644 --- a/src/wp-content/themes/twentyeleven/content-image.php +++ b/src/wp-content/themes/twentyeleven/content-image.php @@ -55,8 +55,9 @@
        -
        + + + +

        Why you should use Learn WordPress – videos from our community.

        + + + +

        How can you get involved?

        + + + + + + + +

        Learn WordPress is an open-source platform available for anyone to contribute content in any areas mentioned above. Find out more about how you can get involved with this initiative.

        + + + +

        Take part in our fun promotion campaigns on social and with your local community.

        + + + +

        Hundreds of people spanning a number of years have contributed to the development of learning materials. Thanks to everyone who worked so hard to make Learn WordPress a reality. 

        + + + +

        Particular thanks to:

        + + + +

        Training: @courane01, @azhiyadev, @geheren, @webtechpooja, @jessecowens, @onealtr, @rastaban, @evarlese, @manzwebdesigns
        Meta: @coreymckrill, @dufresnesteven, @jonoaldersonwp
        Community: @hlashbrooke, @camikaos, @harishanker, @angelasjin, @nao, @courtneypk, @andreamiddleton, @rmarks, @sippis
        Marketing: @webcommsat, @oglekler, @lmurillom, @yvettesonneveld, @meher, @nalininonstopnewsuk, @megphillips91, @marks99, @marybaum, @antialiasfactory, @herculespekkas, @chaion07
        Design: @melchoyce

        + + + +

        For a fuller list of the contributors who have been involved in training and Learn WordPress, visit the initial beta launch post. Thanks to everyone who has been involved to date and will be in the future. 

        + + + +

        #LearnWordPress #LearnWP

        +]]> + + + + 9444 + + WordPress 5.6 ā€œSimoneā€ + https://wordpress.org/news/2020/12/simone/ + + + Tue, 08 Dec 2020 19:46:00 +0000 + + https://wordpress.org/news/?p=9325 + + + Meet Simone, our latest and greatest WordPress release. Named for the legendary performer Nina Simone, who is known for tunes like “Feeling Good”, “Young, Gifted and Black”, and “Four Women”. Fire up a playlist with her best work and read on to discover what we have in store for you.

        + + + +
        WordPress 5.6 Simone with a photo of Nina Simone
        + + + +
        +

        Welcome to WordPress 5.6

        +

        Sharing your stories has never been easier.

        +
        + + + +

        WordPress 5.6 brings you countless ways to set your ideas free and bring them to life. With a brand-new default theme as your canvas, it supports an ever-growing collection of blocks as your brushes. Paint with words. Pictures. Sound. Or rich embedded media.

        + + + +
        colored circles
        + + + +

        Greater layout flexibility

        + + + +

        Bring your stories to life with more tools that let you edit your layout with or without code. Single column blocks, designs using mixed widths and columns, full-width headers, and gradients in your cover block—make small changes or big statements with equal ease!

        + + + +

        More block patterns

        + + + +

        In some themes, preconfigured block patterns make setting up standard pages on your site a breeze. Let the power of patterns streamline your workflow and save you clicks. Plus, share these features with clients, editors, and more.

        + + + +

        Better video captioning

        + + + +

        To help you add subtitles or captions to your videos, you can now upload them within your post or page. This makes it easier than ever to make your videos accessible for anyone who needs or prefers to use subtitles.

        + + + +
        black vertical line
        + + + +

        Twenty Twenty-One is here!

        + + + +
        Examples of block patterns available in Twenty Twenty-One.
        + + + +

        Twenty Twenty-One is a blank canvas for your ideas, and the block editor is the best brush. It is built for the block editor and packed with brand-new block patterns you can only get in the default themes. Try different layouts in a matter of seconds, and let the theme’s eye-catching, yet timeless design make your work shine. 

        + + + +

        What’s more, this default theme puts accessibility at the heart of your website. It conforms to the WordPress accessibility-ready guidelines and addresses several more specialized standards from the Web Content Accessibility Guidelines (WCAG) 2.1 at level AAA. It will help you meet the highest level of international accessibility standards when you create accessible content and choose plugins which are accessible too!

        + + + +

        A rainbow of soft pastels

        + + + +
        A mobile screenshot of each included color palette in Twenty Twenty-One, going in ROYGBIV order.
        + + + +

        Perfect for a new year, Twenty Twenty-One gives you a range of pre-selected color palettes in pastel, all of which conform to AAA standards for contrast. You can also choose your own background color for the theme, and the theme chooses accessibility-conscious text colors for you — automatically!

        + + + +

        Need more flexibility than that? You can also choose your own color palette from the color picker.

        + + + +
        colored circles
        + + + +

        Improvements for everyone

        + + + +

        Expanding auto-updates

        + + + +

        For years, only developers have been able to update WordPress automatically. But now you have that option, right in your dashboard. If this is your first site, you have auto-updates ready to go, right now! Upgrading an existing site? No problem! Everything is the same as it was before.

        + + + +

        Accessibility Statement 

        + + + +

        Even if you’re not an expert, you can start letting others know about your site’s commitment to accessibility! The new feature plugin includes template copy for you to edit and publish, and it’s written to support different contexts and jurisdictions.  

        + + + +

        Built-in Patterns

        + + + +

        If you’ve not had the chance to play with block patterns yet, all default themes now feature a range of block patterns that let you master complex layouts with minimal effort. Customize the patterns to your liking with the copy, images, and colors that fit your story or brand. 

        + + + +
        colored and textured rectangles
        + + + +

        For developers

        + + + +

        REST API authentication with Application Passwords

        + + + +

        Thanks to the API’s new Application Passwords authorization feature, third-party apps can connect to your site seamlessly and securely. This new REST API feature lets you see what apps are connecting to your site and control what they do. 

        + + + +

        More PHP 8 support

        + + + +

        5.6 marks the first steps toward WordPress Core support for PHP 8. Now is a great time to start planning how your WordPress products, services, and sites can support the latest PHP version. For more information about what to expect next, read the PHP 8 developer note.

        + + + +

        jQuery

        + + + +

        Updates to jQuery in WordPress take place across three releases 5.5, 5.6, and 5.7. As we reach the mid-point of this process, run the update test plugin to check your sites for errors ahead of time.    

        + + + +

        If you find issues with the way your site looks ( e.g. a slider doesn’t work, a button is stuck — that sort of thing), install the jQuery Migrate plugin.

        + + + +

        Check out the Field Guide

        + + + +

        Read about the latest version of WordPress in this guide. It highlights developer notes for each change in the release. 

        + + + +
        +

        ā€œIt’s a new day, it’s a new life for me….and I’m feeling good.ā€

        +

        ~Nina Simone

        +
        + + + +

        The Squad

        + + + +

        The WordPress 5.6 release comes to you from an all-women and non-binary identifying release squad:

        + + + + + + + +

        As always, this release reflects the hard work of 605 generous volunteer contributors. They collaborated on nearly 350 tickets on Trac and over 1,000 pull requests on GitHub.

        + + + +Özgür KARALAR, 1naveengiri, A5hleyRich, Aaron D. Campbell, Aaron Jorbin, aaronrobertshaw, abderrahman, Abha Thakor, Abhijit Rakas, Abhishek Pokhriyal, acosmin, Adam Silverstein, Adam Zielinski, Addie, Adrián de Grafreak, Adrianti Rusli, Afshana Diya, Ahmed Chaion, Ahmed Elgameel, ajensen, Ajit Bohra, Akira Tachibana, aktasfatih, Albert Juhé Lluveras, albertomake, Alex Concha, Alex Kirk, Alex Kozack, Alex Lende, Alex Mills, Alex Standiford, Alex Stine, allancole, Allie Nimmons, ambienthack, Amit Dudhat, Amol Vhankalas, Amy Kamala, Anand Upadhyay, Anchen le Roux, Anders Norén, Andrea Fercia, Andrea Middleton, Andrei Baicus, Andrei Draganescu, Andrew Duthie, Andrew Nacin, Andrew Ozz, Andrey "Rarst" Savchenko, Andy Fragen, Andy Peatling, Andy Skelton, Andy Stitt, Angel Hess, Angela Jin, Ankit Gade, Ankit Panchal, Anne McCarthy, Anthony Burchell, Anthony Hortin, Anton Lukin, Antonis Lilis, anuj2, Anyssa Ferreira, apedog, Apermo, archduck, archon810, Ari Stathopoulos, arippberger, arjendejong, ArnaudBan, Arpit G Shah, Arslan Ahmed, Arslan Ahmed Kalwar, Asvin Balloo, Atharva Dhekne, Austin Passy, austin880625, avixansa, ayesh, Ayesh Karunaratne, BackuPs, Barry, Bart Czyz, bduclos, Beatriz Fialho, Ben Meredith, Bernhard Kau, Bernhard Reiter, Bet Hannon, Beth Soderberg, bgermann, Bhagvan Mangukiya, bhautikvirani, Billy S, Birgir Erlendsson (birgire), Birgit Pauli-Haack, bobbingwide, BoldGrid, Boone Gorges, Boy Witthaya, Brady Vercher, Brandon Kraft, Brandon Payton, Breann McDede, Brent Miller, Brent Swisher, Brian Henry, Brian Hogg, bridgetwillard, brijeshb42, Burhan Nasir, Caleb Burks, Calin Don, Cameron Voell, campusboy, Carike, Carolina Nymark, Caroline, ceyhun0, Chad Reitsma, Chandrika Guntur, Chetan Prajapati, chexwarrior, Chintan hingrajiya, Chip Snyder, ChloĆ© Bringmann, Chouby, Chris Alexander, Chris Van Patten, chriscct7, Christian Martin, Christoph Herr, Christopher Churchill, chunkysteveo, Claudiu Lodromanean, Clayton Collie, Collins Agbonghama, Commeuneimage, Copons, Corey Salzano, cpapazoglou, cranewest, Csaba (LittleBigThings), ctmartin, Dávid Szabó, Daisy Olsen, Dan Farrow, Daniel Bachhuber, Daniel Richards, Daniele Scasciafratte, danieltj, dantahoua, Darin Kotter, Dave McHale, David Aguilera, David Anderson, David Baumwald, David Gwyer, David Herrera, David Shanske, David Smith, David Wolfpaw, david.binda, Davis Shaver, dd32, Dean, Debabrata Karfa, Dee Teal, Deepak Lalwani, dekervit, demetris (Demetris Kikizas), Denis de Bernardy, Derek Herman, Designer023, dfenton, Dharmesh Patel, Dharmin Shah, Dhruvin, Dhul Wells, dietpawel, Dilip Bheda, dingo-d, DjZoNe, dogwithblog, Dominik Schilling, donmhico, donsony, Dossy Shiobara, dpacks, Dr. Ronny Harbich, dratwas, Drew Jaynes, dsifford, dushakov, dushanthi, dyrer, Earle Davies, Ebonie Butler, Edi Amin, Ella van Durpe, Ellen Bauer, Enej Bajgorić, Enrique Sánchez, epiqueras, Erik Betshammar, erikjandelange, Erin 'Folletto' Casali, eringoblog, eroraghav, Estela Rueda, etoledom, EugeneBos, Evan Mullins, Fabian, Fabian Kägy, Fabian Todt, Felipe Elia, Felix Arntz, Ferenc Forgacs, Florian TIAR, flymike, Francesca Marano, Frank Klein, Frankie Jarrett, fullofcaffeine, Gan Eng Chin, Garrett Hyder, Gary Cao, Gary Jones, Gary Pendergast, gchtr, Gennady Kovshenin, George, George Stephanis, geriux, Glauber Mota, glendaviesnz, goldenapples, Greg Ziółkowski, guidooffermans, gumacahin, H-var, hakre, happiryu, Hareesh, Haris Zulfiqar, harrym, harshbarach, Hauwa Abashiya, Haz, Helen Hou-SandĆ­, Henry Wright, Herre Groen, HoaSi, Hong Nga Nguyen, Howdy_McGee, Hugh Lashbrooke, Ian Dunn, Igor Radovanov, Imran Sayed, ingereck, Ipstenu (Mika Epstein), iqbalbary, Irene Strikkers, Isabel Brison, jagirbaheshwp, Jake Spurlock, Jake Whiteley, James Collins, James Koster, James Nylen, James Rosado, jameslnewell, Jan Thiel, Janvo Aldred, Jared Cobb, Jason Caldwell, Jason LeMahieu (MadtownLems), javorszky, Jaydip Rami, Jean-Baptiste Audras, Jeff Matson, Jeff Ong, Jeff Paul, jeffikus, jellypixel, Jeremy Felt, Jeremy Scott, Jeremy Yip, Jeroen Rotty, jeryj, Jeslen Bucci, Jessica Lyschik, jfoulquier, jimyaghi, Jip Moors, Joe Dolson, Joe McGill, joelclimbsthings, joelyoder, Joen Asmussen, Johanna de Vos, John Blackbourn, John Godley, John James Jacoby, Jon Brown, Jonathan Bossenger, Jonathan Desrosiers, Jonathan Stegall, Jonny Harris, Jono Alderson, Joost de Valk, jordesign, Jorge Bernal, Jorge Costa, joseaneto, Josepha Haden, Josh Levinson, Josh Pollock, joshuatf, JOTAKI, Taisuke, Joy, jsnajdr, Juliette Reinders Folmer, Junaid Bhura, Justin Ahinon, justlevine, K. Adam White, Kai Hao, Kailey (trepmal), Kalpesh Akabari, Karthik Bhat, Kaspars, Kelly Dwan, Kelly Hoffman, Kelly R, kellybleck, kellylawrence, Kevin Hagerty, Kharis Sulistiyono, Kipperlenny, Kiril Zhelyazkov, Kirsty Burgoine, Kishan Jasani, Kite, KittMedia, kjbenk, Kjell Reigstad, Knut Sparhell, komagain, Konstantin Obenland, Krupa, Kyle B. Johnson, landau, Larissa Murillo, latifi, Laura Byrne, Laura Nelson, Laxman Prajapati, leogermani, Lester Chan, Leutrim Husaj, lim3ra, Lionel Pointet, llizard, Louis, Luca Grandicelli, Luigi Cavalieri, Luke Cavanagh, Lumne, mager19, Maggie Cabrera, Mahesh Waghmare, mailnew2ster, Mainul Hassan Main, malinajirka, manzwebdesigns, Marcus Kazmierczak, Marek Hrabe, Marie Comet, Marijn, Marin Atanasov, Marius Jensen, Mark Jaquith, Mark Parnell, Mark Robson, Mark Smallman, Mark Uraine, Marko Heijnen, markshep, Marty Helmick, Mary Baum, Mateus Machado Luna, Mathieu Viet, Matias Ventura, Matt Cromwell, Matt Gibson, Matt Keys, Matt Mullenweg, Matt Wiebe, mattchowning, Matthias Pfefferle, mattoperry, Mayank Majeji, Meagan Hanes, Meg Phillips, Meher Bala, Mel Choyce-Dwan, mgol, mgrenierfarmmedia, Michael Arestad, Michael Beckwith, Michele Butcher-Jones, Michelle Frechette, Miguel Fonseca, mihdan, Mike Schroder, mikelopez, Mikey Arce, Milan Dinić, Milana Cap, Mitchell Bennis, mmarco9, Mohammad Jangda, Monika Rao, mopsyd, Morgan Estes, Morgan Kay, Morteza Geransayeh, mqudsi, mreishus, mrgrt, mrjoeldean, Mukesh Panchal, munyagu, musicaljoeker, mweichert, n5hzr, Nabil Moqbel, Nalini Thakor, Naoki Ohashi, Naoko Takano, Nate Gay, Nathan Johnson, Navanath Bhosale, Naveen Kharwar, Neil James (lcyh78), nendeb, net, Netravnen, nicomollet, Nidhi Jain, Niels Lange, Nik Tsekouras, Nikola, Nikolay Bachiyski, njbrown, nlpro, Noah Allen, noahshrader, nourma, O André, oakesjosh, oguzkocer, Olga Gleckler, Omar Alshaker, Omar Reiss, oolleegg55, Optimizing Matters, Ov3rfly, ovann86, ovenall, oxyc, Paal Joachim Romdahl, pabloselin, Paddy, Pankaj Mohale, Pascal Birchler, Pascal Casier, Paul Bearne, Paul Biron, Paul Bunkham, Paul Schreiber, Paul Stonier, Paul Von Schrottky, Pedro Mendonça, pentatonicfunk, pepe, Peter Elmered, Peter Smits, Peter Wilson, Phil Johnston, Pierre Gordon, Pilar Mera, Pinar, Piotrek Boniu, pishmishy, pkvillanueva, prashanttholia, Pratik K. Yadav, Presskopp, presstoke, prionkor, psealock, Puneet Sahalot, Q, Rachel Baker, Rajan Vijayan, rajeshsingh520, Rami Yushuvaev, Ravi Vaghela, ravipatel, rebasaurus, redstar504, Regan Khadgi, Rene Hermenau, retlehs, retrofox, riaanlom, Riad Benguella, ribaricplusplus, Rich Tabor, Rnaby, Robert Anderson, Robert Chapin, Rodrigo Arias, rogerlos, roikles, Rolf Siebers, Ronak Ganatra, roo2, rtagliento, Ryan Fredlund, Ryan Kienstra, Ryan McCue, Ryan Welcher, Sören Wrede, Sabrina Zeidan, Saeed Fard, salvoaranzulla, Sam Fullalove, Sam Webster, Samuel Wood (Otto), Sanjeev Aryal, Saqib Ameen, Sarah Ricker, sarayourfriend, sawanoboly, scarolan, Scott Cariss, Scott Reilly, scribu, scruffian, seanpaulrasmussen, Sebastian Pisula, SeBsZ, Senning, Sergey Biryukov, Sergey Yakimov, SergioEstevao, shaunandrews, Shawntelle Coker, Shital Marakana, shramee, Simon Resok, sirreal, smerriman, snapfractalpop, sproutchris, Stéphane Treilhou, Stanko Metodiev, Stefano Garuti, Stephen Bernhardt, Steve Dufresne, Steven Stern (sterndata), stevenlinx, Stoyan Georgiev, sudoshreyansh, Syed Balkhi, szaqal21, Tammie Lister, TeBenachi, techboyg5, Tellyworth, thefarlilacfield, Thelma Mutete, thib3113, thijsvanloef, Thomas M, Thomas Patrick Levy, thomaslhotta, Tim Havinga, Tim Hengeveld, Timi Wahalahti, Timothy Jacobs, TimoTijhof, Tkama, tmdesigned, TobiasBg, tobifjellner (Tor-Bjorn Fjellner), Tonya Mork, Toro_Unit (Hiroshi Urabe), torres126, Torsten Landsiedel, Towhidul I Chowdhury, tracy apps, treibstoff, Trisha Cornelius, Tung Du, tzafrir, Udit Desai, Ulrich, uxkai, Valentin Bora, Varun Sharma, vcanales, vidhiaddweb, Vinayak Anivase, Vinita Tandulkar, Vinny, virgodesign, WebMan Design | Oliver Juhas, Webmigrates Technologies, Weston Ruter, William Earnhardt, williampatton, Winstina Hughes, wittich, worldweb, Y_Kolev, Yan Sern, Yoav Farhi, yscik, Yui, Yvette Sonneveld, and Zebulan Stanphill. + + + +

        + + + +

        In addition, many thanks to all of the community volunteers who contribute in the support forums. They answer questions from people across the world, whether they are using WordPress for the first time, or they’ve been around since the first release all the way back in 2003. These releases are as successful as they are because of their efforts!

        + + + +

        Finally, thanks to all the community translators who helped make WordPress 5.6. available in 38 languages at the time of release. Our community translators are hard at work ensuring more languages are on their way (70 are already at 90%). If contributing to WordPress appeals to you, it’s easy to learn more. Check out Make WordPress or the core development blog.

        +]]>
        + + + + 9325
        + + State of the Word 2020 + https://wordpress.org/news/2020/12/state-of-the-word-2020/ + + + Fri, 04 Dec 2020 22:55:19 +0000 + + https://wordpress.org/news/?p=9296 + + + State of the Word is an annual keynote address delivered by the project co-founder, Matt Mullenweg. This year’s keynote will be streamed on Facebook, YouTube, and Twitter on Thursday, Dec 17th, 2020  at 1600 UTC.

        + + + +
        + + + +

        Have a question?

        + + + +

        A Question and Answer period with pre-recorded videos will follow State of the Word. To take part, record a video of you asking your question to Matt on your computer or phone (landscape format, please). Don’t forget to include your name and how you use WordPress! Try to keep your video to under a minute so Matt can answer as many questions as possible.

        + + + +

        To submit your question, upload it as an unlisted video (YouTube works great for this) and send a link to ask-matt@wordcamp.org. Deadline is Friday, Dec 11th, 2020!

        + + + +

        New to State of the Word?

        + + + +

        If this is your first time hearing of this talk, you’re in luck! Check out previous recordings below.

        + + + + +]]>
        + + + + 9296
        + + The Month in WordPress: November 2020 + https://wordpress.org/news/2020/12/the-month-in-wordpress-november-2020/ + + + Wed, 02 Dec 2020 09:13:48 +0000 + + https://wordpress.org/news/?p=9283 + + + November 2020 saw several updates to the WordPress 5.6 release. Read on to follow all the latest news from the WordPress world!

        + + + +
        + + + +

        WordPress 5.6 updates

        + + + +

        The Core team released WordPress 5.6 Beta 3 on Nov. 2, Beta 4 on Nov. 12, release candidate 1 on Nov. 17, and release candidate 2 on Dec. 1. You can test the Beta versions and the release candidates by downloading them from WordPress.org or by using the WordPress Beta Tester plugin. Check out the WordPress 5.6 field guide to understand the features of WordPress 5.6 and learn how you can incorporate them into your websites. WordPress 5.6 will be out by Dec. 9, 2020.

        + + + +

        But our work is never done: You can submit feature suggestions for WordPress 5.7 by Dec. 15. 

        + + + +

        Want to contribute to upcoming WordPress releases? Join the WordPress Core dev chats on Wednesdays at 5 a.m. and 8 p.m. UTC in the #core channel on the Make WordPress Slack, and catch up with recaps on the Core team blog. If you would like to help with WordPress 5.6 outreach, contact the WordPress Marketing team on the #marketing channel.

        + + + +

        Gutenberg 9.3 and 9.4 are out

        + + + +

        Contributor teams released Gutenberg Version 9.3 on Nov. 4 and Version 9.4 on Nov. 18. Both versions include  several improvements to Full Site Editing (FSE) flows, in addition to bug fixes and feature upgrades. Version 9.3 is the first release that isn’t included entirely in WordPress 5.6; the version automatically enables FSE experiments when a block-based theme is active. Version 9.4 introduces some new features like percentage width for button blocks, block variation transformations, social icon support, and font size support for the list block. You can find out more about the Gutenberg roadmap in the What’s next in Gutenberg blog post.

        + + + +

        Want to get involved in building Gutenberg? Follow the Core team blog, contribute to Gutenberg on GitHub, and join the #core-editor channel in the Making WordPress Slack group.

        + + + +

        Learn WordPress updates

        + + + +

        WordPress contributor teams are all set to launch Learn WordPress in December. Community members can now watch video workshops to learn about various WordPress topics, participate in discussion groups, and use lesson plans for organizing their own workshops. Contributor teams have launched quizzes and are also working on setting standards for workshops.

        + + + +

        Want to contribute to Learn WordPress? You can now submit a workshop application (submissions in languages other than English are welcome!), apply to become a discussion group leader, organize discussions for your local WordPress meetup group, or help fix issues with existing lesson plans.

        + + + +

        WordPress 5.6 Translations and Polyglots survey

        + + + +

        WordPress 5.6 is ready to be translated and is now at hard string freeze. If you would like to contribute, check out these instructions and ensure that your locale is ready for an automated release. The Polyglots team has also kicked off its translator research survey. Please participate in the survey, share the survey link with members of your locale, and help amplify the Facebook, Twitter, and LinkedIn posts about it.

        + + + +

        Want to help WordPress speak your language? Follow the Polyglots team blog and join the #polyglots channel in the Making WordPress Slack group

        + + + +
        + + + +

        Further Reading:

        + + + + + + + +

        Have a story that we should include in the next ā€œMonth in WordPressā€ post? Please submit it here.

        +]]>
        + + + + 9283
        + + WordPress 5.6 Release Candidate 2 + https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/ + + + Tue, 01 Dec 2020 22:09:28 +0000 + + + https://wordpress.org/news/?p=9274 + + + The second release candidate for WordPress 5.6 is here!

        + + + +

        WordPress 5.6 is slated for release on December 8, 2020, and we need your help to get there—if you haven’t tried 5.6 yet, now is the time!

        + + + +

        You can test WordPress 5.6 release candidate 2 in two ways:

        + + + + + + + +

        Thank you to all of the contributors who tested the Beta releases and gave feedback. Testing for bugs is a critical part of polishing every release and a great way to contribute to WordPress.

        + + + +

        Plugin and Theme Developers

        + + + +

        Please test your plugins and themes against WordPress 5.6 and update the Tested up to version in the readme file to 5.6. If you find compatibility problems, please be sure to post to the support forums. That way, those can be figured out before the final release.

        + + + +

        For a more detailed breakdown of the changes included in WordPress 5.6, check out the WordPress 5.6 beta 1 post. The WordPress 5.6 Field Guide is also out! It’s your source for details on all the major changes.

        + + + +

        How to Help

        + + + +

        Do you speak a language other than English? Help translate WordPress into more than 100 languages!

        + + + +

        Think you found a bug? Post it to the Alpha/Beta area in the support forums. We would love to hear from you! If you’re comfortable writing a reproducible bug report you can file one on WordPress Trac. Don’t forget to check the list of known bugs!

        +]]>
        + + + + 9274
        + + WordPress 5.6 Release Candidate + https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/ + + + Tue, 17 Nov 2020 22:43:50 +0000 + + + https://wordpress.org/news/?p=9258 + + + The first release candidate for WordPress 5.6 is now available!

        + + + +

        This is an important milestone in the community’s progress toward the final release of WordPress 5.6.

        + + + +

        ā€œRelease Candidateā€ means that the new version is ready for release, but with millions of users and thousands of plugins and themes, it’s possible something was missed. WordPress 5.6 is slated for release on December 8, 2020, but we need your help to get there—if you haven’t tried 5.6 yet, now is the time!

        + + + +

        You can test the WordPress 5.6 release candidate in two ways:

        + + + + + + + +

        Thank you to all of the contributors who tested the Beta releases and gave feedback. Testing for bugs is a critical part of polishing every release and a great way to contribute to WordPress.

        + + + +

        What’s in WordPress 5.6?

        + + + +

        The final release of 2020 continues the annual tradition of a new default theme that is custom built to showcase the new features and functionality of the software. Continued progress on the block editor is especially clear in this release, which brings more blocks to more places, and fewer clicks to implement your layouts.

        + + + +

        WordPress 5.6 also has lots of refinements to polish the developer experience. To learn more, subscribe to the Make WordPress Core blog and pay special attention to the developer notes tag for updates on those and other changes that could affect your products.

        + + + +

        Plugin and Theme Developers

        + + + +

        Please test your plugins and themes against WordPress 5.6 and update the Tested up to version in the readme file to 5.6. If you find compatibility problems, please be sure to post to the support forums, so those can be figured out before the final release.

        + + + +

        The WordPress 5.6 Field Guide, due very shortly, will give you a more detailed dive into the major changes.

        + + + +

        How to Help

        + + + +

        Do you speak a language other than English? Help us translate WordPress into more than 100 languages! This release also marks the hard string freeze point of the 5.6 release schedule.

        + + + +

        If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.

        +]]>
        + + + + 9258
        + + WordPress 5.6 Beta 4 + https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/ + + + Thu, 12 Nov 2020 23:49:45 +0000 + + + https://wordpress.org/news/?p=9249 + + + WordPress 5.6 Beta 4 is now available for testing!

        + + + +

        This software is still in development, so we recommend that you run this version on a test site.

        + + + +

        You can test the WordPress 5.6 beta in two ways:

        + + + + + + + +

        The current target for the final release is December 8, 2020. This is just over three weeks away, so your help is needed to ensure this release is tested properly.

        + + + +

        Thank you to all of the contributors that tested the beta 3 development release and provided feedback. Testing for bugs is an important part of polishing each release and a great way to contribute to WordPress.

        + + + +

        Some Highlights

        + + + +

        Since beta 3, 42 bugs have been fixed. Here is a summary of a few changes included in beta 4:

        + + + + + + + +

        To see all of the features for each Gutenberg release in detail, check out the release posts: 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, and 9.3.

        + + + +

        Developer notes

        + + + +

        WordPress 5.6 has lots of refinements to the developer experience. To keep up, subscribe to the Make WordPress Core blog and pay special attention to the developers’ notes for updates on those and other changes that could affect your products.

        + + + +

        How to Help

        + + + +

        If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you!

        + + + +

        If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.

        + + + +

        Props to @tonyamork, @audrasjb for technical notes and @angelasjin, @yvettesonneveld, @cguntur, @cbringmann for final review.

        +]]>
        + + + + 9249
        + + WordPress 5.6 Beta 3 + https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/ + + + Mon, 02 Nov 2020 21:23:07 +0000 + + + https://wordpress.org/news/?p=9234 + + + WordPress 5.6 Beta 3 is now available for testing!

        + + + +

        This software is still in development, so we recommend that you run this version on a test site.

        + + + +

        You can test the WordPress 5.6 beta in two ways:

        + + + + + + + +

        The current target for the final release is December 8, 2020. This is just five weeks away, so your help is needed to ensure this release is tested properly.

        + + + +

        Thank you to all of the contributors that tested the beta 2 development release and provided feedback. Testing for bugs is an important part of polishing each release and a great way to contribute to WordPress.

        + + + +

        Some Highlights

        + + + +

        Since beta 2, 20 bugs have been fixed. Here is a summary of a few changes included in beta 3:

        + + + +
        • Added block patterns for Twenty Twenty (see #51098) and Twenty Nineteen (see #51099) themes.
        • Added theme support for navigation-widgets (see #51445).
        • Fixed incorrect slashes in the URL if the parent is empty for REST API (see #44745).
        • Added a test to Site Health to verify that the Authorization header is working as expected for Application Passwords (see #51638).
        • 10 additional bugs fixed in the block editor (see #26588).
        + + + +

        To see all of the features for each Gutenberg release in detail, check out the release posts: 8.68.78.88.99.09.1, 9.2, and 9.3.

        + + + +

        Developer notes

        + + + +

        WordPress 5.6 has lots of refinements to the developer experience as well. To keep up, subscribe to the Make WordPress Core blog and pay special attention to the developers’ notes for updates on those and other changes that could affect your products.

        + + + +

        How to Help

        + + + +

        If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you!

        + + + +

        If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.

        + + + +

        Props to @hellofromtonya for help and @chanthaboune for final review.

        +]]>
        + + + + 9234
        + + The Month in WordPress: October 2020 + https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/ + + + Mon, 02 Nov 2020 18:14:00 +0000 + + https://wordpress.org/news/?p=9225 + + + October 2020 was a notable month for WordPress lovers, thanks to the release of several products and updates. Read on to keep up with all the latest news!

        + + + +
        + + + +

        The 2020 WordPress Annual Survey is out

        + + + +

        The team published the 2020 WordPress Annual survey —  to help those who build WordPress to understand more about our software usage and our contributors’ experience. The Annual Survey will be open for at least 6 weeks and is available in French, German, Japanese, Russian, and Spanish. The survey results (once complete) will be posted on WordPress.org/news. The 2019 survey results have also been released and can now be viewed as slides or downloaded in PDF format

        + + + +

        WordPress Translation celebrations spanned four weeks

        + + + +

        The last week of September and most of October were focused on recruiting and encouraging polyglot contributors to the WordPress translation project. What was originally envisioned as a single-day event lasted 24 days! The Polyglots and Marketing Teams are exploring how future mini-events can be supported to continue building the momentum. Recordings of the live talks and interviews with contributors are available on YouTube. Write-ups from the different events are on the WPTranslationDay website.

        + + + +

        Want to help WordPress speak your own language? Follow the Polyglots team blog and join the #polyglots channel in the Making WordPress Slack group

        + + + +

        WordPress maintenance and beta releases

        + + + +

        The Core team released WordPress 5.5.3 on Oct. 31, following the release of Version 5.5.2 on Oct. 29. Both releases fix several bugs and security issues with WordPress. You can update to the latest version directly from your WordPress dashboard or download it now from WordPress.org.  The team also released WordPress 5.6 Beta 1 on Oct. 20, followed by Beta 2 on Oct. 27. When ready, the final release will include improvements to the editor, auto-updates for major releases, PHP 8 support, and the Twenty Twenty One theme. You can test the Beta versions by downloading them from WordPress.org or using the WordPress Beta Tester plugin.

        + + + +

        Want to be involved in the next release? Follow WordPress 5.6 updates on the development cycle and sign-up for the code review/commit office hours. You can help build WordPress Core by following the Core team blog and joining the #core channel in the Making WordPress Slack group. If you would like to help out with WordPress 5.6 outreach, contact the WordPress Marketing team on the #marketing channel.

        + + + +

        Gutenberg 9.2 is released

        + + + +

        Version 9.2 of the Gutenberg plugin came out on Oct. 21. This release offers support for video subtitles, the ability to transform selected blocks into the columns block, background patterns in cover blocks, along with several exciting features such as improvements to the widget screen, as well as bug fixes. You can find out more about the Gutenberg roadmap in the What’s next in Gutenberg blog post.

        + + + +

        Want to get involved in building Gutenberg? Follow the Core team blog, contribute to Gutenberg on GitHub, and join the #core-editor channel in the Making WordPress Slack group.

        + + + +

        Learn WordPress is gearing up for launch

        + + + +

        The Learn WordPress initiative, which offers WordPress video workshops followed by interactive discussions, is aiming to put out two courses by the end of the year as part of its full launch. The team is working on creating courses and is requesting feedback from community members on the planned list of courses.

        Want to contribute to Learn WordPress? You can now submit a workshop application (submissions in non-English languages are welcome), apply to become a discussion group leader, organize discussions for your local WordPress meetup group, or update screenshots on existing lesson plans.

        + + + +
        + + + +

        Further Reading:

        + + + + + + + +

        Have a story that we should include in the next ā€œMonth in WordPressā€ post? Please submit it here.

        +]]>
        + + + + 9225
        + + WordPress 5.5.3 Maintenance Release + https://wordpress.org/news/2020/10/wordpress-5-5-3-maintenance-release/ + + + Fri, 30 Oct 2020 20:25:44 +0000 + + https://wordpress.org/news/?p=9212 + + + WordPress 5.5.3 is now available. 

        + + + +

        This maintenance release fixes an issue introduced in WordPress 5.5.2 which makes it impossible to install WordPress on a brand new website that does not have a database connection configured. This release does not affect sites where a database connection is already configured, for example, via one-click installers or an existing wp-config.php file.

        + + + +

        5.5.3-alpha Issue

        + + + +

        Earlier today — between approximately 15:30 and 16:00 UTC — the auto-update system for WordPress updated some sites from version 5.5.2 to version 5.5.3-alpha. This auto-update was due to an error in the Updates API caused by the 5.5.3 release preparations (see more here). The 5.5.3-alpha version at this point was functionally identical to 5.5.2 as no development work had been started on 5.5.3; however, the following changes may have been made to your site:

        + + + +
        • The default ā€œTwentyā€ themes installed as part of the pre-release package.
        • The ā€œAkismetā€ plugin installed as part of the pre-release package.
        + + + +

        These themes and plugins were not activated and therefore remain non-functional unless you installed them previously. It is safe to delete these features should you prefer not to use them. 

        + + + +

        If you are not on 5.5.2, or have auto-updates for minor releases disabled, please manually update to the 5.5.3 version by downloading WordPress 5.5.3 or visiting Dashboard → Updates and click ā€œUpdate Now.ā€

        + + + +

        For more technical details of the issue, we’ve posted on our Core Development blog.

        + + + +

        Thanks and props!

        + + + +

        Thanks to those who contributed to the 5.5.3 release: @audrasjb, @barry, @chanthaboune, @cbringmann, @clorith, @davidbaumwald, @desrosj, @hellofromtonya, @jeffpaul, @johnbillion, @garubi, @metalandcoffee, @mukesh27, @otto42, @punitsoftac, @sergeybiryukov, @whyisjake, and @xknown.

        +]]>
        + + + + 9212
        + + diff --git a/tests/phpunit/data/formatting/cr-line-endings-file-header.php b/tests/phpunit/data/formatting/cr-line-endings-file-header.php deleted file mode 100644 index e8f3869999e1c..0000000000000 --- a/tests/phpunit/data/formatting/cr-line-endings-file-header.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/tests/phpunit/data/functions/dummy.txt b/tests/phpunit/data/functions/dummy.txt new file mode 100644 index 0000000000000..7614ea709c87a --- /dev/null +++ b/tests/phpunit/data/functions/dummy.txt @@ -0,0 +1 @@ +This is a dummy text file which is only used by the `Tests_Functions_CleanDirsizeCache::test_recurse_dirsize_without_transient()` test. diff --git a/tests/phpunit/data/images/test-image-1-100x100.jpg b/tests/phpunit/data/images/test-image-1-100x100.jpg new file mode 100644 index 0000000000000..534aac1d6bf49 Binary files /dev/null and b/tests/phpunit/data/images/test-image-1-100x100.jpg differ diff --git a/tests/phpunit/data/images/test-image-2.gif b/tests/phpunit/data/images/test-image-2.gif new file mode 100644 index 0000000000000..8fad364479d96 Binary files /dev/null and b/tests/phpunit/data/images/test-image-2.gif differ diff --git a/tests/phpunit/data/images/test-image-3.jpg b/tests/phpunit/data/images/test-image-3.jpg new file mode 100644 index 0000000000000..534aac1d6bf49 Binary files /dev/null and b/tests/phpunit/data/images/test-image-3.jpg differ diff --git a/tests/phpunit/data/images/test-image-4.png b/tests/phpunit/data/images/test-image-4.png new file mode 100644 index 0000000000000..642ce92975eae Binary files /dev/null and b/tests/phpunit/data/images/test-image-4.png differ diff --git a/tests/phpunit/data/images/test-image-large.jpg b/tests/phpunit/data/images/test-image-large.jpg new file mode 100644 index 0000000000000..1d0a16298b9a7 Binary files /dev/null and b/tests/phpunit/data/images/test-image-large.jpg differ diff --git a/tests/phpunit/data/images/test-image-large.png b/tests/phpunit/data/images/test-image-large.png deleted file mode 100644 index 828c4a6bc398a..0000000000000 Binary files a/tests/phpunit/data/images/test-image-large.png and /dev/null differ diff --git a/tests/phpunit/data/images/test-image.webp b/tests/phpunit/data/images/test-image.webp new file mode 100644 index 0000000000000..37ab153807080 Binary files /dev/null and b/tests/phpunit/data/images/test-image.webp differ diff --git a/tests/phpunit/data/images/webp-animated.webp b/tests/phpunit/data/images/webp-animated.webp new file mode 100644 index 0000000000000..c60d334a82714 Binary files /dev/null and b/tests/phpunit/data/images/webp-animated.webp differ diff --git a/tests/phpunit/data/images/webp-lossless.webp b/tests/phpunit/data/images/webp-lossless.webp new file mode 100644 index 0000000000000..7a3a06e0b4490 Binary files /dev/null and b/tests/phpunit/data/images/webp-lossless.webp differ diff --git a/tests/phpunit/data/images/webp-lossy.webp b/tests/phpunit/data/images/webp-lossy.webp new file mode 100644 index 0000000000000..c8b0e25391237 Binary files /dev/null and b/tests/phpunit/data/images/webp-lossy.webp differ diff --git a/tests/phpunit/data/images/webp-transparent.webp b/tests/phpunit/data/images/webp-transparent.webp new file mode 100644 index 0000000000000..c4b24a08be283 Binary files /dev/null and b/tests/phpunit/data/images/webp-transparent.webp differ diff --git a/tests/phpunit/data/languages/es_ES.mo b/tests/phpunit/data/languages/es_ES.mo index bd56b36d4c6cb..2f949bcf6a819 100644 Binary files a/tests/phpunit/data/languages/es_ES.mo and b/tests/phpunit/data/languages/es_ES.mo differ diff --git a/tests/phpunit/data/languages/es_ES.po b/tests/phpunit/data/languages/es_ES.po index 511874825ea95..fc6b062bdf7c3 100644 --- a/tests/phpunit/data/languages/es_ES.po +++ b/tests/phpunit/data/languages/es_ES.po @@ -2,12 +2,12 @@ # This file is distributed under the same license as the Development (5.2.x) package. msgid "" msgstr "" -"PO-Revision-Date: 2019-03-28 19:43+0300\n" +"PO-Revision-Date: 2020-07-23 21:12+0300\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 2.3\n" "Project-Id-Version: Development (5.2.x)\n" "Language: es_ES\n" "POT-Creation-Date: \n" @@ -43,7 +43,7 @@ msgstr "(Actualmente fijado en: %s)" #. translators: Privacy data request subject. 1: Site name, 2: Name of the action #: wp-includes/user.php:3445 msgid "[%1$s] Confirm Action: %2$s" -msgstr "[%1$s] Confirma la acción: %2$s" +msgstr "[%1$s] Confirmar la acción: %2$s" #. translators: %s: Site name. #: wp-includes/user.php:3175 diff --git a/tests/phpunit/data/languages/plugins/notice-pl_PL.mo b/tests/phpunit/data/languages/plugins/notice-pl_PL.mo new file mode 100644 index 0000000000000..0ee1868e41a36 Binary files /dev/null and b/tests/phpunit/data/languages/plugins/notice-pl_PL.mo differ diff --git a/tests/phpunit/data/languages/plugins/notice-pl_PL.po b/tests/phpunit/data/languages/plugins/notice-pl_PL.po new file mode 100644 index 0000000000000..78a72d81c46f4 --- /dev/null +++ b/tests/phpunit/data/languages/plugins/notice-pl_PL.po @@ -0,0 +1,55 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2015-12-31 16:31+0100\n" +"PO-Revision-Date: 2021-08-11 12:25+0200\n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;" +"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;" +"esc_html_x:1,2c\n" +"X-Textdomain-Support: yes\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Poedit-SearchPath-0: .\n" + +msgctxt "block title" +msgid "Notice" +msgstr "Powiadomienie" + +msgctxt "block description" +msgid "Shows warning, error or success notices…" +msgstr "Wyświetla ostrzeżenie, błąd lub powiadomienie o sukcesie…" + +msgctxt "block keyword" +msgid "alert" +msgstr "ostrzeżenie" + +msgctxt "block keyword" +msgid "message" +msgstr "wiadomość" + +msgctxt "block style label" +msgid "Default" +msgstr "Domyślny" + +msgctxt "block style label" +msgid "Other" +msgstr "Inny" + +msgctxt "block variation title" +msgid "Error" +msgstr "Błąd" + +msgctxt "block variation description" +msgid "Shows error." +msgstr "Wyświetla błąd." + +msgctxt "block variation keyword" +msgid "failure" +msgstr "niepowodzenie" diff --git a/tests/phpunit/data/languages/themes/block-theme-pl_PL.mo b/tests/phpunit/data/languages/themes/block-theme-pl_PL.mo new file mode 100644 index 0000000000000..0ff620e64ae4a Binary files /dev/null and b/tests/phpunit/data/languages/themes/block-theme-pl_PL.mo differ diff --git a/tests/phpunit/data/languages/themes/block-theme-pl_PL.po b/tests/phpunit/data/languages/themes/block-theme-pl_PL.po new file mode 100644 index 0000000000000..d55e02b8b5468 --- /dev/null +++ b/tests/phpunit/data/languages/themes/block-theme-pl_PL.po @@ -0,0 +1,31 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2015-12-31 16:31+0100\n" +"PO-Revision-Date: 2021-03-15 13:10+0100\n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;" +"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;" +"esc_html_x:1,2c\n" +"X-Textdomain-Support: yes\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Poedit-SearchPath-0: .\n" + +msgctxt "Custom template name" +msgid "Homepage template" +msgstr "Szablon strony głównej" + +msgctxt "Color name" +msgid "Light" +msgstr "Jasny" + +msgctxt "Color name" +msgid "Dark" +msgstr "Ciemny" diff --git a/tests/phpunit/data/plugins/link-manager.zip b/tests/phpunit/data/plugins/link-manager.zip new file mode 100644 index 0000000000000..788eae362618b Binary files /dev/null and b/tests/phpunit/data/plugins/link-manager.zip differ diff --git a/tests/phpunit/data/themedir1/block-theme/index.php b/tests/phpunit/data/themedir1/block-theme/index.php new file mode 100644 index 0000000000000..589adcefcd0f2 --- /dev/null +++ b/tests/phpunit/data/themedir1/block-theme/index.php @@ -0,0 +1,4 @@ + diff --git a/tests/phpunit/data/themedir1/rest-api/style.css b/tests/phpunit/data/themedir1/rest-api/style.css new file mode 100644 index 0000000000000..27fe7b53a0df5 --- /dev/null +++ b/tests/phpunit/data/themedir1/rest-api/style.css @@ -0,0 +1,15 @@ +/* +Theme Name: REST Theme +Theme URI: http://wordpress.org/?search=1&term=2 +Description: The 9' foot tall theme. +Version: 1.6 +Author: Michael Heilemann +Author URI: http://binarybonsai.com/?search=1&term=2 +Tags: holiday, custom-menu +Template: default +Requires at least: 5.3 +Requires PHP: 5.6 +Text Domain: rest-api +*/ + + diff --git a/tests/phpunit/data/themedir1/stylesheetonly/style.css b/tests/phpunit/data/themedir1/stylesheetonly/style.css index f3f7585b8e950..52245d0fa912a 100644 --- a/tests/phpunit/data/themedir1/stylesheetonly/style.css +++ b/tests/phpunit/data/themedir1/stylesheetonly/style.css @@ -1,4 +1,4 @@ -/* +/* Theme Name: Stylesheet Only Theme URI: http://www.example.com/blog/ Description: A three-column widget-ready theme in dark blue. diff --git a/tests/phpunit/data/widgets/custom-widget-classes.php b/tests/phpunit/data/widgets/custom-widget-classes.php new file mode 100644 index 0000000000000..8d079f36933eb --- /dev/null +++ b/tests/phpunit/data/widgets/custom-widget-classes.php @@ -0,0 +1,14 @@ +suppress_errors = false; @@ -68,15 +68,13 @@ public static function setUpBeforeClass() { $wpdb->db_connect(); ini_set( 'display_errors', 1 ); - parent::setUpBeforeClass(); + parent::set_up_before_class(); - $c = get_called_class(); - if ( ! method_exists( $c, 'wpSetUpBeforeClass' ) ) { - self::commit_transaction(); - return; - } + $class = get_called_class(); - call_user_func( array( $c, 'wpSetUpBeforeClass' ), self::factory() ); + if ( method_exists( $class, 'wpSetUpBeforeClass' ) ) { + call_user_func( array( $class, 'wpSetUpBeforeClass' ), self::factory() ); + } self::commit_transaction(); } @@ -84,19 +82,17 @@ public static function setUpBeforeClass() { /** * Runs the routine after all tests have been run. */ - public static function tearDownAfterClass() { - parent::tearDownAfterClass(); + public static function tear_down_after_class() { + parent::tear_down_after_class(); _delete_all_data(); self::flush_cache(); - $c = get_called_class(); - if ( ! method_exists( $c, 'wpTearDownAfterClass' ) ) { - self::commit_transaction(); - return; - } + $class = get_called_class(); - call_user_func( array( $c, 'wpTearDownAfterClass' ) ); + if ( method_exists( $class, 'wpTearDownAfterClass' ) ) { + call_user_func( array( $class, 'wpTearDownAfterClass' ) ); + } self::commit_transaction(); } @@ -104,7 +100,7 @@ public static function tearDownAfterClass() { /** * Runs the routine before each test is executed. */ - public function setUp() { + public function set_up() { set_time_limit( 0 ); if ( ! self::$ignore_files ) { @@ -142,9 +138,9 @@ public function setUp() { } /** - * After a test method runs, reset any state in WordPress the test method might have changed. + * After a test method runs, resets any state in WordPress the test method might have changed. */ - public function tearDown() { + public function tear_down() { global $wpdb, $wp_query, $wp; $wpdb->query( 'ROLLBACK' ); if ( is_multisite() ) { @@ -161,6 +157,29 @@ public function tearDown() { $GLOBALS[ $global ] = null; } + /* + * Reset globals related to current screen to provide a consistent global starting state + * for tests that interact with admin screens. Replaces the need for individual tests + * to invoke `set_current_screen( 'front' )` (or an alternative implementation) as a reset. + * + * The globals are from `WP_Screen::set_current_screen()`. + * + * Why not invoke `set_current_screen( 'front' )`? + * Performance (faster test runs with less memory usage). How so? For each test, + * it saves creating an instance of WP_Screen, making two method calls, + * and firing of the `current_screen` action. + */ + $current_screen_globals = array( 'current_screen', 'taxnow', 'typenow' ); + foreach ( $current_screen_globals as $global ) { + $GLOBALS[ $global ] = null; + } + + /* + * Reset $wp_sitemap global so that sitemap-related dynamic $wp->public_query_vars + * are added when the next test runs. + */ + $GLOBALS['wp_sitemaps'] = null; + $this->unregister_all_meta_keys(); remove_theme_support( 'html5' ); remove_filter( 'query', array( $this, '_create_temporary_tables' ) ); @@ -174,33 +193,35 @@ public function tearDown() { * Cleans the global scope (e.g `$_GET` and `$_POST`). */ public function clean_up_global_scope() { - $_GET = array(); - $_POST = array(); + $_GET = array(); + $_POST = array(); + $_REQUEST = array(); self::flush_cache(); } /** - * Allow tests to be skipped on some automated runs. + * Allows tests to be skipped on some automated runs. * - * For test runs on Travis for something other than trunk/master + * For test runs on GitHub Actions for something other than trunk/master, * we want to skip tests that only need to run for master. */ public function skipOnAutomatedBranches() { - // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables - $travis_branch = getenv( 'TRAVIS_BRANCH' ); - $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); + // https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables + $github_event_name = getenv( 'GITHUB_EVENT_NAME' ); + $github_ref = getenv( 'GITHUB_REF' ); - if ( ! $travis_branch || ! $travis_pull_request ) { - return; - } + if ( $github_event_name && 'false' !== $github_event_name ) { + // We're on GitHub Actions. + $skipped = array( 'pull_request', 'pull_request_target' ); - if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) { - $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); + if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/master' !== $github_ref ) { + $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); + } } } /** - * Allow tests to be skipped when Multisite is not in use. + * Allows tests to be skipped when Multisite is not in use. * * Use in conjunction with the ms-required group. */ @@ -211,7 +232,7 @@ public function skipWithoutMultisite() { } /** - * Allow tests to be skipped when Multisite is in use. + * Allows tests to be skipped when Multisite is in use. * * Use in conjunction with the ms-excluded group. */ @@ -222,7 +243,7 @@ public function skipWithMultisite() { } /** - * Allow tests to be skipped if the HTTP request times out. + * Allows tests to be skipped if the HTTP request times out. * * @param array|WP_Error $response HTTP response. */ @@ -245,7 +266,7 @@ public function skipTestOnTimeout( $response ) { } /** - * Unregister existing post types and register defaults. + * Unregisters existing post types and register defaults. * * Run before each test in order to clean up the global scope, in case * a test forgets to unregister a post type on its own, or fails before @@ -261,7 +282,7 @@ protected function reset_post_types() { } /** - * Unregister existing taxonomies and register defaults. + * Unregisters existing taxonomies and register defaults. * * Run before each test in order to clean up the global scope, in case * a test forgets to unregister a taxonomy on its own, or fails before @@ -275,7 +296,7 @@ protected function reset_taxonomies() { } /** - * Unregister non-built-in post statuses. + * Unregisters non-built-in post statuses. */ protected function reset_post_statuses() { foreach ( get_post_stati( array( '_builtin' => false ) ) as $post_status ) { @@ -284,7 +305,7 @@ protected function reset_post_statuses() { } /** - * Reset `$_SERVER` variables + * Resets `$_SERVER` variables */ protected function reset__SERVER() { tests_reset__SERVER(); @@ -352,7 +373,7 @@ public static function flush_cache() { } /** - * Clean up any registered meta keys. + * Cleans up any registered meta keys. * * @since 5.1.0 * @@ -384,7 +405,7 @@ public function start_transaction() { } /** - * Commit the queries in a transaction. + * Commits the queries in a transaction. * * @since 4.1.0 */ @@ -432,11 +453,16 @@ public function get_wp_die_handler( $handler ) { /** * Throws an exception when called. * - * @throws WPDieException Exception containing the message. + * @since UT (3.7.0) + * @since 5.9.0 Added the `$title` and `$args` parameters. * - * @param string $message The `wp_die()` message. + * @throws WPDieException Exception containing the message and the response code. + * + * @param string|WP_Error $message The `wp_die()` message or WP_Error object. + * @param string $title The `wp_die()` title. + * @param string|array $args The `wp_die()` arguments. */ - public function wp_die_handler( $message ) { + public function wp_die_handler( $message, $title, $args ) { if ( is_wp_error( $message ) ) { $message = $message->get_error_message(); } @@ -445,14 +471,29 @@ public function wp_die_handler( $message ) { $message = '0'; } - throw new WPDieException( $message ); + $code = 0; + if ( isset( $args['response'] ) ) { + $code = $args['response']; + } + + throw new WPDieException( $message, $code ); } /** * Sets up the expectations for testing a deprecated call. */ public function expectDeprecated() { - $annotations = $this->getAnnotations(); + if ( method_exists( $this, 'getAnnotations' ) ) { + // PHPUnit < 9.5.0. + $annotations = $this->getAnnotations(); + } else { + // PHPUnit >= 9.5.0. + $annotations = \PHPUnit\Util\Test::parseTestMethodAnnotations( + static::class, + $this->getName( false ) + ); + } + foreach ( array( 'class', 'method' ) as $depth ) { if ( ! empty( $annotations[ $depth ]['expectedDeprecated'] ) ) { $this->expected_deprecated = array_merge( $this->expected_deprecated, $annotations[ $depth ]['expectedDeprecated'] ); @@ -463,10 +504,12 @@ public function expectDeprecated() { } add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) ); add_action( 'deprecated_argument_run', array( $this, 'deprecated_function_run' ) ); + add_action( 'deprecated_file_included', array( $this, 'deprecated_function_run' ) ); add_action( 'deprecated_hook_run', array( $this, 'deprecated_function_run' ) ); add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) ); add_action( 'deprecated_function_trigger_error', '__return_false' ); add_action( 'deprecated_argument_trigger_error', '__return_false' ); + add_action( 'deprecated_file_trigger_error', '__return_false' ); add_action( 'deprecated_hook_trigger_error', '__return_false' ); add_action( 'doing_it_wrong_trigger_error', '__return_false' ); } @@ -509,18 +552,18 @@ public function expectedDeprecated() { } /** - * Detect post-test failure conditions. + * Detects post-test failure conditions. * * We use this method to detect expectedDeprecated and expectedIncorrectUsage annotations. * * @since 4.2.0 */ - protected function assertPostConditions() { + protected function assert_post_conditions() { $this->expectedDeprecated(); } /** - * Declare an expected `_deprecated_function()` or `_deprecated_argument()` call from within a test. + * Declares an expected `_deprecated_function()` or `_deprecated_argument()` call from within a test. * * @since 4.2.0 * @@ -532,7 +575,7 @@ public function setExpectedDeprecated( $deprecated ) { } /** - * Declare an expected `_doing_it_wrong()` call from within a test. + * Declares an expected `_doing_it_wrong()` call from within a test. * * @since 4.2.0 * @@ -544,23 +587,25 @@ public function setExpectedIncorrectUsage( $doing_it_wrong ) { } /** - * PHPUnit 6+ compatibility shim. + * Redundant PHPUnit 6+ compatibility shim. DO NOT USE! + * + * This method is only left in place for backward compatibility reasons. + * + * @deprecated 5.9.0 Use the PHPUnit native expectException*() methods directly. * * @param mixed $exception * @param string $message * @param int|string $code */ public function setExpectedException( $exception, $message = '', $code = null ) { - if ( method_exists( 'PHPUnit_Framework_TestCase', 'setExpectedException' ) ) { - parent::setExpectedException( $exception, $message, $code ); - } else { - $this->expectException( $exception ); - if ( '' !== $message ) { - $this->expectExceptionMessage( $message ); - } - if ( null !== $code ) { - $this->expectExceptionCode( $code ); - } + $this->expectException( $exception ); + + if ( '' !== $message ) { + $this->expectExceptionMessage( $message ); + } + + if ( null !== $code ) { + $this->expectExceptionCode( $code ); } } @@ -626,7 +671,7 @@ public function assertIXRError( $actual, $message = '' ) { * @param string $message Optional. Message to display when the assertion fails. */ public function assertNotIXRError( $actual, $message = '' ) { - if ( $actual instanceof IXR_Error && '' === $message ) { + if ( '' === $message && $actual instanceof IXR_Error ) { $message = $actual->message; } $this->assertNotInstanceOf( 'IXR_Error', $actual, $message ); @@ -635,81 +680,194 @@ public function assertNotIXRError( $actual, $message = '' ) { /** * Asserts that the given fields are present in the given object. * - * @param object $object The object to check. - * @param array $fields The fields to check. + * @since UT (3.7.0) + * @since 5.9.0 Added the `$message` parameter. + * + * @param object $object The object to check. + * @param array $fields The fields to check. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertEqualFields( $object, $fields ) { + public function assertEqualFields( $object, $fields, $message = '' ) { + $this->assertIsObject( $object, $message . ' Passed $object is not an object.' ); + $this->assertIsArray( $fields, $message . ' Passed $fields is not an array.' ); + $this->assertNotEmpty( $fields, $message . ' Fields array is empty.' ); + foreach ( $fields as $field_name => $field_value ) { - if ( $object->$field_name !== $field_value ) { - $this->fail(); - } + $this->assertObjectHasAttribute( $field_name, $object, $message . " Property $field_name does not exist on the object." ); + $this->assertSame( $field_value, $object->$field_name, $message . " Value of property $field_name is not $field_value." ); } } /** * Asserts that two values are equal, with whitespace differences discarded. * - * @param string $expected The expected value. - * @param string $actual The actual value. + * @since UT (3.7.0) + * @since 5.9.0 Added the `$message` parameter. + * + * @param mixed $expected The expected value. + * @param mixed $actual The actual value. + * @param string $message Optional. Message to display when the assertion fails. + */ + public function assertDiscardWhitespace( $expected, $actual, $message = '' ) { + if ( is_string( $expected ) ) { + $expected = preg_replace( '/\s*/', '', $expected ); + } + + if ( is_string( $actual ) ) { + $actual = preg_replace( '/\s*/', '', $actual ); + } + + $this->assertEquals( $expected, $actual, $message ); + } + + /** + * Asserts that two values have the same type and value, with EOL differences discarded. + * + * @since 5.6.0 + * @since 5.8.0 Added support for nested arrays. + * @since 5.9.0 Added the `$message` parameter. + * + * @param mixed $expected The expected value. + * @param mixed $actual The actual value. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertDiscardWhitespace( $expected, $actual ) { - $this->assertEquals( preg_replace( '/\s*/', '', $expected ), preg_replace( '/\s*/', '', $actual ) ); + public function assertSameIgnoreEOL( $expected, $actual, $message = '' ) { + if ( null !== $expected ) { + $expected = map_deep( + $expected, + static function ( $value ) { + if ( is_string( $value ) ) { + return str_replace( "\r\n", "\n", $value ); + } + + return $value; + } + ); + } + + if ( null !== $actual ) { + $actual = map_deep( + $actual, + static function ( $value ) { + if ( is_string( $value ) ) { + return str_replace( "\r\n", "\n", $value ); + } + + return $value; + } + ); + } + + $this->assertSame( $expected, $actual, $message ); } /** * Asserts that two values are equal, with EOL differences discarded. * * @since 5.4.0 + * @since 5.6.0 Turned into an alias for `::assertSameIgnoreEOL()`. + * @since 5.9.0 Added the `$message` parameter. * - * @param string $expected The expected value. - * @param string $actual The actual value. + * @param mixed $expected The expected value. + * @param mixed $actual The actual value. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertEqualsIgnoreEOL( $expected, $actual ) { - $this->assertEquals( str_replace( "\r\n", "\n", $expected ), str_replace( "\r\n", "\n", $actual ) ); + public function assertEqualsIgnoreEOL( $expected, $actual, $message = '' ) { + $this->assertSameIgnoreEOL( $expected, $actual, $message ); + } + + /** + * Asserts that the contents of two un-keyed, single arrays are the same, without accounting for the order of elements. + * + * @since 5.6.0 + * @since 5.9.0 Added the `$message` parameter. + * + * @param array $expected Expected array. + * @param array $actual Array to check. + * @param string $message Optional. Message to display when the assertion fails. + */ + public function assertSameSets( $expected, $actual, $message = '' ) { + $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); + $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); + + sort( $expected ); + sort( $actual ); + $this->assertSame( $expected, $actual, $message ); } /** * Asserts that the contents of two un-keyed, single arrays are equal, without accounting for the order of elements. * * @since 3.5.0 + * @since 5.9.0 Added the `$message` parameter. * - * @param array $expected Expected array. - * @param array $actual Array to check. + * @param array $expected Expected array. + * @param array $actual Array to check. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertEqualSets( $expected, $actual ) { + public function assertEqualSets( $expected, $actual, $message = '' ) { + $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); + $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); + sort( $expected ); sort( $actual ); - $this->assertEquals( $expected, $actual ); + $this->assertEquals( $expected, $actual, $message ); + } + + /** + * Asserts that the contents of two keyed, single arrays are the same, without accounting for the order of elements. + * + * @since 5.6.0 + * @since 5.9.0 Added the `$message` parameter. + * + * @param array $expected Expected array. + * @param array $actual Array to check. + * @param string $message Optional. Message to display when the assertion fails. + */ + public function assertSameSetsWithIndex( $expected, $actual, $message = '' ) { + $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); + $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); + + ksort( $expected ); + ksort( $actual ); + $this->assertSame( $expected, $actual, $message ); } /** * Asserts that the contents of two keyed, single arrays are equal, without accounting for the order of elements. * * @since 4.1.0 + * @since 5.9.0 Added the `$message` parameter. * - * @param array $expected Expected array. - * @param array $actual Array to check. + * @param array $expected Expected array. + * @param array $actual Array to check. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertEqualSetsWithIndex( $expected, $actual ) { + public function assertEqualSetsWithIndex( $expected, $actual, $message = '' ) { + $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); + $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); + ksort( $expected ); ksort( $actual ); - $this->assertEquals( $expected, $actual ); + $this->assertEquals( $expected, $actual, $message ); } /** * Asserts that the given variable is a multidimensional array, and that all arrays are non-empty. * * @since 4.8.0 + * @since 5.9.0 Added the `$message` parameter. * - * @param array $array Array to check. + * @param array $array Array to check. + * @param string $message Optional. Message to display when the assertion fails. */ - public function assertNonEmptyMultidimensionalArray( $array ) { - $this->assertTrue( is_array( $array ) ); - $this->assertNotEmpty( $array ); + public function assertNonEmptyMultidimensionalArray( $array, $message = '' ) { + $this->assertIsArray( $array, $message . ' Value under test is not an array.' ); + $this->assertNotEmpty( $array, $message . ' Array is empty.' ); foreach ( $array as $sub_array ) { - $this->assertTrue( is_array( $sub_array ) ); - $this->assertNotEmpty( $sub_array ); + $this->assertIsArray( $sub_array, $message . ' Subitem of the array is not an array.' ); + $this->assertNotEmpty( $sub_array, $message . ' Subitem of the array is empty.' ); } } @@ -779,53 +937,13 @@ public function go_to( $url ) { * * This is a custom extension of the PHPUnit requirements handling. * - * Contains legacy code for skipping tests that are associated with an open Trac ticket. - * Core tests no longer support this behaviour. - * * @since 3.5.0 + * @deprecated 5.9.0 This method has not been functional since PHPUnit 7.0. */ protected function checkRequirements() { - parent::checkRequirements(); - - $annotations = $this->getAnnotations(); - - $groups = array(); - if ( ! empty( $annotations['class']['group'] ) ) { - $groups = array_merge( $groups, $annotations['class']['group'] ); - } - if ( ! empty( $annotations['method']['group'] ) ) { - $groups = array_merge( $groups, $annotations['method']['group'] ); - } - - if ( ! empty( $groups ) ) { - if ( in_array( 'ms-required', $groups, true ) ) { - $this->skipWithoutMultisite(); - } - - if ( in_array( 'ms-excluded', $groups, true ) ) { - $this->skipWithMultisite(); - } - } - - // Core tests no longer check against open Trac tickets, - // but others using WP_UnitTestCase may do so. - if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { - return; - } - - if ( WP_TESTS_FORCE_KNOWN_BUGS ) { - return; - } - $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) ); - foreach ( $tickets as $ticket ) { - if ( is_numeric( $ticket ) ) { - $this->knownWPBug( $ticket ); - } elseif ( 0 === strpos( $ticket, 'Plugin' ) ) { - $ticket = substr( $ticket, 6 ); - if ( $ticket && is_numeric( $ticket ) ) { - $this->knownPluginBug( $ticket ); - } - } + // For PHPUnit 5/6, as we're overloading a public PHPUnit native method in those versions. + if ( is_callable( 'PHPUnit\Framework\TestCase', 'checkRequirements' ) ) { + parent::checkRequirements(); } } @@ -849,7 +967,6 @@ public function knownWPBug( $ticket_id ) { * Skips the current test if there is an open Unit Test Trac ticket associated with it. * * @since 3.5.0 - * * @deprecated No longer used since the Unit Test Trac was merged into the Core Trac. * * @param int $ticket_id Ticket number. @@ -913,16 +1030,20 @@ public function prepareTemplate( Text_Template $template ) { public function temp_filename() { $tmp_dir = ''; $dirs = array( 'TMP', 'TMPDIR', 'TEMP' ); + foreach ( $dirs as $dir ) { if ( isset( $_ENV[ $dir ] ) && ! empty( $_ENV[ $dir ] ) ) { $tmp_dir = $dir; break; } } + if ( empty( $tmp_dir ) ) { - $tmp_dir = '/tmp'; + $tmp_dir = get_temp_dir(); } + $tmp_dir = realpath( $tmp_dir ); + return tempnam( $tmp_dir, 'wpunit' ); } @@ -1110,8 +1231,8 @@ public function delete_folders( $path ) { } /** - * Retrieves all directories contained inside a directory and stores them in the `$matched_dirs` property. Hidden - * directories are ignored. + * Retrieves all directories contained inside a directory and stores them in the `$matched_dirs` property. + * Hidden directories are ignored. * * This is a helper for the `delete_folders()` method. * @@ -1239,4 +1360,26 @@ protected function update_post_modified( $post_id, $date ) { ) ); } + + /** + * Touches the given file and its directory if it doesn't already exist. + * + * This can be used to ensure a file that is implictly relied on in a test exists + * without it having to be built. + * + * @param string $file The file name. + */ + public static function touch( $file ) { + if ( file_exists( $file ) ) { + return; + } + + $dir = dirname( $file ); + + if ( ! file_exists( $dir ) ) { + mkdir( $dir, 0777, true ); + } + + touch( $file ); + } } diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index dcde8fd2eaba8..a8a18a1ac3ee3 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -3,13 +3,6 @@ * Installs WordPress for running the tests and loads WordPress and the test libraries */ -/** - * Compatibility with PHPUnit 6+ - */ -if ( class_exists( 'PHPUnit\Runner\Version' ) ) { - require_once __DIR__ . '/phpunit6/compat.php'; -} - if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) { $config_file_path = WP_TESTS_CONFIG_FILE_PATH; } else { @@ -30,24 +23,189 @@ global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer, $wp_theme_directories; if ( ! is_readable( $config_file_path ) ) { - echo "Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n"; + echo 'Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.' . PHP_EOL; exit( 1 ); } require_once $config_file_path; require_once __DIR__ . '/functions.php'; -if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { +if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) { + if ( substr( ABSPATH, -7 ) !== '/build/' ) { + printf( + 'Error: The ABSPATH constant in the `wp-tests-config.php` file is set to a non-existent path "%s". Please verify.' . PHP_EOL, + ABSPATH + ); + exit( 1 ); + } else { + echo 'Error: The PHPUnit tests should be run on the /src/ directory, not the /build/ directory.' + . ' Please update the ABSPATH constant in your `wp-tests-config.php` file to `dirname( __FILE__ ) . \'/src/\'`' + . ' or run `npm run build` prior to running PHPUnit.' . PHP_EOL; + exit( 1 ); + } +} + +$phpunit_version = tests_get_phpunit_version(); + +if ( version_compare( $phpunit_version, '5.7.21', '<' ) ) { printf( - "Error: Looks like you're using PHPUnit %s. WordPress is currently only compatible with PHPUnit up to 7.x.\n", - tests_get_phpunit_version() + "Error: Looks like you're using PHPUnit %s. WordPress requires at least PHPUnit 5.7.21." . PHP_EOL, + $phpunit_version ); - echo "Please use the latest PHPUnit version from the 7.x branch.\n"; + echo 'Please use the latest PHPUnit version supported for the PHP version you are running the tests on.' . PHP_EOL; exit( 1 ); } -if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) { - echo "Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n"; +/* + * Load the PHPUnit Polyfills autoloader. + * + * The PHPUnit Polyfills are a requirement for the WP test suite. + * + * For running the Core tests, the Make WordPress Core handbook contains step-by-step instructions + * on how to get up and running for a variety of supported workflows: + * {@link https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/#test-running-workflow-options} + * + * Plugin/theme integration tests can handle this in any of the following ways: + * - When using a full WP install: run `composer update -W` for the WP install prior to running the tests. + * - When using a partial WP test suite install: + * - Add a `yoast/phpunit-polyfills` (dev) requirement to the plugin/theme's own `composer.json` file. + * - And then: + * - Either load the PHPUnit Polyfills autoload file prior to running the WP core bootstrap file. + * - Or declare a `WP_TESTS_PHPUNIT_POLYFILLS_PATH` constant containing the absolute path to the + * root directory of the PHPUnit Polyfills installation. + * If the constant is used, it is strongly recommended to declare this constant in the plugin/theme's + * own test bootstrap file. + * The constant MUST be declared prior to calling this file. + */ +if ( ! class_exists( 'Yoast\PHPUnitPolyfills\Autoload' ) ) { + // Default location of the autoloader for WP core test runs. + $phpunit_polyfills_autoloader = dirname( dirname( dirname( __DIR__ ) ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'; + $phpunit_polyfills_error = false; + + // Allow for a custom installation location to be provided for plugin/theme integration tests. + if ( defined( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' ) ) { + $phpunit_polyfills_path = WP_TESTS_PHPUNIT_POLYFILLS_PATH; + + if ( is_string( WP_TESTS_PHPUNIT_POLYFILLS_PATH ) + && '' !== WP_TESTS_PHPUNIT_POLYFILLS_PATH + ) { + // Be tolerant to the path being provided including the filename. + if ( substr( $phpunit_polyfills_path, -29 ) !== 'phpunitpolyfills-autoload.php' ) { + $phpunit_polyfills_path = rtrim( $phpunit_polyfills_path, '/\\' ); + $phpunit_polyfills_path = $phpunit_polyfills_path . '/phpunitpolyfills-autoload.php'; + } + + $phpunit_polyfills_autoloader = $phpunit_polyfills_path; + } else { + $phpunit_polyfills_error = true; + } + } + + if ( $phpunit_polyfills_error || ! file_exists( $phpunit_polyfills_autoloader ) ) { + echo 'Error: The PHPUnit Polyfills library is a requirement for running the WP test suite.' . PHP_EOL; + if ( defined( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' ) ) { + printf( + 'The PHPUnit Polyfills autoload file was not found in "%s"' . PHP_EOL, + WP_TESTS_PHPUNIT_POLYFILLS_PATH + ); + echo 'Please verify that the file path provided in the WP_TESTS_PHPUNIT_POLYFILLS_PATH constant is correct.' . PHP_EOL; + echo 'The WP_TESTS_PHPUNIT_POLYFILLS_PATH constant should contain an absolute path to the root directory' + . ' of the PHPUnit Polyfills library.' . PHP_EOL; + } elseif ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { + echo 'You need to run `composer update -W` before running the tests.' . PHP_EOL; + echo 'Once the dependencies are installed, you can run the tests using the Composer-installed version' + . ' of PHPUnit or using a PHPUnit phar file, but the dependencies do need to be installed' + . ' whichever way the tests are run.' . PHP_EOL; + } else { + echo 'If you are trying to run plugin/theme integration tests, make sure the PHPUnit Polyfills library' + . ' (https://github.com/Yoast/PHPUnit-Polyfills) is available and either load the autoload file' + . ' of this library in your own test bootstrap before calling the WP Core test bootstrap file;' + . ' or set the absolute path to the PHPUnit Polyfills library in a "WP_TESTS_PHPUNIT_POLYFILLS_PATH"' + . ' constant to allow the WP Core bootstrap to load the Polyfills.' . PHP_EOL . PHP_EOL; + echo 'If you are trying to run the WP Core tests, make sure to set the "WP_RUN_CORE_TESTS" constant' + . ' to 1 and run `composer update -W` before running the tests.' . PHP_EOL; + echo 'Once the dependencies are installed, you can run the tests using the Composer-installed' + . ' version of PHPUnit or using a PHPUnit phar file, but the dependencies do need to be' + . ' installed whichever way the tests are run.' . PHP_EOL; + } + exit( 1 ); + } + + require_once $phpunit_polyfills_autoloader; +} +unset( $phpunit_polyfills_autoloader, $phpunit_polyfills_error, $phpunit_polyfills_path ); + +/* + * Minimum version of the PHPUnit Polyfills package as declared in `composer.json`. + * Only needs updating when new polyfill features start being used in the test suite. + */ +$phpunit_polyfills_minimum_version = '1.0.1'; +if ( class_exists( '\Yoast\PHPUnitPolyfills\Autoload' ) + && ( defined( '\Yoast\PHPUnitPolyfills\Autoload::VERSION' ) === false + || version_compare( Yoast\PHPUnitPolyfills\Autoload::VERSION, $phpunit_polyfills_minimum_version, '<' ) ) +) { + printf( + 'Error: Version mismatch detected for the PHPUnit Polyfills.' + . ' Please ensure that PHPUnit Polyfills %s or higher is loaded. Found version: %s' . PHP_EOL, + $phpunit_polyfills_minimum_version, + defined( '\Yoast\PHPUnitPolyfills\Autoload::VERSION' ) ? Yoast\PHPUnitPolyfills\Autoload::VERSION : '1.0.0 or lower' + ); + if ( defined( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' ) ) { + printf( + 'Please ensure that the PHPUnit Polyfill installation in "%s" is updated to version %s or higher.' . PHP_EOL, + WP_TESTS_PHPUNIT_POLYFILLS_PATH, + $phpunit_polyfills_minimum_version + ); + } elseif ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { + echo 'Please run `composer update -W` to install the latest version.' . PHP_EOL; + } + exit( 1 ); +} +unset( $phpunit_polyfills_minimum_version ); + +// If running core tests, check if all the required PHP extensions are loaded before running the test suite. +if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { + $required_extensions = array( + 'gd', + ); + $missing_extensions = array(); + + foreach ( $required_extensions as $extension ) { + if ( ! extension_loaded( $extension ) ) { + $missing_extensions[] = $extension; + } + } + + if ( $missing_extensions ) { + printf( + 'Error: The following required PHP extensions are missing from the testing environment: %s.' . PHP_EOL, + implode( ', ', $missing_extensions ) + ); + echo 'Please make sure they are installed and enabled.' . PHP_EOL, + exit( 1 ); + } +} + +$required_constants = array( + 'WP_TESTS_DOMAIN', + 'WP_TESTS_EMAIL', + 'WP_TESTS_TITLE', + 'WP_PHP_BINARY', +); +$missing_constants = array(); + +foreach ( $required_constants as $constant ) { + if ( ! defined( $constant ) ) { + $missing_constants[] = $constant; + } +} + +if ( $missing_constants ) { + printf( + 'Error: The following required constants are not defined: %s.' . PHP_EOL, + implode( ', ', $missing_constants ) + ); + echo 'Please check out `wp-tests-config-sample.php` for an example.' . PHP_EOL, exit( 1 ); } @@ -121,6 +279,10 @@ tests_add_filter( 'wp_die_handler', '_wp_die_handler_filter' ); // Use the Spy REST Server instead of default. tests_add_filter( 'wp_rest_server_class', '_wp_rest_server_class_filter' ); +// Prevent updating translations asynchronously. +tests_add_filter( 'async_update_translation', '__return_false' ); +// Disable background updates. +tests_add_filter( 'automatic_updater_disabled', '__return_true' ); // Preset WordPress options defined in bootstrap file. // Used to activate themes, plugins, as well as other settings. @@ -141,24 +303,30 @@ function wp_tests_options( $value ) { // Delete any default posts & related data. _delete_all_posts(); -if ( version_compare( tests_get_phpunit_version(), '7.0', '>=' ) ) { - require __DIR__ . '/phpunit7/testcase.php'; -} else { - require __DIR__ . '/testcase.php'; +// Load class aliases for compatibility with PHPUnit 6+. +if ( version_compare( tests_get_phpunit_version(), '6.0', '>=' ) ) { + require __DIR__ . '/phpunit6/compat.php'; } +require __DIR__ . '/phpunit-adapter-testcase.php'; +require __DIR__ . '/abstract-testcase.php'; +require __DIR__ . '/testcase.php'; require __DIR__ . '/testcase-rest-api.php'; require __DIR__ . '/testcase-rest-controller.php'; require __DIR__ . '/testcase-rest-post-type-controller.php'; require __DIR__ . '/testcase-xmlrpc.php'; require __DIR__ . '/testcase-ajax.php'; require __DIR__ . '/testcase-canonical.php'; +require __DIR__ . '/testcase-xml.php'; require __DIR__ . '/exceptions.php'; require __DIR__ . '/utils.php'; require __DIR__ . '/spy-rest-server.php'; require __DIR__ . '/class-wp-rest-test-search-handler.php'; require __DIR__ . '/class-wp-rest-test-configurable-controller.php'; require __DIR__ . '/class-wp-fake-block-type.php'; +require __DIR__ . '/class-wp-sitemaps-test-provider.php'; +require __DIR__ . '/class-wp-sitemaps-empty-test-provider.php'; +require __DIR__ . '/class-wp-sitemaps-large-test-provider.php'; /** * A class to handle additional command line arguments passed to the script. @@ -172,7 +340,7 @@ function wp_tests_options( $value ) { */ class WP_PHPUnit_Util_Getopt { - function __construct( $argv ) { + public function __construct( $argv ) { $skipped_groups = array( 'ajax' => true, 'ms-files' => true, diff --git a/tests/phpunit/includes/class-jsonserializable-object.php b/tests/phpunit/includes/class-jsonserializable-object.php index eb4ae5c3afa75..e2353270202a8 100644 --- a/tests/phpunit/includes/class-jsonserializable-object.php +++ b/tests/phpunit/includes/class-jsonserializable-object.php @@ -15,6 +15,7 @@ public function __construct( $data ) { $this->data = $data; } + #[ReturnTypeWillChange] public function jsonSerialize() { return $this->data; } diff --git a/tests/phpunit/includes/class-wp-sitemaps-empty-test-provider.php b/tests/phpunit/includes/class-wp-sitemaps-empty-test-provider.php new file mode 100644 index 0000000000000..c772c3941c077 --- /dev/null +++ b/tests/phpunit/includes/class-wp-sitemaps-empty-test-provider.php @@ -0,0 +1,38 @@ +object_type = $object_type; + } + + /** + * Gets a URL list for a sitemap. + * + * @param int $page_num Page of results. + * @param string $object_subtype Optional. Object subtype name. Default empty. + * @return array List of URLs for a sitemap. + */ + public function get_url_list( $page_num, $object_subtype = '' ) { + return array(); + } + + /** + * Query for determining the number of pages. + * + * @param string $object_subtype Optional. Object subtype. Default empty. + * @return int Total number of pages. + */ + public function get_max_num_pages( $object_subtype = '' ) { + return 0; + } +} diff --git a/tests/phpunit/includes/class-wp-sitemaps-large-test-provider.php b/tests/phpunit/includes/class-wp-sitemaps-large-test-provider.php new file mode 100644 index 0000000000000..67563c654d8bf --- /dev/null +++ b/tests/phpunit/includes/class-wp-sitemaps-large-test-provider.php @@ -0,0 +1,59 @@ +name = 'tests'; + $this->object_type = 'test'; + + $this->num_entries = $num_entries; + } + + /** + * Gets a URL list for a sitemap. + * + * @param int $page_num Page of results. + * @param string $object_subtype Optional. Object subtype name. Default empty. + * @return array List of URLs for a sitemap. + */ + public function get_url_list( $page_num, $object_subtype = '' ) { + return array_fill( 0, $this->num_entries, array( 'loc' => home_url( '/' ) ) ); + } + + /** + * Lists sitemap pages exposed by this provider. + * + * The returned data is used to populate the sitemap entries of the index. + * + * @return array[] Array of sitemap entries. + */ + public function get_sitemap_entries() { + return array_fill( 0, $this->num_entries, array( 'loc' => home_url( '/' ) ) ); + } + + /** + * Query for determining the number of pages. + * + * @param string $object_subtype Optional. Object subtype. Default empty. + * @return int Total number of pages. + */ + public function get_max_num_pages( $object_subtype = '' ) { + return $this->num_entries; + } +} diff --git a/tests/phpunit/includes/class-wp-sitemaps-test-provider.php b/tests/phpunit/includes/class-wp-sitemaps-test-provider.php new file mode 100644 index 0000000000000..389bb6c7bf3d5 --- /dev/null +++ b/tests/phpunit/includes/class-wp-sitemaps-test-provider.php @@ -0,0 +1,52 @@ +object_type = $object_type; + } + + /** + * Return the public post types, which excludes nav_items and similar types. + * Attachments are also excluded. This includes custom post types with public = true + * + * @return array Map of object subtype objects (WP_Post_Type) keyed by their name. + */ + public function get_object_subtypes() { + return array( + 'type-1' => (object) array( 'name' => 'type-1' ), + 'type-2' => (object) array( 'name' => 'type-2' ), + 'type-3' => (object) array( 'name' => 'type-3' ), + ); + } + + /** + * Gets a URL list for a sitemap. + * + * @param int $page_num Page of results. + * @param string $object_subtype Optional. Object subtype name. Default empty. + * @return array List of URLs for a sitemap. + */ + public function get_url_list( $page_num, $object_subtype = '' ) { + return array(); + } + + /** + * Query for determining the number of pages. + * + * @param string $object_subtype Optional. Object subtype. Default empty. + * @return int Total number of pages. + */ + public function get_max_num_pages( $object_subtype = '' ) { + return 4; + } +} diff --git a/tests/phpunit/includes/class-wp-test-stream.php b/tests/phpunit/includes/class-wp-test-stream.php new file mode 100644 index 0000000000000..f489b2bdcc8e7 --- /dev/null +++ b/tests/phpunit/includes/class-wp-test-stream.php @@ -0,0 +1,289 @@ + '', + 'path' => '', + ), + parse_url( $url ) + ); + + $this->bucket = $components['host']; + $this->file = $components['path'] ? $components['path'] : '/'; + + if ( empty( $this->bucket ) ) { + trigger_error( 'Cannot use an empty bucket name', E_USER_ERROR ); + } + + if ( ! isset( WP_Test_Stream::$data[ $this->bucket ] ) ) { + WP_Test_Stream::$data[ $this->bucket ] = array(); + } + + $this->data_ref =& WP_Test_Stream::$data[ $this->bucket ][ $this->file ]; + + $this->position = 0; + } + + /** + * Opens a URL. + * + * @see streamWrapper::stream_open + */ + public function stream_open( $path, $mode, $options, &$opened_path ) { + $this->open( $path ); + return true; + } + + /** + * Reads from a stream. + * + * @see streamWrapper::stream_read + */ + public function stream_read( $count ) { + if ( ! isset( $this->data_ref ) ) { + return ''; + } + + $ret = substr( $this->data_ref, $this->position, $count ); + + $this->position += strlen( $ret ); + return $ret; + } + + /** + * Writes to a stream. + * + * @see streamWrapper::stream_write + */ + public function stream_write( $data ) { + if ( ! isset( $this->data_ref ) ) { + $this->data_ref = ''; + } + + $left = substr( $this->data_ref, 0, $this->position ); + $right = substr( $this->data_ref, $this->position + strlen( $data ) ); + + WP_Test_Stream::$data[ $this->bucket ][ $this->file ] = $left . $data . $right; + + $this->position += strlen( $data ); + return strlen( $data ); + } + + /** + * Seeks to specific location in a stream. + * + * @see streamWrapper::stream_seek + * + * @param int $offset The stream offset to seek to. + * @param int $whence Optional. Seek position. + * @return bool Returns true when position is updated, else false. + */ + public function stream_seek( $offset, $whence = SEEK_SET ) { + if ( empty( $this->data_ref ) ) { + return false; + } + + $new_offset = $this->position; + switch ( $whence ) { + case SEEK_CUR: + $new_offset += $offset; + break; + + case SEEK_END: + $new_offset = strlen( $this->data_ref ) + $offset; + break; + + case SEEK_SET: + $new_offset = $offset; + break; + + default: + return false; + } + + if ( $new_offset < 0 ) { + return false; + } + + // Save the new position. + $this->position = $new_offset; + + return true; + } + + /** + * Retrieves the current position of a stream. + * + * @see streamWrapper::stream_tell + */ + public function stream_tell() { + return $this->position; + } + + /** + * Tests for end-of-file. + * + * @see streamWrapper::stream_eof + */ + public function stream_eof() { + if ( ! isset( $this->data_ref ) ) { + return true; + } + + return $this->position >= strlen( $this->data_ref ); + } + + /** + * Change stream metadata. + * + * @see streamWrapper::stream_metadata + */ + public function stream_metadata( $path, $option, $var ) { + $this->open( $path ); + if ( STREAM_META_TOUCH === $option ) { + if ( ! isset( $this->data_ref ) ) { + $this->data_ref = ''; + } + return true; + } + return false; + } + + /** + * Creates a directory. + * + * @see streamWrapper::mkdir + */ + public function mkdir( $path, $mode, $options ) { + $this->open( $path ); + $plainfile = rtrim( $this->file, '/' ); + + if ( isset( WP_Test_Stream::$data[ $this->bucket ][ $file ] ) ) { + return false; + } + $dir_ref = & $this->get_directory_ref(); + $dir_ref = 'DIRECTORY'; + return true; + } + + /** + * Creates a file metadata object, with defaults. + * + * @param array $stats Partial file metadata. + * @return array Complete file metadata. + */ + private function make_stat( $stats ) { + $defaults = array( + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0, + ); + + return array_merge( $defaults, $stats ); + } + + /** + * Retrieves information about a file. + * + * @see streamWrapper::stream_stat + */ + public function stream_stat() { + $dir_ref = & $this->get_directory_ref(); + if ( substr( $this->file, -1 ) === '/' || isset( $dir_ref ) ) { + return $this->make_stat( + array( + 'mode' => WP_Test_Stream::DIRECTORY_MODE, + ) + ); + } + + if ( ! isset( $this->data_ref ) ) { + return false; + } + + return $this->make_stat( + array( + 'size' => strlen( $this->data_ref ), + 'mode' => WP_Test_Stream::FILE_MODE, + ) + ); + } + + /** + * Retrieves information about a file. + * + * @see streamWrapper::url_stat + */ + public function url_stat( $path, $flags ) { + $this->open( $path ); + return $this->stream_stat(); + } + + /** + * Deletes a file. + * + * @see streamWrapper::unlink + */ + public function unlink( $path ) { + if ( ! isset( $this->data_ref ) ) { + return false; + } + unset( WP_Test_Stream::$data[ $this->bucket ][ $this->file ] ); + return true; + } + + /** + * Interprets this stream's path as a directory, and returns the entry. + * + * @return A reference to the data entry for the directory. + */ + private function &get_directory_ref() { + return WP_Test_Stream::$data[ $this->bucket ][ rtrim( $this->file, '/' ) . '/' ]; + } +} diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php index 98b46c441f1e6..aba7f0d37825f 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php @@ -40,12 +40,12 @@ public function create_object( $args ) { } if ( isset( $args['meta'] ) ) { - // The `$site_data_whitelist` matches the one used in `wpmu_create_blog()`. - $site_data_whitelist = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); + // The `$allowed_data_fields` matches the one used in `wpmu_create_blog()`. + $allowed_data_fields = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); foreach ( $args['meta'] as $key => $value ) { - // Promote whitelisted keys to top-level arguments, add others to the options array. - if ( in_array( $key, $site_data_whitelist, true ) ) { + // Promote allowed keys to top-level arguments, add others to the options array. + if ( in_array( $key, $allowed_data_fields, true ) ) { $args[ $key ] = $value; } else { $args['options'][ $key ] = $value; diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php index 2ea054bc41c8b..312fd90dc8658 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php @@ -28,7 +28,7 @@ public function __construct( $factory = null ) { * * @param array $args Array with elements for the post. * - * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. + * @return int The post ID on success. The value 0 on failure. */ public function create_object( $args ) { return wp_insert_post( $args ); @@ -40,7 +40,7 @@ public function create_object( $args ) { * @param int $post_id ID of the post to update. * @param array $fields Post data. * - * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. + * @return int The post ID on success. The value 0 on failure. */ public function update_object( $post_id, $fields ) { $fields['ID'] = $post_id; diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php index bc81c8d0a2300..1d4a5cba9c318 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php @@ -82,7 +82,7 @@ public function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) { * @param array $args Array or string of arguments for inserting a term. * @param null $generation_definitions The default values. * - * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure. + * @return WP_Term|WP_Error|null WP_Term on success. WP_Error if taxonomy does not exist. Null for miscellaneous failure. */ public function create_and_get( $args = array(), $generation_definitions = null ) { $term_id = $this->create( $args, $generation_definitions ); @@ -100,7 +100,7 @@ public function create_and_get( $args = array(), $generation_definitions = null * * @param int $term_id ID of the term to retrieve. * - * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure. + * @return WP_Term|WP_Error|null WP_Term on success. WP_Error if taxonomy does not exist. Null for miscellaneous failure. */ public function get_object_by_id( $term_id ) { return get_term( $term_id, $this->taxonomy ); diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory.php b/tests/phpunit/includes/factory/class-wp-unittest-factory.php index 3b74092e62ec2..4d0934bb9a059 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-factory.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-factory.php @@ -8,52 +8,72 @@ class WP_UnitTest_Factory { /** + * Generates post fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Post */ public $post; /** + * Generates attachment fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Attachment */ public $attachment; /** + * Generates comment fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Comment */ public $comment; /** + * Generates user fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_User */ public $user; /** + * Generates taxonomy term fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Term */ public $term; /** + * Generates category fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Term */ public $category; /** + * Generates tag fixtures for use in tests. + * * @var WP_UnitTest_Factory_For_Term */ public $tag; /** + * Generates bookmark (link) fixtures for use in tests. + * * @since 4.6.0 * @var WP_UnitTest_Factory_For_Bookmark */ public $bookmark; /** + * Generates blog (site) fixtures for use in Multisite tests. + * * @var WP_UnitTest_Factory_For_Blog */ public $blog; /** + * Generates network fixtures for use in Multisite tests. + * * @var WP_UnitTest_Factory_For_Network */ public $network; diff --git a/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php b/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php index 5c0778f3d46de..9391dd8bf7d9c 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php @@ -1,7 +1,7 @@ $v ) { @@ -225,8 +228,12 @@ function _wp_die_handler_txt( $message, $title, $args ) { */ function _wp_die_handler_exit( $message, $title, $args ) { echo "\nwp_die called\n"; - echo "Message : $message\n"; - echo "Title : $title\n"; + echo "Message: $message\n"; + + if ( ! empty( $title ) ) { + echo "Title: $title\n"; + } + if ( ! empty( $args ) ) { echo "Args: \n"; foreach ( $args as $k => $v ) { @@ -299,13 +306,36 @@ function _unhook_block_registration() { remove_action( 'init', 'register_block_core_block' ); remove_action( 'init', 'register_block_core_calendar' ); remove_action( 'init', 'register_block_core_categories' ); + remove_action( 'init', 'register_block_core_file' ); + remove_action( 'init', 'register_block_core_loginout' ); remove_action( 'init', 'register_block_core_latest_comments' ); remove_action( 'init', 'register_block_core_latest_posts' ); + remove_action( 'init', 'register_block_core_page_list' ); + remove_action( 'init', 'register_block_core_post_author' ); + remove_action( 'init', 'register_block_core_post_content' ); + remove_action( 'init', 'register_block_core_post_date' ); + remove_action( 'init', 'register_block_core_post_excerpt' ); + remove_action( 'init', 'register_block_core_post_featured_image' ); + remove_action( 'init', 'register_block_core_post_terms' ); + remove_action( 'init', 'register_block_core_post_title' ); + remove_action( 'init', 'register_block_core_query' ); + remove_action( 'init', 'register_block_core_post_template' ); + remove_action( 'init', 'gutenberg_register_legacy_query_loop_block' ); + remove_action( 'init', 'register_block_core_query_pagination' ); + remove_action( 'init', 'register_block_core_query_pagination_next' ); + remove_action( 'init', 'register_block_core_query_pagination_numbers' ); + remove_action( 'init', 'register_block_core_query_pagination_previous' ); + remove_action( 'init', 'register_block_core_query_title' ); remove_action( 'init', 'register_block_core_rss' ); remove_action( 'init', 'register_block_core_search' ); remove_action( 'init', 'register_block_core_shortcode' ); + remove_action( 'init', 'register_block_core_site_tagline' ); + remove_action( 'init', 'register_block_core_site_logo' ); + remove_action( 'init', 'register_block_core_site_title' ); remove_action( 'init', 'register_block_core_social_link' ); remove_action( 'init', 'register_block_core_social_link' ); remove_action( 'init', 'register_block_core_tag_cloud' ); + remove_action( 'init', 'register_core_block_types_from_metadata' ); + remove_action( 'init', 'register_block_core_legacy_widget' ); } tests_add_filter( 'init', '_unhook_block_registration', 1000 ); diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index 4ab457f48ae9b..8ce307818d7d3 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -92,6 +92,11 @@ $subdomain_install = false; install_network(); - populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install ); + $error = populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install ); + + if ( is_wp_error( $error ) ) { + wp_die( $error ); + } + $wp_rewrite->set_permalink_structure( '' ); } diff --git a/tests/phpunit/includes/listener-loader.php b/tests/phpunit/includes/listener-loader.php deleted file mode 100644 index 1f86fefc0645a..0000000000000 --- a/tests/phpunit/includes/listener-loader.php +++ /dev/null @@ -1,7 +0,0 @@ -=' ) ) { - require __DIR__ . '/phpunit7/speed-trap-listener.php'; -} else { - require __DIR__ . '/speed-trap-listener.php'; -} diff --git a/tests/phpunit/includes/mock-fs.php b/tests/phpunit/includes/mock-fs.php index 6ff3b522b19f2..2c56ddbf4920b 100644 --- a/tests/phpunit/includes/mock-fs.php +++ b/tests/phpunit/includes/mock-fs.php @@ -13,14 +13,14 @@ class WP_Filesystem_MockFS extends WP_Filesystem_Base { public $errors = array(); public $method = 'MockFS'; - function __construct() {} + public function __construct() {} - function connect() { + public function connect() { return true; } // Copy of core's function, but accepts a path. - function abspath( $path = false ) { + public function abspath( $path = false ) { if ( ! $path ) { $path = ABSPATH; } @@ -40,7 +40,7 @@ function abspath( $path = false ) { * Sets initial filesystem environment and/or clears the current environment. * Can also be passed the initial filesystem to be setup which is passed to self::setfs() */ - function init( $paths = '', $home_dir = '/' ) { + public function init( $paths = '', $home_dir = '/' ) { $this->fs = new MockFS_Directory_Node( '/' ); $this->fs_map = array( '/' => $this->fs, @@ -53,7 +53,7 @@ function init( $paths = '', $home_dir = '/' ) { /** * "Bulk Loads" a filesystem into the internal virtual filesystem */ - function setfs( $paths ) { + public function setfs( $paths ) { if ( ! is_array( $paths ) ) { $paths = explode( "\n", $paths ); } @@ -93,7 +93,7 @@ private function locate_parent_node( $path ) { // Here starteth the WP_Filesystem functions. - function mkdir( $path, /* Optional args are ignored */ $chmod = false, $chown = false, $chgrp = false ) { + public function mkdir( $path, /* Optional args are ignored */ $chmod = false, $chown = false, $chgrp = false ) { $path = trailingslashit( $path ); $parent_node = $this->locate_parent_node( $path ); @@ -114,7 +114,7 @@ function mkdir( $path, /* Optional args are ignored */ $chmod = false, $chown = return true; } - function put_contents( $path, $contents = '', $mode = null ) { + public function put_contents( $path, $contents = '', $mode = null ) { if ( ! $this->is_dir( dirname( $path ) ) ) { $this->mkdir( dirname( $path ) ); } @@ -126,18 +126,18 @@ function put_contents( $path, $contents = '', $mode = null ) { $this->fs_map[ $path ] = $new_file; } - function get_contents( $file ) { + public function get_contents( $file ) { if ( ! $this->is_file( $file ) ) { return false; } return $this->fs_map[ $file ]->contents; } - function cwd() { + public function cwd() { return $this->cwd->path; } - function chdir( $path ) { + public function chdir( $path ) { if ( ! isset( $this->fs_map[ $path ] ) ) { return false; } @@ -146,21 +146,21 @@ function chdir( $path ) { return true; } - function exists( $path ) { + public function exists( $path ) { return isset( $this->fs_map[ $path ] ) || isset( $this->fs_map[ trailingslashit( $path ) ] ); } - function is_file( $file ) { + public function is_file( $file ) { return isset( $this->fs_map[ $file ] ) && $this->fs_map[ $file ]->is_file(); } - function is_dir( $path ) { + public function is_dir( $path ) { $path = trailingslashit( $path ); return isset( $this->fs_map[ $path ] ) && $this->fs_map[ $path ]->is_dir(); } - function dirlist( $path = '.', $include_hidden = true, $recursive = false ) { + public function dirlist( $path = '.', $include_hidden = true, $recursive = false ) { if ( empty( $path ) || '.' === $path ) { $path = $this->cwd(); @@ -214,16 +214,16 @@ class MockFS_Node { public $type; // The type of the entry 'f' for file, 'd' for directory. public $path; // The full path to the entry. - function __construct( $path ) { + public function __construct( $path ) { $this->path = $path; $this->name = basename( $path ); } - function is_file() { + public function is_file() { return 'f' === $this->type; } - function is_dir() { + public function is_dir() { return 'd' === $this->type; } } @@ -237,7 +237,7 @@ class MockFS_File_Node extends MockFS_Node { public $type = 'f'; public $contents = ''; // The contents of the file. - function __construct( $path, $contents = '' ) { + public function __construct( $path, $contents = '' ) { parent::__construct( $path ); $this->contents = $contents; } diff --git a/tests/phpunit/includes/mock-image-editor.php b/tests/phpunit/includes/mock-image-editor.php index 5f457ded9693e..bc08fbb2907be 100644 --- a/tests/phpunit/includes/mock-image-editor.php +++ b/tests/phpunit/includes/mock-image-editor.php @@ -7,6 +7,9 @@ class WP_Image_Editor_Mock extends WP_Image_Editor { public static $load_return = true; public static $test_return = true; public static $save_return = array(); + public static $spy = array(); + public static $edit_return = array(); + public static $size_return = null; // Allow testing of jpeg_quality filter. public function set_mime_type( $mime_type = null ) { @@ -23,26 +26,51 @@ public static function supports_mime_type( $mime_type ) { return true; } public function resize( $max_w, $max_h, $crop = false ) { - + self::$spy[ __FUNCTION__ ][] = func_get_args(); + if ( isset( self::$edit_return[ __FUNCTION__ ] ) ) { + return self::$edit_return[ __FUNCTION__ ]; + } } public function multi_resize( $sizes ) { - + self::$spy[ __FUNCTION__ ][] = func_get_args(); + if ( isset( self::$edit_return[ __FUNCTION__ ] ) ) { + return self::$edit_return[ __FUNCTION__ ]; + } } public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { - + self::$spy[ __FUNCTION__ ][] = func_get_args(); + if ( isset( self::$edit_return[ __FUNCTION__ ] ) ) { + return self::$edit_return[ __FUNCTION__ ]; + } } public function rotate( $angle ) { - + self::$spy[ __FUNCTION__ ][] = func_get_args(); + if ( isset( self::$edit_return[ __FUNCTION__ ] ) ) { + return self::$edit_return[ __FUNCTION__ ]; + } } public function flip( $horz, $vert ) { - + self::$spy[ __FUNCTION__ ][] = func_get_args(); + if ( isset( self::$edit_return[ __FUNCTION__ ] ) ) { + return self::$edit_return[ __FUNCTION__ ]; + } } public function save( $destfilename = null, $mime_type = null ) { + // Set new mime-type and quality if converting the image. + $this->get_output_format( $destfilename, $mime_type ); return self::$save_return; } public function stream( $mime_type = null ) { } + + public function get_size() { + if ( self::$size_return ) { + return self::$size_return; + } + + return parent::get_size(); + } } endif; diff --git a/tests/phpunit/includes/mock-mailer.php b/tests/phpunit/includes/mock-mailer.php index ef497ceacdcd7..f5172d62a6c59 100644 --- a/tests/phpunit/includes/mock-mailer.php +++ b/tests/phpunit/includes/mock-mailer.php @@ -1,10 +1,11 @@ Encoding = '8bit'; return parent::preSend(); } @@ -12,7 +13,7 @@ function preSend() { /** * Override postSend() so mail isn't actually sent. */ - function postSend() { + public function postSend() { $this->mock_sent[] = array( 'to' => $this->to, 'cc' => $this->cc, @@ -75,7 +76,7 @@ public function get_recipient( $address_type, $mock_sent_index = 0, $recipient_i * * @since 4.4.0 * - * @return object|bool + * @return MockPHPMailer|false */ function tests_retrieve_phpmailer_instance() { $mailer = false; @@ -95,7 +96,12 @@ function tests_retrieve_phpmailer_instance() { function reset_phpmailer_instance() { $mailer = tests_retrieve_phpmailer_instance(); if ( $mailer ) { - $GLOBALS['phpmailer'] = new MockPHPMailer( true ); + $mailer = new MockPHPMailer( true ); + $mailer::$validator = static function ( $email ) { + return (bool) is_email( $email ); + }; + + $GLOBALS['phpmailer'] = $mailer; return true; } diff --git a/tests/phpunit/includes/normalize-xml.xsl b/tests/phpunit/includes/normalize-xml.xsl new file mode 100644 index 0000000000000..135556c61b3cb --- /dev/null +++ b/tests/phpunit/includes/normalize-xml.xsl @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/phpunit/includes/phpunit-adapter-testcase.php b/tests/phpunit/includes/phpunit-adapter-testcase.php new file mode 100644 index 0000000000000..423a9d2213d04 --- /dev/null +++ b/tests/phpunit/includes/phpunit-adapter-testcase.php @@ -0,0 +1,19 @@ +loadOptions( $options ); - } - - /** - * An error occurred. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addError( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void { - } - - /** - * A warning occurred. - * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_Warning $e - * @param float $time - * @since Method available since Release 5.1.0 - */ - public function addWarning( PHPUnit\Framework\Test $test, PHPUnit\Framework\Warning $e, float $time ): void { - } - - /** - * A failure occurred. - * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_AssertionFailedError $e - * @param float $time - */ - public function addFailure( PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, float $time ): void { - } - - /** - * Incomplete test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addIncompleteTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void { - } - - /** - * Risky test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - * @since Method available since Release 4.0.0 - */ - public function addRiskyTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void { - } - - /** - * Skipped test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addSkippedTest( PHPUnit\Framework\Test $test, Throwable $t, float $time ): void { - } - - /** - * A test started. - * - * @param PHPUnit_Framework_Test $test - */ - public function startTest( PHPUnit\Framework\Test $test ): void { - } - - /** - * A test ended. - * - * @param PHPUnit_Framework_Test $test - * @param float $time - */ - public function endTest( PHPUnit\Framework\Test $test, float $time ): void { - if ( ! $test instanceof PHPUnit_Framework_TestCase ) { - return; - } - - $time = $this->toMilliseconds( $time ); - $threshold = $this->getSlowThreshold( $test ); - - if ( $this->isSlow( $time, $threshold ) ) { - $this->addSlowTest( $test, $time ); - } - } - - /** - * A test suite started. - * - * @param PHPUnit_Framework_TestSuite $suite - */ - public function startTestSuite( PHPUnit\Framework\TestSuite $suite ): void { - $this->suites++; - } - - /** - * A test suite ended. - * - * @param PHPUnit_Framework_TestSuite $suite - */ - public function endTestSuite( PHPUnit\Framework\TestSuite $suite ): void { - $this->suites--; - - if ( 0 === $this->suites && $this->hasSlowTests() ) { - arsort( $this->slow ); // Sort longest running tests to the top. - - $this->renderHeader(); - $this->renderBody(); - $this->renderFooter(); - } - } - - /** - * Whether the given test execution time is considered slow. - * - * @param int $time Test execution time in milliseconds - * @param int $slow_threshold Test execution time at which a test should be considered slow (milliseconds) - * @return bool - */ - protected function isSlow( $time, $slow_threshold ) { - return $time >= $slow_threshold; - } - - /** - * Stores a test as slow. - * - * @param PHPUnit_Framework_TestCase $test - * @param int $time Test execution time in milliseconds - */ - protected function addSlowTest( PHPUnit_Framework_TestCase $test, $time ) { - $label = $this->makeLabel( $test ); - - $this->slow[ $label ] = $time; - } - - /** - * Whether at least one test has been considered slow. - * - * @return bool - */ - protected function hasSlowTests() { - return ! empty( $this->slow ); - } - - /** - * Convert PHPUnit's reported test time (microseconds) to milliseconds. - * - * @param float $time - * @return int - */ - protected function toMilliseconds( $time ) { - return (int) round( $time * 1000 ); - } - - /** - * Label for describing a test. - * - * @param PHPUnit_Framework_TestCase $test - * @return string - */ - protected function makeLabel( PHPUnit_Framework_TestCase $test ) { - return sprintf( '%s:%s', get_class( $test ), $test->getName() ); - } - - /** - * Calculate number of slow tests to report about. - * - * @return int - */ - protected function getReportLength() { - return min( count( $this->slow ), $this->report_length ); - } - - /** - * Find how many slow tests occurred that won't be shown due to list length. - * - * @return int Number of hidden slow tests - */ - protected function getHiddenCount() { - $total = count( $this->slow ); - $showing = $this->getReportLength( $this->slow ); - - $hidden = 0; - if ( $total > $showing ) { - $hidden = $total - $showing; - } - - return $hidden; - } - - /** - * Renders slow test report header. - */ - protected function renderHeader() { - echo sprintf( "\n\nYou should really fix these slow tests (>%sms)...\n", $this->slow_threshold ); - } - - /** - * Renders slow test report body. - */ - protected function renderBody() { - $slow_tests = $this->slow; - - $length = $this->getReportLength( $slow_tests ); - for ( $i = 1; $i <= $length; ++$i ) { - $label = key( $slow_tests ); - $time = array_shift( $slow_tests ); - - echo sprintf( " %s. %sms to run %s\n", $i, $time, $label ); - } - } - - /** - * Renders slow test report footer. - */ - protected function renderFooter() { - $hidden = $this->getHiddenCount( $this->slow ); - if ( $hidden ) { - echo sprintf( '...and there %s %s more above your threshold hidden from view', 1 === $hidden ? 'is' : 'are', $hidden ); - } - } - - /** - * Populate options into class internals. - * - * @param array $options - */ - protected function loadOptions( array $options ) { - $this->slow_threshold = isset( $options['slowThreshold'] ) ? $options['slowThreshold'] : 500; - $this->report_length = isset( $options['reportLength'] ) ? $options['reportLength'] : 10; - } - - /** - * Get slow test threshold for given test. A TestCase can override the - * suite-wide slow threshold by using the annotation @slowThreshold with - * the threshold value in milliseconds. - * - * The following test will only be considered slow when its execution time - * reaches 5000ms (5 seconds): - * - * - * - * @slowThreshold 5000 - * public function testLongRunningProcess() {} - * - * - * @param PHPUnit_Framework_TestCase $test - * @return int - */ - protected function getSlowThreshold( PHPUnit_Framework_TestCase $test ) { - $ann = $test->getAnnotations(); - - return isset( $ann['method']['slowThreshold'][0] ) ? $ann['method']['slowThreshold'][0] : $this->slow_threshold; - } -} diff --git a/tests/phpunit/includes/phpunit7/testcase.php b/tests/phpunit/includes/phpunit7/testcase.php deleted file mode 100644 index 84fe88fe3ec5a..0000000000000 --- a/tests/phpunit/includes/phpunit7/testcase.php +++ /dev/null @@ -1,32 +0,0 @@ -loadOptions( $options ); - } - - /** - * An error occurred. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addError( PHPUnit_Framework_Test $test, Exception $e, $time ) { - } - - /** - * A warning occurred. - * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_Warning $e - * @param float $time - * @since Method available since Release 5.1.0 - */ - public function addWarning( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time ) { - } - - /** - * A failure occurred. - * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_AssertionFailedError $e - * @param float $time - */ - public function addFailure( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time ) { - } - - /** - * Incomplete test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addIncompleteTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { - } - - /** - * Risky test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - * @since Method available since Release 4.0.0 - */ - public function addRiskyTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { - } - - /** - * Skipped test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addSkippedTest( PHPUnit_Framework_Test $test, Exception $e, $time ) { - } - - /** - * A test started. - * - * @param PHPUnit_Framework_Test $test - */ - public function startTest( PHPUnit_Framework_Test $test ) { - } - - /** - * A test ended. - * - * @param PHPUnit_Framework_Test $test - * @param float $time - */ - public function endTest( PHPUnit_Framework_Test $test, $time ) { - if ( ! $test instanceof PHPUnit_Framework_TestCase ) { - return; - } - - $time = $this->toMilliseconds( $time ); - $threshold = $this->getSlowThreshold( $test ); - - if ( $this->isSlow( $time, $threshold ) ) { - $this->addSlowTest( $test, $time ); - } - } - - /** - * A test suite started. - * - * @param PHPUnit_Framework_TestSuite $suite - */ - public function startTestSuite( PHPUnit_Framework_TestSuite $suite ) { - $this->suites++; - } - - /** - * A test suite ended. - * - * @param PHPUnit_Framework_TestSuite $suite - */ - public function endTestSuite( PHPUnit_Framework_TestSuite $suite ) { - $this->suites--; - - if ( 0 === $this->suites && $this->hasSlowTests() ) { - arsort( $this->slow ); // Sort longest running tests to the top. - - $this->renderHeader(); - $this->renderBody(); - $this->renderFooter(); - } - } - - /** - * Whether the given test execution time is considered slow. - * - * @param int $time Test execution time in milliseconds - * @param int $slow_threshold Test execution time at which a test should be considered slow (milliseconds) - * @return bool - */ - protected function isSlow( $time, $slow_threshold ) { - return $time >= $slow_threshold; - } - - /** - * Stores a test as slow. - * - * @param PHPUnit_Framework_TestCase $test - * @param int $time Test execution time in milliseconds - */ - protected function addSlowTest( PHPUnit_Framework_TestCase $test, $time ) { - $label = $this->makeLabel( $test ); - - $this->slow[ $label ] = $time; - } - - /** - * Whether at least one test has been considered slow. - * - * @return bool - */ - protected function hasSlowTests() { - return ! empty( $this->slow ); - } - - /** - * Convert PHPUnit's reported test time (microseconds) to milliseconds. - * - * @param float $time - * @return int - */ - protected function toMilliseconds( $time ) { - return (int) round( $time * 1000 ); - } - - /** - * Label for describing a test. - * - * @param PHPUnit_Framework_TestCase $test - * @return string - */ - protected function makeLabel( PHPUnit_Framework_TestCase $test ) { - return sprintf( '%s:%s', get_class( $test ), $test->getName() ); - } - - /** - * Calculate number of slow tests to report about. - * - * @return int - */ - protected function getReportLength() { - return min( count( $this->slow ), $this->report_length ); - } - - /** - * Find how many slow tests occurred that won't be shown due to list length. - * - * @return int Number of hidden slow tests - */ - protected function getHiddenCount() { - $total = count( $this->slow ); - $showing = $this->getReportLength( $this->slow ); - - $hidden = 0; - if ( $total > $showing ) { - $hidden = $total - $showing; - } - - return $hidden; - } - - /** - * Renders slow test report header. - */ - protected function renderHeader() { - echo sprintf( "\n\nYou should really fix these slow tests (>%sms)...\n", $this->slow_threshold ); - } - - /** - * Renders slow test report body. - */ - protected function renderBody() { - $slow_tests = $this->slow; - - $length = $this->getReportLength( $slow_tests ); - for ( $i = 1; $i <= $length; ++$i ) { - $label = key( $slow_tests ); - $time = array_shift( $slow_tests ); - - echo sprintf( " %s. %sms to run %s\n", $i, $time, $label ); - } - } - - /** - * Renders slow test report footer. - */ - protected function renderFooter() { - if ( $hidden = $this->getHiddenCount( $this->slow ) ) { - echo sprintf( '...and there %s %s more above your threshold hidden from view', 1 === $hidden ? 'is' : 'are', $hidden ); - } - } - - /** - * Populate options into class internals. - * - * @param array $options - */ - protected function loadOptions( array $options ) { - $this->slow_threshold = isset( $options['slowThreshold'] ) ? $options['slowThreshold'] : 500; - $this->report_length = isset( $options['reportLength'] ) ? $options['reportLength'] : 10; - } - - /** - * Get slow test threshold for given test. A TestCase can override the - * suite-wide slow threshold by using the annotation @slowThreshold with - * the threshold value in milliseconds. - * - * The following test will only be considered slow when its execution time - * reaches 5000ms (5 seconds): - * - * - * - * @slowThreshold 5000 - * public function testLongRunningProcess() {} - * - * - * @param PHPUnit_Framework_TestCase $test - * @return int - */ - protected function getSlowThreshold( PHPUnit_Framework_TestCase $test ) { - $ann = $test->getAnnotations(); - - return isset( $ann['method']['slowThreshold'][0] ) ? $ann['method']['slowThreshold'][0] : $this->slow_threshold; - } -} diff --git a/tests/phpunit/includes/spy-rest-server.php b/tests/phpunit/includes/spy-rest-server.php index 596117347ce00..5bfd1d2dba306 100644 --- a/tests/phpunit/includes/spy-rest-server.php +++ b/tests/phpunit/includes/spy-rest-server.php @@ -6,6 +6,7 @@ class Spy_REST_Server extends WP_REST_Server { public $sent_body = ''; public $last_request = null; public $override_by_default = false; + public $status = null; /** * Gets the raw $endpoints data from the server. @@ -37,6 +38,14 @@ public function send_header( $header, $value ) { $this->sent_headers[ $header ] = $value; } + /** + * Stores last set status. + * @param int $code HTTP status. + */ + public function set_status( $status ) { + $this->status = $status; + } + /** * Removes a header from the list of sent headers. * diff --git a/tests/phpunit/includes/testcase-ajax.php b/tests/phpunit/includes/testcase-ajax.php index 5be85dc160478..0478c10900c37 100644 --- a/tests/phpunit/includes/testcase-ajax.php +++ b/tests/phpunit/includes/testcase-ajax.php @@ -115,7 +115,9 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase { 'wp-privacy-erase-personal-data', ); - public static function setUpBeforeClass() { + public static function set_up_before_class() { + parent::set_up_before_class(); + remove_action( 'admin_init', '_maybe_update_core' ); remove_action( 'admin_init', '_maybe_update_plugins' ); remove_action( 'admin_init', '_maybe_update_themes' ); @@ -126,8 +128,6 @@ public static function setUpBeforeClass() { add_action( 'wp_ajax_' . $action, 'wp_ajax_' . str_replace( '-', '_', $action ), 1 ); } } - - parent::setUpBeforeClass(); } /** @@ -135,8 +135,8 @@ public static function setUpBeforeClass() { * * Overrides wp_die(), pretends to be Ajax, and suppresses E_WARNINGs. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'wp_doing_ajax', '__return_true' ); add_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 ); @@ -149,9 +149,6 @@ public function setUp() { // Suppress warnings from "Cannot modify header information - headers already sent by". $this->_error_level = error_reporting(); error_reporting( $this->_error_level & ~E_WARNING ); - - // Make some posts. - self::factory()->post->create_many( 5 ); } /** @@ -159,8 +156,7 @@ public function setUp() { * * Resets $_POST, removes the wp_die() override, restores error reporting. */ - public function tearDown() { - parent::tearDown(); + public function tear_down() { $_POST = array(); $_GET = array(); unset( $GLOBALS['post'] ); @@ -169,6 +165,7 @@ public function tearDown() { remove_action( 'clear_auth_cookie', array( $this, 'logout' ) ); error_reporting( $this->_error_level ); set_current_screen( 'front' ); + parent::tear_down(); } /** @@ -196,15 +193,18 @@ public function getDieHandler() { * * Save the output for analysis, stop execution by throwing an exception. * - * Error conditions (no output, just die) will throw WPAjaxDieStopException( $message ) + * Error conditions (no output, just die) will throw WPAjaxDieStopException( $message ). * You can test for this with: * - * $this->setExpectedException( 'WPAjaxDieStopException', 'something contained in $message' ); + * $this->expectException( 'WPAjaxDieStopException' ); + * $this->expectExceptionMessage( 'something contained in $message' ); * - * Normal program termination (wp_die called at then end of output) will throw WPAjaxDieContinueException( $message ) + * + * Normal program termination (wp_die called at the end of output) will throw WPAjaxDieContinueException( $message ). * You can test for this with: * - * $this->setExpectedException( 'WPAjaxDieContinueException', 'something contained in $message' ); + * $this->expectException( 'WPAjaxDieContinueException' ); + * $this->expectExceptionMessage( 'something contained in $message' ); * * * @param string $message The message to set. diff --git a/tests/phpunit/includes/testcase-canonical.php b/tests/phpunit/includes/testcase-canonical.php index 1777b7646a478..833df23e5b876 100644 --- a/tests/phpunit/includes/testcase-canonical.php +++ b/tests/phpunit/includes/testcase-canonical.php @@ -1,13 +1,13 @@ user->create( array( 'user_login' => 'canonical-author' ) ); @@ -52,7 +52,7 @@ public static function generate_shared_fixtures( $factory ) { wp_set_current_user( self::$author_id ); // Already created by install defaults: - // self::factory()->term->create( array( 'taxonomy' => 'category', 'name' => 'uncategorized' ) ); + // $factory->term->create( array( 'taxonomy' => 'category', 'name' => 'uncategorized' ) ); self::$post_ids[] = $factory->post->create( array( @@ -61,40 +61,57 @@ public static function generate_shared_fixtures( $factory ) { 'post_date' => '2008-06-02 00:00:00', ) ); - $post_id = $factory->post->create( + + $gallery_post_id = $factory->post->create( array( 'post_title' => 'post-format-test-gallery', 'post_date' => '2008-06-10 00:00:00', ) ); - self::$post_ids[] = $post_id; - $factory->post->create( + + self::$post_ids[] = $gallery_post_id; + + self::$post_ids[] = $factory->post->create( array( 'import_id' => 611, 'post_type' => 'attachment', 'post_title' => 'canola2', - 'post_parent' => $post_id, + 'post_parent' => $gallery_post_id, + ) + ); + + self::$post_ids[] = $factory->post->create( + array( + 'post_title' => 'images-test', + 'post_date' => '2008-09-03 00:00:00', ) ); - self::$post_ids[] = $post_id; self::$post_ids[] = $factory->post->create( array( - 'post_title' => 'images-test', + 'post_title' => 'multipage-post-test', 'post_date' => '2008-09-03 00:00:00', 'post_content' => 'Page 1 Page 2 Page 3', ) ); - $post_id = $factory->post->create( + self::$post_ids[] = $factory->post->create( + array( + 'post_title' => 'non-paged-post-test', + 'post_date' => '2008-09-03 00:00:00', + ) + ); + + $comment_post_id = $factory->post->create( array( 'import_id' => 149, 'post_title' => 'comment-test', 'post_date' => '2008-03-03 00:00:00', ) ); - self::$post_ids[] = $post_id; - self::$comment_ids = $factory->comment->create_post_comments( $post_id, 15 ); + + self::$post_ids[] = $comment_post_id; + self::$comment_ids = $factory->comment->create_post_comments( $comment_post_id, 15 ); self::$post_ids[] = $factory->post->create( array( 'post_date' => '2008-09-05 00:00:00' ) ); @@ -108,86 +125,103 @@ public static function generate_shared_fixtures( $factory ) { 'post_title' => 'sample-page', ) ); + self::$post_ids[] = $factory->post->create( array( 'post_type' => 'page', 'post_title' => 'about', ) ); - $post_id = $factory->post->create( + + $parent_page_id = $factory->post->create( array( 'post_type' => 'page', 'post_title' => 'parent-page', ) ); - self::$post_ids[] = $post_id; + + self::$post_ids[] = $parent_page_id; + self::$post_ids[] = $factory->post->create( array( 'import_id' => 144, 'post_type' => 'page', 'post_title' => 'child-page-1', - 'post_parent' => $post_id, + 'post_parent' => $parent_page_id, ) ); - $parent_id = $factory->post->create( + $parent_page_id = $factory->post->create( array( 'post_name' => 'parent', 'post_type' => 'page', ) ); - self::$post_ids[] = $parent_id; - $child_id_1 = $factory->post->create( + + self::$post_ids[] = $parent_page_id; + + $child_id_1 = $factory->post->create( array( 'post_name' => 'child1', 'post_type' => 'page', - 'post_parent' => $parent_id, + 'post_parent' => $parent_page_id, ) ); + self::$post_ids[] = $child_id_1; - $child_id_2 = $factory->post->create( + + $child_id_2 = $factory->post->create( array( 'post_name' => 'child2', 'post_type' => 'page', - 'post_parent' => $parent_id, + 'post_parent' => $parent_page_id, ) ); + self::$post_ids[] = $child_id_2; - $grandchild_id_1 = $factory->post->create( + + $grandchild_id_1 = $factory->post->create( array( 'post_name' => 'grandchild', 'post_type' => 'page', 'post_parent' => $child_id_1, ) ); + self::$post_ids[] = $grandchild_id_1; - $grandchild_id_2 = $factory->post->create( + + $grandchild_id_2 = $factory->post->create( array( 'post_name' => 'grandchild', 'post_type' => 'page', 'post_parent' => $child_id_2, ) ); + self::$post_ids[] = $grandchild_id_2; - $cat1 = $factory->term->create( + $cat1 = $factory->term->create( array( 'taxonomy' => 'category', 'name' => 'parent', ) ); + self::$terms['/category/parent/'] = $cat1; - self::$term_ids[ $cat1 ] = 'category'; - $cat2 = $factory->term->create( + self::$term_ids[ $cat1 ] = 'category'; + + $cat2 = $factory->term->create( array( 'taxonomy' => 'category', 'name' => 'child-1', 'parent' => self::$terms['/category/parent/'], ) ); + self::$terms['/category/parent/child-1/'] = $cat2; - self::$term_ids[ $cat2 ] = 'category'; + + self::$term_ids[ $cat2 ] = 'category'; $cat3 = $factory->term->create( array( @@ -196,26 +230,35 @@ public static function generate_shared_fixtures( $factory ) { 'parent' => self::$terms['/category/parent/child-1/'], ) ); + self::$terms['/category/parent/child-1/child-2/'] = $cat3; - self::$term_ids[ $cat3 ] = 'category'; - $cat4 = $factory->term->create( + self::$term_ids[ $cat3 ] = 'category'; + + $cat4 = $factory->term->create( array( 'taxonomy' => 'category', 'name' => 'cat-a', ) ); + self::$term_ids[ $cat4 ] = 'category'; - $cat5 = $factory->term->create( + $cat5 = $factory->term->create( array( 'taxonomy' => 'category', 'name' => 'cat-b', ) ); + self::$term_ids[ $cat5 ] = 'category'; - $tag1 = $factory->term->create( array( 'name' => 'post-formats' ) ); + $tag1 = $factory->term->create( + array( + 'name' => 'post-formats', + ) + ); + self::$term_ids[ $tag1 ] = 'post_tag'; } @@ -265,7 +308,7 @@ public function assertCanonical( $test_url, $expected, $ticket = 0, $expected_do // Just test the path and query if present. if ( isset( $expected['url'] ) ) { - $this->assertEquals( $expected['url'], $parsed_can_url['path'] . ( ! empty( $parsed_can_url['query'] ) ? '?' . $parsed_can_url['query'] : '' ), $ticket_ref ); + $this->assertSame( $expected['url'], $parsed_can_url['path'] . ( ! empty( $parsed_can_url['query'] ) ? '?' . $parsed_can_url['query'] : '' ), $ticket_ref ); } // If the test data doesn't include expected query vars, then we're done here. @@ -285,7 +328,7 @@ public function assertCanonical( $test_url, $expected, $ticket = 0, $expected_do // $_qv should not contain any elements which are set in $query_vars already // (i.e. $_GET vars should not be present in the Rewrite). - $this->assertEquals( array(), array_intersect( $query_vars, $_qv ), 'Query vars are duplicated from the Rewrite into $_GET; ' . $ticket_ref ); + $this->assertSame( array(), array_intersect( $query_vars, $_qv ), 'Query vars are duplicated from the Rewrite into $_GET; ' . $ticket_ref ); $query_vars = array_merge( $query_vars, $_qv ); } diff --git a/tests/phpunit/includes/testcase-rest-api.php b/tests/phpunit/includes/testcase-rest-api.php index c857e0e392ed9..45e7c5e145b77 100644 --- a/tests/phpunit/includes/testcase-rest-api.php +++ b/tests/phpunit/includes/testcase-rest-api.php @@ -7,13 +7,13 @@ protected function assertErrorResponse( $code, $response, $status = null ) { $response = $response->as_error(); } - $this->assertInstanceOf( 'WP_Error', $response ); - $this->assertEquals( $code, $response->get_error_code() ); + $this->assertWPError( $response ); + $this->assertSame( $code, $response->get_error_code() ); if ( null !== $status ) { $data = $response->get_error_data(); $this->assertArrayHasKey( 'status', $data ); - $this->assertEquals( $status, $data['status'] ); + $this->assertSame( $status, $data['status'] ); } } } diff --git a/tests/phpunit/includes/testcase-rest-controller.php b/tests/phpunit/includes/testcase-rest-controller.php index bc7d4093683e9..a0b96545bf38f 100644 --- a/tests/phpunit/includes/testcase-rest-controller.php +++ b/tests/phpunit/includes/testcase-rest-controller.php @@ -4,8 +4,8 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase { protected $server; - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'rest_url', array( $this, 'filter_rest_url_for_leading_slash' ), 10, 2 ); /** @var WP_REST_Server $wp_rest_server */ global $wp_rest_server; @@ -13,12 +13,12 @@ public function setUp() { do_action( 'rest_api_init', $wp_rest_server ); } - public function tearDown() { - parent::tearDown(); + public function tear_down() { remove_filter( 'rest_url', array( $this, 'test_rest_url_for_leading_slash' ), 10, 2 ); /** @var WP_REST_Server $wp_rest_server */ global $wp_rest_server; $wp_rest_server = null; + parent::tear_down(); } abstract public function test_register_routes(); diff --git a/tests/phpunit/includes/testcase-rest-post-type-controller.php b/tests/phpunit/includes/testcase-rest-post-type-controller.php index 36368308ede22..1ebb28f3a59ca 100644 --- a/tests/phpunit/includes/testcase-rest-post-type-controller.php +++ b/tests/phpunit/includes/testcase-rest-post-type-controller.php @@ -6,24 +6,24 @@ protected function check_post_data( $post, $data, $context, $links ) { $post_type_obj = get_post_type_object( $post->post_type ); // Standard fields. - $this->assertEquals( $post->ID, $data['id'] ); - $this->assertEquals( $post->post_name, $data['slug'] ); - $this->assertEquals( get_permalink( $post->ID ), $data['link'] ); + $this->assertSame( $post->ID, $data['id'] ); + $this->assertSame( $post->post_name, $data['slug'] ); + $this->assertSame( get_permalink( $post->ID ), $data['link'] ); if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { $post_date_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_date ) - ( get_option( 'gmt_offset' ) * 3600 ) ); - $this->assertEquals( mysql_to_rfc3339( $post_date_gmt ), $data['date_gmt'] ); + $this->assertSame( mysql_to_rfc3339( $post_date_gmt ), $data['date_gmt'] ); } else { - $this->assertEquals( mysql_to_rfc3339( $post->post_date_gmt ), $data['date_gmt'] ); + $this->assertSame( mysql_to_rfc3339( $post->post_date_gmt ), $data['date_gmt'] ); } - $this->assertEquals( mysql_to_rfc3339( $post->post_date ), $data['date'] ); + $this->assertSame( mysql_to_rfc3339( $post->post_date ), $data['date'] ); if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) { $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * 3600 ) ); - $this->assertEquals( mysql_to_rfc3339( $post_modified_gmt ), $data['modified_gmt'] ); + $this->assertSame( mysql_to_rfc3339( $post_modified_gmt ), $data['modified_gmt'] ); } else { - $this->assertEquals( mysql_to_rfc3339( $post->post_modified_gmt ), $data['modified_gmt'] ); + $this->assertSame( mysql_to_rfc3339( $post->post_modified_gmt ), $data['modified_gmt'] ); } - $this->assertEquals( mysql_to_rfc3339( $post->post_modified ), $data['modified'] ); + $this->assertSame( mysql_to_rfc3339( $post->post_modified ), $data['modified'] ); // Author. if ( post_type_supports( $post->post_type, 'author' ) ) { @@ -37,123 +37,123 @@ protected function check_post_data( $post, $data, $context, $links ) { $this->assertArrayHasKey( 'parent', $data ); if ( $post->post_parent ) { if ( is_int( $data['parent'] ) ) { - $this->assertEquals( $post->post_parent, $data['parent'] ); + $this->assertSame( $post->post_parent, $data['parent'] ); } else { - $this->assertEquals( $post->post_parent, $data['parent']['id'] ); + $this->assertSame( $post->post_parent, $data['parent']['id'] ); $this->check_get_post_response( $data['parent'], get_post( $data['parent']['id'] ), 'view-parent' ); } } else { $this->assertEmpty( $data['parent'] ); } } else { - $this->assertFalse( isset( $data['parent'] ) ); + $this->assertArrayNotHasKey( 'parent', $data ); } // Page attributes. if ( $post_type_obj->hierarchical && post_type_supports( $post->post_type, 'page-attributes' ) ) { - $this->assertEquals( $post->menu_order, $data['menu_order'] ); + $this->assertSame( $post->menu_order, $data['menu_order'] ); } else { - $this->assertFalse( isset( $data['menu_order'] ) ); + $this->assertArrayNotHasKey( 'menu_order', $data ); } // Comments. if ( post_type_supports( $post->post_type, 'comments' ) ) { - $this->assertEquals( $post->comment_status, $data['comment_status'] ); - $this->assertEquals( $post->ping_status, $data['ping_status'] ); + $this->assertSame( $post->comment_status, $data['comment_status'] ); + $this->assertSame( $post->ping_status, $data['ping_status'] ); } else { - $this->assertFalse( isset( $data['comment_status'] ) ); - $this->assertFalse( isset( $data['ping_status'] ) ); + $this->assertArrayNotHasKey( 'comment_status', $data ); + $this->assertArrayNotHasKey( 'ping_status', $data ); } if ( 'post' === $post->post_type ) { - $this->assertEquals( is_sticky( $post->ID ), $data['sticky'] ); + $this->assertSame( is_sticky( $post->ID ), $data['sticky'] ); } if ( 'post' === $post->post_type && 'edit' === $context ) { - $this->assertEquals( $post->post_password, $data['password'] ); + $this->assertSame( $post->post_password, $data['password'] ); } if ( 'page' === $post->post_type ) { - $this->assertEquals( get_page_template_slug( $post->ID ), $data['template'] ); + $this->assertSame( get_page_template_slug( $post->ID ), $data['template'] ); } if ( post_type_supports( $post->post_type, 'thumbnail' ) ) { - $this->assertEquals( (int) get_post_thumbnail_id( $post->ID ), $data['featured_media'] ); + $this->assertSame( (int) get_post_thumbnail_id( $post->ID ), $data['featured_media'] ); } else { - $this->assertFalse( isset( $data['featured_media'] ) ); + $this->assertArrayNotHasKey( 'featured_media', $data ); } // Check post format. if ( post_type_supports( $post->post_type, 'post-formats' ) ) { $post_format = get_post_format( $post->ID ); if ( empty( $post_format ) ) { - $this->assertEquals( 'standard', $data['format'] ); + $this->assertSame( 'standard', $data['format'] ); } else { - $this->assertEquals( get_post_format( $post->ID ), $data['format'] ); + $this->assertSame( get_post_format( $post->ID ), $data['format'] ); } } else { - $this->assertFalse( isset( $data['format'] ) ); + $this->assertArrayNotHasKey( 'format', $data ); } // Check filtered values. if ( post_type_supports( $post->post_type, 'title' ) ) { add_filter( 'protected_title_format', array( $this, 'protected_title_format' ) ); - $this->assertEquals( get_the_title( $post->ID ), $data['title']['rendered'] ); + $this->assertSame( get_the_title( $post->ID ), $data['title']['rendered'] ); remove_filter( 'protected_title_format', array( $this, 'protected_title_format' ) ); if ( 'edit' === $context ) { - $this->assertEquals( $post->post_title, $data['title']['raw'] ); + $this->assertSame( $post->post_title, $data['title']['raw'] ); } else { - $this->assertFalse( isset( $data['title']['raw'] ) ); + $this->assertArrayNotHasKey( 'raw', $data['title'] ); } } else { - $this->assertFalse( isset( $data['title'] ) ); + $this->assertArrayNotHasKey( 'title', $data ); } if ( post_type_supports( $post->post_type, 'editor' ) ) { // TODO: Apply content filter for more accurate testing. if ( ! $post->post_password ) { - $this->assertEquals( wpautop( $post->post_content ), $data['content']['rendered'] ); + $this->assertSame( wpautop( $post->post_content ), $data['content']['rendered'] ); } if ( 'edit' === $context ) { - $this->assertEquals( $post->post_content, $data['content']['raw'] ); + $this->assertSame( $post->post_content, $data['content']['raw'] ); } else { - $this->assertFalse( isset( $data['content']['raw'] ) ); + $this->assertArrayNotHasKey( 'raw', $data['content'] ); } } else { - $this->assertFalse( isset( $data['content'] ) ); + $this->assertArrayNotHasKey( 'content', $data ); } if ( post_type_supports( $post->post_type, 'excerpt' ) ) { if ( empty( $post->post_password ) ) { // TODO: Apply excerpt filter for more accurate testing. - $this->assertEquals( wpautop( $post->post_excerpt ), $data['excerpt']['rendered'] ); + $this->assertSame( wpautop( $post->post_excerpt ), $data['excerpt']['rendered'] ); } else { // TODO: Better testing for excerpts for password protected posts. } if ( 'edit' === $context ) { - $this->assertEquals( $post->post_excerpt, $data['excerpt']['raw'] ); + $this->assertSame( $post->post_excerpt, $data['excerpt']['raw'] ); } else { - $this->assertFalse( isset( $data['excerpt']['raw'] ) ); + $this->assertArrayNotHasKey( 'raw', $data['excerpt'] ); } } else { - $this->assertFalse( isset( $data['excerpt'] ) ); + $this->assertArrayNotHasKey( 'excerpt', $data ); } - $this->assertEquals( $post->post_status, $data['status'] ); - $this->assertEquals( $post->guid, $data['guid']['rendered'] ); + $this->assertSame( $post->post_status, $data['status'] ); + $this->assertSame( $post->guid, $data['guid']['rendered'] ); if ( 'edit' === $context ) { - $this->assertEquals( $post->guid, $data['guid']['raw'] ); + $this->assertSame( $post->guid, $data['guid']['raw'] ); } $taxonomies = wp_list_filter( get_object_taxonomies( $post->post_type, 'objects' ), array( 'show_in_rest' => true ) ); foreach ( $taxonomies as $taxonomy ) { - $this->assertTrue( isset( $data[ $taxonomy->rest_base ] ) ); + $this->assertArrayHasKey( $taxonomy->rest_base, $data ); $terms = wp_get_object_terms( $post->ID, $taxonomy->name, array( 'fields' => 'ids' ) ); sort( $terms ); sort( $data[ $taxonomy->rest_base ] ); - $this->assertEquals( $terms, $data[ $taxonomy->rest_base ] ); + $this->assertSame( $terms, $data[ $taxonomy->rest_base ] ); } // Test links. @@ -161,38 +161,38 @@ protected function check_post_data( $post, $data, $context, $links ) { $links = test_rest_expand_compact_links( $links ); $post_type = get_post_type_object( $data['type'] ); - $this->assertEquals( $links['self'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['id'] ) ); - $this->assertEquals( $links['collection'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base ) ); - $this->assertEquals( $links['about'][0]['href'], rest_url( 'wp/v2/types/' . $data['type'] ) ); + $this->assertSame( $links['self'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['id'] ) ); + $this->assertSame( $links['collection'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base ) ); + $this->assertSame( $links['about'][0]['href'], rest_url( 'wp/v2/types/' . $data['type'] ) ); if ( post_type_supports( $post->post_type, 'author' ) && $data['author'] ) { - $this->assertEquals( $links['author'][0]['href'], rest_url( 'wp/v2/users/' . $data['author'] ) ); + $this->assertSame( $links['author'][0]['href'], rest_url( 'wp/v2/users/' . $data['author'] ) ); } if ( post_type_supports( $post->post_type, 'comments' ) ) { - $this->assertEquals( $links['replies'][0]['href'], add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/comments' ) ) ); + $this->assertSame( $links['replies'][0]['href'], add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/comments' ) ) ); } if ( post_type_supports( $post->post_type, 'revisions' ) ) { - $this->assertEquals( $links['version-history'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['id'] . '/revisions' ) ); + $this->assertSame( $links['version-history'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['id'] . '/revisions' ) ); } if ( $post_type->hierarchical && ! empty( $data['parent'] ) ) { - $this->assertEquals( $links['up'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['parent'] ) ); + $this->assertSame( $links['up'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['parent'] ) ); } if ( ! in_array( $data['type'], array( 'attachment', 'nav_menu_item', 'revision' ), true ) ) { - $this->assertEquals( $links['https://api.w.org/attachment'][0]['href'], add_query_arg( 'parent', $data['id'], rest_url( 'wp/v2/media' ) ) ); + $this->assertSame( $links['https://api.w.org/attachment'][0]['href'], add_query_arg( 'parent', $data['id'], rest_url( 'wp/v2/media' ) ) ); } if ( ! empty( $data['featured_media'] ) ) { - $this->assertEquals( $links['https://api.w.org/featuredmedia'][0]['href'], rest_url( 'wp/v2/media/' . $data['featured_media'] ) ); + $this->assertSame( $links['https://api.w.org/featuredmedia'][0]['href'], rest_url( 'wp/v2/media/' . $data['featured_media'] ) ); } $num = 0; foreach ( $taxonomies as $key => $taxonomy ) { - $this->assertEquals( $taxonomy->name, $links['https://api.w.org/term'][ $num ]['attributes']['taxonomy'] ); - $this->assertEquals( add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/' . $taxonomy->rest_base ) ), $links['https://api.w.org/term'][ $num ]['href'] ); + $this->assertSame( $taxonomy->name, $links['https://api.w.org/term'][ $num ]['attributes']['taxonomy'] ); + $this->assertSame( add_query_arg( 'post', $data['id'], rest_url( 'wp/v2/' . $taxonomy->rest_base ) ), $links['https://api.w.org/term'][ $num ]['href'] ); $num++; } } @@ -202,7 +202,7 @@ protected function check_post_data( $post, $data, $context, $links ) { protected function check_get_posts_response( $response, $context = 'view' ) { $this->assertNotWPError( $response ); $response = rest_ensure_response( $response ); - $this->assertEquals( 200, $response->get_status() ); + $this->assertSame( 200, $response->get_status() ); $headers = $response->get_headers(); $this->assertArrayHasKey( 'X-WP-Total', $headers ); @@ -235,7 +235,7 @@ protected function check_get_posts_response( $response, $context = 'view' ) { protected function check_get_post_response( $response, $context = 'view' ) { $this->assertNotWPError( $response ); $response = rest_ensure_response( $response ); - $this->assertEquals( 200, $response->get_status() ); + $this->assertSame( 200, $response->get_status() ); $data = $response->get_data(); $post = get_post( $data['id'] ); @@ -247,7 +247,7 @@ protected function check_create_post_response( $response ) { $this->assertNotWPError( $response ); $response = rest_ensure_response( $response ); - $this->assertEquals( 201, $response->get_status() ); + $this->assertSame( 201, $response->get_status() ); $headers = $response->get_headers(); $this->assertArrayHasKey( 'Location', $headers ); @@ -260,7 +260,7 @@ protected function check_update_post_response( $response ) { $this->assertNotWPError( $response ); $response = rest_ensure_response( $response ); - $this->assertEquals( 200, $response->get_status() ); + $this->assertSame( 200, $response->get_status() ); $headers = $response->get_headers(); $this->assertArrayNotHasKey( 'Location', $headers ); diff --git a/tests/phpunit/includes/testcase-xml.php b/tests/phpunit/includes/testcase-xml.php new file mode 100644 index 0000000000000..253ac2c7fcd2e --- /dev/null +++ b/tests/phpunit/includes/testcase-xml.php @@ -0,0 +1,92 @@ +loadXML( $xml, $options ); + $libxml_last_error = libxml_get_last_error(); + + $this->assertFalse( + isset( $libxml_last_error->message ), + isset( $libxml_last_error->message ) ? sprintf( 'Non-well-formed XML: %s.', $libxml_last_error->message ) : '' + ); + + // Restore default error handler. + libxml_use_internal_errors( $internal ); + libxml_clear_errors(); + + return $xml_dom; + } + + /** + * Normalize an XML document to make comparing two documents easier. + * + * @param string $xml + * @param int $options Bitwise OR of the {@link https://www.php.net/manual/en/libxml.constants.php libxml option constants}. + * Default is 0. + * @return string The normalized form of `$xml`. + */ + public function normalizeXML( $xml, $options = 0 ) { + if ( ! class_exists( 'XSLTProcessor' ) ) { + $this->markTestSkipped( 'This test requires the XSL extension.' ); + } + + static $xslt_proc; + + if ( ! $xslt_proc ) { + $xslt_proc = new XSLTProcessor(); + $xslt_proc->importStyleSheet( simplexml_load_file( __DIR__ . '/normalize-xml.xsl' ) ); + } + + return $xslt_proc->transformToXML( $this->loadXML( $xml, $options ) ); + } + + /** + * Reports an error identified by `$message` if the namespace normalized form of the XML document in `$actualXml` + * is equal to the namespace normalized form of the XML document in `$expectedXml`. + * + * This is similar to {@link https://phpunit.de/manual/6.5/en/appendixes.assertions.html#appendixes.assertions.assertXmlStringEqualsXmlString assertXmlStringEqualsXmlString()} + * except that differences in namespace prefixes are normalized away, such that given + * `$actualXml = "";` and + * `$expectedXml = "";` + * then `$this->assertXMLEquals( $expectedXml, $actualXml )` will succeed. + * + * @param string $expectedXml + * @param string $actualXml + * @param string $message Optional. Message to display when the assertion fails. + */ + public function assertXMLEquals( $expectedXml, $actualXml, $message = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase + $this->assertSame( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase + } + + /** + * Reports an error identified by `$message` if the namespace normalized form of the XML document in `$actualXml` + * is not equal to the namespace normalized form of the XML document in `$expectedXml`. + * + * This is similar to {@link https://phpunit.de/manual/6.5/en/appendixes.assertions.html#appendixes.assertions.assertXmlStringEqualsXmlString assertXmlStringNotEqualsXmlString()} + * except that differences in namespace prefixes are normalized away, such that given + * `$actualXml = "";` and + * `$expectedXml = "";` + * then `$this->assertXMLNotEquals( $expectedXml, $actualXml )` will fail. + * + * @param string $expectedXml + * @param string $actualXml + * @param string $message Optional. Message to display when the assertion fails. + */ + public function assertXMLNotEquals( $expectedXml, $actualXml, $message = '' ) { //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase + $this->assertNotEquals( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase + } +} diff --git a/tests/phpunit/includes/testcase-xmlrpc.php b/tests/phpunit/includes/testcase-xmlrpc.php index f529dfa93ae22..2608ca1f268af 100644 --- a/tests/phpunit/includes/testcase-xmlrpc.php +++ b/tests/phpunit/includes/testcase-xmlrpc.php @@ -3,26 +3,29 @@ require_once ABSPATH . WPINC . '/class-IXR.php'; require_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'; -class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase { +abstract class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase { + /** + * @var wp_xmlrpc_server + */ protected $myxmlrpcserver; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'pre_option_enable_xmlrpc', '__return_true' ); $this->myxmlrpcserver = new wp_xmlrpc_server(); } - function tearDown() { + public function tear_down() { remove_filter( 'pre_option_enable_xmlrpc', '__return_true' ); $this->remove_added_uploads(); - parent::tearDown(); + parent::tear_down(); } - protected function make_user_by_role( $role ) { + protected static function make_user_by_role( $role ) { return self::factory()->user->create( array( 'user_login' => $role, diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index 7689d0e48c491..2cbb180308b3f 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -1,32 +1,7 @@ reset(); $this->debug = $debug; } - function reset() { + public function reset() { $this->events = array(); } - function current_filter() { + public function current_filter() { if ( is_callable( 'current_filter' ) ) { return current_filter(); } @@ -61,7 +81,7 @@ function current_filter() { return end( $wp_actions ); } - function action( $arg ) { + public function action( $arg ) { if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); } @@ -74,7 +94,7 @@ function action( $arg ) { return $arg; } - function action2( $arg ) { + public function action2( $arg ) { if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); } @@ -88,7 +108,7 @@ function action2( $arg ) { return $arg; } - function filter( $arg ) { + public function filter( $arg ) { if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); } @@ -102,7 +122,7 @@ function filter( $arg ) { return $arg; } - function filter2( $arg ) { + public function filter2( $arg ) { if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); } @@ -116,7 +136,7 @@ function filter2( $arg ) { return $arg; } - function filter_append( $arg ) { + public function filter_append( $arg ) { if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); } @@ -130,7 +150,7 @@ function filter_append( $arg ) { return $arg . '_append'; } - function filterall( $tag, ...$args ) { + public function filterall( $tag, ...$args ) { // This one doesn't return the result, so it's safe to use with the new 'all' filter. if ( $this->debug ) { dmp( __FUNCTION__, $this->current_filter() ); @@ -144,12 +164,12 @@ function filterall( $tag, ...$args ) { } // Return a list of all the actions, tags and args. - function get_events() { + public function get_events() { return $this->events; } // Return a count of the number of times the action was called since the last reset. - function get_call_count( $tag = '' ) { + public function get_call_count( $tag = '' ) { if ( $tag ) { $count = 0; foreach ( $this->events as $e ) { @@ -163,7 +183,7 @@ function get_call_count( $tag = '' ) { } // Return an array of the tags that triggered calls to this action. - function get_tags() { + public function get_tags() { $out = array(); foreach ( $this->events as $e ) { $out[] = $e['tag']; @@ -172,7 +192,7 @@ function get_tags() { } // Return an array of args passed in calls to this action. - function get_args() { + public function get_args() { $out = array(); foreach ( $this->events as $e ) { $out[] = $e['args']; @@ -184,13 +204,13 @@ function get_args() { // Convert valid XML to an array tree structure. // Kinda lame, but it works with a default PHP 4 installation. class TestXMLParser { - var $xml; - var $data = array(); + public $xml; + public $data = array(); /** * PHP5 constructor. */ - function __construct( $in ) { + public function __construct( $in ) { $this->xml = xml_parser_create(); xml_set_object( $this->xml, $this ); xml_parser_set_option( $this->xml, XML_OPTION_CASE_FOLDING, 0 ); @@ -199,7 +219,7 @@ function __construct( $in ) { $this->parse( $in ); } - function parse( $in ) { + public function parse( $in ) { $parse = xml_parse( $this->xml, $in, true ); if ( ! $parse ) { trigger_error( @@ -215,14 +235,14 @@ function parse( $in ) { return true; } - function start_handler( $parser, $name, $attributes ) { + public function start_handler( $parser, $name, $attributes ) { $data['name'] = $name; if ( $attributes ) { $data['attributes'] = $attributes; } $this->data[] = $data; } - function data_handler( $parser, $data ) { + public function data_handler( $parser, $data ) { $index = count( $this->data ) - 1; if ( ! isset( $this->data[ $index ]['content'] ) ) { @@ -231,7 +251,7 @@ function data_handler( $parser, $data ) { $this->data[ $index ]['content'] .= $data; } - function end_handler( $parser, $name ) { + public function end_handler( $parser, $name ) { if ( count( $this->data ) > 1 ) { $data = array_pop( $this->data ); $index = count( $this->data ) - 1; @@ -240,11 +260,31 @@ function end_handler( $parser, $name ) { } } +/** + * Converts an XML string into an array tree structure. + * + * The output of this function can be passed to xml_find() to find nodes by their path. + * + * @param string $in The XML string. + * @return array XML as an array. + */ function xml_to_array( $in ) { $p = new TestXMLParser( $in ); return $p->data; } +/** + * Finds XML nodes by a given "path". + * + * Example usage: + * + * $tree = xml_to_array( $rss ); + * $items = xml_find( $tree, 'rss', 'channel', 'item' ); + * + * @param array $tree An array tree structure of XML, typically from xml_to_array(). + * @param string ...$elements Names of XML nodes to create a "path" to find within the XML. + * @return array Array of matching XML node information. + */ function xml_find( $tree, ...$elements ) { $n = count( $elements ); $out = array(); @@ -275,7 +315,7 @@ function xml_join_atts( $atts ) { foreach ( $atts as $k => $v ) { $a[] = $k . '="' . $v . '"'; } - return join( ' ', $a ); + return implode( ' ', $a ); } function xml_array_dumbdown( &$data ) { @@ -299,7 +339,7 @@ function xml_array_dumbdown( &$data ) { function dmp( ...$args ) { foreach ( $args as $thing ) { - echo ( is_scalar( $thing ) ? strval( $thing ) : var_export( $thing, true ) ), "\n"; + echo ( is_scalar( $thing ) ? (string) $thing : var_export( $thing, true ) ), "\n"; } } @@ -319,7 +359,7 @@ function gen_tests_array( $name, $array ) { $out = array(); foreach ( $array as $k => $v ) { if ( is_numeric( $k ) ) { - $index = strval( $k ); + $index = (string) $k; } else { $index = "'" . addcslashes( $k, "\n\r\t'\\" ) . "'"; } @@ -332,13 +372,13 @@ function gen_tests_array( $name, $array ) { $out[] = gen_tests_array( "{$name}[{$index}]", $v ); } } - return join( "\n", $out ) . "\n"; + return implode( "\n", $out ) . "\n"; } /** * Use to create objects by yourself */ -class MockClass {}; +class MockClass {} /** * Drops all tables from the WordPress database diff --git a/tests/phpunit/includes/wp-profiler.php b/tests/phpunit/includes/wp-profiler.php index 2cc27a8e57c6a..17c79ee51b04e 100644 --- a/tests/phpunit/includes/wp-profiler.php +++ b/tests/phpunit/includes/wp-profiler.php @@ -7,11 +7,11 @@ * * start() and stop() must be called in pairs, for example: * - * function something_to_profile() { - * wppf_start(__FUNCTION__); - * do_stuff(); - * wppf_stop(); - * } + * function something_to_profile() { + * wppf_start( __FUNCTION__ ); + * do_stuff(); + * wppf_stop(); + * } * * Multiple profile blocks are permitted, and they may be nested. */ diff --git a/tests/phpunit/multisite.xml b/tests/phpunit/multisite.xml index 840bd0188d38c..5bb20a759da27 100644 --- a/tests/phpunit/multisite.xml +++ b/tests/phpunit/multisite.xml @@ -1,8 +1,15 @@ @@ -12,16 +19,10 @@ tests - - tests/phpunit/tests/rest-api/rest-autosaves-controller.php - tests/rest-api/rest-autosaves-controller.php - - tests/phpunit/tests/rest-api/rest-autosaves-controller.php - tests/rest-api/rest-autosaves-controller.php @@ -34,15 +35,41 @@ oembed-headers - - - - - - 150 - - - - - + + + ../../src + + + ../../src/wp-includes/ID3 + ../../src/wp-includes/IXR + ../../src/wp-includes/random_compat + ../../src/wp-includes/PHPMailer + ../../src/wp-includes/Requests + ../../src/wp-includes/SimplePie + ../../src/wp-includes/sodium_compat + ../../src/wp-includes/Text + + + ../../src/wp-content/ + + ../../src/wp-admin/includes/class-ftp* + ../../src/wp-admin/includes/class-pclzip.php + ../../src/wp-admin/includes/deprecated.php + ../../src/wp-admin/includes/ms-deprecated.php + + ../../src/wp-includes/atomlib.php + ../../src/wp-includes/class-IXR.php + ../../src/wp-includes/class-json.php + ../../src/wp-includes/class-phpass.php + ../../src/wp-includes/class-pop3.php + ../../src/wp-includes/class-requests.php + ../../src/wp-includes/class-simplepie.php + ../../src/wp-includes/class-snoopy.php + ../../src/wp-includes/deprecated.php + ../../src/wp-includes/ms-deprecated.php + ../../src/wp-includes/pluggable-deprecated.php + ../../src/wp-includes/rss.php + + + diff --git a/tests/phpunit/tests/actions.php b/tests/phpunit/tests/actions.php index 6e4cb701a01bf..51225f12dd512 100644 --- a/tests/phpunit/tests/actions.php +++ b/tests/phpunit/tests/actions.php @@ -7,7 +7,10 @@ */ class Tests_Actions extends WP_UnitTestCase { - function test_simple_action() { + /** + * @covers ::do_action + */ + public function test_simple_action() { $a = new MockAction(); $tag = __FUNCTION__; @@ -15,16 +18,19 @@ function test_simple_action() { do_action( $tag ); // Only one event occurred for the hook, with empty args. - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); // Only our hook was called. - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( array( $tag ), $a->get_tags() ); $argsvar = $a->get_args(); $args = array_pop( $argsvar ); - $this->assertEquals( array( '' ), $args ); + $this->assertSame( array( '' ), $args ); } - function test_remove_action() { + /** + * @covers ::remove_action + */ + public function test_remove_action() { $a = new MockAction(); $tag = __FUNCTION__; @@ -32,33 +38,40 @@ function test_remove_action() { do_action( $tag ); // Make sure our hook was called correctly. - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); // Now remove the action, do it again, and make sure it's not called this time. remove_action( $tag, array( &$a, 'action' ) ); do_action( $tag ); - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); } - function test_has_action() { + /** + * @covers ::has_action + */ + public function test_has_action() { $tag = __FUNCTION__; $func = __FUNCTION__ . '_func'; $this->assertFalse( has_action( $tag, $func ) ); $this->assertFalse( has_action( $tag ) ); add_action( $tag, $func ); - $this->assertEquals( 10, has_action( $tag, $func ) ); + $this->assertSame( 10, has_action( $tag, $func ) ); $this->assertTrue( has_action( $tag ) ); remove_action( $tag, $func ); $this->assertFalse( has_action( $tag, $func ) ); $this->assertFalse( has_action( $tag ) ); } - // One tag with multiple actions. - function test_multiple_actions() { + /** + * One tag with multiple actions. + * + * @covers ::do_action + */ + public function test_multiple_actions() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; @@ -70,11 +83,16 @@ function test_multiple_actions() { do_action( $tag ); // Both actions called once each. - $this->assertEquals( 1, $a1->get_call_count() ); - $this->assertEquals( 1, $a2->get_call_count() ); + $this->assertSame( 1, $a1->get_call_count() ); + $this->assertSame( 1, $a2->get_call_count() ); } - function test_action_args_1() { + /** + * One tag with multiple actions. + * + * @covers ::do_action + */ + public function test_action_args_1() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; @@ -84,12 +102,17 @@ function test_action_args_1() { do_action( $tag, $val ); $call_count = $a->get_call_count(); - $this->assertEquals( 1, $call_count ); + $this->assertSame( 1, $call_count ); $argsvar = $a->get_args(); - $this->assertEquals( array( $val ), array_pop( $argsvar ) ); + $this->assertSame( array( $val ), array_pop( $argsvar ) ); } - function test_action_args_2() { + /** + * One tag with multiple actions. + * + * @covers ::do_action + */ + public function test_action_args_2() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; @@ -104,14 +127,14 @@ function test_action_args_2() { $call_count = $a1->get_call_count(); // $a1 should be called with both args. - $this->assertEquals( 1, $call_count ); + $this->assertSame( 1, $call_count ); $argsvar1 = $a1->get_args(); - $this->assertEquals( array( $val1, $val2 ), array_pop( $argsvar1 ) ); + $this->assertSame( array( $val1, $val2 ), array_pop( $argsvar1 ) ); // $a2 should be called with one only. - $this->assertEquals( 1, $a2->get_call_count() ); + $this->assertSame( 1, $a2->get_call_count() ); $argsvar2 = $a2->get_args(); - $this->assertEquals( array( $val1 ), array_pop( $argsvar2 ) ); + $this->assertSame( array( $val1 ), array_pop( $argsvar2 ) ); } /** @@ -120,8 +143,10 @@ function test_action_args_2() { * * @see https://core.trac.wordpress.org/ticket/17817#comment:72 * @ticket 17817 + * + * @covers ::do_action */ - function test_action_args_3() { + public function test_action_args_3() { $a1 = new MockAction(); $a2 = new MockAction(); $a3 = new MockAction(); @@ -138,27 +163,29 @@ function test_action_args_3() { $call_count = $a1->get_call_count(); // $a1 should be called with both args. - $this->assertEquals( 1, $call_count ); + $this->assertSame( 1, $call_count ); $argsvar1 = $a1->get_args(); - $this->assertEquals( array( $val1, $val2 ), array_pop( $argsvar1 ) ); + $this->assertSame( array( $val1, $val2 ), array_pop( $argsvar1 ) ); // $a2 should be called with one only. - $this->assertEquals( 1, $a2->get_call_count() ); + $this->assertSame( 1, $a2->get_call_count() ); $argsvar2 = $a2->get_args(); - $this->assertEquals( array( $val1 ), array_pop( $argsvar2 ) ); + $this->assertSame( array( $val1 ), array_pop( $argsvar2 ) ); // $a3 should be called with both args. - $this->assertEquals( 1, $a3->get_call_count() ); + $this->assertSame( 1, $a3->get_call_count() ); $argsvar3 = $a3->get_args(); - $this->assertEquals( array( $val1, $val2 ), array_pop( $argsvar3 ) ); + $this->assertSame( array( $val1, $val2 ), array_pop( $argsvar3 ) ); } /** * Tests PHP 4 notation for calling actions while passing in an object by reference. * * @ticket 48312 + * + * @covers ::do_action */ - function test_action_args_with_php4_syntax() { + public function test_action_args_with_php4_syntax() { $a = new MockAction(); $tag = __FUNCTION__; $val = new stdClass(); @@ -172,7 +199,7 @@ function test_action_args_with_php4_syntax() { $this->assertSame( array( $val ), array_pop( $argsvar ) ); } - function test_action_priority() { + public function test_action_priority() { $a = new MockAction(); $tag = __FUNCTION__; @@ -181,7 +208,7 @@ function test_action_priority() { do_action( $tag ); // Two events, one per action. - $this->assertEquals( 2, $a->get_call_count() ); + $this->assertSame( 2, $a->get_call_count() ); $expected = array( // 'action2' is called first because it has priority 9. @@ -198,17 +225,20 @@ function test_action_priority() { ), ); - $this->assertEquals( $expected, $a->get_events() ); + $this->assertSame( $expected, $a->get_events() ); } - function test_did_action() { + /** + * @covers ::did_action + */ + public function test_did_action() { $tag1 = 'action1'; $tag2 = 'action2'; // Do action $tag1 but not $tag2. do_action( $tag1 ); - $this->assertEquals( 1, did_action( $tag1 ) ); - $this->assertEquals( 0, did_action( $tag2 ) ); + $this->assertSame( 1, did_action( $tag1 ) ); + $this->assertSame( 0, did_action( $tag2 ) ); // Do action $tag2 a random number of times. $count = rand( 0, 10 ); @@ -217,19 +247,22 @@ function test_did_action() { } // $tag1's count hasn't changed, $tag2 should be correct. - $this->assertEquals( 1, did_action( $tag1 ) ); - $this->assertEquals( $count, did_action( $tag2 ) ); + $this->assertSame( 1, did_action( $tag1 ) ); + $this->assertSame( $count, did_action( $tag2 ) ); } - function test_all_action() { + /** + * @covers ::do_action + */ + public function test_all_action() { $a = new MockAction(); $tag1 = __FUNCTION__ . '_1'; $tag2 = __FUNCTION__ . '_2'; // Add an 'all' action. add_action( 'all', array( &$a, 'action' ) ); - $this->assertEquals( 10, has_filter( 'all', array( &$a, 'action' ) ) ); + $this->assertSame( 10, has_filter( 'all', array( &$a, 'action' ) ) ); // Do some actions. do_action( $tag1 ); do_action( $tag2 ); @@ -237,36 +270,42 @@ function test_all_action() { do_action( $tag1 ); // Our action should have been called once for each tag. - $this->assertEquals( 4, $a->get_call_count() ); + $this->assertSame( 4, $a->get_call_count() ); // Only our hook was called. - $this->assertEquals( array( $tag1, $tag2, $tag1, $tag1 ), $a->get_tags() ); + $this->assertSame( array( $tag1, $tag2, $tag1, $tag1 ), $a->get_tags() ); remove_action( 'all', array( &$a, 'action' ) ); $this->assertFalse( has_filter( 'all', array( &$a, 'action' ) ) ); } - function test_remove_all_action() { + /** + * @covers ::remove_action + */ + public function test_remove_all_action() { $a = new MockAction(); $tag = __FUNCTION__; add_action( 'all', array( &$a, 'action' ) ); - $this->assertEquals( 10, has_filter( 'all', array( &$a, 'action' ) ) ); + $this->assertSame( 10, has_filter( 'all', array( &$a, 'action' ) ) ); do_action( $tag ); // Make sure our hook was called correctly. - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); // Now remove the action, do it again, and make sure it's not called this time. remove_action( 'all', array( &$a, 'action' ) ); $this->assertFalse( has_filter( 'all', array( &$a, 'action' ) ) ); do_action( $tag ); - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); } - function test_action_ref_array() { + /** + * @covers ::do_action_ref_array + */ + public function test_action_ref_array() { $obj = new stdClass(); $a = new MockAction(); $tag = __FUNCTION__; @@ -279,13 +318,15 @@ function test_action_ref_array() { $this->assertSame( $args[0][0], $obj ); // Just in case we don't trust assertSame(). $obj->foo = true; - $this->assertFalse( empty( $args[0][0]->foo ) ); + $this->assertNotEmpty( $args[0][0]->foo ); } /** * @ticket 11241 + * + * @covers ::do_action */ - function test_action_keyed_array() { + public function test_action_keyed_array() { $a = new MockAction(); $tag = __FUNCTION__; @@ -309,20 +350,25 @@ function test_action_keyed_array() { } - function test_action_self_removal() { + /** + * @covers ::remove_action + */ + public function test_action_self_removal() { add_action( 'test_action_self_removal', array( $this, 'action_self_removal' ) ); do_action( 'test_action_self_removal' ); - $this->assertEquals( 1, did_action( 'test_action_self_removal' ) ); + $this->assertSame( 1, did_action( 'test_action_self_removal' ) ); } - function action_self_removal() { + public function action_self_removal() { remove_action( 'test_action_self_removal', array( $this, 'action_self_removal' ) ); } /** * @ticket 17817 + * + * @covers ::do_action */ - function test_action_recursion() { + public function test_action_recursion() { $tag = __FUNCTION__; $a = new MockAction(); $b = new MockAction(); @@ -332,11 +378,14 @@ function test_action_recursion() { add_action( $tag, array( $this, 'action_that_causes_recursion' ), 12, 1 ); do_action( $tag, $tag ); - $this->assertEquals( 2, $a->get_call_count(), 'recursive actions should call all callbacks with earlier priority' ); - $this->assertEquals( 2, $b->get_call_count(), 'recursive actions should call callbacks with later priority' ); + $this->assertSame( 2, $a->get_call_count(), 'recursive actions should call all callbacks with earlier priority' ); + $this->assertSame( 2, $b->get_call_count(), 'recursive actions should call callbacks with later priority' ); } - function action_that_causes_recursion( $tag ) { + /** + * @covers ::do_action + */ + public function action_that_causes_recursion( $tag ) { static $recursing = false; if ( ! $recursing ) { $recursing = true; @@ -348,8 +397,11 @@ function action_that_causes_recursion( $tag ) { /** * @ticket 9968 * @ticket 17817 + * + * @covers ::remove_action + * @covers ::add_action */ - function test_action_callback_manipulation_while_running() { + public function test_action_callback_manipulation_while_running() { $tag = __FUNCTION__; $a = new MockAction(); $b = new MockAction(); @@ -364,14 +416,14 @@ function test_action_callback_manipulation_while_running() { do_action( $tag, $tag, array( $a, $b, $c, $d, $e ) ); do_action( $tag, $tag, array( $a, $b, $c, $d, $e ) ); - $this->assertEquals( 2, $a->get_call_count(), 'callbacks should run unless otherwise instructed' ); - $this->assertEquals( 1, $b->get_call_count(), 'callback removed by same priority callback should still get called' ); - $this->assertEquals( 1, $c->get_call_count(), 'callback added by same priority callback should not get called' ); - $this->assertEquals( 2, $d->get_call_count(), 'callback added by earlier priority callback should get called' ); - $this->assertEquals( 1, $e->get_call_count(), 'callback added by later priority callback should not get called' ); + $this->assertSame( 2, $a->get_call_count(), 'callbacks should run unless otherwise instructed' ); + $this->assertSame( 1, $b->get_call_count(), 'callback removed by same priority callback should still get called' ); + $this->assertSame( 1, $c->get_call_count(), 'callback added by same priority callback should not get called' ); + $this->assertSame( 2, $d->get_call_count(), 'callback added by earlier priority callback should get called' ); + $this->assertSame( 1, $e->get_call_count(), 'callback added by later priority callback should not get called' ); } - function action_that_manipulates_a_running_hook( $tag, $mocks ) { + public function action_that_manipulates_a_running_hook( $tag, $mocks ) { remove_action( $tag, array( $mocks[1], 'action' ), 12, 2 ); add_action( $tag, array( $mocks[2], 'action' ), 12, 2 ); add_action( $tag, array( $mocks[3], 'action' ), 13, 2 ); @@ -383,8 +435,10 @@ function action_that_manipulates_a_running_hook( $tag, $mocks ) { * * This specificaly addresses the concern raised at * https://core.trac.wordpress.org/ticket/17817#comment:52 + * + * @covers ::remove_filter */ - function test_remove_anonymous_callback() { + public function test_remove_anonymous_callback() { $tag = __FUNCTION__; $a = new MockAction(); add_action( $tag, array( $a, 'action' ), 12, 1 ); @@ -416,14 +470,18 @@ function test_remove_anonymous_callback() { * Test the ArrayAccess methods of WP_Hook * * @ticket 17817 + * + * @covers WP_Hook::offsetGet + * @covers WP_Hook::offsetSet + * @covers WP_Hook::offsetUnset */ - function test_array_access_of_wp_filter_global() { + public function test_array_access_of_wp_filter_global() { global $wp_filter; $tag = __FUNCTION__; add_action( $tag, '__return_null', 11, 1 ); - $this->assertTrue( isset( $wp_filter[ $tag ][11] ) ); + $this->assertArrayHasKey( 11, $wp_filter[ $tag ] ); $this->assertArrayHasKey( '__return_null', $wp_filter[ $tag ][11] ); unset( $wp_filter[ $tag ][11] ); @@ -435,26 +493,30 @@ function test_array_access_of_wp_filter_global() { 'accepted_args' => 1, ), ); - $this->assertEquals( 11, has_action( $tag, '__return_null' ) ); + $this->assertSame( 11, has_action( $tag, '__return_null' ) ); } /** * Make sure current_action() behaves as current_filter() * * @ticket 14994 + * + * @covers ::current_action */ - function test_current_action() { + public function test_current_action() { global $wp_current_filter; $wp_current_filter[] = 'first'; $wp_current_filter[] = 'second'; // Let's say a second action was invoked. - $this->assertEquals( 'second', current_action() ); + $this->assertSame( 'second', current_action() ); } /** * @ticket 14994 + * + * @covers ::doing_filter */ - function test_doing_filter() { + public function test_doing_filter() { global $wp_current_filter; $wp_current_filter = array(); // Set to an empty array first. @@ -472,8 +534,10 @@ function test_doing_filter() { /** * @ticket 14994 + * + * @covers ::doing_filter */ - function test_doing_action() { + public function test_doing_action() { global $wp_current_filter; $wp_current_filter = array(); // Set to an empty array first. @@ -491,14 +555,16 @@ function test_doing_action() { /** * @ticket 14994 + * + * @covers ::doing_filter */ - function test_doing_filter_real() { + public function test_doing_filter_real() { $this->assertFalse( doing_filter() ); // No filter is passed in, and no filter is being processed. $this->assertFalse( doing_filter( 'testing' ) ); // Filter is passed in but not being processed. add_filter( 'testing', array( $this, 'apply_testing_filter' ) ); $this->assertTrue( has_action( 'testing' ) ); - $this->assertEquals( 10, has_action( 'testing', array( $this, 'apply_testing_filter' ) ) ); + $this->assertSame( 10, has_action( 'testing', array( $this, 'apply_testing_filter' ) ) ); apply_filters( 'testing', '' ); @@ -509,7 +575,7 @@ function test_doing_filter_real() { $this->assertFalse( doing_filter( 'testing' ) ); // No longer doing this filter. } - function apply_testing_filter() { + public function apply_testing_filter() { $this->apply_testing_filter = true; $this->assertTrue( doing_filter() ); @@ -519,7 +585,7 @@ function apply_testing_filter() { add_filter( 'testing_nested', array( $this, 'apply_testing_nested_filter' ) ); $this->assertTrue( has_action( 'testing_nested' ) ); - $this->assertEquals( 10, has_action( 'testing_nested', array( $this, 'apply_testing_nested_filter' ) ) ); + $this->assertSame( 10, has_action( 'testing_nested', array( $this, 'apply_testing_nested_filter' ) ) ); apply_filters( 'testing_nested', '' ); @@ -530,7 +596,7 @@ function apply_testing_filter() { $this->assertFalse( doing_filter( 'testing_nested' ) ); } - function apply_testing_nested_filter() { + public function apply_testing_nested_filter() { $this->apply_testing_nested_filter = true; $this->assertTrue( doing_filter() ); $this->assertTrue( doing_filter( 'testing' ) ); @@ -541,6 +607,8 @@ function apply_testing_nested_filter() { /** * @ticket 10441 * @expectedDeprecated tests_do_action_deprecated + * + * @covers ::do_action_deprecated */ public function test_do_action_deprecated() { $p = new WP_Post( (object) array( 'post_title' => 'Foo' ) ); @@ -559,6 +627,8 @@ public static function deprecated_action_callback( $p ) { /** * @ticket 10441 * @expectedDeprecated tests_do_action_deprecated + * + * @covers ::do_action_deprecated */ public function test_do_action_deprecated_with_multiple_params() { $p1 = new WP_Post( (object) array( 'post_title' => 'Foo1' ) ); diff --git a/tests/phpunit/tests/actions/callbacks.php b/tests/phpunit/tests/actions/callbacks.php index 41db3dac3a172..e31104499450d 100644 --- a/tests/phpunit/tests/actions/callbacks.php +++ b/tests/phpunit/tests/actions/callbacks.php @@ -7,16 +7,18 @@ class Tests_Actions_Callbacks extends WP_UnitTestCase { /** * @ticket 23265 + * + * @covers ::add_action */ - function test_callback_representations() { + public function test_callback_representations() { $tag = __FUNCTION__; $this->assertFalse( has_action( $tag ) ); add_action( $tag, array( 'Class', 'method' ) ); - $this->assertEquals( 10, has_action( $tag, array( 'Class', 'method' ) ) ); + $this->assertSame( 10, has_action( $tag, array( 'Class', 'method' ) ) ); - $this->assertEquals( 10, has_action( $tag, 'Class::method' ) ); + $this->assertSame( 10, has_action( $tag, 'Class::method' ) ); } } diff --git a/tests/phpunit/tests/actions/closures.php b/tests/phpunit/tests/actions/closures.php index d1a458e273005..b9016e860ce7f 100644 --- a/tests/phpunit/tests/actions/closures.php +++ b/tests/phpunit/tests/actions/closures.php @@ -9,10 +9,14 @@ class Tests_Actions_Closures extends WP_UnitTestCase { /** * @ticket 10493 + * + * @covers ::add_action + * @covers ::has_action + * @covers ::do_action */ - function test_action_closure() { + public function test_action_closure() { $tag = 'test_action_closure'; - $closure = function( $a, $b ) { + $closure = static function( $a, $b ) { $GLOBALS[ $a ] = $b; }; add_action( $tag, $closure, 10, 2 ); @@ -25,7 +29,7 @@ function test_action_closure() { $this->assertSame( $GLOBALS[ $context[0] ], $context[1] ); $tag2 = 'test_action_closure_2'; - $closure2 = function() { + $closure2 = static function() { $GLOBALS['closure_no_args'] = true; }; add_action( $tag2, $closure2 ); diff --git a/tests/phpunit/tests/admin/includesComment.php b/tests/phpunit/tests/admin/includesComment.php index 1dcc6bb458c3b..1e0aba2108fd2 100644 --- a/tests/phpunit/tests/admin/includesComment.php +++ b/tests/phpunit/tests/admin/includesComment.php @@ -24,7 +24,7 @@ class Tests_Admin_IncludesComment extends WP_UnitTestCase { * * @param WP_UnitTest_Factory $factory */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$post_id = $factory->post->create(); self::$comment_ids[] = $factory->comment->create( @@ -47,6 +47,8 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Verify that both the comment date and author must match for a comment to exist. + * + * @covers ::comment_exists */ public function test_must_match_date_and_author() { $this->assertNull( comment_exists( 1, '2004-01-02 12:00:00' ) ); @@ -55,6 +57,8 @@ public function test_must_match_date_and_author() { /** * @ticket 33871 + * + * @covers ::comment_exists */ public function test_default_value_of_timezone_should_be_blog() { $this->assertEquals( self::$post_id, comment_exists( 1, '2014-05-06 12:00:00' ) ); @@ -62,6 +66,8 @@ public function test_default_value_of_timezone_should_be_blog() { /** * @ticket 33871 + * + * @covers ::comment_exists */ public function test_should_respect_timezone_blog() { $this->assertEquals( self::$post_id, comment_exists( 1, '2014-05-06 12:00:00', 'blog' ) ); @@ -69,6 +75,8 @@ public function test_should_respect_timezone_blog() { /** * @ticket 33871 + * + * @covers ::comment_exists */ public function test_should_respect_timezone_gmt() { $this->assertEquals( self::$post_id, comment_exists( 1, '2014-05-06 07:00:00', 'gmt' ) ); @@ -76,6 +84,8 @@ public function test_should_respect_timezone_gmt() { /** * @ticket 33871 + * + * @covers ::comment_exists */ public function test_invalid_timezone_should_fall_back_on_blog() { $this->assertEquals( self::$post_id, comment_exists( 1, '2014-05-06 12:00:00', 'not_a_valid_value' ) ); diff --git a/tests/phpunit/tests/admin/includesCommunityEvents.php b/tests/phpunit/tests/admin/includesCommunityEvents.php deleted file mode 100644 index 42525ad6f8778..0000000000000 --- a/tests/phpunit/tests/admin/includesCommunityEvents.php +++ /dev/null @@ -1,526 +0,0 @@ -instance = new WP_Community_Events( 1, $this->get_user_location() ); - } - - /** - * Simulates a stored user location. - * - * @access private - * @since 4.8.0 - * - * @return array The mock location. - */ - private function get_user_location() { - return array( - 'description' => 'San Francisco', - 'latitude' => '37.7749300', - 'longitude' => '-122.4194200', - 'country' => 'US', - ); - } - - /** - * Test: get_events() should return an instance of WP_Error if the response code is not 200. - * - * @since 4.8.0 - */ - public function test_get_events_bad_response_code() { - add_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); - - $this->assertWPError( $this->instance->get_events() ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); - } - - /** - * Test: The response body should not be cached if the response code is not 200. - * - * @since 4.8.0 - */ - public function test_get_cached_events_bad_response_code() { - add_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); - - $this->instance->get_events(); - - $this->assertFalse( $this->instance->get_cached_events() ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); - } - - /** - * Simulates an HTTP response with a non-200 response code. - * - * @since 4.8.0 - * - * @return array A mock response with a 404 HTTP status code - */ - public function _http_request_bad_response_code() { - return array( - 'headers' => '', - 'body' => '', - 'response' => array( - 'code' => 404, - ), - 'cookies' => '', - 'filename' => '', - ); - } - - /** - * Test: get_events() should return an instance of WP_Error if the response body does not have - * the required properties. - * - * @since 4.8.0 - */ - public function test_get_events_invalid_response() { - add_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); - - $this->assertWPError( $this->instance->get_events() ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); - } - - /** - * Test: The response body should not be cached if it does not have the required properties. - * - * @since 4.8.0 - */ - public function test_get_cached_events_invalid_response() { - add_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); - - $this->instance->get_events(); - - $this->assertFalse( $this->instance->get_cached_events() ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); - } - - /** - * Simulates an HTTP response with a body that does not have the required properties. - * - * @since 4.8.0 - * - * @return array A mock response that's missing required properties. - */ - public function _http_request_invalid_response() { - return array( - 'headers' => '', - 'body' => wp_json_encode( array() ), - 'response' => array( - 'code' => 200, - ), - 'cookies' => '', - 'filename' => '', - ); - } - - /** - * Test: With a valid response, get_events() should return an associated array containing a location array and - * an events array with individual events that have formatted time and date. - * - * @since 4.8.0 - */ - public function test_get_events_valid_response() { - add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); - - $response = $this->instance->get_events(); - - $this->assertNotWPError( $response ); - $this->assertEqualSetsWithIndex( $this->get_user_location(), $response['location'] ); - $this->assertEquals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $response['events'][0]['formatted_date'] ); - $this->assertEquals( '1:00 pm', $response['events'][0]['formatted_time'] ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); - } - - /** - * Test: get_cached_events() should return the same data as get_events(), including formatted time - * and date values for each event. - * - * @since 4.8.0 - */ - public function test_get_cached_events_valid_response() { - add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); - - $this->instance->get_events(); - - $cached_events = $this->instance->get_cached_events(); - - $this->assertNotWPError( $cached_events ); - $this->assertEqualSetsWithIndex( $this->get_user_location(), $cached_events['location'] ); - $this->assertEquals( gmdate( 'l, M j, Y', strtotime( 'next Sunday 1pm' ) ), $cached_events['events'][0]['formatted_date'] ); - $this->assertEquals( '1:00 pm', $cached_events['events'][0]['formatted_time'] ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); - } - - /** - * Simulates an HTTP response with valid location and event data. - * - * @since 4.8.0 - * - * @return array A mock HTTP response with valid data. - */ - public function _http_request_valid_response() { - return array( - 'headers' => '', - 'body' => wp_json_encode( - array( - 'location' => $this->get_user_location(), - 'events' => array( - array( - 'type' => 'meetup', - 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', - 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', - 'meetup' => 'The East Bay WordPress Meetup Group', - 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Sunday 1pm' ) ), - 'location' => array( - 'location' => 'Oakland, CA, USA', - 'country' => 'us', - 'latitude' => 37.808453, - 'longitude' => -122.26593, - ), - ), - array( - 'type' => 'meetup', - 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', - 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', - 'meetup' => 'WordPress Bay Area Foothills Group', - 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), - 'location' => array( - 'location' => 'Milpitas, CA, USA', - 'country' => 'us', - 'latitude' => 37.432813, - 'longitude' => -121.907095, - ), - ), - array( - 'type' => 'wordcamp', - 'title' => 'WordCamp Kansas City', - 'url' => 'https://2017.kansascity.wordcamp.org', - 'meetup' => null, - 'meetup_url' => null, - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Saturday' ) ), - 'location' => array( - 'location' => 'Kansas City, MO', - 'country' => 'US', - 'latitude' => 39.0392325, - 'longitude' => -94.577076, - ), - ), - ), - ) - ), - 'response' => array( - 'code' => 200, - ), - 'cookies' => '', - 'filename' => '', - ); - } - - /** - * Test: get_events() should return the events with the WordCamp pinned in the prepared list. - * - * @since 4.9.7 - */ - public function test_get_events_pin_wordcamp() { - add_filter( 'pre_http_request', array( $this, '_http_request_valid_response_unpinned_wordcamp' ) ); - - $response_body = $this->instance->get_events(); - - /* - * San Diego was at position 3 in the mock API response, but pinning puts it at position 2, - * so that it remains in the list. The other events should remain unchanged. - */ - $this->assertCount( 3, $response_body['events'] ); - $this->assertEquals( $response_body['events'][0]['title'], 'Flexbox + CSS Grid: Magic for Responsive Layouts' ); - $this->assertEquals( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); - $this->assertEquals( $response_body['events'][2]['title'], 'WordCamp San Diego' ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response_unpinned_wordcamp' ) ); - } - - /** - * Simulates a valid HTTP response where a WordCamp needs to be pinned higher than it's default position. - * - * @since 4.9.7 - * - * @return array A mock HTTP response. - */ - public function _http_request_valid_response_unpinned_wordcamp() { - return array( - 'headers' => '', - 'response' => array( 'code' => 200 ), - 'cookies' => '', - 'filename' => '', - 'body' => wp_json_encode( - array( - 'location' => $this->get_user_location(), - 'events' => array( - array( - 'type' => 'meetup', - 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', - 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', - 'meetup' => 'The East Bay WordPress Meetup Group', - 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Monday 1pm' ) ), - 'location' => array( - 'location' => 'Oakland, CA, USA', - 'country' => 'us', - 'latitude' => 37.808453, - 'longitude' => -122.26593, - ), - ), - array( - 'type' => 'meetup', - 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', - 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', - 'meetup' => 'WordPress Bay Area Foothills Group', - 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Tuesday 1:30pm' ) ), - 'location' => array( - 'location' => 'Milpitas, CA, USA', - 'country' => 'us', - 'latitude' => 37.432813, - 'longitude' => -121.907095, - ), - ), - array( - 'type' => 'meetup', - 'title' => 'WordPress Q&A', - 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', - 'meetup' => 'The San Jose WordPress Meetup', - 'meetup_url' => 'https://www.meetup.com/sanjosewp/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 5:30pm' ) ), - 'location' => array( - 'location' => 'Milpitas, CA, USA', - 'country' => 'us', - 'latitude' => 37.244194, - 'longitude' => -121.889313, - ), - ), - array( - 'type' => 'wordcamp', - 'title' => 'WordCamp San Diego', - 'url' => 'https://2018.sandiego.wordcamp.org', - 'meetup' => null, - 'meetup_url' => null, - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Thursday 9am' ) ), - 'location' => array( - 'location' => 'San Diego, CA', - 'country' => 'US', - 'latitude' => 32.7220419, - 'longitude' => -117.1534513, - ), - ), - ), - ) - ), - ); - } - - /** - * Test: get_events() shouldn't stick an extra WordCamp when there's already one that naturally - * falls into the list. - * - * @since 4.9.7 - */ - public function test_get_events_dont_pin_multiple_wordcamps() { - add_filter( 'pre_http_request', array( $this, '_http_request_valid_response_multiple_wordcamps' ) ); - - $response_body = $this->instance->get_events(); - - /* - * The first meetup should be removed because it's expired, while the next 3 events are selected. - * WordCamp LA should not be stuck to the list, because San Diego already appears naturally. - */ - $this->assertCount( 3, $response_body['events'] ); - $this->assertEquals( $response_body['events'][0]['title'], 'WordCamp San Diego' ); - $this->assertEquals( $response_body['events'][1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); - $this->assertEquals( $response_body['events'][2]['title'], 'WordPress Q&A' ); - - remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response_multiple_wordcamps' ) ); - } - - /** - * Simulates a valid HTTP response where a WordCamp needs to be pinned higher than it's default position. - * no need to pin extra camp b/c one already exists in response - * - * @since 4.9.7 - * - * @return array A mock HTTP response. - */ - public function _http_request_valid_response_multiple_wordcamps() { - return array( - 'headers' => '', - 'response' => array( 'code' => 200 ), - 'cookies' => '', - 'filename' => '', - 'body' => wp_json_encode( - array( - 'location' => $this->get_user_location(), - 'events' => array( - array( - 'type' => 'meetup', - 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', - 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', - 'meetup' => 'The East Bay WordPress Meetup Group', - 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( '2 days ago' ) ), - 'location' => array( - 'location' => 'Oakland, CA, USA', - 'country' => 'us', - 'latitude' => 37.808453, - 'longitude' => -122.26593, - ), - ), - array( - 'type' => 'wordcamp', - 'title' => 'WordCamp San Diego', - 'url' => 'https://2018.sandiego.wordcamp.org', - 'meetup' => null, - 'meetup_url' => null, - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Tuesday 9am' ) ), - 'location' => array( - 'location' => 'San Diego, CA', - 'country' => 'US', - 'latitude' => 32.7220419, - 'longitude' => -117.1534513, - ), - ), - array( - 'type' => 'meetup', - 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', - 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', - 'meetup' => 'WordPress Bay Area Foothills Group', - 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ), - 'location' => array( - 'location' => 'Milpitas, CA, USA', - 'country' => 'us', - 'latitude' => 37.432813, - 'longitude' => -121.907095, - ), - ), - array( - 'type' => 'meetup', - 'title' => 'WordPress Q&A', - 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', - 'meetup' => 'The San Jose WordPress Meetup', - 'meetup_url' => 'https://www.meetup.com/sanjosewp/', - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Thursday 5:30pm' ) ), - 'location' => array( - 'location' => 'Milpitas, CA, USA', - 'country' => 'us', - 'latitude' => 37.244194, - 'longitude' => -121.889313, - ), - ), - array( - 'type' => 'wordcamp', - 'title' => 'WordCamp Los Angeles', - 'url' => 'https://2018.la.wordcamp.org', - 'meetup' => null, - 'meetup_url' => null, - 'date' => gmdate( 'Y-m-d H:i:s', strtotime( 'next Friday 9am' ) ), - 'location' => array( - 'location' => 'Los Angeles, CA', - 'country' => 'US', - 'latitude' => 34.050888, - 'longitude' => -118.285426, - ), - ), - ), - ) - ), - ); - } - - /** - * Test that get_unsafe_client_ip() properly anonymizes all possible address formats - * - * @dataProvider data_get_unsafe_client_ip - * - * @ticket 41083 - */ - public function test_get_unsafe_client_ip( $raw_ip, $expected_result ) { - $_SERVER['REMOTE_ADDR'] = 'this should not be used'; - $_SERVER['HTTP_CLIENT_IP'] = $raw_ip; - $actual_result = WP_Community_Events::get_unsafe_client_ip(); - - $this->assertEquals( $expected_result, $actual_result ); - } - - /** - * Provide test cases for `test_get_unsafe_client_ip()`. - * - * @return array - */ - public function data_get_unsafe_client_ip() { - return array( - // Handle '::' returned from `wp_privacy_anonymize_ip()`. - array( - 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001', - false, - ), - - // Handle '0.0.0.0' returned from `wp_privacy_anonymize_ip()`. - array( - 'unknown', - false, - ), - - // Valid IPv4. - array( - '198.143.164.252', - '198.143.164.0', - ), - - // Valid IPv6. - array( - '2a03:2880:2110:df07:face:b00c::1', - '2a03:2880:2110:df07::', - ), - ); - } -} diff --git a/tests/phpunit/tests/admin/includesFile.php b/tests/phpunit/tests/admin/includesFile.php index 70c8fab1ab720..9ac46ad333ec0 100644 --- a/tests/phpunit/tests/admin/includesFile.php +++ b/tests/phpunit/tests/admin/includesFile.php @@ -4,28 +4,30 @@ * @group file * @group admin */ -class Tests_Admin_includesFile extends WP_UnitTestCase { +class Tests_Admin_IncludesFile extends WP_UnitTestCase { /** * @ticket 20449 + * + * @covers ::get_home_path */ - function test_get_home_path() { + public function test_get_home_path() { $home = get_option( 'home' ); $siteurl = get_option( 'siteurl' ); $sfn = $_SERVER['SCRIPT_FILENAME']; - $this->assertEquals( str_replace( '\\', '/', ABSPATH ), get_home_path() ); + $this->assertSame( str_replace( '\\', '/', ABSPATH ), get_home_path() ); update_option( 'home', 'http://localhost' ); update_option( 'siteurl', 'http://localhost/wp' ); $_SERVER['SCRIPT_FILENAME'] = 'D:\root\vhosts\site\httpdocs\wp\wp-admin\options-permalink.php'; - $this->assertEquals( 'D:/root/vhosts/site/httpdocs/', get_home_path() ); + $this->assertSame( 'D:/root/vhosts/site/httpdocs/', get_home_path() ); $_SERVER['SCRIPT_FILENAME'] = '/Users/foo/public_html/trunk/wp/wp-admin/options-permalink.php'; - $this->assertEquals( '/Users/foo/public_html/trunk/', get_home_path() ); + $this->assertSame( '/Users/foo/public_html/trunk/', get_home_path() ); $_SERVER['SCRIPT_FILENAME'] = 'S:/home/wordpress/trunk/wp/wp-admin/options-permalink.php'; - $this->assertEquals( 'S:/home/wordpress/trunk/', get_home_path() ); + $this->assertSame( 'S:/home/wordpress/trunk/', get_home_path() ); update_option( 'home', $home ); update_option( 'siteurl', $siteurl ); @@ -34,13 +36,15 @@ function test_get_home_path() { /** * @ticket 43329 + * + * @covers ::download_url */ public function test_download_url_non_200_response_code() { add_filter( 'pre_http_request', array( $this, '_fake_download_url_non_200_response_code' ), 10, 3 ); $error = download_url( 'test_download_url_non_200' ); $this->assertWPError( $error ); - $this->assertEquals( + $this->assertSame( array( 'code' => 418, 'body' => 'This is an unexpected error message from your favorite server.', @@ -52,7 +56,7 @@ public function test_download_url_non_200_response_code() { $error = download_url( 'test_download_url_non_200' ); $this->assertWPError( $error ); - $this->assertEquals( + $this->assertSame( array( 'code' => 418, 'body' => 'This ', @@ -77,4 +81,249 @@ public function _fake_download_url_non_200_response_code( $response, $args, $url public function __return_5() { return 5; } + + /** + * @ticket 38231 + * @dataProvider data_download_url_should_respect_filename_from_content_disposition_header + * + * @covers ::download_url + * + * @param $filter A callback containing a fake Content-Disposition header. + */ + public function test_download_url_should_respect_filename_from_content_disposition_header( $filter ) { + add_filter( 'pre_http_request', array( $this, $filter ), 10, 3 ); + + $filename = download_url( 'url_with_content_disposition_header' ); + $this->assertStringContainsString( 'filename-from-content-disposition-header', $filename ); + $this->assertFileExists( $filename ); + $this->unlink( $filename ); + + remove_filter( 'pre_http_request', array( $this, $filter ) ); + } + + /** + * Data provider for test_download_url_should_respect_filename_from_content_disposition_header. + * + * @return array + */ + public function data_download_url_should_respect_filename_from_content_disposition_header() { + return array( + 'valid parameters' => array( 'filter_content_disposition_header_with_filename' ), + 'path traversal' => array( 'filter_content_disposition_header_with_filename_with_path_traversal' ), + 'no quotes' => array( 'filter_content_disposition_header_with_filename_without_quotes' ), + ); + } + + /** + * Filter callback for data_download_url_should_respect_filename_from_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'attachment; filename="filename-from-content-disposition-header.txt"', + ), + ); + } + + /** + * Filter callback for data_download_url_should_respect_filename_from_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename_with_path_traversal( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'attachment; filename="../../filename-from-content-disposition-header.txt"', + ), + ); + } + + /** + * Filter callback for data_download_url_should_respect_filename_from_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename_without_quotes( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'attachment; filename=filename-from-content-disposition-header.txt', + ), + ); + } + + /** + * @ticket 38231 + * @dataProvider data_download_url_should_reject_filename_from_invalid_content_disposition_header + * + * @covers ::download_url + * + * @param $filter A callback containing a fake Content-Disposition header. + */ + public function test_download_url_should_reject_filename_from_invalid_content_disposition_header( $filter ) { + add_filter( 'pre_http_request', array( $this, $filter ), 10, 3 ); + + $filename = download_url( 'url_with_content_disposition_header' ); + $this->assertStringContainsString( 'url_with_content_disposition_header', $filename ); + $this->unlink( $filename ); + + remove_filter( 'pre_http_request', array( $this, $filter ) ); + } + + /** + * Data provider for test_download_url_should_reject_filename_from_invalid_content_disposition_header. + * + * @return array + */ + public function data_download_url_should_reject_filename_from_invalid_content_disposition_header() { + return array( + 'no context' => array( 'filter_content_disposition_header_with_filename_without_context' ), + 'inline context' => array( 'filter_content_disposition_header_with_filename_with_inline_context' ), + 'form-data context' => array( 'filter_content_disposition_header_with_filename_with_form_data_context' ), + ); + } + + /** + * Filter callback for data_download_url_should_reject_filename_from_invalid_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename_without_context( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'filename="filename-from-content-disposition-header.txt"', + ), + ); + } + + /** + * Filter callback for data_download_url_should_reject_filename_from_invalid_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename_with_inline_context( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'inline; filename="filename-from-content-disposition-header.txt"', + ), + ); + } + + /** + * Filter callback for data_download_url_should_reject_filename_from_invalid_content_disposition_header. + * + * @since 5.9.0 + * + * @return array + */ + public function filter_content_disposition_header_with_filename_with_form_data_context( $response, $args, $url ) { + return array( + 'response' => array( + 'code' => 200, + ), + 'headers' => array( + 'content-disposition' => 'form-data; name="file"; filename="filename-from-content-disposition-header.txt"', + ), + ); + } + + /** + * Verify that a WP_Error object is returned when invalid input is passed as the `$url` parameter. + * + * @covers ::download_url + * @dataProvider data_download_url_empty_url + * + * @param mixed $url Input URL. + */ + public function test_download_url_empty_url( $url ) { + $error = download_url( $url ); + $this->assertWPError( $error ); + $this->assertSame( 'http_no_url', $error->get_error_code() ); + $this->assertSame( 'Invalid URL Provided.', $error->get_error_message() ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_download_url_empty_url() { + return array( + 'null' => array( null ), + 'false' => array( false ), + 'integer 0' => array( 0 ), + 'empty string' => array( '' ), + 'string 0' => array( '0' ), + ); + } + + /** + * Test that PHP 8.1 "passing null to non-nullable" deprecation notice + * is not thrown when the `$url` does not have a path component. + * + * @ticket 53635 + * @covers ::download_url + */ + public function test_download_url_no_warning_for_url_without_path() { + $result = download_url( 'https://example.com' ); + + $this->assertIsString( $result ); + $this->assertNotEmpty( $result ); // File path will be generated, but will never be empty. + } + + /** + * Test that PHP 8.1 "passing null to non-nullable" deprecation notice + * is not thrown when the `$url` does not have a path component, + * and signature verification via a local file is requested. + * + * @ticket 53635 + * @covers ::download_url + */ + public function test_download_url_no_warning_for_url_without_path_with_signature_verification() { + add_filter( + 'wp_signature_hosts', + static function( $urls ) { + $urls[] = 'example.com'; + return $urls; + } + ); + $error = download_url( 'https://example.com', 300, true ); + + /* + * Note: This test is not testing the signature verification itself. + * There is no signature available for the domain used in the test, + * which is why an error is expected and that's fine. + * The point of the test is to verify that the call to `verify_file_signature()` + * is actually reached and that no PHP deprecation notice is thrown + * before this point. + */ + $this->assertWPError( $error ); + $this->assertSame( 'signature_verification_no_signature', $error->get_error_code() ); + } } diff --git a/tests/phpunit/tests/admin/includesMisc.php b/tests/phpunit/tests/admin/includesMisc.php index 47db6a3746dec..ce0ef7c6c5e76 100644 --- a/tests/phpunit/tests/admin/includesMisc.php +++ b/tests/phpunit/tests/admin/includesMisc.php @@ -3,8 +3,12 @@ /** * @group admin */ -class Tests_Admin_includesMisc extends WP_UnitTestCase { - function test_shorten_url() { +class Tests_Admin_IncludesMisc extends WP_UnitTestCase { + + /** + * @covers ::url_shorten + */ + public function test_shorten_url() { $tests = array( 'wordpress\.org/about/philosophy' => 'wordpress\.org/about/philosophy', // No longer strips slashes. @@ -20,7 +24,7 @@ function test_shorten_url() { => 'wordpress.org/about/philosophy/#…', // Shorten to 32 if > 35 after cleaning. ); foreach ( $tests as $k => $v ) { - $this->assertEquals( $v, url_shorten( $k ) ); + $this->assertSame( $v, url_shorten( $k ) ); } } } diff --git a/tests/phpunit/tests/admin/includesPlugin.php b/tests/phpunit/tests/admin/includesPlugin.php index 1c9d0f8254daf..9a3b4e5cd92d5 100644 --- a/tests/phpunit/tests/admin/includesPlugin.php +++ b/tests/phpunit/tests/admin/includesPlugin.php @@ -3,8 +3,16 @@ * @group plugins * @group admin */ -class Tests_Admin_includesPlugin extends WP_UnitTestCase { - function test_get_plugin_data() { +class Tests_Admin_IncludesPlugin extends WP_UnitTestCase { + public static function wpSetUpBeforeClass( $factory ) { + self::_back_up_mu_plugins(); + } + + public static function wpTearDownAfterClass() { + self::_restore_mu_plugins(); + } + + public function test_get_plugin_data() { $data = get_plugin_data( DIR_TESTDATA . '/plugins/hello.php' ); $default_headers = array( @@ -19,15 +27,15 @@ function test_get_plugin_data() { 'DomainPath' => '', ); - $this->assertTrue( is_array( $data ) ); + $this->assertIsArray( $data ); foreach ( $default_headers as $name => $value ) { - $this->assertTrue( isset( $data[ $name ] ) ); - $this->assertEquals( $value, $data[ $name ] ); + $this->assertArrayHasKey( $name, $data ); + $this->assertSame( $value, $data[ $name ] ); } } - function test_menu_page_url() { + public function test_menu_page_url() { $current_user = get_current_user_id(); wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); update_option( 'siteurl', 'http://example.com' ); @@ -51,25 +59,25 @@ function test_menu_page_url() { $expected['testpages'] = 'http://example.com/wp-admin/edit.php?post_type=page&page=testpages'; foreach ( $expected as $name => $value ) { - $this->assertEquals( $value, menu_page_url( $name, false ) ); + $this->assertSame( $value, menu_page_url( $name, false ) ); } wp_set_current_user( $current_user ); } /** - * Tests the priority parameter. + * Tests the position parameter. * * @ticket 39776 * * @covers ::add_submenu_page * - * @param int $priority The position of the new item. + * @param int $position The position passed for the new item. * @param int $expected_position Where the new item is expected to appear. * - * @dataProvider data_submenu_priority + * @dataProvider data_submenu_position */ - function test_submenu_priority( $priority, $expected_position ) { + public function test_submenu_position( $position, $expected_position ) { global $submenu; global $menu; $current_user = get_current_user_id(); @@ -84,7 +92,7 @@ function test_submenu_priority( $priority, $expected_position ) { } // Insert the new page. - add_submenu_page( $parent, 'New Page', 'New Page', 'manage_options', 'custom-position', 'custom_pos', $priority ); + add_submenu_page( $parent, 'New Page', 'New Page', 'manage_options', 'custom-position', 'custom_pos', $position ); wp_set_current_user( $current_user ); // Clean up the temporary user. @@ -95,7 +103,7 @@ function test_submenu_priority( $priority, $expected_position ) { } /** - * Tests the priority parameter for menu helper functions. + * Tests the position parameter for menu helper functions. * * @ticket 39776 * @group ms-excluded @@ -112,12 +120,12 @@ function test_submenu_priority( $priority, $expected_position ) { * @covers ::add_pages_page * @covers ::add_comments_page * - * @param int $priority The position of the new item. + * @param int $position The position passed for the new item. * @param int $expected_position Where the new item is expected to appear. * - * @dataProvider data_submenu_priority + * @dataProvider data_submenu_position */ - function test_submenu_helpers_priority( $priority, $expected_position ) { + public function test_submenu_helpers_position( $position, $expected_position ) { global $submenu; global $menu; @@ -189,8 +197,8 @@ function test_submenu_helpers_priority( $priority, $expected_position ) { $test = 'test_' . $helper_function['callback']; - // Call the helper function, passing the desired priority. - call_user_func_array( $helper_function['callback'], array( $test, $test, 'manage_options', 'custom-position', '', $priority ) ); + // Call the helper function, passing the desired position. + call_user_func_array( $helper_function['callback'], array( $test, $test, 'manage_options', 'custom-position', '', $position ) ); $actual_positions[ $test ] = $submenu[ $helper_function['menu_root'] ][ $expected_position ][2]; } @@ -219,29 +227,29 @@ function test_submenu_helpers_priority( $priority, $expected_position ) { * } * } */ - function submenus_to_add() { + private function submenus_to_add() { return array( - array( 'Submenu Priority', 'Submenu Priority', 'manage_options', 'sub-page', '' ), - array( 'Submenu Priority 2', 'Submenu Priority 2', 'manage_options', 'sub-page2', '' ), - array( 'Submenu Priority 3', 'Submenu Priority 3', 'manage_options', 'sub-page3', '' ), - array( 'Submenu Priority 4', 'Submenu Priority 4', 'manage_options', 'sub-page4', '' ), - array( 'Submenu Priority 5', 'Submenu Priority 5', 'manage_options', 'sub-page5', '' ), + array( 'Submenu Position', 'Submenu Position', 'manage_options', 'sub-page', '' ), + array( 'Submenu Position 2', 'Submenu Position 2', 'manage_options', 'sub-page2', '' ), + array( 'Submenu Position 3', 'Submenu Position 3', 'manage_options', 'sub-page3', '' ), + array( 'Submenu Position 4', 'Submenu Position 4', 'manage_options', 'sub-page4', '' ), + array( 'Submenu Position 5', 'Submenu Position 5', 'manage_options', 'sub-page5', '' ), ); } /** - * Data provider for test_submenu_helpers_priority(). + * Data provider for test_submenu_helpers_position(). * * @since 5.3.0 * * @return array { * @type array { - * @type int|null Priority. + * @type int|null Passed position. * @type int Expected position. * } * } */ - function data_submenu_priority() { + public function data_submenu_position() { $menu_count = count( $this->submenus_to_add() ); return array( array( null, $menu_count ), // Insert at the end of the menu if null is passed. Default behavior. @@ -256,11 +264,11 @@ function data_submenu_priority() { } /** - * Test that when a submenu has the same slug as a parent item, that it's just appended and ignores the priority. + * Test that when a submenu has the same slug as a parent item, that it's just appended and ignores the position. * * @ticket 48599 */ - function test_priority_when_parent_slug_child_slug_are_the_same() { + public function test_position_when_parent_slug_child_slug_are_the_same() { global $submenu, $menu; // Reset menus. @@ -288,11 +296,11 @@ function test_priority_when_parent_slug_child_slug_are_the_same() { } /** - * Passing a string as priority will fail. + * Passing a string as position will fail. * * @ticket 48599 */ - function test_passing_string_as_priority_fires_doing_it_wrong() { + public function test_passing_string_as_position_fires_doing_it_wrong() { $this->setExpectedIncorrectUsage( 'add_submenu_page' ); global $submenu, $menu; @@ -316,7 +324,7 @@ function test_passing_string_as_priority_fires_doing_it_wrong() { $this->assertSame( 'submenu_page_1', $submenu['main_slug'][1][2] ); } - function test_is_plugin_active_true() { + public function test_is_plugin_active_true() { activate_plugin( 'hello.php' ); $test = is_plugin_active( 'hello.php' ); $this->assertTrue( $test ); @@ -324,19 +332,19 @@ function test_is_plugin_active_true() { deactivate_plugins( 'hello.php' ); } - function test_is_plugin_active_false() { + public function test_is_plugin_active_false() { deactivate_plugins( 'hello.php' ); $test = is_plugin_active( 'hello.php' ); $this->assertFalse( $test ); } - function test_is_plugin_inactive_true() { + public function test_is_plugin_inactive_true() { deactivate_plugins( 'hello.php' ); $test = is_plugin_inactive( 'hello.php' ); $this->assertTrue( $test ); } - function test_is_plugin_inactive_false() { + public function test_is_plugin_inactive_false() { activate_plugin( 'hello.php' ); $test = is_plugin_inactive( 'hello.php' ); $this->assertFalse( $test ); @@ -349,7 +357,7 @@ function test_is_plugin_inactive_false() { */ public function test_get_plugin_files_single() { $name = 'hello.php'; - $this->assertEquals( array( $name ), get_plugin_files( $name ) ); + $this->assertSame( array( $name ), get_plugin_files( $name ) ); } /** @@ -358,7 +366,7 @@ public function test_get_plugin_files_single() { public function test_get_plugin_files_folder() { $plugin_dir = WP_PLUGIN_DIR . '/list_files_test_plugin'; @mkdir( $plugin_dir ); - $plugin = $this->_create_plugin( null, 'list_files_test_plugin.php', $plugin_dir ); + $plugin = $this->_create_plugin( '', 'list_files_test_plugin.php', $plugin_dir ); $sub_dir = trailingslashit( dirname( $plugin[1] ) ) . 'subdir'; mkdir( $sub_dir ); @@ -369,130 +377,83 @@ public function test_get_plugin_files_folder() { 'list_files_test_plugin/list_files_test_plugin.php', 'list_files_test_plugin/subdir/subfile.php', ); - $this->assertEquals( $expected, $plugin_files ); unlink( $sub_dir . '/subfile.php' ); unlink( $plugin[1] ); rmdir( $sub_dir ); rmdir( $plugin_dir ); + + $this->assertSame( $expected, $plugin_files ); } /** * @covers ::get_mu_plugins */ public function test_get_mu_plugins_when_mu_plugins_exists_but_is_empty() { - if ( is_dir( WPMU_PLUGIN_DIR ) ) { - $exists = true; - $this->_back_up_mu_plugins(); - } else { - $exists = false; - mkdir( WPMU_PLUGIN_DIR ); - } + mkdir( WPMU_PLUGIN_DIR ); - $this->assertEquals( array(), get_mu_plugins() ); + $mu_plugins = get_mu_plugins(); - // Clean up. - if ( $exists ) { - $this->_restore_mu_plugins(); - } else { - rmdir( WPMU_PLUGIN_DIR ); - } + rmdir( WPMU_PLUGIN_DIR ); + + $this->assertSame( array(), $mu_plugins ); } /** * @covers ::get_mu_plugins */ public function test_get_mu_plugins_when_mu_plugins_directory_does_not_exist() { - $exists = false; - if ( is_dir( WPMU_PLUGIN_DIR ) ) { - $exists = true; - $this->_back_up_mu_plugins(); - rmdir( WPMU_PLUGIN_DIR ); - } - - $this->assertEquals( array(), get_mu_plugins() ); - - // Clean up. - if ( $exists ) { - mkdir( WPMU_PLUGIN_DIR ); - $this->_restore_mu_plugins(); - } + $this->assertFileDoesNotExist( WPMU_PLUGIN_DIR ); + $this->assertSame( array(), get_mu_plugins() ); } /** * @covers ::get_mu_plugins */ public function test_get_mu_plugins_should_ignore_index_php_containing_silence_is_golden() { - if ( is_dir( WPMU_PLUGIN_DIR ) ) { - $exists = true; - $this->_back_up_mu_plugins(); - } else { - $exists = false; - mkdir( WPMU_PLUGIN_DIR ); - } + mkdir( WPMU_PLUGIN_DIR ); $this->_create_plugin( 'assertEquals( array(), get_mu_plugins() ); - // Clean up. + $mu_plugins = get_mu_plugins(); + unlink( WPMU_PLUGIN_DIR . '/index.php' ); - if ( $exists ) { - $this->_restore_mu_plugins(); - } else { - rmdir( WPMU_PLUGIN_DIR ); - } + rmdir( WPMU_PLUGIN_DIR ); + + $this->assertSame( array(), $mu_plugins ); } /** * @covers ::get_mu_plugins */ public function test_get_mu_plugins_should_not_ignore_index_php_containing_something_other_than_silence_is_golden() { - if ( is_dir( WPMU_PLUGIN_DIR ) ) { - $exists = true; - $this->_back_up_mu_plugins(); - } else { - $exists = false; - mkdir( WPMU_PLUGIN_DIR ); - } + mkdir( WPMU_PLUGIN_DIR ); $this->_create_plugin( 'assertEquals( array( 'index.php' ), array_keys( $found ) ); // Clean up. unlink( WPMU_PLUGIN_DIR . '/index.php' ); - if ( $exists ) { - $this->_restore_mu_plugins(); - } else { - rmdir( WPMU_PLUGIN_DIR ); - } + rmdir( WPMU_PLUGIN_DIR ); + + $this->assertSame( array( 'index.php' ), array_keys( $found ) ); } /** * @covers ::get_mu_plugins */ public function test_get_mu_plugins_should_ignore_files_without_php_extensions() { - if ( is_dir( WPMU_PLUGIN_DIR ) ) { - $exists = true; - $this->_back_up_mu_plugins(); - } else { - $exists = false; - mkdir( WPMU_PLUGIN_DIR ); - } + mkdir( WPMU_PLUGIN_DIR ); $this->_create_plugin( '_create_plugin( 'assertEquals( array( 'foo.php' ), array_keys( $found ) ); // Clean up. unlink( WPMU_PLUGIN_DIR . '/foo.php' ); unlink( WPMU_PLUGIN_DIR . '/bar.txt' ); - if ( $exists ) { - $this->_restore_mu_plugins(); - } else { - rmdir( WPMU_PLUGIN_DIR ); - } + + $this->assertSame( array( 'foo.php' ), array_keys( $found ) ); } /** @@ -501,7 +462,7 @@ public function test_get_mu_plugins_should_ignore_files_without_php_extensions() public function test__sort_uname_callback() { $this->assertLessThan( 0, _sort_uname_callback( array( 'Name' => 'a' ), array( 'Name' => 'b' ) ) ); $this->assertGreaterThan( 0, _sort_uname_callback( array( 'Name' => 'c' ), array( 'Name' => 'b' ) ) ); - $this->assertEquals( 0, _sort_uname_callback( array( 'Name' => 'a' ), array( 'Name' => 'a' ) ) ); + $this->assertSame( 0, _sort_uname_callback( array( 'Name' => 'a' ), array( 'Name' => 'a' ) ) ); } /** @@ -510,7 +471,7 @@ public function test__sort_uname_callback() { public function test_get_dropins_empty() { $this->_back_up_drop_ins(); - $this->assertEquals( array(), get_dropins() ); + $this->assertSame( array(), get_dropins() ); // Clean up. $this->_restore_drop_ins(); @@ -526,7 +487,7 @@ public function test_get_dropins_not_empty() { $p2 = $this->_create_plugin( "assertEquals( array( 'advanced-cache.php' ), array_keys( $dropins ) ); + $this->assertSame( array( 'advanced-cache.php' ), array_keys( $dropins ) ); unlink( $p1[1] ); unlink( $p2[1] ); @@ -583,14 +544,14 @@ public function test_validate_active_plugins_remove_invalid() { unlink( $plugin[1] ); $result = validate_active_plugins(); - $this->assertTrue( isset( $result[ $plugin[0] ] ) ); + $this->assertArrayHasKey( $plugin[0], $result ); } /** * @covers ::validate_active_plugins */ public function test_validate_active_plugins_empty() { - $this->assertEquals( array(), validate_active_plugins() ); + $this->assertSame( array(), validate_active_plugins() ); } /** @@ -651,34 +612,16 @@ private function _create_plugin( $data = "user->create_many( 2, array( 'role' => 'author' ) ); self::$author_ids = self::$user_ids; @@ -26,7 +26,7 @@ public static function wpSetUpBeforeClass( $factory ) { self::$post_id = $factory->post->create(); } - function test__wp_translate_postdata_cap_checks_contributor() { + public function test__wp_translate_postdata_cap_checks_contributor() { wp_set_current_user( self::$contributor_id ); // Create new draft post. @@ -37,8 +37,8 @@ function test__wp_translate_postdata_cap_checks_contributor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'draft', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'draft', $_results['post_status'] ); // Submit post for approval. $_post_data = array(); @@ -48,8 +48,8 @@ function test__wp_translate_postdata_cap_checks_contributor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'pending', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'pending', $_results['post_status'] ); // Create new draft post for another user. $_post_data = array(); @@ -59,8 +59,8 @@ function test__wp_translate_postdata_cap_checks_contributor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertInstanceOf( 'WP_Error', $_results ); - $this->assertEquals( 'edit_others_posts', $_results->get_error_code() ); - $this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() ); + $this->assertSame( 'edit_others_posts', $_results->get_error_code() ); + $this->assertSame( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() ); // Edit draft post for another user. $_post_data = array(); @@ -72,11 +72,11 @@ function test__wp_translate_postdata_cap_checks_contributor() { $_results = _wp_translate_postdata( true, $_post_data ); $this->assertInstanceOf( 'WP_Error', $_results ); - $this->assertEquals( 'edit_others_posts', $_results->get_error_code() ); - $this->assertEquals( 'Sorry, you are not allowed to edit posts as this user.', $_results->get_error_message() ); + $this->assertSame( 'edit_others_posts', $_results->get_error_code() ); + $this->assertSame( 'Sorry, you are not allowed to edit posts as this user.', $_results->get_error_message() ); } - function test__wp_translate_postdata_cap_checks_editor() { + public function test__wp_translate_postdata_cap_checks_editor() { wp_set_current_user( self::$editor_id ); // Create new draft post. @@ -87,8 +87,8 @@ function test__wp_translate_postdata_cap_checks_editor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'draft', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'draft', $_results['post_status'] ); // Publish post. $_post_data = array(); @@ -98,8 +98,8 @@ function test__wp_translate_postdata_cap_checks_editor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'publish', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'publish', $_results['post_status'] ); // Create new draft post for another user. $_post_data = array(); @@ -109,8 +109,8 @@ function test__wp_translate_postdata_cap_checks_editor() { $_results = _wp_translate_postdata( false, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'draft', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'draft', $_results['post_status'] ); // Edit draft post for another user. $_post_data = array(); @@ -122,8 +122,8 @@ function test__wp_translate_postdata_cap_checks_editor() { $_results = _wp_translate_postdata( true, $_post_data ); $this->assertNotWPError( $_results ); - $this->assertEquals( $_post_data['post_author'], $_results['post_author'] ); - $this->assertEquals( 'draft', $_results['post_status'] ); + $this->assertSame( $_post_data['post_author'], $_results['post_author'] ); + $this->assertSame( 'draft', $_results['post_status'] ); } /** @@ -131,10 +131,10 @@ function test__wp_translate_postdata_cap_checks_editor() { * * @ticket 25272 */ - function test_edit_post_auto_draft() { + public function test_edit_post_auto_draft() { wp_set_current_user( self::$editor_id ); $post = self::factory()->post->create_and_get( array( 'post_status' => 'auto-draft' ) ); - $this->assertEquals( 'auto-draft', $post->post_status ); + $this->assertSame( 'auto-draft', $post->post_status ); $post_data = array( 'post_title' => 'Post title', 'content' => 'Post content', @@ -142,7 +142,7 @@ function test_edit_post_auto_draft() { 'post_ID' => $post->ID, ); edit_post( $post_data ); - $this->assertEquals( 'draft', get_post( $post->ID )->post_status ); + $this->assertSame( 'draft', get_post( $post->ID )->post_status ); } /** @@ -252,10 +252,10 @@ public function test_bulk_edit_posts_stomping() { $post = get_post( $post2 ); // Check that the first post's values don't stomp the second post. - $this->assertEquals( 'draft', $post->post_status ); + $this->assertSame( 'draft', $post->post_status ); $this->assertEquals( self::$author_ids[1], $post->post_author ); - $this->assertEquals( 'closed', $post->comment_status ); - $this->assertEquals( 'closed', $post->ping_status ); + $this->assertSame( 'closed', $post->comment_status ); + $this->assertSame( 'closed', $post->ping_status ); } /** @@ -314,7 +314,7 @@ public function test_bulk_edit_posts_should_set_post_format_before_wp_update_pos public function check_post_format( $post_id ) { if ( self::$post_id === $post_id ) { - $this->assertEquals( 'aside', get_post_format( $post_id ) ); + $this->assertSame( 'aside', get_post_format( $post_id ) ); } } @@ -391,8 +391,8 @@ public function test_get_sample_permalink_html_should_use_default_permalink_for_ ); $found = get_sample_permalink_html( $p ); - $this->assertContains( 'href="' . get_option( 'home' ) . '/?p=' . $p . '"', $found ); - $this->assertContains( '>' . get_option( 'home' ) . '/?p=' . $p . '<', $found ); + $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/?p=' . $p . '"', $found ); + $this->assertStringContainsString( '>' . get_option( 'home' ) . '/?p=' . $p . '<', $found ); } /** @@ -415,8 +415,8 @@ public function test_get_sample_permalink_html_should_use_pretty_permalink_for_v $found = get_sample_permalink_html( $p ); $post = get_post( $p ); - $this->assertContains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); - $this->assertContains( '>' . urldecode( $post->post_name ) . '<', $found ); + $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); + $this->assertStringContainsString( '>' . urldecode( $post->post_name ) . '<', $found ); } /** @@ -440,8 +440,8 @@ public function test_get_sample_permalink_html_should_use_pretty_permalink_for_v $found = get_sample_permalink_html( $p ); $post = get_post( $p ); - $this->assertContains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); - $this->assertContains( '>' . urldecode( get_permalink( $post ) ) . '<', $found ); + $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); + $this->assertStringContainsString( '>' . urldecode( get_permalink( $post ) ) . '<', $found ); } /** @@ -464,8 +464,8 @@ public function test_get_sample_permalink_html_should_use_correct_permalink_for_ $found = get_sample_permalink_html( $p, null, 'new_slug-صورة' ); $post = get_post( $p ); $message = 'Published post'; - $this->assertContains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); - $this->assertContains( '>new_slug-صورة<', $found, $message ); + $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); + $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); // Scheduled posts should use published permalink. $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); @@ -480,8 +480,8 @@ public function test_get_sample_permalink_html_should_use_correct_permalink_for_ $found = get_sample_permalink_html( $p, null, 'new_slug-صورة' ); $post = get_post( $p ); $message = 'Scheduled post'; - $this->assertContains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); - $this->assertContains( '>new_slug-صورة<', $found, $message ); + $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); + $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); // Draft posts should use preview link. $p = self::factory()->post->create( @@ -498,8 +498,8 @@ public function test_get_sample_permalink_html_should_use_correct_permalink_for_ $preview_link = get_permalink( $post->ID ); $preview_link = add_query_arg( 'preview', 'true', $preview_link ); - $this->assertContains( 'href="' . esc_url( $preview_link ) . '"', $found, $message ); - $this->assertContains( '>new_slug-صورة<', $found, $message ); + $this->assertStringContainsString( 'href="' . esc_url( $preview_link ) . '"', $found, $message ); + $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); } /** @@ -522,7 +522,7 @@ public function test_get_sample_permalink_html_should_use_preview_links_for_draf $found = get_sample_permalink_html( $p ); $post = get_post( $p ); - $this->assertContains( 'href="' . esc_url( get_preview_post_link( $post ) ), $found ); + $this->assertStringContainsString( 'href="' . esc_url( get_preview_post_link( $post ) ), $found ); } /** @@ -538,7 +538,7 @@ public function test_get_sample_permalink_should_avoid_slugs_that_would_create_c ); $found = get_sample_permalink( $p ); - $this->assertEquals( '2015-2', $found[1] ); + $this->assertSame( '2015-2', $found[1] ); } /** @@ -554,7 +554,7 @@ public function test_get_sample_permalink_should_allow_yearlike_slugs_if_permast ); $found = get_sample_permalink( $p ); - $this->assertEquals( '2015', $found[1] ); + $this->assertSame( '2015', $found[1] ); } /** @@ -570,7 +570,7 @@ public function test_get_sample_permalink_should_avoid_slugs_that_would_create_c ); $found = get_sample_permalink( $p ); - $this->assertEquals( '11-2', $found[1] ); + $this->assertSame( '11-2', $found[1] ); } /** @@ -586,7 +586,7 @@ public function test_get_sample_permalink_should_ignore_potential_month_conflict ); $found = get_sample_permalink( $p ); - $this->assertEquals( '13', $found[1] ); + $this->assertSame( '13', $found[1] ); } /** @@ -602,7 +602,7 @@ public function test_get_sample_permalink_should_avoid_slugs_that_would_create_c ); $found = get_sample_permalink( $p ); - $this->assertEquals( '30-2', $found[1] ); + $this->assertSame( '30-2', $found[1] ); } /** @@ -624,7 +624,7 @@ public function test_get_sample_permalink_should_iterate_slug_suffix_when_a_date ); $found = get_sample_permalink( $p ); - $this->assertEquals( '30-3', $found[1] ); + $this->assertSame( '30-3', $found[1] ); } /** @@ -640,7 +640,7 @@ public function test_get_sample_permalink_should_ignore_potential_day_conflicts_ ); $found = get_sample_permalink( $p ); - $this->assertEquals( '32', $found[1] ); + $this->assertSame( '32', $found[1] ); } /** @@ -656,7 +656,7 @@ public function test_get_sample_permalink_should_allow_daylike_slugs_if_permastr ); $found = get_sample_permalink( $p ); - $this->assertEquals( '30', $found[1] ); + $this->assertSame( '30', $found[1] ); } /** @@ -789,7 +789,7 @@ public function test_post_exists_should_match_nonempty_title_content_and_date() $this->assertSame( $p, post_exists( $title, $content, $date ) ); } - function test_use_block_editor_for_post() { + public function test_use_block_editor_for_post() { $this->assertFalse( use_block_editor_for_post( -1 ) ); $bogus_post_id = $this->factory()->post->create( array( @@ -822,10 +822,11 @@ function test_use_block_editor_for_post() { remove_filter( 'use_block_editor_for_post', '__return_true' ); } - function test_get_block_editor_server_block_settings() { + public function test_get_block_editor_server_block_settings() { $name = 'core/test'; $settings = array( 'icon' => 'text', + 'category' => 'common', 'render_callback' => 'foo', ); @@ -836,7 +837,20 @@ function test_get_block_editor_server_block_settings() { unregister_block_type( $name ); $this->assertArrayHasKey( $name, $blocks ); - $this->assertSame( array( 'icon' => 'text' ), $blocks[ $name ] ); + $this->assertSame( + array( + 'apiVersion' => 1, + 'title' => '', + 'description' => '', + 'icon' => 'text', + 'usesContext' => array(), + 'category' => 'common', + 'styles' => array(), + 'keywords' => array(), + 'variations' => array(), + ), + $blocks[ $name ] + ); } /** @@ -853,7 +867,7 @@ public function test_post_add_meta_empty_is_allowed() { wp_set_current_user( self::$admin_id ); $this->assertNotFalse( add_meta( $p ) ); - $this->assertEquals( '', get_post_meta( $p, 'testkey', true ) ); + $this->assertSame( '', get_post_meta( $p, 'testkey', true ) ); } /** @@ -862,6 +876,16 @@ public function test_post_add_meta_empty_is_allowed() { * @ticket 37406 */ public function test_post_exists_should_support_post_type() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $title = 'Foo Bar'; $post_type = 'page'; $post_id = self::factory()->post->create( @@ -879,6 +903,16 @@ public function test_post_exists_should_support_post_type() { * @ticket 37406 */ public function test_post_exists_should_not_match_a_page_for_post() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $title = 'Foo Bar'; $post_type = 'page'; $post_id = self::factory()->post->create( @@ -889,4 +923,123 @@ public function test_post_exists_should_not_match_a_page_for_post() { ); $this->assertSame( 0, post_exists( $title, null, null, 'post' ) ); } + + /** + * Test the status support in post_exists() + * + * @ticket 34012 + */ + public function test_post_exists_should_support_post_status() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $title = 'Foo Bar'; + $post_type = 'post'; + $post_status = 'publish'; + $post_id = self::factory()->post->create( + array( + 'post_title' => $title, + 'post_type' => $post_type, + 'post_status' => $post_status, + ) + ); + $this->assertSame( $post_id, post_exists( $title, null, null, null, $post_status ) ); + } + + + /** + * Test the type and status query in post_exists() + * + * @ticket 34012 + */ + public function test_post_exists_should_support_post_type_status_combined() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $title = 'Foo Bar'; + $post_type = 'post'; + $post_status = 'publish'; + $post_id = self::factory()->post->create( + array( + 'post_title' => $title, + 'post_type' => $post_type, + 'post_status' => $post_status, + ) + ); + $this->assertSame( $post_id, post_exists( $title, null, null, $post_type, $post_status ) ); + } + + /** + * Test that post_exists() doesn't find an existing draft post when looking for publish + * + * @ticket 34012 + */ + public function test_post_exists_should_only_match_correct_post_status() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $title = 'Foo Bar'; + $post_type = 'post'; + $post_status = 'draft'; + $post_id = self::factory()->post->create( + array( + 'post_title' => $title, + 'post_type' => $post_type, + 'post_status' => $post_status, + ) + ); + $this->assertSame( 0, post_exists( $title, null, null, null, 'publish' ) ); + } + + /** + * Test the status support in post_exists() + * + * @ticket 34012 + */ + public function test_post_exists_should_not_match_invalid_post_type_and_status_combined() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $title = 'Foo Bar'; + $post_type = 'post'; + $post_status = 'publish'; + $post_id = self::factory()->post->create( + array( + 'post_title' => $title, + 'post_type' => $post_type, + 'post_status' => $post_status, + ) + ); + + $this->assertSame( 0, post_exists( $title, null, null, $post_type, 'draft' ) ); + $this->assertSame( 0, post_exists( $title, null, null, 'wp_tests', $post_status ) ); + } } diff --git a/tests/phpunit/tests/admin/includesSchema.php b/tests/phpunit/tests/admin/includesSchema.php index 54b0f0379c85f..ea392e41c327d 100644 --- a/tests/phpunit/tests/admin/includesSchema.php +++ b/tests/phpunit/tests/admin/includesSchema.php @@ -3,7 +3,7 @@ /** * @group admin */ -class Tests_Admin_Includes_Schema extends WP_UnitTestCase { +class Tests_Admin_IncludesSchema extends WP_UnitTestCase { private static $options; private static $blogmeta; @@ -12,7 +12,7 @@ class Tests_Admin_Includes_Schema extends WP_UnitTestCase { /** * Make sure the schema code is loaded before the tests are run. */ - public static function wpSetUpBeforeClass() { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { global $wpdb; self::$options = 'testprefix_options'; @@ -91,7 +91,7 @@ public static function wpTearDownAfterClass() { * @ticket 44893 * @dataProvider data_populate_options */ - function test_populate_options( $options, $expected ) { + public function test_populate_options( $options, $expected ) { global $wpdb; $orig_options = $wpdb->options; @@ -110,7 +110,7 @@ function test_populate_options( $options, $expected ) { $wpdb->options = $orig_options; - $this->assertEquals( $expected, $results ); + $this->assertSame( $expected, $results ); } public function data_populate_options() { @@ -119,8 +119,8 @@ public function data_populate_options() { array(), array( // Random options to check. - 'posts_per_rss' => 10, - 'rss_use_excerpt' => 0, + 'posts_per_rss' => '10', + 'rss_use_excerpt' => '0', 'mailserver_url' => 'mail.example.com', 'mailserver_login' => 'login@example.com', 'mailserver_pass' => 'password', @@ -128,13 +128,13 @@ public function data_populate_options() { ), array( array( - 'posts_per_rss' => 7, - 'rss_use_excerpt' => 1, + 'posts_per_rss' => '7', + 'rss_use_excerpt' => '1', ), array( // Random options to check. - 'posts_per_rss' => 7, - 'rss_use_excerpt' => 1, + 'posts_per_rss' => '7', + 'rss_use_excerpt' => '1', 'mailserver_url' => 'mail.example.com', 'mailserver_login' => 'login@example.com', 'mailserver_pass' => 'password', @@ -147,8 +147,8 @@ public function data_populate_options() { array( // Random options to check. 'custom_option' => '1', - 'posts_per_rss' => 10, - 'rss_use_excerpt' => 0, + 'posts_per_rss' => '10', + 'rss_use_excerpt' => '0', 'mailserver_url' => 'mail.example.com', 'mailserver_login' => 'login@example.com', 'mailserver_pass' => 'password', @@ -159,7 +159,7 @@ public function data_populate_options() { 'use_quicktags' => '1', ), array( - // This option is on a blacklist and should never exist. + // This option is disallowed and should never exist. 'use_quicktags' => false, ), ), @@ -183,7 +183,7 @@ public function data_populate_options() { * @group ms-required * @dataProvider data_populate_site_meta */ - function test_populate_site_meta( $meta, $expected ) { + public function test_populate_site_meta( $meta, $expected ) { global $wpdb; $orig_blogmeta = $wpdb->blogmeta; @@ -200,7 +200,7 @@ function test_populate_site_meta( $meta, $expected ) { $wpdb->blogmeta = $orig_blogmeta; - $this->assertEquals( $expected, $results ); + $this->assertSame( $expected, $results ); } public function data_populate_site_meta() { @@ -227,7 +227,7 @@ public function data_populate_site_meta() { * @group multisite * @dataProvider data_populate_network_meta */ - function test_populate_network_meta( $meta, $expected ) { + public function test_populate_network_meta( $meta, $expected ) { global $wpdb; $orig_sitemeta = $wpdb->sitemeta; @@ -248,7 +248,7 @@ function test_populate_network_meta( $meta, $expected ) { $wpdb->sitemeta = $orig_sitemeta; - $this->assertEquals( $expected, $results ); + $this->assertSame( $expected, $results ); } public function data_populate_network_meta() { @@ -258,8 +258,8 @@ public function data_populate_network_meta() { array( // Random meta to check. 'registration' => 'none', - 'blog_upload_space' => 100, - 'fileupload_maxk' => 1500, + 'blog_upload_space' => '100', + 'fileupload_maxk' => '1500', ), ), array( @@ -271,8 +271,8 @@ public function data_populate_network_meta() { // Random meta to check. 'site_name' => 'My Great Network', 'registration' => 'none', - 'blog_upload_space' => 100, - 'fileupload_maxk' => 1500, + 'blog_upload_space' => '100', + 'fileupload_maxk' => '1500', 'WPLANG' => 'fr_FR', ), ), @@ -284,8 +284,8 @@ public function data_populate_network_meta() { // Random meta to check. 'custom_meta' => '1', 'registration' => 'none', - 'blog_upload_space' => 100, - 'fileupload_maxk' => 1500, + 'blog_upload_space' => '100', + 'fileupload_maxk' => '1500', ), ), ); diff --git a/tests/phpunit/tests/admin/includesScreen.php b/tests/phpunit/tests/admin/includesScreen.php index 56013dfee6806..a5750fd5bd9cd 100644 --- a/tests/phpunit/tests/admin/includesScreen.php +++ b/tests/phpunit/tests/admin/includesScreen.php @@ -4,8 +4,8 @@ * @group admin * @group adminScreen */ -class Tests_Admin_includesScreen extends WP_UnitTestCase { - var $core_screens = array( +class Tests_Admin_IncludesScreen extends WP_UnitTestCase { + public $core_screens = array( 'index.php' => array( 'base' => 'dashboard', 'id' => 'dashboard', @@ -155,19 +155,12 @@ class Tests_Admin_includesScreen extends WP_UnitTestCase { ), ); - function setUp() { - set_current_screen( 'front' ); - parent::setUp(); - } - - function tearDown() { + public function tear_down() { unset( $GLOBALS['wp_taxonomies']['old-or-new'] ); - unset( $GLOBALS['screen'] ); - unset( $GLOBALS['current_screen'] ); - parent::tearDown(); + parent::tear_down(); } - function test_set_current_screen_with_hook_suffix() { + public function test_set_current_screen_with_hook_suffix() { global $current_screen; foreach ( $this->core_screens as $hook_name => $screen ) { @@ -203,18 +196,18 @@ function test_set_current_screen_with_hook_suffix() { $GLOBALS['hook_suffix'] = $hook['path']; set_current_screen(); - $this->assertEquals( $screen->id, $current_screen->id, $hook_name ); - $this->assertEquals( $screen->base, $current_screen->base, $hook_name ); + $this->assertSame( $screen->id, $current_screen->id, $hook_name ); + $this->assertSame( $screen->base, $current_screen->base, $hook_name ); if ( isset( $screen->action ) ) { - $this->assertEquals( $screen->action, $current_screen->action, $hook_name ); + $this->assertSame( $screen->action, $current_screen->action, $hook_name ); } if ( isset( $screen->post_type ) ) { - $this->assertEquals( $screen->post_type, $current_screen->post_type, $hook_name ); + $this->assertSame( $screen->post_type, $current_screen->post_type, $hook_name ); } else { $this->assertEmpty( $current_screen->post_type, $hook_name ); } if ( isset( $screen->taxonomy ) ) { - $this->assertEquals( $screen->taxonomy, $current_screen->taxonomy, $hook_name ); + $this->assertSame( $screen->taxonomy, $current_screen->taxonomy, $hook_name ); } $this->assertTrue( $current_screen->in_admin() ); @@ -235,89 +228,90 @@ function test_set_current_screen_with_hook_suffix() { } } - function test_post_type_as_hookname() { + public function test_post_type_as_hookname() { $screen = convert_to_screen( 'page' ); - $this->assertEquals( $screen->post_type, 'page' ); - $this->assertEquals( $screen->base, 'post' ); - $this->assertEquals( $screen->id, 'page' ); + $this->assertSame( $screen->post_type, 'page' ); + $this->assertSame( $screen->base, 'post' ); + $this->assertSame( $screen->id, 'page' ); $this->assertTrue( $screen->is_block_editor ); } - function test_post_type_with_special_suffix_as_hookname() { + public function test_post_type_with_special_suffix_as_hookname() { register_post_type( 'value-add' ); $screen = convert_to_screen( 'value-add' ); // The '-add' part is key. - $this->assertEquals( $screen->post_type, 'value-add' ); - $this->assertEquals( $screen->base, 'post' ); - $this->assertEquals( $screen->id, 'value-add' ); + $this->assertSame( $screen->post_type, 'value-add' ); + $this->assertSame( $screen->base, 'post' ); + $this->assertSame( $screen->id, 'value-add' ); $this->assertFalse( $screen->is_block_editor ); // Post types do not support `show_in_rest` by default. $screen = convert_to_screen( 'edit-value-add' ); // The '-add' part is key. - $this->assertEquals( $screen->post_type, 'value-add' ); - $this->assertEquals( $screen->base, 'edit' ); - $this->assertEquals( $screen->id, 'edit-value-add' ); + $this->assertSame( $screen->post_type, 'value-add' ); + $this->assertSame( $screen->base, 'edit' ); + $this->assertSame( $screen->id, 'edit-value-add' ); $this->assertFalse( $screen->is_block_editor ); // Post types do not support `show_in_rest` by default. } - function test_taxonomy_with_special_suffix_as_hookname() { + public function test_taxonomy_with_special_suffix_as_hookname() { register_taxonomy( 'old-or-new', 'post' ); $screen = convert_to_screen( 'edit-old-or-new' ); // The '-new' part is key. - $this->assertEquals( $screen->taxonomy, 'old-or-new' ); - $this->assertEquals( $screen->base, 'edit-tags' ); - $this->assertEquals( $screen->id, 'edit-old-or-new' ); + $this->assertSame( $screen->taxonomy, 'old-or-new' ); + $this->assertSame( $screen->base, 'edit-tags' ); + $this->assertSame( $screen->id, 'edit-old-or-new' ); $this->assertFalse( $screen->is_block_editor ); } - function test_post_type_with_edit_prefix() { + public function test_post_type_with_edit_prefix() { register_post_type( 'edit-some-thing' ); $screen = convert_to_screen( 'edit-some-thing' ); - $this->assertEquals( $screen->post_type, 'edit-some-thing' ); - $this->assertEquals( $screen->base, 'post' ); - $this->assertEquals( $screen->id, 'edit-some-thing' ); + $this->assertSame( $screen->post_type, 'edit-some-thing' ); + $this->assertSame( $screen->base, 'post' ); + $this->assertSame( $screen->id, 'edit-some-thing' ); $this->assertFalse( $screen->is_block_editor ); // Post types do not support `show_in_rest` by default. $screen = convert_to_screen( 'edit-edit-some-thing' ); - $this->assertEquals( $screen->post_type, 'edit-some-thing' ); - $this->assertEquals( $screen->base, 'edit' ); - $this->assertEquals( $screen->id, 'edit-edit-some-thing' ); + $this->assertSame( $screen->post_type, 'edit-some-thing' ); + $this->assertSame( $screen->base, 'edit' ); + $this->assertSame( $screen->id, 'edit-edit-some-thing' ); $this->assertFalse( $screen->is_block_editor ); // Post types do not support `show_in_rest` by default. } - function test_post_type_edit_collisions() { + public function test_post_type_edit_collisions() { register_post_type( 'comments' ); register_post_type( 'tags' ); // Sorry, core wins here. $screen = convert_to_screen( 'edit-comments' ); - $this->assertEquals( $screen->base, 'edit-comments' ); + $this->assertSame( $screen->base, 'edit-comments' ); // The post type wins here. convert_to_screen( $post_type ) is only relevant for meta boxes anyway. $screen = convert_to_screen( 'comments' ); - $this->assertEquals( $screen->base, 'post' ); + $this->assertSame( $screen->base, 'post' ); // Core wins. $screen = convert_to_screen( 'edit-tags' ); - $this->assertEquals( $screen->base, 'edit-tags' ); + $this->assertSame( $screen->base, 'edit-tags' ); $screen = convert_to_screen( 'tags' ); - $this->assertEquals( $screen->base, 'post' ); + $this->assertSame( $screen->base, 'post' ); } - function test_help_tabs() { + public function test_help_tabs() { $tab = __FUNCTION__; $tab_args = array( - 'id' => $tab, 'title' => 'Help!', + 'id' => $tab, 'content' => 'Some content', 'callback' => false, ); + set_current_screen( 'edit.php' ); $screen = get_current_screen(); $screen->add_help_tab( $tab_args ); - $this->assertEquals( + $this->assertSame( $screen->get_help_tab( $tab ), array( - 'id' => $tab, 'title' => 'Help!', + 'id' => $tab, 'content' => 'Some content', 'callback' => false, 'priority' => 10, @@ -331,13 +325,13 @@ function test_help_tabs() { $this->assertNull( $screen->get_help_tab( $tab ) ); $screen->remove_help_tabs(); - $this->assertEquals( $screen->get_help_tabs(), array() ); + $this->assertSame( $screen->get_help_tabs(), array() ); } /** * @ticket 19828 */ - function test_help_tabs_priority() { + public function test_help_tabs_priority() { $tab_1 = 'tab1'; $tab_1_args = array( 'title' => 'Help!', @@ -372,26 +366,27 @@ function test_help_tabs_priority() { // Don't include a priority. ); + set_current_screen( 'edit.php' ); $screen = get_current_screen(); // Add help tabs. $screen->add_help_tab( $tab_1_args ); - $this->assertequals( $screen->get_help_tab( $tab_1 ), $tab_1_args ); + $this->assertSame( $screen->get_help_tab( $tab_1 ), $tab_1_args ); $screen->add_help_tab( $tab_2_args ); - $this->assertEquals( $screen->get_help_tab( $tab_2 ), $tab_2_args ); + $this->assertSame( $screen->get_help_tab( $tab_2 ), $tab_2_args ); $screen->add_help_tab( $tab_3_args ); - $this->assertEquals( $screen->get_help_tab( $tab_3 ), $tab_3_args ); + $this->assertSame( $screen->get_help_tab( $tab_3 ), $tab_3_args ); $screen->add_help_tab( $tab_4_args ); // Priority is added with the default for future calls. $tab_4_args['priority'] = 10; - $this->assertEquals( $screen->get_help_tab( $tab_4 ), $tab_4_args ); + $this->assertSame( $screen->get_help_tab( $tab_4 ), $tab_4_args ); $tabs = $screen->get_help_tabs(); - $this->assertEquals( 4, count( $tabs ) ); + $this->assertCount( 4, $tabs ); $this->assertArrayHasKey( $tab_1, $tabs ); $this->assertArrayHasKey( $tab_2, $tabs ); $this->assertArrayHasKey( $tab_3, $tabs ); @@ -411,28 +406,28 @@ function test_help_tabs_priority() { $screen->remove_help_tab( $tab_1 ); $this->assertNull( $screen->get_help_tab( $tab_1 ) ); - $this->assertSame( 3, count( $screen->get_help_tabs() ) ); + $this->assertCount( 3, $screen->get_help_tabs() ); $screen->remove_help_tab( $tab_2 ); $this->assertNull( $screen->get_help_tab( $tab_2 ) ); - $this->assertSame( 2, count( $screen->get_help_tabs() ) ); + $this->assertCount( 2, $screen->get_help_tabs() ); $screen->remove_help_tab( $tab_3 ); $this->assertNull( $screen->get_help_tab( $tab_3 ) ); - $this->assertSame( 1, count( $screen->get_help_tabs() ) ); + $this->assertCount( 1, $screen->get_help_tabs() ); $screen->remove_help_tab( $tab_4 ); $this->assertNull( $screen->get_help_tab( $tab_4 ) ); - $this->assertSame( 0, count( $screen->get_help_tabs() ) ); + $this->assertCount( 0, $screen->get_help_tabs() ); $screen->remove_help_tabs(); - $this->assertEquals( array(), $screen->get_help_tabs() ); + $this->assertSame( array(), $screen->get_help_tabs() ); } /** * @ticket 25799 */ - function test_options() { + public function test_options() { $option = __FUNCTION__; $option_args = array( 'label' => 'Option', @@ -440,10 +435,11 @@ function test_options() { 'option' => $option, ); + set_current_screen( 'edit.php' ); $screen = get_current_screen(); $screen->add_option( $option, $option_args ); - $this->assertEquals( $screen->get_option( $option ), $option_args ); + $this->assertSame( $screen->get_option( $option ), $option_args ); $options = $screen->get_options(); $this->assertArrayHasKey( $option, $options ); @@ -452,12 +448,10 @@ function test_options() { $this->assertNull( $screen->get_option( $option ) ); $screen->remove_options(); - $this->assertEquals( $screen->get_options(), array() ); + $this->assertSame( $screen->get_options(), array() ); } - function test_in_admin() { - $screen = get_current_screen(); - + public function test_in_admin() { set_current_screen( 'edit.php' ); $this->assertTrue( get_current_screen()->in_admin() ); $this->assertTrue( get_current_screen()->in_admin( 'site' ) ); @@ -481,8 +475,6 @@ function test_in_admin() { $this->assertFalse( get_current_screen()->in_admin( 'site' ) ); $this->assertFalse( get_current_screen()->in_admin( 'network' ) ); $this->assertFalse( get_current_screen()->in_admin( 'user' ) ); - - $GLOBALS['current_screen'] = $screen; } /** diff --git a/tests/phpunit/tests/admin/includesTemplate.php b/tests/phpunit/tests/admin/includesTemplate.php index ea656c81e81a7..c5e73d59e3ad0 100644 --- a/tests/phpunit/tests/admin/includesTemplate.php +++ b/tests/phpunit/tests/admin/includesTemplate.php @@ -2,48 +2,45 @@ /** * @group admin */ -class Tests_Admin_includesTemplate extends WP_UnitTestCase { - function test_equal() { - $this->assertEquals( ' selected=\'selected\'', selected( 'foo', 'foo', false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( 'foo', 'foo', false ) ); +class Tests_Admin_IncludesTemplate extends WP_UnitTestCase { - $this->assertEquals( ' selected=\'selected\'', selected( '1', 1, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( '1', 1, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( '1', true, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( '1', true, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( 1, 1, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( 1, 1, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( 1, true, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( 1, true, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( true, true, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( true, true, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( '0', 0, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( '0', 0, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( 0, 0, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( 0, 0, false ) ); - - $this->assertEquals( ' selected=\'selected\'', selected( '', false, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( '', false, false ) ); + /** + * @ticket 51137 + * @dataProvider data_wp_terms_checklist_with_selected_cats + */ + public function test_wp_terms_checklist_with_selected_cats( $term_id ) { + $output = wp_terms_checklist( + 0, + array( + 'selected_cats' => array( $term_id ), + 'echo' => false, + ) + ); - $this->assertEquals( ' selected=\'selected\'', selected( false, false, false ) ); - $this->assertEquals( ' checked=\'checked\'', checked( false, false, false ) ); + $this->assertStringContainsString( "checked='checked'", $output ); } - function test_notequal() { - $this->assertEquals( '', selected( '0', '', false ) ); - $this->assertEquals( '', checked( '0', '', false ) ); + /** + * @ticket 51137 + * @dataProvider data_wp_terms_checklist_with_selected_cats + */ + public function test_wp_terms_checklist_with_popular_cats( $term_id ) { + $output = wp_terms_checklist( + 0, + array( + 'popular_cats' => array( $term_id ), + 'echo' => false, + ) + ); - $this->assertEquals( '', selected( 0, '', false ) ); - $this->assertEquals( '', checked( 0, '', false ) ); + $this->assertStringContainsString( 'class="popular-category"', $output ); + } - $this->assertEquals( '', selected( 0, false, false ) ); - $this->assertEquals( '', checked( 0, false, false ) ); + public function data_wp_terms_checklist_with_selected_cats() { + return array( + array( '1' ), + array( 1 ), + ); } public function test_add_meta_box() { @@ -57,7 +54,7 @@ public function test_add_meta_box() { public function test_remove_meta_box() { global $wp_meta_boxes; - // Add a meta boxes to remove. + // Add a meta box to remove. add_meta_box( 'testbox1', 'Test Metabox', '__return_false', $current_screen = 'post' ); // Confirm it's there. @@ -108,11 +105,30 @@ public function test_remove_meta_box_from_multiple_screens() { $this->assertFalse( $wp_meta_boxes['attachment']['advanced']['default']['testbox1'] ); } + /** + * @ticket 50019 + */ + public function test_add_meta_box_with_previously_removed_box_and_sorted_priority() { + global $wp_meta_boxes; + + // Add a meta box to remove. + add_meta_box( 'testbox1', 'Test Metabox', '__return_false', $current_screen = 'post' ); + + // Remove the meta box. + remove_meta_box( 'testbox1', $current_screen, 'advanced' ); + + // Attempt to re-add the meta box with the 'sorted' priority. + add_meta_box( 'testbox1', null, null, $current_screen, 'advanced', 'sorted' ); + + // Check that the meta box was not re-added. + $this->assertFalse( $wp_meta_boxes[ $current_screen ]['advanced']['default']['testbox1'] ); + } + /** * Test calling get_settings_errors() with variations on where it gets errors from. * * @ticket 42498 - * @covers ::get_settings_errors() + * @covers ::get_settings_errors * @global array $wp_settings_errors */ public function test_get_settings_errors_sources() { @@ -145,14 +161,14 @@ public function test_get_settings_errors_sources() { set_transient( 'settings_errors', array( $blogname_error ) ); $wp_settings_errors = null; add_settings_error( $blogdescription_error['setting'], $blogdescription_error['code'], $blogdescription_error['message'], $blogdescription_error['type'] ); - $this->assertEqualSets( array( $blogname_error, $blogdescription_error ), get_settings_errors() ); + $this->assertSameSets( array( $blogname_error, $blogdescription_error ), get_settings_errors() ); $wp_settings_errors = null; } /** * @ticket 44941 - * @covers ::settings_errors() + * @covers ::settings_errors * @global array $wp_settings_errors * @dataProvider settings_errors_css_classes_provider */ @@ -169,8 +185,8 @@ public function test_settings_errors_css_classes( $type, $expected ) { $expected = sprintf( 'notice %s settings-error is-dismissible', $expected ); - $this->assertContains( $expected, $output ); - $this->assertNotContains( 'notice-notice-', $output ); + $this->assertStringContainsString( $expected, $output ); + $this->assertStringNotContainsString( 'notice-notice-', $output ); } public function settings_errors_css_classes_provider() { @@ -185,4 +201,39 @@ public function settings_errors_css_classes_provider() { ); } + /** + * @ticket 42791 + */ + public function test_wp_add_dashboard_widget() { + global $wp_meta_boxes; + + set_current_screen( 'dashboard' ); + + if ( ! function_exists( 'wp_add_dashboard_widget' ) ) { + require_once ABSPATH . 'wp-admin/includes/dashboard.php'; + } + + // Some hardcoded defaults for core widgets. + wp_add_dashboard_widget( 'dashboard_quick_press', 'Quick', '__return_false' ); + wp_add_dashboard_widget( 'dashboard_browser_nag', 'Nag', '__return_false' ); + + $this->assertArrayHasKey( 'dashboard_quick_press', $wp_meta_boxes['dashboard']['side']['core'] ); + $this->assertArrayHasKey( 'dashboard_browser_nag', $wp_meta_boxes['dashboard']['normal']['high'] ); + + // Location and priority defaults. + wp_add_dashboard_widget( 'dashboard1', 'Widget 1', '__return_false', null, null, 'foo' ); + wp_add_dashboard_widget( 'dashboard2', 'Widget 2', '__return_false', null, null, null, 'bar' ); + + $this->assertArrayHasKey( 'dashboard1', $wp_meta_boxes['dashboard']['foo']['core'] ); + $this->assertArrayHasKey( 'dashboard2', $wp_meta_boxes['dashboard']['normal']['bar'] ); + + // Cleanup. + remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); + remove_meta_box( 'dashboard_browser_nag', 'dashboard', 'normal' ); + remove_meta_box( 'dashboard1', 'dashboard', 'foo' ); + + // This doesn't actually get removed due to the invalid priority. + remove_meta_box( 'dashboard2', 'dashboard', 'normal' ); + } + } diff --git a/tests/phpunit/tests/admin/includesTheme.php b/tests/phpunit/tests/admin/includesTheme.php index 9e8354c36e7d0..8208d3fcfa591 100644 --- a/tests/phpunit/tests/admin/includesTheme.php +++ b/tests/phpunit/tests/admin/includesTheme.php @@ -2,37 +2,37 @@ /** * @group themes */ -class Tests_Admin_includesTheme extends WP_UnitTestCase { +class Tests_Admin_IncludesTheme extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->theme_root = DIR_TESTDATA . '/themedir1'; $this->orig_theme_dir = $GLOBALS['wp_theme_directories']; $GLOBALS['wp_theme_directories'] = array( WP_CONTENT_DIR . '/themes', $this->theme_root ); - add_filter( 'theme_root', array( $this, '_theme_root' ) ); - add_filter( 'stylesheet_root', array( $this, '_theme_root' ) ); - add_filter( 'template_root', array( $this, '_theme_root' ) ); + add_filter( 'theme_root', array( $this, 'filter_theme_root' ) ); + add_filter( 'stylesheet_root', array( $this, 'filter_theme_root' ) ); + add_filter( 'template_root', array( $this, 'filter_theme_root' ) ); // Clear caches. wp_clean_themes_cache(); unset( $GLOBALS['wp_themes'] ); } - function tearDown() { + public function tear_down() { $GLOBALS['wp_theme_directories'] = $this->orig_theme_dir; - remove_filter( 'theme_root', array( $this, '_theme_root' ) ); - remove_filter( 'stylesheet_root', array( $this, '_theme_root' ) ); - remove_filter( 'template_root', array( $this, '_theme_root' ) ); + remove_filter( 'theme_root', array( $this, 'filter_theme_root' ) ); + remove_filter( 'stylesheet_root', array( $this, 'filter_theme_root' ) ); + remove_filter( 'template_root', array( $this, 'filter_theme_root' ) ); wp_clean_themes_cache(); unset( $GLOBALS['wp_themes'] ); - parent::tearDown(); + parent::tear_down(); } // Replace the normal theme root directory with our premade test directory. - function _theme_root( $dir ) { + public function filter_theme_root( $dir ) { return $this->theme_root; } @@ -42,13 +42,13 @@ function _theme_root( $dir ) { * @expectedDeprecated get_theme * @expectedDeprecated get_themes */ - function test_page_templates() { + public function test_page_templates() { $theme = get_theme( 'Page Template Theme' ); $this->assertNotEmpty( $theme ); switch_theme( $theme['Template'], $theme['Stylesheet'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', @@ -62,7 +62,7 @@ function test_page_templates() { switch_theme( $theme['Template'], $theme['Stylesheet'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', @@ -75,39 +75,39 @@ function test_page_templates() { /** * @ticket 18375 */ - function test_page_templates_different_post_types() { + public function test_page_templates_different_post_types() { $theme = wp_get_theme( 'page-templates' ); $this->assertNotEmpty( $theme ); switch_theme( $theme['Template'], $theme['Stylesheet'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level-post-types.php', 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', ), get_page_templates( null, 'foo' ) ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level-post-types.php', 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', ), get_page_templates( null, 'post' ) ); - $this->assertEquals( array(), get_page_templates( null, 'bar' ) ); + $this->assertSame( array(), get_page_templates( null, 'bar' ) ); } /** * @ticket 38766 */ - function test_page_templates_for_post_types_with_trailing_periods() { + public function test_page_templates_for_post_types_with_trailing_periods() { $theme = wp_get_theme( 'page-templates' ); $this->assertNotEmpty( $theme ); switch_theme( $theme['Template'], $theme['Stylesheet'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'No Trailing Period' => '38766/no-trailing-period-post-types.php', 'Trailing Period.' => '38766/trailing-period-post-types.php', @@ -118,7 +118,7 @@ function test_page_templates_for_post_types_with_trailing_periods() { ), get_page_templates( null, 'period' ) ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'No Trailing Period' => '38766/no-trailing-period-post-types.php', 'Trailing Period.' => '38766/trailing-period-post-types.php', @@ -133,13 +133,13 @@ function test_page_templates_for_post_types_with_trailing_periods() { /** * @ticket 38696 */ - function test_page_templates_child_theme() { + public function test_page_templates_child_theme() { $theme = wp_get_theme( 'page-templates-child' ); $this->assertNotEmpty( $theme ); switch_theme( $theme['Template'], $theme['Stylesheet'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level-post-types.php', 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', @@ -149,7 +149,7 @@ function test_page_templates_child_theme() { get_page_templates( null, 'foo' ) ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level-post-types.php', 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', @@ -157,7 +157,7 @@ function test_page_templates_child_theme() { get_page_templates( null, 'post' ) ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', @@ -166,7 +166,7 @@ function test_page_templates_child_theme() { get_page_templates() ); - $this->assertEquals( array(), get_page_templates( null, 'bar' ) ); + $this->assertSame( array(), get_page_templates( null, 'bar' ) ); } /** @@ -180,7 +180,7 @@ public function test_get_post_templates_child_theme() { $post_templates = $theme->get_post_templates(); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'template-top-level-post-types.php' => 'Top Level', 'subdir/template-sub-dir-post-types.php' => 'Sub Dir', @@ -190,7 +190,7 @@ public function test_get_post_templates_child_theme() { $post_templates['foo'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'template-top-level-post-types.php' => 'Top Level', 'subdir/template-sub-dir-post-types.php' => 'Sub Dir', @@ -198,7 +198,7 @@ public function test_get_post_templates_child_theme() { $post_templates['post'] ); - $this->assertEqualSetsWithIndex( + $this->assertSameSetsWithIndex( array( 'template-top-level.php' => 'Top Level', 'subdir/template-sub-dir.php' => 'Sub Dir', @@ -216,7 +216,7 @@ public function test_get_post_templates_child_theme() { * @group external-http * @ticket 28121 */ - function test_get_theme_featured_list_api() { + public function test_get_theme_featured_list_api() { wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) ); $featured_list_api = get_theme_feature_list( true ); $this->assertNonEmptyMultidimensionalArray( $featured_list_api ); @@ -230,7 +230,7 @@ function test_get_theme_featured_list_api() { * @group external-http * @ticket 28121 */ - function test_get_theme_featured_list_hardcoded() { + public function test_get_theme_featured_list_hardcoded() { $featured_list_hardcoded = get_theme_feature_list( false ); $this->assertNonEmptyMultidimensionalArray( $featured_list_hardcoded ); } diff --git a/tests/phpunit/tests/admin/includesUpdateCore.php b/tests/phpunit/tests/admin/includesUpdateCore.php deleted file mode 100644 index 67d750a442c69..0000000000000 --- a/tests/phpunit/tests/admin/includesUpdateCore.php +++ /dev/null @@ -1,34 +0,0 @@ -assertFileNotExists( dirname( ABSPATH ) . '/build/' . $file ); - } -} diff --git a/tests/phpunit/tests/admin/includesUser.php b/tests/phpunit/tests/admin/includesUser.php new file mode 100644 index 0000000000000..4e0d99c639da1 --- /dev/null +++ b/tests/phpunit/tests/admin/includesUser.php @@ -0,0 +1,58 @@ +assertWPError( $error ); + $this->assertEquals( $error_code, $error->get_error_code() ); + } else { + $this->assertNotWPError( $error ); + } + } + + public function data_is_authorize_application_password_request_valid() { + return array( + array( + array(), + '', + ), + array( + array( 'success_url' => 'http://example.org' ), + 'invalid_redirect_scheme', + ), + array( + array( 'reject_url' => 'http://example.org' ), + 'invalid_redirect_scheme', + ), + array( + array( 'success_url' => 'https://example.org' ), + '', + ), + array( + array( 'reject_url' => 'https://example.org' ), + '', + ), + array( + array( 'success_url' => 'wordpress://example' ), + '', + ), + array( + array( 'reject_url' => 'wordpress://example' ), + '', + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/wpCommentsListTable.php b/tests/phpunit/tests/admin/wpCommentsListTable.php new file mode 100644 index 0000000000000..b05c5fa5f1970 --- /dev/null +++ b/tests/phpunit/tests/admin/wpCommentsListTable.php @@ -0,0 +1,198 @@ +table = _get_list_table( 'WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); + } + + /** + * @ticket 40188 + * + * @covers WP_Comments_List_Table::extra_tablenav + */ + public function test_filter_button_should_not_be_shown_if_there_are_no_comments() { + ob_start(); + $this->table->extra_tablenav( 'top' ); + $output = ob_get_clean(); + + $this->assertStringNotContainsString( 'id="post-query-submit"', $output ); + } + + /** + * @ticket 40188 + * + * @covers WP_Comments_List_Table::extra_tablenav + */ + public function test_filter_button_should_be_shown_if_there_are_comments() { + $post_id = self::factory()->post->create(); + $comment_id = self::factory()->comment->create( + array( + 'comment_post_ID' => $post_id, + 'comment_approved' => '1', + ) + ); + + $this->table->prepare_items(); + + ob_start(); + $this->table->extra_tablenav( 'top' ); + $output = ob_get_clean(); + + $this->assertStringContainsString( 'id="post-query-submit"', $output ); + } + + /** + * @ticket 40188 + * + * @covers WP_Comments_List_Table::extra_tablenav + */ + public function test_filter_comment_type_dropdown_should_be_shown_if_there_are_comments() { + $post_id = self::factory()->post->create(); + $comment_id = self::factory()->comment->create( + array( + 'comment_post_ID' => $post_id, + 'comment_approved' => '1', + ) + ); + + $this->table->prepare_items(); + + ob_start(); + $this->table->extra_tablenav( 'top' ); + $output = ob_get_clean(); + + $this->assertStringContainsString( 'id="filter-by-comment-type"', $output ); + $this->assertStringContainsString( " + + + + +OPTIONS; + $expected = str_replace( "\r\n", "\n", $expected ); + + $this->assertStringContainsString( $expected, $output ); + } + + /** + * @ticket 45089 + * + * @covers WP_Comments_List_Table::print_column_headers + */ + public function test_sortable_columns() { + $override_sortable_columns = array( + 'author' => array( 'comment_author', true ), + 'response' => 'comment_post_ID', + 'date' => array( 'comment_date', 'dEsC' ), // The ordering support should be case-insensitive. + ); + + // Stub the get_sortable_columns() method. + $object = $this->getMockBuilder( 'WP_Comments_List_Table' ) + ->setConstructorArgs( array( array( 'screen' => 'edit-comments' ) ) ) + ->setMethods( array( 'get_sortable_columns' ) ) + ->getMock(); + + // Change the null return value of the stubbed get_sortable_columns() method. + $object->method( 'get_sortable_columns' ) + ->willReturn( $override_sortable_columns ); + + $output = get_echo( array( $object, 'print_column_headers' ) ); + + $this->assertStringContainsString( '?orderby=comment_author&order=desc', $output, 'Mismatch of the default link ordering for comment author column. Should be desc.' ); + $this->assertStringContainsString( 'column-author sortable asc', $output, 'Mismatch of CSS classes for the comment author column.' ); + + $this->assertStringContainsString( '?orderby=comment_post_ID&order=asc', $output, 'Mismatch of the default link ordering for comment response column. Should be asc.' ); + $this->assertStringContainsString( 'column-response sortable desc', $output, 'Mismatch of CSS classes for the comment post ID column.' ); + + $this->assertStringContainsString( '?orderby=comment_date&order=desc', $output, 'Mismatch of the default link ordering for comment date column. Should be asc.' ); + $this->assertStringContainsString( 'column-date sortable asc', $output, 'Mismatch of CSS classes for the comment date column.' ); + } + + /** + * @ticket 45089 + * + * @covers WP_Comments_List_Table::print_column_headers + */ + public function test_sortable_columns_with_current_ordering() { + $override_sortable_columns = array( + 'author' => array( 'comment_author', false ), + 'response' => 'comment_post_ID', + 'date' => array( 'comment_date', 'asc' ), // We will override this with current ordering. + ); + + // Current ordering. + $_GET['orderby'] = 'comment_date'; + $_GET['order'] = 'desc'; + + // Stub the get_sortable_columns() method. + $object = $this->getMockBuilder( 'WP_Comments_List_Table' ) + ->setConstructorArgs( array( array( 'screen' => 'edit-comments' ) ) ) + ->setMethods( array( 'get_sortable_columns' ) ) + ->getMock(); + + // Change the null return value of the stubbed get_sortable_columns() method. + $object->method( 'get_sortable_columns' ) + ->willReturn( $override_sortable_columns ); + + $output = get_echo( array( $object, 'print_column_headers' ) ); + + $this->assertStringContainsString( '?orderby=comment_author&order=asc', $output, 'Mismatch of the default link ordering for comment author column. Should be asc.' ); + $this->assertStringContainsString( 'column-author sortable desc', $output, 'Mismatch of CSS classes for the comment author column.' ); + + $this->assertStringContainsString( '?orderby=comment_post_ID&order=asc', $output, 'Mismatch of the default link ordering for comment response column. Should be asc.' ); + $this->assertStringContainsString( 'column-response sortable desc', $output, 'Mismatch of CSS classes for the comment post ID column.' ); + + $this->assertStringContainsString( '?orderby=comment_date&order=asc', $output, 'Mismatch of the current link ordering for comment date column. Should be asc.' ); + $this->assertStringContainsString( 'column-date sorted desc', $output, 'Mismatch of CSS classes for the comment date column.' ); + } + +} diff --git a/tests/phpunit/tests/admin/wpCommunityEvents.php b/tests/phpunit/tests/admin/wpCommunityEvents.php new file mode 100644 index 0000000000000..631d8fdfeb80f --- /dev/null +++ b/tests/phpunit/tests/admin/wpCommunityEvents.php @@ -0,0 +1,603 @@ +instance = new WP_Community_Events( 1, $this->get_user_location() ); + } + + /** + * Simulates a stored user location. + * + * @access private + * @since 4.8.0 + * + * @return array The mock location. + */ + private function get_user_location() { + return array( + 'description' => 'San Francisco', + 'latitude' => '37.7749300', + 'longitude' => '-122.4194200', + 'country' => 'US', + ); + } + + /** + * Test: get_events() should return an instance of WP_Error if the response code is not 200. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_events + */ + public function test_get_events_bad_response_code() { + add_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); + + $this->assertWPError( $this->instance->get_events() ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); + } + + /** + * Test: The response body should not be cached if the response code is not 200. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_cached_events + */ + public function test_get_cached_events_bad_response_code() { + add_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); + + $this->instance->get_events(); + + $this->assertFalse( $this->instance->get_cached_events() ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_bad_response_code' ) ); + } + + /** + * Simulates an HTTP response with a non-200 response code. + * + * @since 4.8.0 + * + * @return array A mock response with a 404 HTTP status code + */ + public function _http_request_bad_response_code() { + return array( + 'headers' => '', + 'body' => '', + 'response' => array( + 'code' => 404, + ), + 'cookies' => '', + 'filename' => '', + ); + } + + /** + * Test: get_events() should return an instance of WP_Error if the response body does not have + * the required properties. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_events + */ + public function test_get_events_invalid_response() { + add_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); + + $this->assertWPError( $this->instance->get_events() ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); + } + + /** + * Test: The response body should not be cached if it does not have the required properties. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_cached_events + */ + public function test_get_cached_events_invalid_response() { + add_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); + + $this->instance->get_events(); + + $this->assertFalse( $this->instance->get_cached_events() ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_invalid_response' ) ); + } + + /** + * Simulates an HTTP response with a body that does not have the required properties. + * + * @since 4.8.0 + * + * @return array A mock response that's missing required properties. + */ + public function _http_request_invalid_response() { + return array( + 'headers' => '', + 'body' => wp_json_encode( array() ), + 'response' => array( + 'code' => 200, + ), + 'cookies' => '', + 'filename' => '', + ); + } + + /** + * Test: With a valid response, get_events() should return an associative array containing a location array and + * an events array with individual events that have Unix start/end timestamps. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_events + */ + public function test_get_events_valid_response() { + add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); + + $response = $this->instance->get_events(); + + $this->assertNotWPError( $response ); + $this->assertSameSetsWithIndex( $this->get_user_location(), $response['location'] ); + $this->assertSame( strtotime( 'next Sunday 1pm' ), $response['events'][0]['start_unix_timestamp'] ); + $this->assertSame( strtotime( 'next Sunday 2pm' ), $response['events'][0]['end_unix_timestamp'] ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); + } + + /** + * Test: `get_cached_events()` should return the same data as get_events(), including Unix start/end + * timestamps for each event. + * + * @since 4.8.0 + * + * @covers WP_Community_Events::get_cached_events + */ + public function test_get_cached_events_valid_response() { + add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); + + $this->instance->get_events(); + + $cached_events = $this->instance->get_cached_events(); + + $this->assertNotWPError( $cached_events ); + $this->assertSameSetsWithIndex( $this->get_user_location(), $cached_events['location'] ); + $this->assertSame( strtotime( 'next Sunday 1pm' ), $cached_events['events'][0]['start_unix_timestamp'] ); + $this->assertSame( strtotime( 'next Sunday 2pm' ), $cached_events['events'][0]['end_unix_timestamp'] ); + + remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); + } + + /** + * Simulates an HTTP response with valid location and event data. + * + * @since 4.8.0 + * + * @return array A mock HTTP response with valid data. + */ + public function _http_request_valid_response() { + return array( + 'headers' => '', + 'body' => wp_json_encode( + array( + 'location' => $this->get_user_location(), + 'events' => $this->get_valid_events(), + ) + ), + 'response' => array( + 'code' => 200, + ), + 'cookies' => '', + 'filename' => '', + ); + } + + /** + * Get a sample of valid events. + * + * @return array[] + */ + protected function get_valid_events() { + return array( + array( + 'type' => 'meetup', + 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', + 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', + 'meetup' => 'The East Bay WordPress Meetup Group', + 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', + 'start_unix_timestamp' => strtotime( 'next Sunday 1pm' ), + 'end_unix_timestamp' => strtotime( 'next Sunday 2pm' ), + + 'location' => array( + 'location' => 'Oakland, CA, USA', + 'country' => 'us', + 'latitude' => 37.808453, + 'longitude' => -122.26593, + ), + ), + + array( + 'type' => 'meetup', + 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', + 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', + 'meetup' => 'WordPress Bay Area Foothills Group', + 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', + 'start_unix_timestamp' => strtotime( 'next Wednesday 1:30pm' ), + 'end_unix_timestamp' => strtotime( 'next Wednesday 2:30pm' ), + + 'location' => array( + 'location' => 'Milpitas, CA, USA', + 'country' => 'us', + 'latitude' => 37.432813, + 'longitude' => -121.907095, + ), + ), + + array( + 'type' => 'wordcamp', + 'title' => 'WordCamp San Francisco', + 'url' => 'https://sf.wordcamp.org/2020/', + 'meetup' => null, + 'meetup_url' => null, + 'start_unix_timestamp' => strtotime( 'next Saturday' ), + 'end_unix_timestamp' => strtotime( 'next Saturday 8pm' ), + + 'location' => array( + 'location' => 'San Francisco, CA', + 'country' => 'US', + 'latitude' => 37.432813, + 'longitude' => -121.907095, + ), + ), + ); + } + + /** + * Test: `trim_events()` should immediately remove expired events. + * + * @since 5.5.2 + * + * @covers WP_Community_Events::trim_events + */ + public function test_trim_expired_events() { + $trim_events = new ReflectionMethod( $this->instance, 'trim_events' ); + $trim_events->setAccessible( true ); + + $events = $this->get_valid_events(); + + // This should be removed because it's already ended. + $events[0]['start_unix_timestamp'] = strtotime( '1 hour ago' ); + $events[0]['end_unix_timestamp'] = strtotime( '2 seconds ago' ); + + // This should remain because it hasn't ended yet. + $events[1]['start_unix_timestamp'] = strtotime( '2 seconds ago' ); + $events[1]['end_unix_timestamp'] = strtotime( '+1 hour' ); + + $actual = $trim_events->invoke( $this->instance, $events ); + + $this->assertCount( 2, $actual ); + $this->assertSame( $actual[0]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); + $this->assertSame( $actual[1]['title'], 'WordCamp San Francisco' ); + } + + /** + * Test: get_events() should return the events with the WordCamp pinned in the prepared list. + * + * @since 4.9.7 + * @since 5.5.2 Tests `trim_events()` directly instead of indirectly via `get_events()`. + * + * @covers WP_Community_Events::trim_events + */ + public function test_trim_events_pin_wordcamp() { + $trim_events = new ReflectionMethod( $this->instance, 'trim_events' ); + $trim_events->setAccessible( true ); + + $actual = $trim_events->invoke( $this->instance, $this->_events_with_unpinned_wordcamp() ); + + /* + * San Diego was at index 3 in the mock API response, but pinning puts it at index 2, + * so that it remains in the list. The other events should remain unchanged. + */ + $this->assertCount( 3, $actual ); + $this->assertSame( $actual[0]['title'], 'Flexbox + CSS Grid: Magic for Responsive Layouts' ); + $this->assertSame( $actual[1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); + $this->assertSame( $actual[2]['title'], 'WordCamp San Diego' ); + } + + /** + * Simulates a scenario where a WordCamp needs to be pinned higher than it's default position. + * + * @since 4.9.7 + * @since 5.5.2 Accepts and returns only the events, rather than an entire HTTP response. + * + * @return array A list of mock events. + */ + public function _events_with_unpinned_wordcamp() { + return array( + array( + 'type' => 'meetup', + 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', + 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', + 'meetup' => 'The East Bay WordPress Meetup Group', + 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', + 'start_unix_timestamp' => strtotime( 'next Monday 1pm' ), + 'end_unix_timestamp' => strtotime( 'next Monday 2pm' ), + + 'location' => array( + 'location' => 'Oakland, CA, USA', + 'country' => 'us', + 'latitude' => 37.808453, + 'longitude' => -122.26593, + ), + ), + + array( + 'type' => 'meetup', + 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', + 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', + 'meetup' => 'WordPress Bay Area Foothills Group', + 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', + 'start_unix_timestamp' => strtotime( 'next Tuesday 1:30pm' ), + 'end_unix_timestamp' => strtotime( 'next Tuesday 2:30pm' ), + + 'location' => array( + 'location' => 'Milpitas, CA, USA', + 'country' => 'us', + 'latitude' => 37.432813, + 'longitude' => -121.907095, + ), + ), + + array( + 'type' => 'meetup', + 'title' => 'WordPress Q&A', + 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', + 'meetup' => 'The San Jose WordPress Meetup', + 'meetup_url' => 'https://www.meetup.com/sanjosewp/', + 'start_unix_timestamp' => strtotime( 'next Wednesday 5:30pm' ), + 'end_unix_timestamp' => strtotime( 'next Wednesday 6:30pm' ), + + 'location' => array( + 'location' => 'Milpitas, CA, USA', + 'country' => 'us', + 'latitude' => 37.244194, + 'longitude' => -121.889313, + ), + ), + + array( + 'type' => 'wordcamp', + 'title' => 'WordCamp San Diego', + 'url' => 'https://2018.sandiego.wordcamp.org', + 'meetup' => null, + 'meetup_url' => null, + 'start_unix_timestamp' => strtotime( 'next Thursday 9am' ), + 'end_unix_timestamp' => strtotime( 'next Thursday 10am' ), + + 'location' => array( + 'location' => 'San Diego, CA', + 'country' => 'US', + 'latitude' => 32.7220419, + 'longitude' => -117.1534513, + ), + ), + ); + } + + /** + * Test: get_events() shouldn't stick an extra WordCamp when there's already one that naturally + * falls into the list. + * + * @since 4.9.7 + * @since 5.5.2 Tests `trim_events()` directly instead of indirectly via `get_events()`. + * + * @covers WP_Community_Events::trim_events + */ + public function test_trim_events_dont_pin_multiple_wordcamps() { + $trim_events = new ReflectionMethod( $this->instance, 'trim_events' ); + $trim_events->setAccessible( true ); + + $actual = $trim_events->invoke( $this->instance, $this->_events_with_multiple_wordcamps() ); + + /* + * The first meetup should be removed because it's expired, while the next 3 events are selected. + * WordCamp LA should not be stuck to the list, because San Diego already appears naturally. + */ + $this->assertCount( 3, $actual ); + $this->assertSame( $actual[0]['title'], 'WordCamp San Diego' ); + $this->assertSame( $actual[1]['title'], 'Part 3- Site Maintenance - Tools to Make It Easy' ); + $this->assertSame( $actual[2]['title'], 'WordPress Q&A' ); + } + + /** + * Simulates a valid HTTP response where a WordCamp needs to be pinned higher than it's default position. + * no need to pin extra camp b/c one already exists in response + * + * @since 4.9.7 + * @since 5.5.2 Tests `trim_events()` directly instead of indirectly via `get_events()`. + * + * @return array A mock HTTP response. + */ + public function _events_with_multiple_wordcamps() { + return array( + array( + 'type' => 'meetup', + 'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts', + 'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/', + 'meetup' => 'The East Bay WordPress Meetup Group', + 'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/', + 'start_unix_timestamp' => strtotime( '2 days ago' ) - HOUR_IN_SECONDS, + 'end_unix_timestamp' => strtotime( '2 days ago' ), + + 'location' => array( + 'location' => 'Oakland, CA, USA', + 'country' => 'us', + 'latitude' => 37.808453, + 'longitude' => -122.26593, + ), + ), + + array( + 'type' => 'wordcamp', + 'title' => 'WordCamp San Diego', + 'url' => 'https://2018.sandiego.wordcamp.org', + 'meetup' => null, + 'meetup_url' => null, + 'start_unix_timestamp' => strtotime( 'next Tuesday 9am' ), + 'end_unix_timestamp' => strtotime( 'next Tuesday 10am' ), + + 'location' => array( + 'location' => 'San Diego, CA', + 'country' => 'US', + 'latitude' => 32.7220419, + 'longitude' => -117.1534513, + ), + ), + + array( + 'type' => 'meetup', + 'title' => 'Part 3- Site Maintenance - Tools to Make It Easy', + 'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/', + 'meetup' => 'WordPress Bay Area Foothills Group', + 'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/', + 'start_unix_timestamp' => strtotime( 'next Wednesday 1:30pm' ), + 'end_unix_timestamp' => strtotime( 'next Wednesday 2:30pm' ), + + 'location' => array( + 'location' => 'Milpitas, CA, USA', + 'country' => 'us', + 'latitude' => 37.432813, + 'longitude' => -121.907095, + ), + ), + + array( + 'type' => 'meetup', + 'title' => 'WordPress Q&A', + 'url' => 'https://www.meetup.com/sanjosewp/events/245419844/', + 'meetup' => 'The San Jose WordPress Meetup', + 'meetup_url' => 'https://www.meetup.com/sanjosewp/', + 'start_unix_timestamp' => strtotime( 'next Thursday 5:30pm' ), + 'end_unix_timestamp' => strtotime( 'next Thursday 6:30pm' ), + + 'location' => array( + 'location' => 'Milpitas, CA, USA', + 'country' => 'us', + 'latitude' => 37.244194, + 'longitude' => -121.889313, + ), + ), + + array( + 'type' => 'wordcamp', + 'title' => 'WordCamp Los Angeles', + 'url' => 'https://2018.la.wordcamp.org', + 'meetup' => null, + 'meetup_url' => null, + 'start_unix_timestamp' => strtotime( 'next Friday 9am' ), + 'end_unix_timestamp' => strtotime( 'next Friday 10am' ), + + 'location' => array( + 'location' => 'Los Angeles, CA', + 'country' => 'US', + 'latitude' => 34.050888, + 'longitude' => -118.285426, + ), + ), + ); + } + + /** + * Test that get_unsafe_client_ip() properly anonymizes all possible address formats + * + * @dataProvider data_get_unsafe_client_ip + * + * @ticket 41083 + * + * @covers WP_Community_Events::get_unsafe_client_ip + */ + public function test_get_unsafe_client_ip( $raw_ip, $expected_result ) { + $_SERVER['REMOTE_ADDR'] = 'this should not be used'; + $_SERVER['HTTP_CLIENT_IP'] = $raw_ip; + $actual_result = WP_Community_Events::get_unsafe_client_ip(); + + $this->assertSame( $expected_result, $actual_result ); + } + + /** + * Provide test cases for `test_get_unsafe_client_ip()`. + * + * @return array + */ + public function data_get_unsafe_client_ip() { + return array( + // Handle '::' returned from `wp_privacy_anonymize_ip()`. + array( + 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001', + false, + ), + + // Handle '0.0.0.0' returned from `wp_privacy_anonymize_ip()`. + array( + 'unknown', + false, + ), + + // Valid IPv4. + array( + '198.143.164.252', + '198.143.164.0', + ), + + // Valid IPv6. + array( + '2a03:2880:2110:df07:face:b00c::1', + '2a03:2880:2110:df07::', + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/wpMediaListTable.php b/tests/phpunit/tests/admin/wpMediaListTable.php new file mode 100644 index 0000000000000..6a2b2d64fa8a7 --- /dev/null +++ b/tests/phpunit/tests/admin/wpMediaListTable.php @@ -0,0 +1,50 @@ +getMockBuilder( WP_Media_List_Table::class ) + ->disableOriginalConstructor() + ->disallowMockingUnknownTypes() + ->setMethods( array( 'set_pagination_args' ) ) + ->getMock(); + + $mock->expects( $this->once() ) + ->method( 'set_pagination_args' ); + + $wp_query->query_vars['posts_per_page'] = 10; + delete_option( 'cron' ); + + // Verify that the cause of the error is in place. + $this->assertFalse( _get_cron_array(), '_get_cron_array() does not return false' ); + + // If this test does not error out due to the PHP warning, we're good. + $mock->prepare_items(); + } +} diff --git a/tests/phpunit/tests/admin/includesListTable.php b/tests/phpunit/tests/admin/wpPostsListTable.php similarity index 74% rename from tests/phpunit/tests/admin/includesListTable.php rename to tests/phpunit/tests/admin/wpPostsListTable.php index 9edbea1793358..306fddb65d9fa 100644 --- a/tests/phpunit/tests/admin/includesListTable.php +++ b/tests/phpunit/tests/admin/wpPostsListTable.php @@ -3,7 +3,7 @@ /** * @group admin */ -class Tests_Admin_includesListTable extends WP_UnitTestCase { +class Tests_Admin_wpPostsListTable extends WP_UnitTestCase { protected static $top = array(); protected static $children = array(); protected static $grandchildren = array(); @@ -14,12 +14,12 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase { */ protected $table; - function setUp() { - parent::setUp(); + function set_up() { + parent::set_up(); $this->table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => 'edit-page' ) ); } - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { // Note that our top/children/grandchildren arrays are 1-indexed. // Create top-level pages. @@ -75,6 +75,9 @@ public static function wpSetUpBeforeClass( $factory ) { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_list_hierarchical_pages_first_page() { $this->_test_list_hierarchical_page( @@ -91,6 +94,9 @@ function test_list_hierarchical_pages_first_page() { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_list_hierarchical_pages_second_page() { $this->_test_list_hierarchical_page( @@ -108,6 +114,9 @@ function test_list_hierarchical_pages_second_page() { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_search_hierarchical_pages_first_page() { $this->_test_list_hierarchical_page( @@ -125,6 +134,9 @@ function test_search_hierarchical_pages_first_page() { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_search_hierarchical_pages_second_page() { $this->_test_list_hierarchical_page( @@ -142,6 +154,9 @@ function test_search_hierarchical_pages_second_page() { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_grandchildren_hierarchical_pages_first_page() { // Page 6 is the first page with grandchildren. @@ -161,6 +176,9 @@ function test_grandchildren_hierarchical_pages_first_page() { /** * @ticket 15459 + * + * @covers WP_Posts_List_Table::display_rows + * @covers WP_Posts_List_Table::set_hierarchical_display */ function test_grandchildren_hierarchical_pages_second_page() { // Page 7 is the second page with grandchildren. @@ -185,6 +203,16 @@ function test_grandchildren_hierarchical_pages_second_page() { * @param array $expected_ids Expected IDs of pages returned. */ protected function _test_list_hierarchical_page( array $args, array $expected_ids ) { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $matches = array(); $_REQUEST['paged'] = $args['paged']; @@ -205,12 +233,14 @@ protected function _test_list_hierarchical_page( array $args, array $expected_id $args['posts_per_archive_page'] = -1; } + // Effectively ignore the output until retrieving it later via `getActualOutput()`. + $this->expectOutputRegex( '`.`' ); + $pages = new WP_Query( $args ); - ob_start(); $this->table->set_hierarchical_display( true ); $this->table->display_rows( $pages->posts ); - $output = ob_get_clean(); + $output = $this->getActualOutput(); // Clean up. unset( $_REQUEST['paged'] ); @@ -221,12 +251,14 @@ protected function _test_list_hierarchical_page( array $args, array $expected_id $this->assertCount( count( $expected_ids ), array_keys( $matches[0] ) ); foreach ( $expected_ids as $id ) { - $this->assertContains( sprintf( 'id="post-%d"', $id ), $output ); + $this->assertStringContainsString( sprintf( 'id="post-%d"', $id ), $output ); } } /** * @ticket 37407 + * + * @covers WP_Posts_List_Table::extra_tablenav */ function test_filter_button_should_not_be_shown_if_there_are_no_posts() { // Set post type to a non-existent one. @@ -236,11 +268,13 @@ function test_filter_button_should_not_be_shown_if_there_are_no_posts() { $this->table->extra_tablenav( 'top' ); $output = ob_get_clean(); - $this->assertNotContains( 'id="post-query-submit"', $output ); + $this->assertStringNotContainsString( 'id="post-query-submit"', $output ); } /** * @ticket 37407 + * + * @covers WP_Posts_List_Table::extra_tablenav */ function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() { // Set post type to a non-existent one. @@ -250,11 +284,13 @@ function test_months_dropdown_should_not_be_shown_if_there_are_no_posts() { $this->table->extra_tablenav( 'top' ); $output = ob_get_clean(); - $this->assertNotContains( 'id="filter-by-date"', $output ); + $this->assertStringNotContainsString( 'id="filter-by-date"', $output ); } /** * @ticket 37407 + * + * @covers WP_Posts_List_Table::extra_tablenav */ function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() { // Set post type to a non-existent one. @@ -264,11 +300,13 @@ function test_category_dropdown_should_not_be_shown_if_there_are_no_posts() { $this->table->extra_tablenav( 'top' ); $output = ob_get_clean(); - $this->assertNotContains( 'id="cat"', $output ); + $this->assertStringNotContainsString( 'id="cat"', $output ); } /** * @ticket 38341 + * + * @covers WP_Posts_List_Table::extra_tablenav */ public function test_empty_trash_button_should_not_be_shown_if_there_are_no_posts() { // Set post type to a non-existent one. @@ -278,19 +316,7 @@ public function test_empty_trash_button_should_not_be_shown_if_there_are_no_post $this->table->extra_tablenav( 'top' ); $output = ob_get_clean(); - $this->assertNotContains( 'id="delete_all"', $output ); + $this->assertStringNotContainsString( 'id="delete_all"', $output ); } - /** - * @ticket 38341 - */ - public function test_empty_trash_button_should_not_be_shown_if_there_are_no_comments() { - $table = _get_list_table( 'WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); - - ob_start(); - $table->extra_tablenav( 'top' ); - $output = ob_get_clean(); - - $this->assertNotContains( 'id="delete_all"', $output ); - } } diff --git a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php index debe163862a2c..1b7eeca52690a 100644 --- a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php +++ b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php @@ -8,20 +8,20 @@ */ /** - * Tests_Admin_WpPrivacyRequestsTable class. + * Tests_Admin_wpPrivacyRequestsTable class. * * @group admin * @group privacy * * @since 5.1.0 */ -class Tests_Admin_WpPrivacyRequestsTable extends WP_UnitTestCase { +class Tests_Admin_wpPrivacyRequestsTable extends WP_UnitTestCase { /** * Get instance for mocked class. * * @since 5.1.0 * - * @return PHPUnit_Framework_MockObject_MockObject|WP_Privacy_Requests_Table $instance Mocked class instance. + * @return PHPUnit_Framework_MockObject_MockObject|WP_Privacy_Requests_Table Mocked class instance. */ public function get_mocked_class_instance() { $args = array( @@ -61,7 +61,7 @@ public function get_mocked_class_instance() { * @param string $expected Expected in SQL query. * @dataProvider data_test_columns_should_be_sortable - * @covers WP_Privacy_Requests_Table::prepare_items() + * @covers WP_Privacy_Requests_Table::prepare_items * @ticket 43960 */ public function test_columns_should_be_sortable( $order, $orderby, $search, $expected ) { @@ -82,7 +82,7 @@ public function test_columns_should_be_sortable( $order, $orderby, $search, $exp unset( $_REQUEST['orderby'] ); unset( $_REQUEST['s'] ); - $this->assertContains( "ORDER BY {$wpdb->posts}.{$expected}", $this->sql ); + $this->assertStringContainsString( "ORDER BY {$wpdb->posts}.{$expected}", $this->sql ); } /** @@ -91,7 +91,7 @@ public function test_columns_should_be_sortable( $order, $orderby, $search, $exp * @since 5.1.0 * * @param string $request The complete SQL query. - * @return string $request The complete SQL query. + * @return string The complete SQL query. */ public function filter_posts_request( $request ) { $this->sql = $request; diff --git a/tests/phpunit/tests/adminbar.php b/tests/phpunit/tests/adminbar.php index 27f8c1ffacc70..24ace35da4133 100644 --- a/tests/phpunit/tests/adminbar.php +++ b/tests/phpunit/tests/adminbar.php @@ -14,13 +14,13 @@ class Tests_AdminBar extends WP_UnitTestCase { protected static $user_ids = array(); - public static function setUpBeforeClass() { - require_once ABSPATH . WPINC . '/class-wp-admin-bar.php'; + public static function set_up_before_class() { + parent::set_up_before_class(); - parent::setUpBeforeClass(); + require_once ABSPATH . WPINC . '/class-wp-admin-bar.php'; } - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) ); self::$user_ids[] = self::$editor_id; self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) ); @@ -32,7 +32,7 @@ public static function wpSetUpBeforeClass( $factory ) { /** * @ticket 21117 */ - function test_content_post_type() { + public function test_content_post_type() { wp_set_current_user( self::$editor_id ); register_post_type( 'content', array( 'show_in_admin_bar' => true ) ); @@ -43,7 +43,7 @@ function test_content_post_type() { $nodes = $admin_bar->get_nodes(); $this->assertFalse( $nodes['new-content']->parent ); - $this->assertEquals( 'new-content', $nodes['add-new-content']->parent ); + $this->assertSame( 'new-content', $nodes['add-new-content']->parent ); _unregister_post_type( 'content' ); } @@ -51,7 +51,7 @@ function test_content_post_type() { /** * @ticket 21117 */ - function test_merging_existing_meta_values() { + public function test_merging_existing_meta_values() { wp_set_current_user( self::$editor_id ); $admin_bar = new WP_Admin_Bar; @@ -64,7 +64,7 @@ function test_merging_existing_meta_values() { ); $node1 = $admin_bar->get_node( 'test-node' ); - $this->assertEquals( array( 'class' => 'test-class' ), $node1->meta ); + $this->assertSame( array( 'class' => 'test-class' ), $node1->meta ); $admin_bar->add_node( array( @@ -74,7 +74,7 @@ function test_merging_existing_meta_values() { ); $node2 = $admin_bar->get_node( 'test-node' ); - $this->assertEquals( + $this->assertSame( array( 'class' => 'test-class', 'some-meta' => 'value', @@ -100,7 +100,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role() { $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' ); // Site menu points to the home page instead of the admin URL. - $this->assertEquals( home_url( '/' ), $node_site_name->href ); + $this->assertSame( home_url( '/' ), $node_site_name->href ); // No profile links as the user doesn't have any permissions on the site. $this->assertFalse( $node_my_account->href ); @@ -125,14 +125,14 @@ public function test_admin_bar_contains_correct_links_for_users_with_role() { $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' ); // Site menu points to the admin URL. - $this->assertEquals( admin_url( '/' ), $node_site_name->href ); + $this->assertSame( admin_url( '/' ), $node_site_name->href ); $profile_url = admin_url( 'profile.php' ); // Profile URLs point to profile.php. - $this->assertEquals( $profile_url, $node_my_account->href ); - $this->assertEquals( $profile_url, $node_user_info->href ); - $this->assertEquals( $profile_url, $node_edit_profile->href ); + $this->assertSame( $profile_url, $node_my_account->href ); + $this->assertSame( $profile_url, $node_user_info->href ); + $this->assertSame( $profile_url, $node_edit_profile->href ); } /** @@ -166,7 +166,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_ // Get primary blog. $primary = get_active_blog_for_user( self::$editor_id ); - $this->assertInternalType( 'object', $primary ); + $this->assertIsObject( $primary ); // No Site menu as the user isn't a member of this blog. $this->assertNull( $node_site_name ); @@ -177,9 +177,9 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_ $this->assertNotEquals( $primary_profile_url, admin_url( 'profile.php' ) ); // Profile URLs should go to the user's primary blog. - $this->assertEquals( $primary_profile_url, $node_my_account->href ); - $this->assertEquals( $primary_profile_url, $node_user_info->href ); - $this->assertEquals( $primary_profile_url, $node_edit_profile->href ); + $this->assertSame( $primary_profile_url, $node_my_account->href ); + $this->assertSame( $primary_profile_url, $node_user_info->href ); + $this->assertSame( $primary_profile_url, $node_edit_profile->href ); restore_current_blog(); } @@ -232,9 +232,9 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_ $this->assertNotEquals( $user_profile_url, admin_url( 'profile.php' ) ); // Profile URLs should go to the user's primary blog. - $this->assertEquals( $user_profile_url, $node_my_account->href ); - $this->assertEquals( $user_profile_url, $node_user_info->href ); - $this->assertEquals( $user_profile_url, $node_edit_profile->href ); + $this->assertSame( $user_profile_url, $node_my_account->href ); + $this->assertSame( $user_profile_url, $node_user_info->href ); + $this->assertSame( $user_profile_url, $node_edit_profile->href ); restore_current_blog(); } @@ -264,7 +264,7 @@ public function test_admin_bar_with_tabindex_meta( $node_data, $expected_html ) $admin_bar = new WP_Admin_Bar(); $admin_bar->add_node( $node_data ); $admin_bar_html = get_echo( array( $admin_bar, 'render' ) ); - $this->assertContains( $expected_html, $admin_bar_html ); + $this->assertStringContainsString( $expected_html, $admin_bar_html ); } /** @@ -400,8 +400,6 @@ public function test_admin_bar_has_no_archives_link_if_no_static_front_page() { $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); - $this->assertNull( $node ); } @@ -415,8 +413,6 @@ public function test_admin_bar_contains_view_archive_link_if_static_front_page() $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); - $this->assertNotNull( $node ); } @@ -429,8 +425,6 @@ public function test_admin_bar_has_no_archives_link_for_pages() { $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); - $this->assertNull( $node ); } @@ -463,7 +457,7 @@ public function test_admin_bar_contains_correct_about_link_for_users_with_no_rol $about_node = $wp_admin_bar->get_node( 'about' ); $this->assertNotNull( $wp_logo_node ); - $this->assertSame( false, $wp_logo_node->href ); + $this->assertFalse( $wp_logo_node->href ); $this->assertArrayHasKey( 'tabindex', $wp_logo_node->meta ); $this->assertSame( 0, $wp_logo_node->meta['tabindex'] ); $this->assertNull( $about_node ); @@ -508,7 +502,6 @@ public function test_admin_bar_has_no_archives_link_for_non_public_cpt() { $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); unregister_post_type( 'foo-non-public' ); $this->assertNull( $node ); @@ -532,7 +525,6 @@ public function test_admin_bar_has_no_archives_link_for_cpt_without_archive() { $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); unregister_post_type( 'foo-non-public' ); $this->assertNull( $node ); @@ -556,7 +548,6 @@ public function test_admin_bar_has_no_archives_link_for_cpt_not_shown_in_admin_b $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'archive' ); - set_current_screen( 'front' ); unregister_post_type( 'foo-non-public' ); $this->assertNull( $node ); @@ -679,7 +670,6 @@ public function test_customize_link() { ); $wp_customize->start_previewing_theme(); - set_current_screen( 'front' ); $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'customize' ); $this->assertNotEmpty( $node ); @@ -687,8 +677,8 @@ public function test_customize_link() { $parsed_url = wp_parse_url( $node->href ); $query_params = array(); wp_parse_str( $parsed_url['query'], $query_params ); - $this->assertEquals( $uuid, $query_params['changeset_uuid'] ); - $this->assertNotContains( 'changeset_uuid', $query_params['url'] ); + $this->assertSame( $uuid, $query_params['changeset_uuid'] ); + $this->assertStringNotContainsString( 'changeset_uuid', $query_params['url'] ); } /** @@ -702,7 +692,7 @@ public function test_my_sites_network_menu_for_regular_user() { $nodes = $wp_admin_bar->get_nodes(); foreach ( $this->get_my_sites_network_menu_items() as $id => $cap ) { - $this->assertFalse( isset( $nodes[ $id ] ), sprintf( 'Menu item %s must not display for a regular user.', $id ) ); + $this->assertArrayNotHasKey( $id, $nodes, sprintf( 'Menu item %s must not display for a regular user.', $id ) ); } } @@ -719,7 +709,7 @@ public function test_my_sites_network_menu_for_super_admin() { $nodes = $wp_admin_bar->get_nodes(); foreach ( $this->get_my_sites_network_menu_items() as $id => $cap ) { - $this->assertTrue( isset( $nodes[ $id ] ), sprintf( 'Menu item %s must display for a super admin.', $id ) ); + $this->assertArrayHasKey( $id, $nodes, sprintf( 'Menu item %s must display for a super admin.', $id ) ); } } @@ -745,9 +735,9 @@ public function test_my_sites_network_menu_for_regular_user_with_network_caps() $nodes = $wp_admin_bar->get_nodes(); foreach ( $this->get_my_sites_network_menu_items() as $id => $cap ) { if ( in_array( $cap, $network_user_caps, true ) ) { - $this->assertTrue( isset( $nodes[ $id ] ), sprintf( 'Menu item %1$s must display for a user with the %2$s cap.', $id, $cap ) ); + $this->assertArrayHasKey( $id, $nodes, sprintf( 'Menu item %1$s must display for a user with the %2$s cap.', $id, $cap ) ); } else { - $this->assertFalse( isset( $nodes[ $id ] ), sprintf( 'Menu item %1$s must not display for a user without the %2$s cap.', $id, $cap ) ); + $this->assertArrayNotHasKey( $id, $nodes, sprintf( 'Menu item %1$s must not display for a user without the %2$s cap.', $id, $cap ) ); } } } diff --git a/tests/phpunit/tests/ajax/AddMeta.php b/tests/phpunit/tests/ajax/AddMeta.php index 964802d1b156b..12ec710a0d272 100644 --- a/tests/phpunit/tests/ajax/AddMeta.php +++ b/tests/phpunit/tests/ajax/AddMeta.php @@ -34,7 +34,7 @@ public function test_post_add_meta_empty_is_allowed_ajax() { unset( $e ); } - $this->assertEquals( '', get_post_meta( $p, 'testkey', true ) ); + $this->assertSame( '', get_post_meta( $p, 'testkey', true ) ); } /** @@ -66,6 +66,6 @@ public function test_post_update_meta_empty_is_allowed_ajax() { unset( $e ); } - $this->assertEquals( '', get_post_meta( $p, 'testkey', true ) ); + $this->assertSame( '', get_post_meta( $p, 'testkey', true ) ); } } diff --git a/tests/phpunit/tests/ajax/Attachments.php b/tests/phpunit/tests/ajax/Attachments.php index 47d5aba579c93..657213d27841d 100644 --- a/tests/phpunit/tests/ajax/Attachments.php +++ b/tests/phpunit/tests/ajax/Attachments.php @@ -58,11 +58,12 @@ public function test_wp_ajax_send_attachment_to_editor_should_return_an_image() // Ensure everything is correct. $this->assertTrue( $response['success'] ); - $this->assertEquals( $expected, $response['data'] ); + $this->assertSame( $expected, $response['data'] ); } /** * @ticket 36578 + * @group ms-excluded */ public function test_wp_ajax_send_attachment_to_editor_should_return_a_link() { // Become an administrator. @@ -111,6 +112,6 @@ public function test_wp_ajax_send_attachment_to_editor_should_return_a_link() { // Ensure everything is correct. $this->assertTrue( $response['success'] ); - $this->assertEquals( $expected, $response['data'] ); + $this->assertSame( $expected, $response['data'] ); } } diff --git a/tests/phpunit/tests/ajax/Autosave.php b/tests/phpunit/tests/ajax/Autosave.php index c81b51fa2e1fa..4966f392dc744 100644 --- a/tests/phpunit/tests/ajax/Autosave.php +++ b/tests/phpunit/tests/ajax/Autosave.php @@ -28,29 +28,21 @@ class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase { protected static $post_id; protected static $user_ids = array(); - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) ); self::$user_ids[] = self::$admin_id; self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) ); self::$user_ids[] = self::$editor_id; - self::$post_id = $factory->post->create( array( 'post_status' => 'draft' ) ); - self::$post = get_post( self::$post_id ); - } - - /** - * Set up the test fixture - */ - public function setUp() { - parent::setUp(); // Set a user so the $post has 'post_author'. wp_set_current_user( self::$admin_id ); + + self::$post_id = $factory->post->create( array( 'post_status' => 'draft' ) ); + self::$post = get_post( self::$post_id ); } /** - * Test autosaving a post - * - * @return void + * Tests autosaving a post. */ public function test_autosave_post() { // The original post_author. @@ -64,7 +56,7 @@ public function test_autosave_post() { 'data' => array( 'wp_autosave' => array( 'post_id' => self::$post_id, - '_wpnonce' => wp_create_nonce( 'update-post_' . self::$post->ID ), + '_wpnonce' => wp_create_nonce( 'update-post_' . self::$post_id ), 'post_content' => self::$post->post_content . PHP_EOL . $md5, 'post_type' => 'post', ), @@ -87,13 +79,11 @@ public function test_autosave_post() { // Check that the edit happened. $post = get_post( self::$post_id ); - $this->assertGreaterThanOrEqual( 0, strpos( self::$post->post_content, $md5 ) ); + $this->assertStringContainsString( $md5, $post->post_content ); } /** - * Test autosaving a locked post - * - * @return void + * Tests autosaving a locked post. */ public function test_autosave_locked_post() { // Lock the post to another user. @@ -135,18 +125,16 @@ public function test_autosave_locked_post() { // Check that the original post was NOT edited. $post = get_post( self::$post_id ); - $this->assertFalse( strpos( $post->post_content, $md5 ) ); + $this->assertStringNotContainsString( $md5, $post->post_content ); // Check if the autosave post was created. $autosave = wp_get_post_autosave( self::$post_id, get_current_user_id() ); $this->assertNotEmpty( $autosave ); - $this->assertGreaterThanOrEqual( 0, strpos( $autosave->post_content, $md5 ) ); + $this->assertStringContainsString( $md5, $autosave->post_content ); } /** - * Test with an invalid nonce - * - * @return void + * Tests with an invalid nonce. */ public function test_with_invalid_nonce() { diff --git a/tests/phpunit/tests/ajax/Compression.php b/tests/phpunit/tests/ajax/Compression.php index 92516cb575970..e900b85375953 100644 --- a/tests/phpunit/tests/ajax/Compression.php +++ b/tests/phpunit/tests/ajax/Compression.php @@ -25,7 +25,8 @@ public function test_logged_out() { $_GET['test'] = 1; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'wp-compression-test' ); } @@ -48,18 +49,16 @@ public function test_text() { } // Ensure we found the right match. - $this->assertContains( 'wpCompressionTest', $this->_last_response ); + $this->assertStringContainsString( 'wpCompressionTest', $this->_last_response ); } /** * Fetch the test text (gzdeflate) + * + * @requires function gzdeflate */ public function test_gzdeflate() { - if ( ! function_exists( 'gzdeflate' ) ) { - $this->fail( 'gzdeflate function not available' ); - } - // Become an administrator. $this->_setRole( 'administrator' ); @@ -75,18 +74,16 @@ public function test_gzdeflate() { } // Ensure we found the right match. - $this->assertContains( 'wpCompressionTest', gzinflate( $this->_last_response ) ); + $this->assertStringContainsString( 'wpCompressionTest', gzinflate( $this->_last_response ) ); } /** * Fetch the test text (gzencode) + * + * @requires function gzencode */ public function test_gzencode() { - if ( ! function_exists( 'gzencode' ) ) { - $this->fail( 'gzencode function not available' ); - } - // Become an administrator. $this->_setRole( 'administrator' ); @@ -102,7 +99,7 @@ public function test_gzencode() { } // Ensure we found the right match. - $this->assertContains( 'wpCompressionTest', $this->_gzdecode( $this->_last_response ) ); + $this->assertStringContainsString( 'wpCompressionTest', $this->_gzdecode( $this->_last_response ) ); } /** @@ -118,7 +115,8 @@ public function test_unknown_encoding() { $_SERVER['HTTP_ACCEPT_ENCODING'] = 'unknown'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'wp-compression-test' ); } @@ -144,7 +142,7 @@ public function test_set_yes() { } // Check the site option is not changed due to lack of nonce. - $this->assertEquals( 0, get_site_option( 'can_compress_scripts' ) ); + $this->assertSame( 0, get_site_option( 'can_compress_scripts' ) ); // Add a nonce. $_GET['_ajax_nonce'] = wp_create_nonce( 'update_can_compress_scripts' ); @@ -157,7 +155,7 @@ public function test_set_yes() { } // Check the site option is changed. - $this->assertEquals( 1, get_site_option( 'can_compress_scripts' ) ); + $this->assertSame( 1, get_site_option( 'can_compress_scripts' ) ); } /** @@ -182,7 +180,7 @@ public function test_set_no() { } // Check the site option is not changed due to lack of nonce. - $this->assertEquals( 1, get_site_option( 'can_compress_scripts' ) ); + $this->assertSame( 1, get_site_option( 'can_compress_scripts' ) ); // Add a nonce. $_GET['_ajax_nonce'] = wp_create_nonce( 'update_can_compress_scripts' ); @@ -195,7 +193,7 @@ public function test_set_no() { } // Check the site option is changed. - $this->assertEquals( 0, get_site_option( 'can_compress_scripts' ) ); + $this->assertSame( 0, get_site_option( 'can_compress_scripts' ) ); } /** diff --git a/tests/phpunit/tests/ajax/CustomizeManager.php b/tests/phpunit/tests/ajax/CustomizeManager.php index d0c70893d37ae..16a029c4f400e 100644 --- a/tests/phpunit/tests/ajax/CustomizeManager.php +++ b/tests/phpunit/tests/ajax/CustomizeManager.php @@ -42,7 +42,7 @@ class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { * * @param WP_UnitTest_Factory $factory Factory. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$subscriber_user_id = $factory->user->create( array( 'role' => 'subscriber' ) ); self::$admin_user_id = $factory->user->create( array( 'role' => 'administrator' ) ); } @@ -50,17 +50,17 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Set up the test fixture. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; } /** * Tear down. */ - public function tearDown() { - parent::tearDown(); + public function tear_down() { $_REQUEST = array(); + parent::tear_down(); } /** @@ -94,7 +94,7 @@ protected function make_ajax_call( $action ) { * @param array $allcaps An array of all the user's capabilities. * @return array All caps. */ - function filter_user_has_cap( $allcaps ) { + public function filter_user_has_cap( $allcaps ) { $allcaps = array_merge( $allcaps, $this->overridden_caps ); return $allcaps; } @@ -103,9 +103,9 @@ function filter_user_has_cap( $allcaps ) { * Test WP_Customize_Manager::save(). * * @ticket 30937 - * @covers WP_Customize_Manager::save() + * @covers WP_Customize_Manager::save */ - function test_save_failures() { + public function test_save_failures() { global $wp_customize; $wp_customize = new WP_Customize_Manager(); $wp_customize->register_controls(); @@ -115,7 +115,7 @@ function test_save_failures() { wp_set_current_user( 0 ); $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'unauthenticated', $this->_last_response_parsed['data'] ); + $this->assertSame( 'unauthenticated', $this->_last_response_parsed['data'] ); // Unauthorized. wp_set_current_user( self::$subscriber_user_id ); @@ -141,7 +141,7 @@ function test_save_failures() { $_REQUEST['nonce'] = $nonce; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'not_preview', $this->_last_response_parsed['data'] ); + $this->assertSame( 'not_preview', $this->_last_response_parsed['data'] ); // Bad nonce. $_POST['nonce'] = 'bad'; @@ -150,7 +150,7 @@ function test_save_failures() { $wp_customize->setup_theme(); $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'invalid_nonce', $this->_last_response_parsed['data'] ); + $this->assertSame( 'invalid_nonce', $this->_last_response_parsed['data'] ); // User cannot create. $nonce = wp_create_nonce( 'save-customize_' . $wp_customize->get_stylesheet() ); @@ -161,7 +161,7 @@ function test_save_failures() { $post_type_obj->cap->create_posts = 'create_customize_changesets'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'cannot_create_changeset_post', $this->_last_response_parsed['data'] ); + $this->assertSame( 'cannot_create_changeset_post', $this->_last_response_parsed['data'] ); $this->overridden_caps[ $post_type_obj->cap->create_posts ] = true; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); @@ -172,7 +172,7 @@ function test_save_failures() { $wp_customize->save_changeset_post( array( 'status' => 'publish' ) ); $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_already_published', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'changeset_already_published', $this->_last_response_parsed['data']['code'] ); wp_update_post( array( 'ID' => $wp_customize->changeset_post_id(), @@ -185,7 +185,7 @@ function test_save_failures() { $post_type_obj->cap->edit_post = 'edit_customize_changesets'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'cannot_edit_changeset_post', $this->_last_response_parsed['data'] ); + $this->assertSame( 'cannot_edit_changeset_post', $this->_last_response_parsed['data'] ); $this->overridden_caps[ $post_type_obj->cap->edit_post ] = true; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); @@ -195,14 +195,14 @@ function test_save_failures() { $_POST['customize_changeset_data'] = '[MALFORMED]'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'invalid_customize_changeset_data', $this->_last_response_parsed['data'] ); + $this->assertSame( 'invalid_customize_changeset_data', $this->_last_response_parsed['data'] ); // Bad customize_changeset_status. $_POST['customize_changeset_data'] = '{}'; $_POST['customize_changeset_status'] = 'unrecognized'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'bad_customize_changeset_status', $this->_last_response_parsed['data'] ); + $this->assertSame( 'bad_customize_changeset_status', $this->_last_response_parsed['data'] ); // Disallowed publish posts if not allowed. $post_type_obj = get_post_type_object( 'customize_changeset' ); @@ -210,11 +210,11 @@ function test_save_failures() { $_POST['customize_changeset_status'] = 'publish'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_publish_unauthorized', $this->_last_response_parsed['data'] ); + $this->assertSame( 'changeset_publish_unauthorized', $this->_last_response_parsed['data'] ); $_POST['customize_changeset_status'] = 'future'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_publish_unauthorized', $this->_last_response_parsed['data'] ); + $this->assertSame( 'changeset_publish_unauthorized', $this->_last_response_parsed['data'] ); $post_type_obj->cap->publish_posts = 'customize'; // Restore. // Validate date. @@ -222,11 +222,11 @@ function test_save_failures() { $_POST['customize_changeset_date'] = 'BAD DATE'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'bad_customize_changeset_date', $this->_last_response_parsed['data'] ); + $this->assertSame( 'bad_customize_changeset_date', $this->_last_response_parsed['data'] ); $_POST['customize_changeset_date'] = '2010-01-01 00:00:00'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'not_future_date', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'not_future_date', $this->_last_response_parsed['data']['code'] ); $_POST['customize_changeset_date'] = ( gmdate( 'Y' ) + 1 ) . '-01-01 00:00:00'; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); @@ -234,7 +234,7 @@ function test_save_failures() { $_POST['customize_changeset_date'] = '+10 minutes'; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'future', get_post_status( $wp_customize->changeset_post_id() ) ); + $this->assertSame( 'future', get_post_status( $wp_customize->changeset_post_id() ) ); wp_update_post( array( 'ID' => $wp_customize->changeset_post_id(), @@ -270,9 +270,9 @@ protected function set_up_valid_state( $uuid = null ) { * Test WP_Customize_Manager::save(). * * @ticket 30937 - * @covers WP_Customize_Manager::save() + * @covers WP_Customize_Manager::save */ - function test_save_success_publish_create() { + public function test_save_success_publish_create() { $wp_customize = $this->set_up_valid_state(); $_POST['customize_changeset_status'] = 'publish'; @@ -286,22 +286,22 @@ function test_save_success_publish_create() { ); $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertInternalType( 'array', $this->_last_response_parsed['data'] ); + $this->assertIsArray( $this->_last_response_parsed['data'] ); - $this->assertEquals( 'publish', $this->_last_response_parsed['data']['changeset_status'] ); + $this->assertSame( 'publish', $this->_last_response_parsed['data']['changeset_status'] ); $this->assertArrayHasKey( 'next_changeset_uuid', $this->_last_response_parsed['data'] ); $this->assertTrue( wp_is_uuid( $this->_last_response_parsed['data']['next_changeset_uuid'], 4 ) ); - $this->assertEquals( 'Success Changeset', get_post( $wp_customize->changeset_post_id() )->post_title ); - $this->assertEquals( 'Successful Site Title', get_option( 'blogname' ) ); + $this->assertSame( 'Success Changeset', get_post( $wp_customize->changeset_post_id() )->post_title ); + $this->assertSame( 'Successful Site Title', get_option( 'blogname' ) ); } /** * Test WP_Customize_Manager::save(). * * @ticket 30937 - * @covers WP_Customize_Manager::save() + * @covers WP_Customize_Manager::save */ - function test_save_success_publish_edit() { + public function test_save_success_publish_edit() { $uuid = wp_generate_uuid4(); $post_id = $this->factory()->post->create( @@ -325,22 +325,22 @@ function test_save_success_publish_edit() { $_POST['customize_changeset_title'] = 'Published'; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertInternalType( 'array', $this->_last_response_parsed['data'] ); + $this->assertIsArray( $this->_last_response_parsed['data'] ); - $this->assertEquals( 'publish', $this->_last_response_parsed['data']['changeset_status'] ); + $this->assertSame( 'publish', $this->_last_response_parsed['data']['changeset_status'] ); $this->assertArrayHasKey( 'next_changeset_uuid', $this->_last_response_parsed['data'] ); $this->assertTrue( wp_is_uuid( $this->_last_response_parsed['data']['next_changeset_uuid'], 4 ) ); - $this->assertEquals( 'New Site Title', get_option( 'blogname' ) ); - $this->assertEquals( 'Published', get_post( $post_id )->post_title ); + $this->assertSame( 'New Site Title', get_option( 'blogname' ) ); + $this->assertSame( 'Published', get_post( $post_id )->post_title ); } /** * Test WP_Customize_Manager::save(). * * @ticket 38943 - * @covers WP_Customize_Manager::save() + * @covers WP_Customize_Manager::save */ - function test_success_save_post_date() { + public function test_success_save_post_date() { $uuid = wp_generate_uuid4(); $post_id = $this->factory()->post->create( array( @@ -368,7 +368,7 @@ function test_success_save_post_date() { $this->assertTrue( $this->_last_response_parsed['success'] ); $this->assertArrayHasKey( 'changeset_date', $this->_last_response_parsed['data'] ); $changeset_post_schedule = get_post( $post_id ); - $this->assertEquals( $future_date, $changeset_post_schedule->post_date ); + $this->assertSame( $future_date, $changeset_post_schedule->post_date ); // Success future changeset change to draft keeping existing date. unset( $_POST['customize_changeset_date'] ); @@ -377,7 +377,7 @@ function test_success_save_post_date() { $this->assertTrue( $this->_last_response_parsed['success'] ); $this->assertArrayNotHasKey( 'changeset_date', $this->_last_response_parsed['data'] ); $changeset_post_draft = get_post( $post_id ); - $this->assertEquals( $future_date, $changeset_post_draft->post_date ); + $this->assertSame( $future_date, $changeset_post_draft->post_date ); // Success if date is not passed with schedule changeset and stored changeset have future date. $_POST['customize_changeset_status'] = 'future'; @@ -385,7 +385,7 @@ function test_success_save_post_date() { $this->assertTrue( $this->_last_response_parsed['success'] ); $this->assertArrayHasKey( 'changeset_date', $this->_last_response_parsed['data'] ); $changeset_post_schedule = get_post( $post_id ); - $this->assertEquals( $future_date, $changeset_post_schedule->post_date ); + $this->assertSame( $future_date, $changeset_post_schedule->post_date ); // Success if draft with past date. $now = current_time( 'mysql' ); wp_update_post( @@ -402,7 +402,7 @@ function test_success_save_post_date() { unset( $_POST['customize_changeset_date'] ); $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'not_future_date', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'not_future_date', $this->_last_response_parsed['data']['code'] ); // Success publish changeset reset date to current. wp_update_post( @@ -423,11 +423,11 @@ function test_success_save_post_date() { $this->assertNotEquals( $future_date, $changeset_post_publish->post_date ); // Check response when trying to update an already-published post. - $this->assertEquals( 'trash', get_post_status( $post_id ) ); + $this->assertSame( 'trash', get_post_status( $post_id ) ); $_POST['customize_changeset_status'] = 'publish'; $this->make_ajax_call( 'customize_save' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_already_published', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'changeset_already_published', $this->_last_response_parsed['data']['code'] ); $this->assertArrayHasKey( 'next_changeset_uuid', $this->_last_response_parsed['data'] ); $this->assertTrue( wp_is_uuid( $this->_last_response_parsed['data']['next_changeset_uuid'], 4 ) ); } @@ -436,7 +436,7 @@ function test_success_save_post_date() { * Test WP_Customize_Manager::save(). * * @ticket 39896 - * @covers WP_Customize_Manager::save() + * @covers WP_Customize_Manager::save */ public function test_save_autosave() { $uuid = wp_generate_uuid4(); @@ -470,19 +470,19 @@ public function test_save_autosave() { $_POST['customize_changeset_autosave'] = 'on'; $this->make_ajax_call( 'customize_save' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'draft', $this->_last_response_parsed['data']['changeset_status'] ); + $this->assertSame( 'draft', $this->_last_response_parsed['data']['changeset_status'] ); $autosave_revision = wp_get_post_autosave( $post_id ); $this->assertInstanceOf( 'WP_Post', $autosave_revision ); - $this->assertContains( 'New Site Title', get_post( $post_id )->post_content ); - $this->assertContains( 'Autosaved Site Title', $autosave_revision->post_content ); + $this->assertStringContainsString( 'New Site Title', get_post( $post_id )->post_content ); + $this->assertStringContainsString( 'Autosaved Site Title', $autosave_revision->post_content ); } /** * Test request for trashing a changeset. * * @ticket 39896 - * @covers WP_Customize_Manager::handle_changeset_trash_request() + * @covers WP_Customize_Manager::handle_changeset_trash_request */ public function test_handle_changeset_trash_request() { $uuid = wp_generate_uuid4(); @@ -490,7 +490,7 @@ public function test_handle_changeset_trash_request() { $this->make_ajax_call( 'customize_trash' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'invalid_nonce', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'invalid_nonce', $this->_last_response_parsed['data']['code'] ); $nonce = wp_create_nonce( 'trash_customize_changeset' ); $_POST['nonce'] = $nonce; @@ -498,7 +498,7 @@ public function test_handle_changeset_trash_request() { $_REQUEST['nonce'] = $nonce; $this->make_ajax_call( 'customize_trash' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'non_existent_changeset', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'non_existent_changeset', $this->_last_response_parsed['data']['code'] ); $wp_customize->register_controls(); // And settings too. $wp_customize->set_post_value( 'blogname', 'HELLO' ); @@ -511,9 +511,19 @@ public function test_handle_changeset_trash_request() { add_filter( 'map_meta_cap', array( $this, 'return_do_not_allow' ) ); $this->make_ajax_call( 'customize_trash' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_trash_unauthorized', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'changeset_trash_unauthorized', $this->_last_response_parsed['data']['code'] ); remove_filter( 'map_meta_cap', array( $this, 'return_do_not_allow' ) ); + $lock_user_id = static::factory()->user->create( array( 'role' => 'administrator' ) ); + $previous_user = get_current_user_id(); + wp_set_current_user( $lock_user_id ); + $wp_customize->set_changeset_lock( $wp_customize->changeset_post_id() ); + wp_set_current_user( $previous_user ); + $this->make_ajax_call( 'customize_trash' ); + $this->assertFalse( $this->_last_response_parsed['success'] ); + $this->assertSame( 'changeset_locked', $this->_last_response_parsed['data']['code'] ); + delete_post_meta( $wp_customize->changeset_post_id(), '_edit_lock' ); + wp_update_post( array( 'ID' => $wp_customize->changeset_post_id(), @@ -522,7 +532,7 @@ public function test_handle_changeset_trash_request() { ); $this->make_ajax_call( 'customize_trash' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_already_trashed', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'changeset_already_trashed', $this->_last_response_parsed['data']['code'] ); wp_update_post( array( @@ -535,16 +545,16 @@ public function test_handle_changeset_trash_request() { add_filter( 'pre_trash_post', '__return_false' ); $this->make_ajax_call( 'customize_trash' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_trash_failure', $this->_last_response_parsed['data']['code'] ); + $this->assertSame( 'changeset_trash_failure', $this->_last_response_parsed['data']['code'] ); remove_filter( 'pre_trash_post', '__return_false' ); - $this->assertEquals( $wp_trash_post_count, did_action( 'wp_trash_post' ) ); + $this->assertSame( $wp_trash_post_count, did_action( 'wp_trash_post' ) ); $wp_trash_post_count = did_action( 'wp_trash_post' ); - $this->assertEquals( 'draft', get_post_status( $wp_customize->changeset_post_id() ) ); + $this->assertSame( 'draft', get_post_status( $wp_customize->changeset_post_id() ) ); $this->make_ajax_call( 'customize_trash' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'trash', get_post_status( $wp_customize->changeset_post_id() ) ); - $this->assertEquals( $wp_trash_post_count + 1, did_action( 'wp_trash_post' ) ); + $this->assertSame( 'trash', get_post_status( $wp_customize->changeset_post_id() ) ); + $this->assertSame( $wp_trash_post_count + 1, did_action( 'wp_trash_post' ) ); } /** @@ -560,8 +570,8 @@ public function return_do_not_allow() { * Test request for dismissing autosave changesets. * * @ticket 39896 - * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request() - * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets() + * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request + * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets */ public function test_handle_dismiss_autosave_or_lock_request() { $uuid = wp_generate_uuid4(); @@ -572,12 +582,12 @@ public function test_handle_dismiss_autosave_or_lock_request() { wp_set_current_user( 0 ); $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'unauthenticated', $this->_last_response_parsed['data'] ); + $this->assertSame( 'unauthenticated', $this->_last_response_parsed['data'] ); wp_set_current_user( $valid_user_id ); $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'invalid_nonce', $this->_last_response_parsed['data'] ); + $this->assertSame( 'invalid_nonce', $this->_last_response_parsed['data'] ); $nonce = wp_create_nonce( 'customize_dismiss_autosave_or_lock' ); $_POST['nonce'] = $nonce; @@ -589,14 +599,14 @@ public function test_handle_dismiss_autosave_or_lock_request() { $_REQUEST['dismiss_lock'] = true; $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'no_changeset_to_dismiss_lock', $this->_last_response_parsed['data'] ); + $this->assertSame( 'no_changeset_to_dismiss_lock', $this->_last_response_parsed['data'] ); $_POST['dismiss_autosave'] = true; $_GET['dismiss_autosave'] = true; $_REQUEST['dismiss_autosave'] = true; $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'no_auto_draft_to_delete', $this->_last_response_parsed['data'] ); + $this->assertSame( 'no_auto_draft_to_delete', $this->_last_response_parsed['data'] ); $other_user_id = $this->factory()->user->create(); @@ -630,20 +640,20 @@ public function test_handle_dismiss_autosave_or_lock_request() { } $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'auto_draft_dismissed', $this->_last_response_parsed['data'] ); + $this->assertSame( 'auto_draft_dismissed', $this->_last_response_parsed['data'] ); foreach ( $user_auto_draft_ids as $post_id ) { - $this->assertEquals( 'auto-draft', get_post_status( $post_id ) ); + $this->assertSame( 'auto-draft', get_post_status( $post_id ) ); $this->assertTrue( (bool) get_post_meta( $post_id, '_customize_restore_dismissed', true ) ); } foreach ( $other_user_auto_draft_ids as $post_id ) { - $this->assertEquals( 'auto-draft', get_post_status( $post_id ) ); + $this->assertSame( 'auto-draft', get_post_status( $post_id ) ); $this->assertFalse( (bool) get_post_meta( $post_id, '_customize_restore_dismissed', true ) ); } // Subsequent test results in none dismissed. $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'no_auto_draft_to_delete', $this->_last_response_parsed['data'] ); + $this->assertSame( 'no_auto_draft_to_delete', $this->_last_response_parsed['data'] ); // Save a changeset as a draft. $r = $wp_customize->save_changeset_post( @@ -662,19 +672,19 @@ public function test_handle_dismiss_autosave_or_lock_request() { $_REQUEST['dismiss_autosave'] = false; $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'changeset_lock_dismissed', $this->_last_response_parsed['data'] ); + $this->assertSame( 'changeset_lock_dismissed', $this->_last_response_parsed['data'] ); $_POST['dismiss_autosave'] = true; $_GET['dismiss_autosave'] = true; $_REQUEST['dismiss_autosave'] = true; $this->assertNotWPError( $r ); $this->assertFalse( wp_get_post_autosave( $wp_customize->changeset_post_id() ) ); - $this->assertContains( 'Foo', get_post( $wp_customize->changeset_post_id() )->post_content ); + $this->assertStringContainsString( 'Foo', get_post( $wp_customize->changeset_post_id() )->post_content ); // Since no autosave yet, confirm no action. $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'no_autosave_revision_to_delete', $this->_last_response_parsed['data'] ); + $this->assertSame( 'no_autosave_revision_to_delete', $this->_last_response_parsed['data'] ); // Add the autosave revision. $r = $wp_customize->save_changeset_post( @@ -690,18 +700,18 @@ public function test_handle_dismiss_autosave_or_lock_request() { $this->assertNotWPError( $r ); $autosave_revision = wp_get_post_autosave( $wp_customize->changeset_post_id() ); $this->assertInstanceOf( 'WP_Post', $autosave_revision ); - $this->assertContains( 'Foo', get_post( $wp_customize->changeset_post_id() )->post_content ); - $this->assertContains( 'Bar', $autosave_revision->post_content ); + $this->assertStringContainsString( 'Foo', get_post( $wp_customize->changeset_post_id() )->post_content ); + $this->assertStringContainsString( 'Bar', $autosave_revision->post_content ); // Confirm autosave gets deleted. $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertTrue( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'autosave_revision_deleted', $this->_last_response_parsed['data'] ); + $this->assertSame( 'autosave_revision_deleted', $this->_last_response_parsed['data'] ); $this->assertFalse( wp_get_post_autosave( $wp_customize->changeset_post_id() ) ); // Since no autosave yet, confirm no action. $this->make_ajax_call( 'customize_dismiss_autosave_or_lock' ); $this->assertFalse( $this->_last_response_parsed['success'] ); - $this->assertEquals( 'no_autosave_revision_to_delete', $this->_last_response_parsed['data'] ); + $this->assertSame( 'no_autosave_revision_to_delete', $this->_last_response_parsed['data'] ); } } diff --git a/tests/phpunit/tests/ajax/CustomizeMenus.php b/tests/phpunit/tests/ajax/CustomizeMenus.php index 6b16fea75f881..7acc29ae80cdd 100644 --- a/tests/phpunit/tests/ajax/CustomizeMenus.php +++ b/tests/phpunit/tests/ajax/CustomizeMenus.php @@ -16,11 +16,41 @@ class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { */ public $wp_customize; + /** + * Page IDs. + * + * @var int[] + */ + public static $pages; + + /** + * Post IDs. + * + * @var int[] + */ + public static $posts; + + /** + * Term IDs. + * + * @var int[] + */ + public static $terms; + + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + // Make some post objects. + self::$posts = $factory->post->create_many( 5 ); + self::$pages = $factory->post->create_many( 5, array( 'post_type' => 'page' ) ); + + // Some terms too. + self::$terms = $factory->term->create_many( 5 ); + } + /** * Set up the test fixture. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); global $wp_customize; @@ -50,11 +80,12 @@ protected function make_ajax_call( $action ) { * @param string $role The role we're checking caps against. * @param array $expected_results Expected results. */ - function test_ajax_load_available_items_cap_check( $role, $expected_results ) { + public function test_ajax_load_available_items_cap_check( $role, $expected_results ) { if ( 'administrator' !== $role ) { - // If we're not an admin, we should get a wp_die(-1). - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + // If we're not an admin, we should get a wp_die( -1 ). + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); } wp_set_current_user( self::factory()->user->create( array( 'role' => $role ) ) ); @@ -91,7 +122,7 @@ function test_ajax_load_available_items_cap_check( $role, $expected_results ) { * } * } */ - function data_ajax_load_available_items_cap_check() { + public function data_ajax_load_available_items_cap_check() { return array( array( 'subscriber', @@ -127,7 +158,7 @@ function data_ajax_load_available_items_cap_check() { * @param array $post_args POST args. * @param mixed $expected_results Expected results. */ - function test_ajax_load_available_items_error_messages( $post_args, $expected_results ) { + public function test_ajax_load_available_items_error_messages( $post_args, $expected_results ) { $_POST = array_merge( array( @@ -161,7 +192,7 @@ function test_ajax_load_available_items_error_messages( $post_args, $expected_re * } * } */ - function data_ajax_load_available_items_error_messages() { + public function data_ajax_load_available_items_error_messages() { return array( // Testing empty obj_type and type. array( @@ -237,7 +268,7 @@ function data_ajax_load_available_items_error_messages() { * @param array $post_args POST args. * @param array $success_status Success status. */ - function test_ajax_load_available_items_success_status( $post_args, $success_status ) { + public function test_ajax_load_available_items_success_status( $post_args, $success_status ) { $_POST = array_merge( array( @@ -271,7 +302,7 @@ function test_ajax_load_available_items_success_status( $post_args, $success_sta * } * } */ - function data_ajax_load_available_items_success_status() { + public function data_ajax_load_available_items_success_status() { return array( array( array( @@ -327,7 +358,7 @@ function data_ajax_load_available_items_success_status() { * * @param array $post_args POST args. */ - function test2_ajax_load_available_items_structure( $post_args ) { + public function test2_ajax_load_available_items_structure( $post_args ) { do_action( 'customize_register', $this->wp_customize ); $expected_keys = array( @@ -340,9 +371,6 @@ function test2_ajax_load_available_items_structure( $post_args ) { 'url', ); - // Create some terms and pages. - self::factory()->term->create_many( 5 ); - self::factory()->post->create_many( 5, array( 'post_type' => 'page' ) ); $auto_draft_post = $this->wp_customize->nav_menus->insert_auto_draft_post( array( 'post_title' => 'Test Auto Draft', @@ -408,7 +436,7 @@ function test2_ajax_load_available_items_structure( $post_args ) { * } * } */ - function data_ajax_load_available_items_structure() { + public function data_ajax_load_available_items_structure() { return array( array( array( @@ -439,11 +467,12 @@ function data_ajax_load_available_items_structure() { * @param string $role Role. * @param array $expected_results Expected results. */ - function test_ajax_search_available_items_caps_check( $role, $expected_results ) { + public function test_ajax_search_available_items_caps_check( $role, $expected_results ) { if ( 'administrator' !== $role ) { - // If we're not an admin, we should get a wp_die(-1). - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + // If we're not an admin, we should get a wp_die( -1 ). + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); } wp_set_current_user( self::factory()->user->create( array( 'role' => $role ) ) ); @@ -481,7 +510,7 @@ function test_ajax_search_available_items_caps_check( $role, $expected_results ) * } * } */ - function data_ajax_search_available_items_caps_check() { + public function data_ajax_search_available_items_caps_check() { return array( array( 'subscriber', @@ -517,7 +546,7 @@ function data_ajax_search_available_items_caps_check() { * @param array $post_args POST args. * @param array $expected_results Expected results. */ - function test_ajax_search_available_items_results( $post_args, $expected_results ) { + public function test_ajax_search_available_items_results( $post_args, $expected_results ) { do_action( 'customize_register', $this->wp_customize ); self::factory()->post->create_many( 5, array( 'post_title' => 'Test Post' ) ); @@ -549,8 +578,8 @@ function test_ajax_search_available_items_results( $post_args, $expected_results $response = json_decode( $this->_last_response, true ); if ( isset( $post_args['search'] ) && 'test' === $post_args['search'] ) { - $this->assertsame( true, $response['success'] ); - $this->assertSame( 6, count( $response['data']['items'] ) ); + $this->assertTrue( $response['success'] ); + $this->assertCount( 6, $response['data']['items'] ); $item_ids = wp_list_pluck( $response['data']['items'], 'id' ); $this->assertContains( 'post-' . $included_auto_draft_post->ID, $item_ids ); $this->assertNotContains( 'post-' . $excluded_auto_draft_post->ID, $item_ids ); @@ -573,7 +602,7 @@ function test_ajax_search_available_items_results( $post_args, $expected_results * } * } */ - function data_ajax_search_available_items_results() { + public function data_ajax_search_available_items_results() { return array( array( array(), @@ -608,9 +637,9 @@ function data_ajax_search_available_items_results() { /** * Testing successful ajax_insert_auto_draft_post() call. * - * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post() + * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post */ - function test_ajax_insert_auto_draft_post_success() { + public function test_ajax_insert_auto_draft_post_success() { $_POST = wp_slash( array( 'customize-menus-nonce' => wp_create_nonce( 'customize-menus' ), @@ -628,26 +657,26 @@ function test_ajax_insert_auto_draft_post_success() { $this->assertArrayHasKey( 'post_id', $response['data'] ); $this->assertArrayHasKey( 'url', $response['data'] ); $post = get_post( $response['data']['post_id'] ); - $this->assertEquals( 'Hello World', $post->post_title ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( '', $post->post_name ); - $this->assertEquals( 'hello-world', get_post_meta( $post->ID, '_customize_draft_post_name', true ) ); - $this->assertEquals( $this->wp_customize->changeset_uuid(), get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ); + $this->assertSame( 'Hello World', $post->post_title ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( '', $post->post_name ); + $this->assertSame( 'hello-world', get_post_meta( $post->ID, '_customize_draft_post_name', true ) ); + $this->assertSame( $this->wp_customize->changeset_uuid(), get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ); } /** * Testing unsuccessful ajax_insert_auto_draft_post() call. * - * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post() + * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post */ - function test_ajax_insert_auto_draft_failures() { + public function test_ajax_insert_auto_draft_failures() { // No nonce. $_POST = array(); $this->_last_response = ''; $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'bad_nonce', $response['data'] ); + $this->assertSame( 'bad_nonce', $response['data'] ); // Bad nonce. $_POST = wp_slash( @@ -659,7 +688,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'bad_nonce', $response['data'] ); + $this->assertSame( 'bad_nonce', $response['data'] ); // Bad nonce. wp_set_current_user( $this->factory()->user->create( array( 'role' => 'subscriber' ) ) ); @@ -672,7 +701,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'customize_not_allowed', $response['data'] ); + $this->assertSame( 'customize_not_allowed', $response['data'] ); // Missing params. wp_set_current_user( $this->factory()->user->create( array( 'role' => 'administrator' ) ) ); @@ -685,7 +714,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'missing_params', $response['data'] ); + $this->assertSame( 'missing_params', $response['data'] ); // insufficient_post_permissions. register_post_type( 'privilege', array( 'capability_type' => 'privilege' ) ); @@ -701,7 +730,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'insufficient_post_permissions', $response['data'] ); + $this->assertSame( 'insufficient_post_permissions', $response['data'] ); // insufficient_post_permissions. $_POST = wp_slash( @@ -716,7 +745,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'missing_post_type_param', $response['data'] ); + $this->assertSame( 'missing_post_type_param', $response['data'] ); // missing_post_title. $_POST = wp_slash( @@ -732,7 +761,7 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'missing_post_title', $response['data'] ); + $this->assertSame( 'missing_post_title', $response['data'] ); // illegal_params. $_POST = wp_slash( @@ -750,6 +779,6 @@ function test_ajax_insert_auto_draft_failures() { $this->make_ajax_call( 'customize-nav-menus-insert-auto-draft' ); $response = json_decode( $this->_last_response, true ); $this->assertFalse( $response['success'] ); - $this->assertEquals( 'illegal_params', $response['data'] ); + $this->assertSame( 'illegal_params', $response['data'] ); } } diff --git a/tests/phpunit/tests/ajax/DeleteComment.php b/tests/phpunit/tests/ajax/DeleteComment.php index 344c782d413f9..bd38671b0df7a 100644 --- a/tests/phpunit/tests/ajax/DeleteComment.php +++ b/tests/phpunit/tests/ajax/DeleteComment.php @@ -16,7 +16,7 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { /** - * List of comments + * List of comments. * * @var array */ @@ -29,7 +29,7 @@ class Tests_Ajax_DeleteComment extends WP_Ajax_UnitTestCase { */ protected static $post_id; - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$post_id = $factory->post->create(); $comment_ids = $factory->comment->create_post_comments( self::$post_id, 8 ); @@ -37,7 +37,7 @@ public static function wpSetUpBeforeClass( $factory ) { } /** - * Clear the POST actions in between requests + * Clears the POST actions in between requests. */ protected function _clear_post_action() { unset( $_POST['trash'] ); @@ -53,12 +53,12 @@ protected function _clear_post_action() { */ /** - * Test as a privilged user (administrator) - * Expects test to pass + * Tests as a privileged user (administrator). * - * @param mixed $comment Comment object - * @param string action trash, untrash, etc. - * @return void + * Expects test to pass. + * + * @param WP_Comment $comment Comment object. + * @param string $action Action: 'trash', 'untrash', etc. */ public function _test_as_admin( $comment, $action ) { @@ -88,8 +88,8 @@ public function _test_as_admin( $comment, $action ) { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Ensure everything is correct. - $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); - $this->assertEquals( 'delete-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); + $this->assertSame( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); + $this->assertSame( 'delete-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); $this->assertGreaterThanOrEqual( time() - 10, (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); $this->assertLessThanOrEqual( time(), (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); @@ -108,16 +108,16 @@ public function _test_as_admin( $comment, $action ) { // Check for either possible total. $message = sprintf( 'returned value: %1$d $total: %2$d $recalc_total: %3$d', (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], $total, $recalc_total ); - $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ), $message ); + $this->assertContains( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), $message ); } /** - * Test as a non-privileged user (subscriber) - * Expects test to fail + * Tests as a non-privileged user (subscriber). + * + * Expects test to fail. * - * @param mixed $comment Comment object - * @param string action trash, untrash, etc. - * @return void + * @param WP_Comment $comment Comment object. + * @param string $action Action: 'trash', 'untrash', etc. */ public function _test_as_subscriber( $comment, $action ) { @@ -137,18 +137,19 @@ public function _test_as_subscriber( $comment, $action ) { $_POST['_url'] = admin_url( 'edit-comments.php' ); // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'delete-comment' ); } /** - * Test with a bad nonce - * Expects test to fail + * Tests with a bad nonce. + * + * Expects test to fail. * - * @param mixed $comment Comment object - * @param string action trash, untrash, etc. - * @return void + * @param WP_Comment $comment Comment object. + * @param string $action Action: 'trash', 'untrash', etc. */ public function _test_with_bad_nonce( $comment, $action ) { @@ -168,17 +169,18 @@ public function _test_with_bad_nonce( $comment, $action ) { $_POST['_url'] = admin_url( 'edit-comments.php' ); // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'delete-comment' ); } /** - * Test with a bad id - * Expects test to fail + * Tests with a bad ID. * - * @param mixed $comment Comment object - * @param string action trash, untrash, etc. - * @return void + * Expects test to fail. + * + * @param WP_Comment $comment Comment object. + * @param string $action Action: 'trash', 'untrash', etc. */ public function _test_with_bad_id( $comment, $action ) { @@ -202,20 +204,20 @@ public function _test_with_bad_id( $comment, $action ) { $this->_handleAjax( 'delete-comment' ); $this->fail( 'Expected exception: WPAjaxDieStopException' ); } catch ( WPAjaxDieStopException $e ) { - $this->assertEquals( 10, strlen( $e->getMessage() ) ); - $this->assertTrue( is_numeric( $e->getMessage() ) ); + $this->assertSame( 10, strlen( $e->getMessage() ) ); + $this->assertIsNumeric( $e->getMessage() ); } catch ( Exception $e ) { $this->fail( 'Unexpected exception type: ' . get_class( $e ) ); } } /** - * Test doubling the action (e.g. trash a trashed comment) - * Expects test to fail + * Tests doubling the action (e.g. trash a trashed comment). + * + * Expects test to fail. * - * @param mixed $comment Comment object - * @param string action trash, untrash, etc. - * @return void + * @param WP_Comment $comment Comment object. + * @param string $action Action: 'trash', 'untrash', etc. */ public function _test_double_action( $comment, $action ) { @@ -252,17 +254,15 @@ public function _test_double_action( $comment, $action ) { $this->_handleAjax( 'delete-comment' ); $this->fail( 'Expected exception: WPAjaxDieStopException' ); } catch ( WPAjaxDieStopException $e ) { - $this->assertEquals( 10, strlen( $e->getMessage() ) ); - $this->assertTrue( is_numeric( $e->getMessage() ) ); + $this->assertSame( 10, strlen( $e->getMessage() ) ); + $this->assertIsNumeric( $e->getMessage() ); } catch ( Exception $e ) { $this->fail( 'Unexpected exception type: ' . get_class( $e ) ); } } /** - * Delete a comment as an administrator (expects success) - * - * @return void + * Deletes a comment as an administrator (expects success). */ public function test_ajax_comment_trash_actions_as_administrator() { // Test trash/untrash. @@ -278,9 +278,7 @@ public function test_ajax_comment_trash_actions_as_administrator() { } /** - * Delete a comment as a subscriber (expects permission denied) - * - * @return void + * Deletes a comment as a subscriber (expects permission denied). */ public function test_ajax_comment_trash_actions_as_subscriber() { // Test trash/untrash. @@ -296,9 +294,7 @@ public function test_ajax_comment_trash_actions_as_subscriber() { } /** - * Delete a comment with no id - * - * @return void + * Deletes a comment with no ID. */ public function test_ajax_trash_comment_no_id() { // Test trash/untrash. @@ -314,9 +310,7 @@ public function test_ajax_trash_comment_no_id() { } /** - * Delete a comment with a bad nonce - * - * @return void + * Deletes a comment with a bad nonce. */ public function test_ajax_trash_comment_bad_nonce() { // Test trash/untrash. @@ -332,9 +326,7 @@ public function test_ajax_trash_comment_bad_nonce() { } /** - * Test trashing an already trashed comment, etc. - * - * @return void + * Tests trashing an already trashed comment, etc. */ public function test_ajax_trash_double_action() { // Test trash/untrash. diff --git a/tests/phpunit/tests/ajax/DeletePlugin.php b/tests/phpunit/tests/ajax/DeletePlugin.php index c932542a5c89a..c42e238499327 100644 --- a/tests/phpunit/tests/ajax/DeletePlugin.php +++ b/tests/phpunit/tests/ajax/DeletePlugin.php @@ -10,11 +10,10 @@ * @group ajax */ class Tests_Ajax_Delete_Plugin extends WP_Ajax_UnitTestCase { - /** - * @expectedException WPAjaxDieStopException - * @expectedExceptionMessage -1 - */ + public function test_missing_nonce() { + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'delete-plugin' ); } @@ -41,7 +40,7 @@ public function test_missing_plugin() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_missing_slug() { @@ -67,7 +66,7 @@ public function test_missing_slug() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_missing_capability() { @@ -94,7 +93,7 @@ public function test_missing_capability() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_invalid_file() { @@ -123,9 +122,12 @@ public function test_invalid_file() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } + /** + * @group ms-excluded + */ public function test_delete_plugin() { $this->_setRole( 'administrator' ); @@ -153,6 +155,6 @@ public function test_delete_plugin() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } } diff --git a/tests/phpunit/tests/ajax/DimComment.php b/tests/phpunit/tests/ajax/DimComment.php index 366677e53f8e7..05e6808bfc58c 100644 --- a/tests/phpunit/tests/ajax/DimComment.php +++ b/tests/phpunit/tests/ajax/DimComment.php @@ -16,24 +16,24 @@ class Tests_Ajax_DimComment extends WP_Ajax_UnitTestCase { /** - * List of comments + * List of comments. * * @var array */ protected $_comments = array(); /** - * Set up the test fixture + * Sets up the test fixture. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $post_id = self::factory()->post->create(); $this->_comments = self::factory()->comment->create_post_comments( $post_id, 15 ); $this->_comments = array_map( 'get_comment', $this->_comments ); } /** - * Clear the POST actions in between requests + * Clears the POST actions in between requests. */ protected function _clear_post_action() { unset( $_POST['id'] ); @@ -46,11 +46,11 @@ protected function _clear_post_action() { */ /** - * Test as a privilged user (administrator) - * Expects test to pass + * Tests as a privileged user (administrator). * - * @param mixed $comment Comment object - * @return void + * Expects test to pass. + * + * @param WP_Comment $comment Comment object. */ public function _test_as_admin( $comment ) { @@ -82,17 +82,17 @@ public function _test_as_admin( $comment ) { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Ensure everything is correct. - $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); - $this->assertEquals( 'dim-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); + $this->assertSame( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); + $this->assertSame( 'dim-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); $this->assertGreaterThanOrEqual( time() - 10, (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); $this->assertLessThanOrEqual( time(), (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); // Check the status. $current = wp_get_comment_status( $comment->comment_ID ); if ( in_array( $prev_status, array( 'unapproved', 'spam' ), true ) ) { - $this->assertEquals( 'approved', $current ); + $this->assertSame( 'approved', $current ); } else { - $this->assertEquals( 'unapproved', $current ); + $this->assertSame( 'unapproved', $current ); } // The total is calculated based on a page break -OR- a random number. Let's look for both possible outcomes. @@ -103,15 +103,15 @@ public function _test_as_admin( $comment ) { $total = $_POST['_total'] - 1; // Check for either possible total. - $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ) ); + $this->assertContains( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ) ); } /** - * Test as a non-privileged user (subscriber) - * Expects test to fail + * Tests as a non-privileged user (subscriber). + * + * Expects test to fail. * - * @param mixed $comment Comment object - * @return void + * @param WP_Comment $comment Comment object. */ public function _test_as_subscriber( $comment ) { @@ -130,16 +130,17 @@ public function _test_as_subscriber( $comment ) { $_POST['_url'] = admin_url( 'edit-comments.php' ); // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'dim-comment' ); } /** - * Test with a bad nonce - * Expects test to fail + * Tests with a bad nonce. * - * @param mixed $comment Comment object - * @return void + * Expects test to fail. + * + * @param WP_Comment $comment Comment object. */ public function _test_with_bad_nonce( $comment ) { @@ -158,15 +159,15 @@ public function _test_with_bad_nonce( $comment ) { $_POST['_url'] = admin_url( 'edit-comments.php' ); // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'dim-comment' ); } /** - * Test with a bad id - * Expects test to fail + * Tests with a bad ID. * - * @return void + * Expects test to fail. */ public function test_with_bad_id() { @@ -194,9 +195,9 @@ public function test_with_bad_id() { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Ensure everything is correct. - $this->assertEquals( '0', (string) $xml->response[0]->comment['id'] ); - $this->assertEquals( 'dim-comment_0', (string) $xml->response['action'] ); - $this->assertContains( 'Comment ' . $_POST['id'] . ' does not exist', $this->_last_response ); + $this->assertSame( '0', (string) $xml->response[0]->comment['id'] ); + $this->assertSame( 'dim-comment_0', (string) $xml->response['action'] ); + $this->assertStringContainsString( 'Comment ' . $_POST['id'] . ' does not exist', $this->_last_response ); } catch ( Exception $e ) { $this->fail( 'Unexpected exception type: ' . get_class( $e ) ); @@ -204,9 +205,7 @@ public function test_with_bad_id() { } /** - * Dim a comment as an administrator (expects success) - * - * @return void + * Dims a comment as an administrator (expects success). */ public function test_ajax_comment_dim_actions_as_administrator() { $comment = array_pop( $this->_comments ); @@ -215,9 +214,7 @@ public function test_ajax_comment_dim_actions_as_administrator() { } /** - * Dim a comment as a subscriber (expects permission denied) - * - * @return void + * Dims a comment as a subscriber (expects permission denied). */ public function test_ajax_comment_dim_actions_as_subscriber() { $comment = array_pop( $this->_comments ); @@ -225,9 +222,7 @@ public function test_ajax_comment_dim_actions_as_subscriber() { } /** - * Dim a comment with no id - * - * @return void + * Dims a comment with no ID. */ public function test_ajax_dim_comment_no_id() { $comment = array_pop( $this->_comments ); @@ -235,9 +230,7 @@ public function test_ajax_dim_comment_no_id() { } /** - * Dim a comment with a bad nonce - * - * @return void + * Dims a comment with a bad nonce. */ public function test_ajax_dim_comment_bad_nonce() { $comment = array_pop( $this->_comments ); diff --git a/tests/phpunit/tests/ajax/EditComment.php b/tests/phpunit/tests/ajax/EditComment.php index 38deb9f16030c..d5b569d388b6f 100644 --- a/tests/phpunit/tests/ajax/EditComment.php +++ b/tests/phpunit/tests/ajax/EditComment.php @@ -16,27 +16,26 @@ class Tests_Ajax_EditComment extends WP_Ajax_UnitTestCase { /** - * A post with at least one comment + * A post with at least one comment. * * @var mixed */ protected $_comment_post = null; /** - * Set up the test fixture + * Sets up the test fixture. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $post_id = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id, 5 ); $this->_comment_post = get_post( $post_id ); } /** - * Get comments as a privilged user (administrator) - * Expects test to pass + * Gets comments as a privileged user (administrator). * - * @return void + * Expects test to pass. */ public function test_as_admin() { @@ -67,9 +66,9 @@ public function test_as_admin() { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Check the meta data. - $this->assertEquals( -1, (string) $xml->response[0]->edit_comment['position'] ); - $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->edit_comment['id'] ); - $this->assertEquals( 'edit-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); + $this->assertSame( '-1', (string) $xml->response[0]->edit_comment['position'] ); + $this->assertSame( $comment->comment_ID, (string) $xml->response[0]->edit_comment['id'] ); + $this->assertSame( 'edit-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); // Check the payload. $this->assertNotEmpty( (string) $xml->response[0]->edit_comment[0]->response_data ); @@ -81,7 +80,7 @@ public function test_as_admin() { /** * @ticket 33154 */ - function test_editor_can_edit_orphan_comments() { + public function test_editor_can_edit_orphan_comments() { global $wpdb; // Become an editor. @@ -115,9 +114,9 @@ function test_editor_can_edit_orphan_comments() { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Check the meta data. - $this->assertEquals( -1, (string) $xml->response[0]->edit_comment['position'] ); - $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->edit_comment['id'] ); - $this->assertEquals( 'edit-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); + $this->assertSame( '-1', (string) $xml->response[0]->edit_comment['position'] ); + $this->assertSame( $comment->comment_ID, (string) $xml->response[0]->edit_comment['id'] ); + $this->assertSame( 'edit-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); // Check the payload. $this->assertNotEmpty( (string) $xml->response[0]->edit_comment[0]->response_data ); @@ -127,10 +126,9 @@ function test_editor_can_edit_orphan_comments() { } /** - * Get comments as a non-privileged user (subscriber) - * Expects test to fail + * Gets comments as a non-privileged user (subscriber). * - * @return void + * Expects test to fail. */ public function test_as_subscriber() { @@ -151,15 +149,15 @@ public function test_as_subscriber() { $_POST['content'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'edit-comment' ); } /** - * Get comments with a bad nonce - * Expects test to fail + * Gets comments with a bad nonce. * - * @return void + * Expects test to fail. */ public function test_bad_nonce() { @@ -180,15 +178,15 @@ public function test_bad_nonce() { $_POST['content'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'get-comments' ); } /** - * Get comments for an invalid post - * This should return valid XML + * Gets comments for an invalid post. * - * @return void + * This should return valid XML. */ public function test_invalid_comment() { @@ -201,7 +199,44 @@ public function test_invalid_comment() { $_POST['content'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'edit-comment' ); } + + /** + * @ticket 39732 + */ + public function test_wp_update_comment_data_is_wp_error() { + // Become an administrator. + $this->_setRole( 'administrator' ); + + // Get a comment. + $comments = get_comments( + array( + 'post_id' => $this->_comment_post->ID, + ) + ); + $comment = array_pop( $comments ); + + // Set up a default request. + $_POST['_ajax_nonce-replyto-comment'] = wp_create_nonce( 'replyto-comment' ); + $_POST['comment_ID'] = $comment->comment_ID; + $_POST['content'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'; + + // Simulate filter check error. + add_filter( 'wp_update_comment_data', array( $this, '_wp_update_comment_data_filter' ), 10, 3 ); + + // Make the request. + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( 'wp_update_comment_data filter fails for this comment.' ); + $this->_handleAjax( 'edit-comment' ); + } + + /** + * Blocks comments from being updated by returning WP_Error. + */ + public function _wp_update_comment_data_filter( $data, $comment, $commentarr ) { + return new WP_Error( 'comment_wrong', 'wp_update_comment_data filter fails for this comment.', 500 ); + } } diff --git a/tests/phpunit/tests/ajax/GetComments.php b/tests/phpunit/tests/ajax/GetComments.php index d41efd06d3096..6649e30dabb06 100644 --- a/tests/phpunit/tests/ajax/GetComments.php +++ b/tests/phpunit/tests/ajax/GetComments.php @@ -16,14 +16,14 @@ class Tests_Ajax_GetComments extends WP_Ajax_UnitTestCase { /** - * A post with at least one comment + * A post with at least one comment. * * @var mixed */ protected static $comment_post = null; /** - * A post with no comments + * A post with no comments. * * @var mixed */ @@ -31,17 +31,16 @@ class Tests_Ajax_GetComments extends WP_Ajax_UnitTestCase { protected static $comment_ids = array(); - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$comment_post = $factory->post->create_and_get(); self::$comment_ids = $factory->comment->create_post_comments( self::$comment_post->ID, 5 ); self::$no_comment_post = $factory->post->create_and_get(); } /** - * Get comments as a privilged user (administrator) - * Expects test to pass + * Gets comments as a privileged user (administrator). * - * @return void + * Expects test to pass. */ public function test_as_admin() { @@ -64,9 +63,9 @@ public function test_as_admin() { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Check the meta data. - $this->assertEquals( 1, (string) $xml->response[0]->comments['position'] ); - $this->assertEquals( 0, (string) $xml->response[0]->comments['id'] ); - $this->assertEquals( 'get-comments_0', (string) $xml->response['action'] ); + $this->assertSame( '1', (string) $xml->response[0]->comments['position'] ); + $this->assertSame( '0', (string) $xml->response[0]->comments['id'] ); + $this->assertSame( 'get-comments_0', (string) $xml->response['action'] ); // Check the payload. $this->assertNotEmpty( (string) $xml->response[0]->comments[0]->response_data ); @@ -76,10 +75,9 @@ public function test_as_admin() { } /** - * Get comments as a non-privileged user (subscriber) - * Expects test to fail + * Gets comments as a non-privileged user (subscriber). * - * @return void + * Expects test to fail. */ public function test_as_subscriber() { @@ -92,15 +90,15 @@ public function test_as_subscriber() { $_POST['p'] = self::$comment_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'get-comments' ); } /** - * Get comments with a bad nonce - * Expects test to fail + * Gets comments with a bad nonce. * - * @return void + * Expects test to fail. */ public function test_bad_nonce() { @@ -113,15 +111,15 @@ public function test_bad_nonce() { $_POST['p'] = self::$comment_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'get-comments' ); } /** - * Get comments for an invalid post - * Bad post IDs are set to 0, this should return valid XML + * Gets comments for an invalid post. * - * @return void + * Bad post IDs are set to 0, this should return valid XML. */ public function test_invalid_post() { @@ -134,15 +132,13 @@ public function test_invalid_post() { $_POST['p'] = 'b0rk'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'get-comments' ); } /** - * Get comments for an invalid post - * Bad post IDs are set to 0, this should return valid XML - * - * @return void + * Gets comments for a post with no comments. */ public function test_post_with_no_comments() { @@ -155,7 +151,8 @@ public function test_post_with_no_comments() { $_POST['p'] = self::$no_comment_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '1' ); $this->_handleAjax( 'get-comments' ); } } diff --git a/tests/phpunit/tests/ajax/ManageThemes.php b/tests/phpunit/tests/ajax/ManageThemes.php index 31e9b0a7d6492..015c140d831c5 100644 --- a/tests/phpunit/tests/ajax/ManageThemes.php +++ b/tests/phpunit/tests/ajax/ManageThemes.php @@ -13,8 +13,8 @@ class Tests_Ajax_Manage_Themes extends WP_Ajax_UnitTestCase { private $orig_theme_dir; private $theme_root; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->theme_root = DIR_TESTDATA . '/themedir1'; $this->orig_theme_dir = $GLOBALS['wp_theme_directories']; @@ -30,7 +30,7 @@ function setUp() { unset( $GLOBALS['wp_themes'] ); } - function tearDown() { + public function tear_down() { $GLOBALS['wp_theme_directories'] = $this->orig_theme_dir; remove_filter( 'theme_root', array( $this, 'filter_theme_root' ) ); remove_filter( 'stylesheet_root', array( $this, 'filter_theme_root' ) ); @@ -38,7 +38,7 @@ function tearDown() { wp_clean_themes_cache(); unset( $GLOBALS['wp_themes'] ); - parent::tearDown(); + parent::tear_down(); } /** @@ -70,7 +70,7 @@ public function test_missing_slug() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_missing_capability() { @@ -92,15 +92,18 @@ public function test_missing_capability() { 'data' => array( 'update' => 'theme', 'slug' => 'foo', - 'errorMessage' => 'Sorry, you are not allowed to update themes for this site.', 'oldVersion' => '', 'newVersion' => '', + 'errorMessage' => 'Sorry, you are not allowed to update themes for this site.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } + /** + * @group ms-excluded + */ public function test_update_theme() { $this->_setRole( 'administrator' ); @@ -128,17 +131,20 @@ public function test_update_theme() { 'data' => array( 'update' => 'theme', 'slug' => 'twentyten', - 'errorMessage' => 'The theme is at the latest version.', 'oldVersion' => $theme->get( 'Version' ), 'newVersion' => '', 'debug' => array( 'The theme is at the latest version.' ), + 'errorMessage' => 'The theme is at the latest version.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } - function test_uppercase_theme_slug() { + /** + * @group ms-excluded + */ + public function test_uppercase_theme_slug() { $this->_setRole( 'administrator' ); $_POST['_ajax_nonce'] = wp_create_nonce( 'updates' ); @@ -161,11 +167,11 @@ function test_uppercase_theme_slug() { 'slug' => 'camelCase', 'oldVersion' => '1.0', 'newVersion' => '', - 'errorMessage' => 'The theme is at the latest version.', 'debug' => array( 'The theme is at the latest version.' ), + 'errorMessage' => 'The theme is at the latest version.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } } diff --git a/tests/phpunit/tests/ajax/MediaEdit.php b/tests/phpunit/tests/ajax/MediaEdit.php index 61c262b013a16..d42ef092037b2 100644 --- a/tests/phpunit/tests/ajax/MediaEdit.php +++ b/tests/phpunit/tests/ajax/MediaEdit.php @@ -11,16 +11,18 @@ * @subpackage UnitTests * @since 3.5.0 * @group ajax + * + * @requires function imagejpeg */ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase { /** * Tear down the test fixture. */ - public function tearDown() { + public function tear_down() { // Cleanup. $this->remove_added_uploads(); - parent::tearDown(); + parent::tear_down(); } /** @@ -94,7 +96,7 @@ public function testImageEditOverwriteConstant() { } foreach ( $files_that_shouldnt_exist as $file ) { - $this->assertFileNotExists( $file, 'IMAGE_EDIT_OVERWRITE is leaving garbage image files behind.' ); + $this->assertFileDoesNotExist( $file, 'IMAGE_EDIT_OVERWRITE is leaving garbage image files behind.' ); } } } diff --git a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php index e75b12f805009..194840f163c40 100644 --- a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php +++ b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php @@ -113,7 +113,7 @@ class Tests_Ajax_PrivacyErasePersonalData extends WP_Ajax_UnitTestCase { * * @param WP_UnitTest_Factory $factory Factory. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$request_email = 'requester@example.com'; self::$request_id = wp_create_user_request( self::$request_email, 'remove_personal_data' ); self::$action = 'wp-privacy-erase-personal-data'; @@ -126,8 +126,8 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Register a custom personal data eraser. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->key_to_unset = ''; @@ -149,7 +149,7 @@ public function setUp() { /** * Clean up after each test method. */ - public function tearDown() { + public function tear_down() { remove_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_custom_personal_data_eraser' ) ); $this->new_callback_value = ''; @@ -157,7 +157,7 @@ public function tearDown() { revoke_super_admin( get_current_user_id() ); } - parent::tearDown(); + parent::tear_down(); } /** @@ -331,7 +331,8 @@ public function test_error_when_current_user_missing_required_capabilities_multi * @since 5.2.0 */ public function test_failure_with_invalid_nonce() { - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_make_ajax_call( array( @@ -784,7 +785,7 @@ public function register_custom_personal_data_eraser( $erasers ) { * @param string $email_address The comment author email address. * @param int $page Page number. * - * @return array $return Erase data. + * @return array Erase data. */ public function callback_personal_data_eraser( $email_address, $page = 1 ) { if ( 1 === $page ) { diff --git a/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php b/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php index 6e5c9b8a5b4d3..4707635a7013d 100644 --- a/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php +++ b/tests/phpunit/tests/ajax/PrivacyExportPersonalData.php @@ -124,7 +124,7 @@ class Tests_Ajax_PrivacyExportPersonalData extends WP_Ajax_UnitTestCase { * * @param WP_UnitTest_Factory $factory Factory. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$request_email = 'requester@example.com'; self::$request_id = wp_create_user_request( self::$request_email, 'export_personal_data' ); self::$action = 'wp-privacy-export-personal-data'; @@ -140,8 +140,8 @@ public static function wpSetUpBeforeClass( $factory ) { * * @since 5.2.0 */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->key_to_unset = ''; $this->new_callback_value = ''; @@ -163,13 +163,13 @@ public function setUp() { /** * Clean up after each test method. */ - public function tearDown() { + public function tear_down() { remove_filter( 'wp_privacy_personal_data_exporters', array( $this, 'filter_register_custom_personal_data_exporter' ) ); if ( is_multisite() ) { revoke_super_admin( get_current_user_id() ); } - parent::tearDown(); + parent::tear_down(); } /** @@ -292,7 +292,8 @@ public function test_error_when_current_user_missing_required_capability_multisi * @since 5.2.0 */ public function test_failure_with_invalid_nonce() { - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_make_ajax_call( array( diff --git a/tests/phpunit/tests/ajax/QuickEdit.php b/tests/phpunit/tests/ajax/QuickEdit.php index aa10ac883f658..2369930cfb6e8 100644 --- a/tests/phpunit/tests/ajax/QuickEdit.php +++ b/tests/phpunit/tests/ajax/QuickEdit.php @@ -81,6 +81,6 @@ public function test_dont_process_terms_if_taxonomy_does_not_allow_show_on_quick // 'wptests_tax_2' terms should have been added successfully. $post_terms_2 = wp_get_object_terms( $post->ID, 'wptests_tax_2' ); - $this->assertEqualSets( array( $t2 ), wp_list_pluck( $post_terms_2, 'term_id' ) ); + $this->assertSameSets( array( $t2 ), wp_list_pluck( $post_terms_2, 'term_id' ) ); } } diff --git a/tests/phpunit/tests/ajax/ReplytoComment.php b/tests/phpunit/tests/ajax/ReplytoComment.php index d0cabef41ebb0..0d98a98a39a66 100644 --- a/tests/phpunit/tests/ajax/ReplytoComment.php +++ b/tests/phpunit/tests/ajax/ReplytoComment.php @@ -16,14 +16,14 @@ class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { /** - * A post with at least one comment + * A post with at least one comment. * * @var mixed */ protected static $comment_post = null; /** - * Draft post + * Draft post. * * @var mixed */ @@ -31,22 +31,21 @@ class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { protected static $comment_ids = array(); - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$comment_post = $factory->post->create_and_get(); self::$comment_ids = $factory->comment->create_post_comments( self::$comment_post->ID, 5 ); self::$draft_post = $factory->post->create_and_get( array( 'post_status' => 'draft' ) ); } - public function tearDown() { + public function tear_down() { remove_filter( 'query', array( $this, '_block_comments' ) ); - parent::tearDown(); + parent::tear_down(); } /** - * Reply as a privilged user (administrator) - * Expects test to pass + * Tests reply as a privileged user (administrator). * - * @return void + * Expects test to pass. */ public function test_as_admin() { @@ -78,7 +77,7 @@ public function test_as_admin() { $xml = simplexml_load_string( $this->_last_response, 'SimpleXMLElement', LIBXML_NOCDATA ); // Check the meta data. - $this->assertEquals( -1, (string) $xml->response[0]->comment['position'] ); + $this->assertSame( '-1', (string) $xml->response[0]->comment['position'] ); $this->assertGreaterThan( 0, (int) $xml->response[0]->comment['id'] ); $this->assertNotEmpty( (string) $xml->response['action'] ); @@ -90,10 +89,9 @@ public function test_as_admin() { } /** - * Reply as a non-privileged user (subscriber) - * Expects test to fail + * Tests reply as a non-privileged user (subscriber). * - * @return void + * Expects test to fail. */ public function test_as_subscriber() { @@ -115,15 +113,15 @@ public function test_as_subscriber() { $_POST['comment_post_ID'] = self::$comment_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'replyto-comment' ); } /** - * Reply using a bad nonce - * Expects test to fail + * Tests reply using a bad nonce. * - * @return void + * Expects test to fail. */ public function test_bad_nonce() { @@ -145,15 +143,15 @@ public function test_bad_nonce() { $_POST['comment_post_ID'] = self::$comment_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'replyto-comment' ); } /** - * Reply to an invalid post - * Expects test to fail + * Tests reply to an invalid post. * - * @return void + * Expects test to fail. */ public function test_invalid_post() { @@ -166,15 +164,15 @@ public function test_invalid_post() { $_POST['comment_post_ID'] = 123456789; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'replyto-comment' ); } /** - * Reply to a draft post - * Expects test to fail + * Tests reply to a draft post. * - * @return void + * Expects test to fail. */ public function test_with_draft_post() { @@ -187,16 +185,17 @@ public function test_with_draft_post() { $_POST['comment_post_ID'] = self::$draft_post->ID; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', 'Error: You are replying to a comment on a draft post.' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( 'Error: You can’t reply to a comment on a draft post.' ); $this->_handleAjax( 'replyto-comment' ); } /** - * Reply to a post with a simulated database failure - * Expects test to fail + * Tests reply to a post with a simulated database failure. + * + * Expects test to fail. * * @global $wpdb - * @return void */ public function test_blocked_comment() { global $wpdb; @@ -220,12 +219,12 @@ public function test_blocked_comment() { $this->fail(); } catch ( WPAjaxDieStopException $e ) { $wpdb->suppress_errors( false ); - $this->assertContains( '1', $e->getMessage() ); + $this->assertStringContainsString( '1', $e->getMessage() ); } } /** - * Block comments from being saved + * Blocks comments from being saved. * * @param string $sql * @return string @@ -239,10 +238,9 @@ public function _block_comments( $sql ) { } /** - * Raises WP_Error after Posted a new pre comment + * Tests blocking a comment from being saved on 'pre_comment_approved'. * * @ticket 39730 - * @return void */ public function test_pre_comments_approved() { @@ -258,14 +256,15 @@ public function test_pre_comments_approved() { add_filter( 'pre_comment_approved', array( $this, '_pre_comment_approved_filter' ), 10, 2 ); // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', 'pre_comment_approved filter fails for new comment' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( 'pre_comment_approved filter fails for new comment.' ); $this->_handleAjax( 'replyto-comment' ); } /** - * Block comments from being saved 'pre_comment_approved', by returning WP_Error + * Blocks comments from being saved on 'pre_comment_approved', by returning WP_Error. */ - function _pre_comment_approved_filter( $approved, $commentdata ) { - return new WP_Error( 'comment_wrong', 'pre_comment_approved filter fails for new comment', 403 ); + public function _pre_comment_approved_filter( $approved, $commentdata ) { + return new WP_Error( 'comment_wrong', 'pre_comment_approved filter fails for new comment.', 403 ); } } diff --git a/tests/phpunit/tests/ajax/Response.php b/tests/phpunit/tests/ajax/Response.php index c8e4e3b1298be..986c0971dabfd 100644 --- a/tests/phpunit/tests/ajax/Response.php +++ b/tests/phpunit/tests/ajax/Response.php @@ -20,8 +20,8 @@ class Tests_Ajax_Response extends WP_UnitTestCase { * Set up the test fixture. * Override wp_die(), pretend to be ajax, and suppres E_WARNINGs */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 ); add_filter( 'wp_doing_ajax', '__return_true' ); @@ -35,10 +35,10 @@ public function setUp() { * Tear down the test fixture. * Remove the wp_die() override, restore error reporting */ - public function tearDown() { + public function tear_down() { remove_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 ); error_reporting( $this->_error_level ); - parent::tearDown(); + parent::tear_down(); } /** @@ -70,13 +70,10 @@ public function dieHandler( $message ) { * @runInSeparateProcess * @preserveGlobalState disabled * @group xdebug + * @requires function xdebug_get_headers */ public function test_response_charset_in_header() { - if ( ! function_exists( 'xdebug_get_headers' ) ) { - $this->markTestSkipped( 'xdebug is required for this test' ); - } - // Generate an Ajax response. ob_start(); $ajax_response = new WP_Ajax_Response(); @@ -86,7 +83,7 @@ public function test_response_charset_in_header() { $headers = xdebug_get_headers(); ob_end_clean(); - $this->assertTrue( in_array( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers, true ) ); + $this->assertContains( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers ); } /** @@ -103,6 +100,6 @@ public function test_response_charset_in_xml() { // Check the XML tag. $contents = ob_get_clean(); - $this->assertRegExp( '/<\?xml\s+version=\'1.0\'\s+encoding=\'' . preg_quote( get_option( 'blog_charset' ) ) . '\'\s+standalone=\'yes\'\?>/', $contents ); + $this->assertMatchesRegularExpression( '/<\?xml\s+version=\'1.0\'\s+encoding=\'' . preg_quote( get_option( 'blog_charset' ) ) . '\'\s+standalone=\'yes\'\?>/', $contents ); } } diff --git a/tests/phpunit/tests/ajax/TagSearch.php b/tests/phpunit/tests/ajax/TagSearch.php index b8177bf60f543..971c8cb9953c7 100644 --- a/tests/phpunit/tests/ajax/TagSearch.php +++ b/tests/phpunit/tests/ajax/TagSearch.php @@ -31,7 +31,7 @@ class Tests_Ajax_TagSearch extends WP_Ajax_UnitTestCase { private static $term_ids = array(); - public static function wpSetUpBeforeClass() { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { foreach ( self::$terms as $t ) { self::$term_ids[] = wp_insert_term( $t, 'post_tag' ); } @@ -57,7 +57,7 @@ public function test_post_tag() { } // Ensure we found the right match. - $this->assertEquals( $this->_last_response, 'chattels' ); + $this->assertSame( $this->_last_response, 'chattels' ); } /** @@ -74,7 +74,8 @@ public function test_no_results() { // Make the request. // No output, so we get a stop exception. - $this->setExpectedException( 'WPAjaxDieStopException', '' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '' ); $this->_handleAjax( 'ajax-tag-search' ); } @@ -98,7 +99,7 @@ public function test_with_comma() { } // Ensure we found the right match. - $this->assertEquals( $this->_last_response, 'chattels' ); + $this->assertSame( $this->_last_response, 'chattels' ); } /** @@ -114,7 +115,8 @@ public function test_logged_out() { $_GET['q'] = 'chat'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'ajax-tag-search' ); } @@ -131,7 +133,8 @@ public function test_invalid_tax() { $_GET['q'] = 'chat'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '0' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '0' ); $this->_handleAjax( 'ajax-tag-search' ); } @@ -148,7 +151,8 @@ public function test_unprivileged_user() { $_GET['q'] = 'chat'; // Make the request. - $this->setExpectedException( 'WPAjaxDieStopException', '-1' ); + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'ajax-tag-search' ); } diff --git a/tests/phpunit/tests/ajax/UpdatePlugin.php b/tests/phpunit/tests/ajax/UpdatePlugin.php index c761bddd48d12..44ce630633a41 100644 --- a/tests/phpunit/tests/ajax/UpdatePlugin.php +++ b/tests/phpunit/tests/ajax/UpdatePlugin.php @@ -10,11 +10,10 @@ * @group ajax */ class Tests_Ajax_Update_Plugin extends WP_Ajax_UnitTestCase { - /** - * @expectedException WPAjaxDieStopException - * @expectedExceptionMessage -1 - */ + public function test_missing_nonce() { + $this->expectException( 'WPAjaxDieStopException' ); + $this->expectExceptionMessage( '-1' ); $this->_handleAjax( 'update-plugin' ); } @@ -41,7 +40,7 @@ public function test_missing_plugin() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_missing_slug() { @@ -67,7 +66,7 @@ public function test_missing_slug() { ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_missing_capability() { @@ -90,13 +89,13 @@ public function test_missing_capability() { 'data' => array( 'update' => 'plugin', 'slug' => 'foo', - 'errorMessage' => 'Sorry, you are not allowed to update plugins for this site.', 'oldVersion' => '', 'newVersion' => '', + 'errorMessage' => 'Sorry, you are not allowed to update plugins for this site.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } public function test_invalid_file() { @@ -121,15 +120,18 @@ public function test_invalid_file() { 'data' => array( 'update' => 'plugin', 'slug' => 'foo', - 'errorMessage' => 'Sorry, you are not allowed to update plugins for this site.', 'oldVersion' => '', 'newVersion' => '', + 'errorMessage' => 'Sorry, you are not allowed to update plugins for this site.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } + /** + * @group ms-excluded + */ public function test_update_plugin() { $this->_setRole( 'administrator' ); @@ -155,15 +157,15 @@ public function test_update_plugin() { 'data' => array( 'update' => 'plugin', 'slug' => 'hello-dolly', - 'plugin' => 'hello.php', - 'pluginName' => 'Hello Dolly', - 'errorMessage' => 'Plugin update failed.', 'oldVersion' => 'Version 1.7.2', 'newVersion' => '', + 'plugin' => 'hello.php', + 'pluginName' => 'Hello Dolly', 'debug' => array( 'The plugin is at the latest version.' ), + 'errorMessage' => 'The plugin is at the latest version.', ), ); - $this->assertEqualSets( $expected, $response ); + $this->assertSameSets( $expected, $response ); } } diff --git a/tests/phpunit/tests/attachment/slashes.php b/tests/phpunit/tests/attachment/slashes.php index ad5811b193bd9..8cb7c484870c7 100644 --- a/tests/phpunit/tests/attachment/slashes.php +++ b/tests/phpunit/tests/attachment/slashes.php @@ -6,10 +6,16 @@ * @ticket 21767 */ class Tests_Attachment_Slashes extends WP_UnitTestCase { - function setUp() { - parent::setUp(); - $this->author_id = self::factory()->user->create( array( 'role' => 'editor' ) ); - wp_set_current_user( $this->author_id ); + protected static $author_id; + + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + self::$author_id = $factory->user->create( array( 'role' => 'editor' ) ); + } + + public function set_up() { + parent::set_up(); + + wp_set_current_user( self::$author_id ); // It is important to test with both even and odd numbered slashes, // as KSES does a strip-then-add slashes in some of its function calls. @@ -25,8 +31,8 @@ function setUp() { /** * Tests the model function that expects slashed data. */ - function test_wp_insert_attachment() { - $id = wp_insert_attachment( + public function test_wp_insert_attachment() { + $post_id = wp_insert_attachment( array( 'post_status' => 'publish', 'post_title' => $this->slash_1, @@ -35,13 +41,13 @@ function test_wp_insert_attachment() { 'post_type' => 'post', ) ); - $post = get_post( $id ); + $post = get_post( $post_id ); - $this->assertEquals( wp_unslash( $this->slash_1 ), $post->post_title ); - $this->assertEquals( wp_unslash( $this->slash_3 ), $post->post_content_filtered ); - $this->assertEquals( wp_unslash( $this->slash_5 ), $post->post_excerpt ); + $this->assertSame( wp_unslash( $this->slash_1 ), $post->post_title ); + $this->assertSame( wp_unslash( $this->slash_3 ), $post->post_content_filtered ); + $this->assertSame( wp_unslash( $this->slash_5 ), $post->post_excerpt ); - $id = wp_insert_attachment( + $post_id = wp_insert_attachment( array( 'post_status' => 'publish', 'post_title' => $this->slash_2, @@ -50,11 +56,11 @@ function test_wp_insert_attachment() { 'post_type' => 'post', ) ); - $post = get_post( $id ); + $post = get_post( $post_id ); - $this->assertEquals( wp_unslash( $this->slash_2 ), $post->post_title ); - $this->assertEquals( wp_unslash( $this->slash_4 ), $post->post_content_filtered ); - $this->assertEquals( wp_unslash( $this->slash_6 ), $post->post_excerpt ); + $this->assertSame( wp_unslash( $this->slash_2 ), $post->post_title ); + $this->assertSame( wp_unslash( $this->slash_4 ), $post->post_content_filtered ); + $this->assertSame( wp_unslash( $this->slash_6 ), $post->post_excerpt ); } } diff --git a/tests/phpunit/tests/auth.php b/tests/phpunit/tests/auth.php index d1046cd940af2..3567a8bba5900 100644 --- a/tests/phpunit/tests/auth.php +++ b/tests/phpunit/tests/auth.php @@ -6,6 +6,10 @@ */ class Tests_Auth extends WP_UnitTestCase { protected $user; + + /** + * @var WP_User + */ protected static $_user; protected static $user_id; protected static $wp_hasher; @@ -15,7 +19,7 @@ class Tests_Auth extends WP_UnitTestCase { */ protected $nonce_failure_hook = 'wp_verify_nonce_failed'; - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$_user = $factory->user->create_and_get( array( 'user_login' => 'password-tests', @@ -28,48 +32,58 @@ public static function wpSetUpBeforeClass( $factory ) { self::$wp_hasher = new PasswordHash( 8, true ); } - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->user = clone self::$_user; wp_set_current_user( self::$user_id ); + update_site_option( 'using_application_passwords', 1 ); + + unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], $GLOBALS['wp_rest_application_password_status'], $GLOBALS['wp_rest_application_password_uuid'] ); + } + + public function tear_down() { + // Cleanup all the global state. + unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], $GLOBALS['wp_rest_application_password_status'], $GLOBALS['wp_rest_application_password_uuid'] ); + + parent::tear_down(); } - function test_auth_cookie_valid() { + public function test_auth_cookie_valid() { $cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'auth' ); - $this->assertEquals( self::$user_id, wp_validate_auth_cookie( $cookie, 'auth' ) ); + $this->assertSame( self::$user_id, wp_validate_auth_cookie( $cookie, 'auth' ) ); } - function test_auth_cookie_invalid() { + public function test_auth_cookie_invalid() { // 3600 or less and +3600 may occur in wp_validate_auth_cookie(), // as an ajax test may have defined DOING_AJAX, failing the test. $cookie = wp_generate_auth_cookie( self::$user_id, time() - 7200, 'auth' ); - $this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'auth' ), 'expired cookie' ); + $this->assertFalse( wp_validate_auth_cookie( $cookie, 'auth' ), 'expired cookie' ); $cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'auth' ); - $this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'logged_in' ), 'wrong auth scheme' ); + $this->assertFalse( wp_validate_auth_cookie( $cookie, 'logged_in' ), 'wrong auth scheme' ); $cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'auth' ); list($a, $b, $c) = explode( '|', $cookie ); $cookie = $a . '|' . ( $b + 1 ) . '|' . $c; - $this->assertEquals( false, wp_validate_auth_cookie( self::$user_id, 'auth' ), 'altered cookie' ); + $this->assertFalse( wp_validate_auth_cookie( self::$user_id, 'auth' ), 'altered cookie' ); } - function test_auth_cookie_scheme() { + public function test_auth_cookie_scheme() { // Arbitrary scheme name. $cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'foo' ); - $this->assertEquals( self::$user_id, wp_validate_auth_cookie( $cookie, 'foo' ) ); + $this->assertSame( self::$user_id, wp_validate_auth_cookie( $cookie, 'foo' ) ); // Wrong scheme name - should fail. $cookie = wp_generate_auth_cookie( self::$user_id, time() + 3600, 'foo' ); - $this->assertEquals( false, wp_validate_auth_cookie( $cookie, 'bar' ) ); + $this->assertFalse( wp_validate_auth_cookie( $cookie, 'bar' ) ); } /** * @ticket 23494 */ - function test_password_trimming() { + public function test_password_trimming() { $passwords_to_test = array( 'a password with no trailing or leading spaces', 'a password with trailing spaces ', @@ -82,7 +96,7 @@ function test_password_trimming() { $authed_user = wp_authenticate( $this->user->user_login, $password_to_test ); $this->assertInstanceOf( 'WP_User', $authed_user ); - $this->assertEquals( $this->user->ID, $authed_user->ID ); + $this->assertSame( $this->user->ID, $authed_user->ID ); } } @@ -94,7 +108,7 @@ function test_password_trimming() { * * @ticket 24973 */ - function test_wp_hash_password_trimming() { + public function test_wp_hash_password_trimming() { $password = ' pass with leading whitespace'; $this->assertTrue( wp_check_password( 'pass with leading whitespace', wp_hash_password( $password ) ) ); @@ -115,7 +129,7 @@ function test_wp_hash_password_trimming() { /** * @ticket 29217 */ - function test_wp_verify_nonce_with_empty_arg() { + public function test_wp_verify_nonce_with_empty_arg() { $this->assertFalse( wp_verify_nonce( '' ) ); $this->assertFalse( wp_verify_nonce( null ) ); } @@ -123,32 +137,32 @@ function test_wp_verify_nonce_with_empty_arg() { /** * @ticket 29542 */ - function test_wp_verify_nonce_with_integer_arg() { + public function test_wp_verify_nonce_with_integer_arg() { $this->assertFalse( wp_verify_nonce( 1 ) ); } /** * @ticket 24030 */ - function test_wp_nonce_verify_failed() { + public function test_wp_nonce_verify_failed() { $nonce = substr( md5( uniqid() ), 0, 10 ); $count = did_action( $this->nonce_failure_hook ); wp_verify_nonce( $nonce, 'nonce_test_action' ); - $this->assertEquals( ( $count + 1 ), did_action( $this->nonce_failure_hook ) ); + $this->assertSame( ( $count + 1 ), did_action( $this->nonce_failure_hook ) ); } /** * @ticket 24030 */ - function test_wp_nonce_verify_success() { + public function test_wp_nonce_verify_success() { $nonce = wp_create_nonce( 'nonce_test_action' ); $count = did_action( $this->nonce_failure_hook ); wp_verify_nonce( $nonce, 'nonce_test_action' ); - $this->assertEquals( $count, did_action( $this->nonce_failure_hook ) ); + $this->assertSame( $count, did_action( $this->nonce_failure_hook ) ); } /** @@ -188,7 +202,7 @@ public function test_check_ajax_referer_with_no_action_triggers_doing_it_wrong() unset( $_REQUEST['_wpnonce'] ); } - function test_password_length_limit() { + public function test_password_length_limit() { $limit = str_repeat( 'a', 4096 ); wp_set_password( $limit, self::$user_id ); @@ -201,7 +215,7 @@ function test_password_length_limit() { $user = wp_authenticate( $this->user->user_login, $limit ); $this->assertInstanceOf( 'WP_User', $user ); - $this->assertEquals( self::$user_id, $user->ID ); + $this->assertSame( self::$user_id, $user->ID ); // One char too many. $user = wp_authenticate( $this->user->user_login, $limit . 'a' ); @@ -211,7 +225,7 @@ function test_password_length_limit() { wp_set_password( $limit . 'a', self::$user_id ); $user = get_user_by( 'id', self::$user_id ); // Password broken by setting it to be too long. - $this->assertEquals( '*', $user->data->user_pass ); + $this->assertSame( '*', $user->data->user_pass ); $user = wp_authenticate( $this->user->user_login, '*' ); $this->assertInstanceOf( 'WP_Error', $user ); @@ -238,7 +252,7 @@ function test_password_length_limit() { /** * @ticket 45746 */ - function test_user_activation_key_is_saved() { + public function test_user_activation_key_is_saved() { $user = get_userdata( $this->user->ID ); $key = get_password_reset_key( $user ); @@ -252,7 +266,7 @@ function test_user_activation_key_is_saved() { /** * @ticket 32429 */ - function test_user_activation_key_is_checked() { + public function test_user_activation_key_is_checked() { global $wpdb; $key = wp_generate_password( 20, false ); @@ -290,7 +304,7 @@ function test_user_activation_key_is_checked() { /** * @ticket 32429 */ - function test_expired_user_activation_key_is_rejected() { + public function test_expired_user_activation_key_is_rejected() { global $wpdb; $key = wp_generate_password( 20, false ); @@ -313,7 +327,7 @@ function test_expired_user_activation_key_is_rejected() { /** * @ticket 32429 */ - function test_empty_user_activation_key_fails_key_check() { + public function test_empty_user_activation_key_fails_key_check() { // An empty user_activation_key should not allow any key to be accepted. $check = check_password_reset_key( 'key', $this->user->user_login ); $this->assertInstanceOf( 'WP_Error', $check ); @@ -326,7 +340,7 @@ function test_empty_user_activation_key_fails_key_check() { /** * @ticket 32429 */ - function test_legacy_user_activation_key_is_rejected() { + public function test_legacy_user_activation_key_is_rejected() { global $wpdb; // A legacy user_activation_key is one without the `time()` prefix introduced in WordPress 4.3. @@ -356,7 +370,7 @@ function test_legacy_user_activation_key_is_rejected() { * @ticket 32429 * @ticket 24783 */ - function test_plaintext_user_activation_key_is_rejected() { + public function test_plaintext_user_activation_key_is_rejected() { global $wpdb; // A plaintext user_activation_key is one stored before hashing was introduced in WordPress 3.7. @@ -414,4 +428,211 @@ public function test_wp_signon_using_email_with_an_apostrophe() { $this->assertInstanceOf( 'WP_User', wp_signon() ); } + /** + * HTTP Auth headers are used to determine the current user. + * + * @ticket 42790 + * + * @covers ::wp_validate_application_password + */ + public function test_application_password_authentication() { + $user_id = $this->factory()->user->create( + array( + 'user_login' => 'http_auth_login', + 'user_pass' => 'http_auth_pass', // Shouldn't be allowed for API login. + ) + ); + + // Create a new app-only password. + list( $user_app_password, $item ) = WP_Application_Passwords::create_new_application_password( $user_id, array( 'name' => 'phpunit' ) ); + + // Fake a REST API request. + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + // Fake an HTTP Auth request with the regular account password first. + $_SERVER['PHP_AUTH_USER'] = 'http_auth_login'; + $_SERVER['PHP_AUTH_PW'] = 'http_auth_pass'; + + $this->assertNull( + wp_validate_application_password( null ), + 'Regular user account password should not be allowed for API authentication' + ); + $this->assertNull( rest_get_authenticated_app_password() ); + + // Not try with an App password instead. + $_SERVER['PHP_AUTH_PW'] = $user_app_password; + + $this->assertSame( + $user_id, + wp_validate_application_password( null ), + 'Application passwords should be allowed for API authentication' + ); + $this->assertSame( $item['uuid'], rest_get_authenticated_app_password() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_respects_existing_user() { + $this->assertSame( self::$_user, wp_authenticate_application_password( self::$_user, self::$_user->user_login, 'password' ) ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_is_rejected_if_not_api_request() { + add_filter( 'application_password_is_api_request', '__return_false' ); + + $this->assertNull( wp_authenticate_application_password( null, self::$_user->user_login, 'password' ) ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_invalid_username() { + add_filter( 'application_password_is_api_request', '__return_true' ); + + $error = wp_authenticate_application_password( null, 'idonotexist', 'password' ); + $this->assertWPError( $error ); + $this->assertSame( 'invalid_username', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_invalid_email() { + add_filter( 'application_password_is_api_request', '__return_true' ); + + $error = wp_authenticate_application_password( null, 'idonotexist@example.org', 'password' ); + $this->assertWPError( $error ); + $this->assertSame( 'invalid_email', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_not_allowed() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_false' ); + + $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' ); + $this->assertWPError( $error ); + $this->assertSame( 'application_passwords_disabled', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_not_allowed_for_user() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + add_filter( 'wp_is_application_passwords_available_for_user', '__return_false' ); + + $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' ); + $this->assertWPError( $error ); + $this->assertSame( 'application_passwords_disabled_for_user', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_incorrect_password() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + $error = wp_authenticate_application_password( null, self::$_user->user_login, 'password' ); + $this->assertWPError( $error ); + $this->assertSame( 'incorrect_password', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_custom_errors() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + add_action( + 'wp_authenticate_application_password_errors', + static function ( WP_Error $error ) { + $error->add( 'my_code', 'My Error' ); + } + ); + + list( $password ) = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'phpunit' ) ); + + $error = wp_authenticate_application_password( null, self::$_user->user_login, $password ); + $this->assertWPError( $error ); + $this->assertSame( 'my_code', $error->get_error_code() ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_by_username() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + list( $password ) = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'phpunit' ) ); + + $user = wp_authenticate_application_password( null, self::$_user->user_login, $password ); + $this->assertInstanceOf( WP_User::class, $user ); + $this->assertSame( self::$user_id, $user->ID ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_by_email() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + list( $password ) = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'phpunit' ) ); + + $user = wp_authenticate_application_password( null, self::$_user->user_email, $password ); + $this->assertInstanceOf( WP_User::class, $user ); + $this->assertSame( self::$user_id, $user->ID ); + } + + /** + * @ticket 42790 + */ + public function test_authenticate_application_password_chunked() { + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + list( $password ) = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'phpunit' ) ); + + $user = wp_authenticate_application_password( null, self::$_user->user_email, WP_Application_Passwords::chunk_password( $password ) ); + $this->assertInstanceOf( WP_User::class, $user ); + $this->assertSame( self::$user_id, $user->ID ); + } + + /** + * @ticket 51939 + */ + public function test_authenticate_application_password_returns_null_if_not_in_use() { + delete_site_option( 'using_application_passwords' ); + + $authenticated = wp_authenticate_application_password( null, 'idonotexist', 'password' ); + $this->assertNull( $authenticated ); + } + + /** + * @ticket 52003 + * + * @covers ::wp_validate_application_password + */ + public function test_application_passwords_does_not_attempt_auth_if_missing_password() { + WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'phpunit' ) ); + + add_filter( 'application_password_is_api_request', '__return_true' ); + add_filter( 'wp_is_application_passwords_available', '__return_true' ); + + $_SERVER['PHP_AUTH_USER'] = self::$_user->user_login; + unset( $_SERVER['PHP_AUTH_PW'] ); + + $this->assertNull( wp_validate_application_password( null ) ); + } } diff --git a/tests/phpunit/tests/avatar.php b/tests/phpunit/tests/avatar.php index 5649944230c7c..336ab611e26ad 100644 --- a/tests/phpunit/tests/avatar.php +++ b/tests/phpunit/tests/avatar.php @@ -11,7 +11,7 @@ class Tests_Avatar extends WP_UnitTestCase { */ public function test_get_avatar_url_gravatar_url() { $url = get_avatar_url( 1 ); - $this->assertEquals( preg_match( '|^http?://[0-9]+.gravatar.com/avatar/[0-9a-f]{32}\?|', $url ), 1 ); + $this->assertSame( preg_match( '|^http?://[0-9]+.gravatar.com/avatar/[0-9a-f]{32}\?|', $url ), 1 ); } /** @@ -19,11 +19,11 @@ public function test_get_avatar_url_gravatar_url() { */ public function test_get_avatar_url_size() { $url = get_avatar_url( 1 ); - $this->assertEquals( preg_match( '|\?.*s=96|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*s=96|', $url ), 1 ); $args = array( 'size' => 100 ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|\?.*s=100|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*s=100|', $url ), 1 ); } /** @@ -31,16 +31,16 @@ public function test_get_avatar_url_size() { */ public function test_get_avatar_url_default() { $url = get_avatar_url( 1 ); - $this->assertEquals( preg_match( '|\?.*d=mm|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*d=mm|', $url ), 1 ); $args = array( 'default' => 'wavatar' ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|\?.*d=wavatar|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*d=wavatar|', $url ), 1 ); - $this->assertEquals( preg_match( '|\?.*f=y|', $url ), 0 ); + $this->assertSame( preg_match( '|\?.*f=y|', $url ), 0 ); $args = array( 'force_default' => true ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|\?.*f=y|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*f=y|', $url ), 1 ); } /** @@ -48,11 +48,11 @@ public function test_get_avatar_url_default() { */ public function test_get_avatar_url_rating() { $url = get_avatar_url( 1 ); - $this->assertEquals( preg_match( '|\?.*r=g|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*r=g|', $url ), 1 ); $args = array( 'rating' => 'M' ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|\?.*r=m|', $url ), 1 ); + $this->assertSame( preg_match( '|\?.*r=m|', $url ), 1 ); } /** @@ -60,15 +60,15 @@ public function test_get_avatar_url_rating() { */ public function test_get_avatar_url_scheme() { $url = get_avatar_url( 1 ); - $this->assertEquals( preg_match( '|^http://|', $url ), 1 ); + $this->assertSame( preg_match( '|^http://|', $url ), 1 ); $args = array( 'scheme' => 'https' ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|^https://|', $url ), 1 ); + $this->assertSame( preg_match( '|^https://|', $url ), 1 ); $args = array( 'scheme' => 'lolcat' ); $url = get_avatar_url( 1, $args ); - $this->assertEquals( preg_match( '|^lolcat://|', $url ), 0 ); + $this->assertSame( preg_match( '|^lolcat://|', $url ), 0 ); } /** @@ -78,19 +78,19 @@ public function test_get_avatar_url_user() { $url = get_avatar_url( 1 ); $url2 = get_avatar_url( WP_TESTS_EMAIL ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); $url2 = get_avatar_url( md5( WP_TESTS_EMAIL ) . '@md5.gravatar.com' ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); $user = get_user_by( 'id', 1 ); $url2 = get_avatar_url( $user ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); $post_id = self::factory()->post->create( array( 'post_author' => 1 ) ); $post = get_post( $post_id ); $url2 = get_avatar_url( $post ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); $comment_id = self::factory()->comment->create( array( @@ -100,7 +100,7 @@ public function test_get_avatar_url_user() { ); $comment = get_comment( $comment_id ); $url2 = get_avatar_url( $comment ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); } protected $fake_url; @@ -114,7 +114,7 @@ public function test_pre_get_avatar_url_filter() { $url = get_avatar_url( 1 ); remove_filter( 'pre_get_avatar_data', array( $this, 'pre_get_avatar_url_filter' ), 10 ); - $this->assertEquals( $url, $this->fake_url ); + $this->assertSame( $url, $this->fake_url ); } public function pre_get_avatar_url_filter( $args ) { $args['url'] = $this->fake_url; @@ -131,7 +131,7 @@ public function test_get_avatar_url_filter() { $url = get_avatar_url( 1 ); remove_filter( 'get_avatar_url', array( $this, 'get_avatar_url_filter' ), 10 ); - $this->assertEquals( $url, $this->fake_url ); + $this->assertSame( $url, $this->fake_url ); } public function get_avatar_url_filter( $url ) { return $this->fake_url; @@ -160,7 +160,7 @@ public function test_get_avatar_comment_types_filter() { $url2 = get_avatar_url( $comment ); remove_filter( 'get_avatar_comment_types', array( $this, 'get_avatar_comment_types_filter' ), 10 ); - $this->assertEquals( $url, $url2 ); + $this->assertSame( $url, $url2 ); } public function get_avatar_comment_types_filter( $comment_types ) { $comment_types[] = 'pingback'; @@ -169,30 +169,30 @@ public function get_avatar_comment_types_filter( $comment_types ) { public function test_get_avatar() { $img = get_avatar( 1 ); - $this->assertEquals( preg_match( "|^[^$|", $img ), 1 ); + $this->assertSame( preg_match( "|^[^$|", $img ), 1 ); } public function test_get_avatar_size() { $size = '100'; $img = get_avatar( 1, $size ); - $this->assertEquals( preg_match( "|^assertSame( preg_match( "|^assertEquals( preg_match( "|^$altassertSame( preg_match( "|^$alt $class ) ); - $this->assertEquals( preg_match( "|^assertSame( preg_match( "|^ true ) ); - $this->assertEquals( preg_match( "|^assertSame( preg_match( "|^assertEquals( $img, $this->fake_img ); + $this->assertSame( $img, $this->fake_img ); } public function pre_get_avatar_filter( $img ) { return $this->fake_img; @@ -234,7 +234,7 @@ public function test_get_avatar_filter() { $img = get_avatar( 1 ); remove_filter( 'get_avatar', array( $this, 'get_avatar_filter' ), 10 ); - $this->assertEquals( $img, $this->fake_url ); + $this->assertSame( $img, $this->fake_url ); } public function get_avatar_filter( $img ) { return $this->fake_url; @@ -257,7 +257,7 @@ public function test_get_avatar_data_should_return_gravatar_url_when_input_avata $actual_data = get_avatar_data( $comment ); $this->assertTrue( is_avatar_comment_type( $comment_type ) ); - $this->assertRegexp( '|^http?://[0-9]+.gravatar.com/avatar/[0-9a-f]{32}\?|', $actual_data['url'] ); + $this->assertMatchesRegularExpression( '|^http?://[0-9]+.gravatar.com/avatar/[0-9a-f]{32}\?|', $actual_data['url'] ); } /** diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index 4facb8454b853..5ffd6b24701fc 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -7,17 +7,17 @@ */ class Tests_Basic extends WP_UnitTestCase { - function test_license() { + public function test_license() { // This test is designed to only run on trunk/master. $this->skipOnAutomatedBranches(); $license = file_get_contents( ABSPATH . 'license.txt' ); preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); $this_year = gmdate( 'Y' ); - $this->assertEquals( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); + $this->assertSame( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); } - function test_security_md() { + public function test_security_md() { // This test is designed to only run on trunk/master. $this->skipOnAutomatedBranches(); @@ -25,10 +25,10 @@ function test_security_md() { preg_match( '#\d.\d.x#', $security, $matches ); $current_version = substr( $GLOBALS['wp_version'], 0, 3 ); $latest_stable = sprintf( '%s.x', (float) $current_version - 0.1 ); - $this->assertEquals( $latest_stable, trim( $matches[0] ), "SECURITY.md's version needs to be updated to $latest_stable." ); + $this->assertSame( $latest_stable, trim( $matches[0] ), "SECURITY.md's version needs to be updated to $latest_stable." ); } - function test_package_json() { + public function test_package_json() { $package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' ); $package_json = json_decode( $package_json, true ); list( $version ) = explode( '-', $GLOBALS['wp_version'] ); @@ -36,26 +36,24 @@ function test_package_json() { if ( 1 === substr_count( $version, '.' ) ) { $version .= '.0'; } - $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); + $this->assertSame( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); return $package_json; } /** * @depends test_package_json */ - function test_package_json_node_engine( $package_json ) { + public function test_package_json_node_engine( $package_json ) { $this->assertArrayHasKey( 'engines', $package_json ); $this->assertArrayHasKey( 'node', $package_json['engines'] ); - $node = $package_json['engines']['node']; - $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); } // Test some helper utility functions. - function test_strip_ws() { - $this->assertEquals( '', strip_ws( '' ) ); - $this->assertEquals( 'foo', strip_ws( 'foo' ) ); - $this->assertEquals( '', strip_ws( "\r\n\t \n\r\t" ) ); + public function test_strip_ws() { + $this->assertSame( '', strip_ws( '' ) ); + $this->assertSame( 'foo', strip_ws( 'foo' ) ); + $this->assertSame( '', strip_ws( "\r\n\t \n\r\t" ) ); $in = "asdf\n"; $in .= "asdf asdf\n"; @@ -75,11 +73,11 @@ function test_strip_ws() { $expected .= "foo bar\n"; $expected .= 'foo'; - $this->assertEquals( $expected, strip_ws( $in ) ); + $this->assertSame( $expected, strip_ws( $in ) ); } - function test_mask_input_value() { + public function test_mask_input_value() { $in = <<Assign Authors

        To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as admins entries.

        @@ -93,6 +91,6 @@ function test_mask_input_value() {

        If a new user is created by WordPress, the password will be set, by default, to "changeme". Quite suggestive, eh? ;)

        1. Current author: Alex Shiels
          Create user
          or map to existing'; $hidden = get_comment_id_fields( $p ); - $this->assertRegExp( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); + $this->assertMatchesRegularExpression( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); } public function test_custom_submit_button() { @@ -35,7 +35,7 @@ public function test_custom_submit_button() { $form = get_echo( 'comment_form', array( $args, $p ) ); $button = ''; - $this->assertContains( $button, $form ); + $this->assertStringContainsString( $button, $form ); } public function test_custom_submit_field() { @@ -53,7 +53,7 @@ public function test_custom_submit_field() { $button = ''; $hidden = get_comment_id_fields( $p ); - $this->assertRegExp( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); + $this->assertMatchesRegularExpression( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); } /** @@ -75,7 +75,7 @@ public function test_submit_button_and_submit_field_should_fall_back_on_defaults $button = ''; $hidden = get_comment_id_fields( $p ); - $this->assertRegExp( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); + $this->assertMatchesRegularExpression( '|

          \s*' . $button . '\s*' . $hidden . '\s*|', $form ); } public function filter_comment_form_defaults( $defaults ) { @@ -102,7 +102,7 @@ public function test_fields_should_include_cookies_consent() { remove_filter( 'option_show_comments_cookies_opt_in', '__return_true' ); - $this->assertRegExp( '|

          |', $form ); + $this->assertMatchesRegularExpression( '||', $form ); } /** @@ -113,7 +113,7 @@ public function test_aria_describedby_email_notes_should_not_be_added_if_no_emai $form_with_aria = get_echo( 'comment_form', array( array(), $p ) ); - $this->assertContains( 'aria-describedby="email-notes"', $form_with_aria ); + $this->assertStringContainsString( 'aria-describedby="email-notes"', $form_with_aria ); $args = array( 'comment_notes_before' => '', @@ -121,6 +121,6 @@ public function test_aria_describedby_email_notes_should_not_be_added_if_no_emai $form_without_aria = get_echo( 'comment_form', array( $args, $p ) ); - $this->assertNotContains( 'aria-describedby="email-notes"', $form_without_aria ); + $this->assertStringNotContainsString( 'aria-describedby="email-notes"', $form_without_aria ); } } diff --git a/tests/phpunit/tests/comment/commentsTemplate.php b/tests/phpunit/tests/comment/commentsTemplate.php index d5bf72d2f844b..7135118485a8a 100644 --- a/tests/phpunit/tests/comment/commentsTemplate.php +++ b/tests/phpunit/tests/comment/commentsTemplate.php @@ -558,7 +558,7 @@ public function test_comment_permalinks_should_be_correct_when_using_default_dis // This is the main post page, so we don't expect any cpage param. foreach ( $matches[1] as $m ) { - $this->assertNotContains( 'cpage', $m ); + $this->assertStringNotContainsString( 'cpage', $m ); } $link_p2 = add_query_arg( @@ -578,7 +578,7 @@ public function test_comment_permalinks_should_be_correct_when_using_default_dis // They should all be on page 2. foreach ( $matches[1] as $m ) { - $this->assertContains( 'cpage=2', $m ); + $this->assertStringContainsString( 'cpage=2', $m ); } } @@ -650,7 +650,7 @@ public function test_comment_permalinks_should_be_correct_when_using_default_dis preg_match_all( '|href="(.*?#comment-([0-9]+))|', $found_p0, $matches ); foreach ( $matches[1] as $m ) { - $this->assertContains( 'cpage=3', $m ); + $this->assertStringContainsString( 'cpage=3', $m ); } $link_p2 = add_query_arg( @@ -670,7 +670,7 @@ public function test_comment_permalinks_should_be_correct_when_using_default_dis // They should all be on page 2. foreach ( $matches[1] as $m ) { - $this->assertContains( 'cpage=2', $m ); + $this->assertStringContainsString( 'cpage=2', $m ); } // p1 is the last page (neat!). @@ -691,7 +691,7 @@ public function test_comment_permalinks_should_be_correct_when_using_default_dis // They should all be on page 2. foreach ( $matches[1] as $m ) { - $this->assertContains( 'cpage=1', $m ); + $this->assertStringContainsString( 'cpage=1', $m ); } } @@ -960,4 +960,124 @@ public function test_pagination_calculation_should_ignore_comment_hierarchy_when $found_cids = array_map( 'intval', $matches[1] ); $this->assertSame( array( $comment_3 ), $found_cids ); } + + /** + * @ticket 38074 + * @dataProvider data_comments_template_top_level_query_args + * + * @param array $expected Array of expected values. + * @param array $query_args Args for the 'comments_template_query_args' filter. + * @param array $top_level_query_args Args for the 'comments_template_top_level_query_args' filter. + */ + public function test_comments_template_top_level_query_args( $expected, $query_args, $top_level_query_args ) { + $now = time(); + $offset = 0; + $p = self::factory()->post->create(); + $comment_ids = array(); + + for ( $num = 1; $num <= 6; $num++ ) { + $comment_ids[ $num ] = self::factory()->comment->create( + array( + 'comment_post_ID' => $p, + 'comment_content' => "{$num}", + 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 * $num ), + ) + ); + add_comment_meta( $comment_ids[ $num ], 'featured', $num > 3 ? '1' : '0' ); + } + + update_option( 'comment_order', 'asc' ); + update_option( 'comments_per_page', 3 ); + update_option( 'page_comments', 1 ); + update_option( 'default_comments_page', 'newest' ); + + add_filter( + 'comments_template_query_args', + static function ( $args ) use ( &$offset, $query_args ) { + $offset = $args['offset']; + + return array_merge( $args, $query_args ); + } + ); + + if ( ! empty( $top_level_query_args ) ) { + add_filter( + 'comments_template_top_level_query_args', + static function ( $args ) use ( $top_level_query_args ) { + return array_merge( $args, $top_level_query_args ); + } + ); + } + + $this->go_to( get_permalink( $p ) ); + + $found = get_echo( 'comments_template' ); + preg_match_all( '/id="comment-([0-9]+)"/', $found, $matches ); + + $expected_ids = array(); + foreach ( $expected['ids'] as $index ) { + $expected_ids[] = $comment_ids[ $index ]; + } + + $this->assertSame( $expected_ids, array_map( 'intval', $matches[1] ) ); + $this->assertEquals( $expected['offset'], $offset ); + } + + public function data_comments_template_top_level_query_args() { + return array( + array( + array( + 'ids' => array(), + 'offset' => 3, + ), + array( + 'meta_key' => 'featured', + 'meta_value' => '1', + ), + array(), + ), + array( + array( + 'ids' => array(), + 'offset' => 3, + ), + array( + 'order' => 'DESC', + 'meta_key' => 'featured', + 'meta_value' => '0', + ), + array(), + ), + array( + array( + 'ids' => array( 6, 5, 4 ), + 'offset' => 0, + ), + array( + 'meta_key' => 'featured', + 'meta_value' => '1', + ), + array( + 'meta_key' => 'featured', + 'meta_value' => '1', + ), + ), + array( + array( + 'ids' => array( 4, 5, 6 ), + 'offset' => 0, + ), + array( + 'order' => 'DESC', + 'meta_key' => 'featured', + 'meta_value' => '1', + ), + array( + 'order' => 'DESC', + 'meta_key' => 'featured', + 'meta_value' => '1', + ), + ), + ); + } } diff --git a/tests/phpunit/tests/comment/dateQuery.php b/tests/phpunit/tests/comment/dateQuery.php index d4ba9d7492a68..c59497a835c80 100644 --- a/tests/phpunit/tests/comment/dateQuery.php +++ b/tests/phpunit/tests/comment/dateQuery.php @@ -17,8 +17,8 @@ class Tests_Comment_DateQuery extends WP_UnitTestCase { public $posts = array(); - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); // Just some dummy posts to use as parents for comments. for ( $i = 1; $i <= 2; $i++ ) { @@ -77,6 +77,6 @@ public function test_year() { '2008-12-10 13:06:27', ); - $this->assertEquals( $expected_dates, wp_list_pluck( $comments, 'comment_date' ) ); + $this->assertSame( $expected_dates, wp_list_pluck( $comments, 'comment_date' ) ); } } diff --git a/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php b/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php index cf00539bb44aa..a5ed6aef6bfeb 100644 --- a/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php +++ b/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php @@ -5,8 +5,8 @@ class Tests_Comment_GetCommentAuthorEmailLink extends WP_UnitTestCase { public static $comment; - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); // Fake the 'comment' global. $GLOBALS['comment'] = self::$comment; @@ -15,14 +15,12 @@ public function setUp() { remove_filter( 'comment_email', 'antispambot' ); } - public function tearDown() { + public function tear_down() { unset( $GLOBALS['comment'] ); - parent::tearDown(); - - add_filter( 'comment_email', 'antispambot' ); + parent::tear_down(); } - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$comment = $factory->comment->create_and_get( array( 'comment_author_email' => 'foo@example.org', @@ -33,7 +31,7 @@ public static function wpSetUpBeforeClass( $factory ) { public function test_global_comment_with_default_parameters() { $expected = 'foo@example.org'; - $this->assertEquals( $expected, get_comment_author_email_link() ); + $this->assertSame( $expected, get_comment_author_email_link() ); } /** @@ -53,7 +51,7 @@ public function test_all_parameters() { $expected = sprintf( '%1$s%3$s%4$s', $before, $email, $linktext, $after ); - $this->assertEquals( $expected, get_comment_author_email_link( $linktext, $before, $after, $comment ) ); + $this->assertSame( $expected, get_comment_author_email_link( $linktext, $before, $after, $comment ) ); } public function test_all_parameters_with_global_comment() { @@ -63,25 +61,25 @@ public function test_all_parameters_with_global_comment() { $expected = sprintf( '%1$s%2$s%3$s', $before, $linktext, $after ); - $this->assertEquals( $expected, get_comment_author_email_link( $linktext, $before, $after ) ); + $this->assertSame( $expected, get_comment_author_email_link( $linktext, $before, $after ) ); } public function test_linktext() { $expected = sprintf( '%1$s', $linktext = 'linktext' ); - $this->assertEquals( $expected, get_comment_author_email_link( $linktext ) ); + $this->assertSame( $expected, get_comment_author_email_link( $linktext ) ); } public function test_before() { $expected = sprintf( '%1$sfoo@example.org', $before = 'before' ); - $this->assertEquals( $expected, get_comment_author_email_link( '', $before ) ); + $this->assertSame( $expected, get_comment_author_email_link( '', $before ) ); } public function test_after() { $expected = sprintf( 'foo@example.org%1$s', $after = 'after' ); - $this->assertEquals( $expected, get_comment_author_email_link( '', '', $after ) ); + $this->assertSame( $expected, get_comment_author_email_link( '', '', $after ) ); } /** @@ -96,6 +94,6 @@ public function test_comment_param_should_override_global() { $expected = sprintf( '%2$s', $email, $email ); - $this->assertEquals( $expected, get_comment_author_email_link( '', '', '', $comment ) ); + $this->assertSame( $expected, get_comment_author_email_link( '', '', '', $comment ) ); } } diff --git a/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php b/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php index c123e932c2eeb..6fd82cb796d90 100644 --- a/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php +++ b/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php @@ -6,7 +6,7 @@ class Tests_Comment_GetCommentAuthorUrlLink extends WP_UnitTestCase { protected static $comments = array(); - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { unset( $GLOBALS['comment'] ); $comment_ids = $factory->comment->create_post_comments( 0, 1 ); @@ -27,7 +27,7 @@ protected function parseCommentAuthorUrl( $comment, $linktext = '' ) { public function test_no_comment() { $url_link = get_comment_author_url_link(); - $this->assertEquals( "", $url_link ); + $this->assertSame( "", $url_link ); } public function test_global_comment() { @@ -36,7 +36,7 @@ public function test_global_comment() { $url_link = get_comment_author_url_link(); $link = $this->parseCommentAuthorUrl( $comment ); - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } public function test_comment_arg() { @@ -44,7 +44,7 @@ public function test_comment_arg() { $url_link = get_comment_author_url_link( '', '', '', $comment ); $link = $this->parseCommentAuthorUrl( $comment ); - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } public function test_linktext() { @@ -52,7 +52,7 @@ public function test_linktext() { $url_link = get_comment_author_url_link( 'Burrito', '', '', $comment ); $link = $this->parseCommentAuthorUrl( $comment, 'Burrito' ); - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } public function test_before() { @@ -60,7 +60,7 @@ public function test_before() { $url_link = get_comment_author_url_link( 'Burrito', 'I would love a ', '', $comment ); $link = 'I would love a ' . $this->parseCommentAuthorUrl( $comment, 'Burrito' ); - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } public function test_after() { @@ -68,7 +68,7 @@ public function test_after() { $url_link = get_comment_author_url_link( 'Burrito', '', ' is my favorite word.', $comment ); $link = $this->parseCommentAuthorUrl( $comment, 'Burrito' ) . ' is my favorite word.'; - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } public function test_before_after() { @@ -76,6 +76,6 @@ public function test_before_after() { $url_link = get_comment_author_url_link( 'Burrito', 'I would love a ', ' right now.', $comment ); $link = 'I would love a ' . $this->parseCommentAuthorUrl( $comment, 'Burrito' ) . ' right now.'; - $this->assertEquals( $link, $url_link ); + $this->assertSame( $link, $url_link ); } } diff --git a/tests/phpunit/tests/comment/getCommentExcerpt.php b/tests/phpunit/tests/comment/getCommentExcerpt.php index d4b8a4c01ca89..3338a859bf237 100644 --- a/tests/phpunit/tests/comment/getCommentExcerpt.php +++ b/tests/phpunit/tests/comment/getCommentExcerpt.php @@ -1,17 +1,11 @@ comment->create( @@ -22,7 +16,7 @@ public function test_get_comment_excerpt() { $excerpt = get_comment_excerpt( $comment_id ); - $this->assertEquals( 20, count( explode( ' ', $excerpt ) ) ); + $this->assertCount( 20, explode( ' ', $excerpt ) ); } public function test_get_comment_excerpt_filtered() { @@ -36,7 +30,7 @@ public function test_get_comment_excerpt_filtered() { $excerpt = get_comment_excerpt( $comment_id ); - $this->assertEquals( 10, count( explode( ' ', $excerpt ) ) ); + $this->assertCount( 10, explode( ' ', $excerpt ) ); } public function _filter_comment_excerpt_length() { diff --git a/tests/phpunit/tests/comment/getCommentLink.php b/tests/phpunit/tests/comment/getCommentLink.php index 03ccf923ab8b1..fcb51c2c5bbb2 100644 --- a/tests/phpunit/tests/comment/getCommentLink.php +++ b/tests/phpunit/tests/comment/getCommentLink.php @@ -7,46 +7,46 @@ class Tests_Comment_GetCommentLink extends WP_UnitTestCase { protected static $p; protected static $comments = array(); - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { $now = time(); - self::$p = self::factory()->post->create(); + self::$p = $factory->post->create(); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '1', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 100 ), ) ); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '2', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 200 ), ) ); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '3', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 300 ), ) ); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '4', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 400 ), ) ); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '4', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 500 ), ) ); - self::$comments[] = self::factory()->comment->create( + self::$comments[] = $factory->comment->create( array( 'comment_post_ID' => self::$p, 'comment_content' => '4', @@ -66,7 +66,7 @@ public function test_default_comments_page_newest_default_page_should_have_cpage $found = get_comment_link( self::$comments[1] ); - $this->assertContains( 'cpage=3', $found ); + $this->assertStringContainsString( 'cpage=3', $found ); } /** @@ -79,7 +79,7 @@ public function test_default_comments_page_newest_middle_page_should_have_cpage( $found = get_comment_link( self::$comments[3] ); - $this->assertContains( 'cpage=2', $found ); + $this->assertStringContainsString( 'cpage=2', $found ); } /** @@ -92,7 +92,7 @@ public function test_default_comments_page_newest_last_page_should_have_cpage() $found = get_comment_link( self::$comments[5] ); - $this->assertContains( 'cpage=1', $found ); + $this->assertStringContainsString( 'cpage=1', $found ); } /** @@ -104,7 +104,7 @@ public function test_default_comments_page_oldest_default_page_should_not_have_c $found = get_comment_link( self::$comments[5] ); - $this->assertNotContains( 'cpage', $found ); + $this->assertStringNotContainsString( 'cpage', $found ); } /** @@ -117,7 +117,7 @@ public function test_default_comments_page_oldest_middle_page_should_have_cpage( $found = get_comment_link( self::$comments[3] ); - $this->assertContains( 'cpage=2', $found ); + $this->assertStringContainsString( 'cpage=2', $found ); } /** @@ -130,7 +130,7 @@ public function test_default_comments_page_oldest_last_page_should_have_cpage() $found = get_comment_link( self::$comments[1] ); - $this->assertContains( 'cpage=3', $found ); + $this->assertStringContainsString( 'cpage=3', $found ); } /** @@ -142,6 +142,6 @@ public function test_should_not_contain_comment_page_1_when_pagination_is_disabl $found = get_comment_link( self::$comments[1] ); - $this->assertNotContains( 'comment-page-1', $found ); + $this->assertStringNotContainsString( 'comment-page-1', $found ); } } diff --git a/tests/phpunit/tests/comment/getCommentReplyLink.php b/tests/phpunit/tests/comment/getCommentReplyLink.php index 73e288501cddb..76332a5742e5d 100644 --- a/tests/phpunit/tests/comment/getCommentReplyLink.php +++ b/tests/phpunit/tests/comment/getCommentReplyLink.php @@ -64,7 +64,7 @@ public function test_get_comment_reply_link_should_include_post_permalink() { ) ); - $this->assertContains( $expected_url, $comment_reply_link ); + $this->assertStringContainsString( $expected_url, $comment_reply_link ); } /** diff --git a/tests/phpunit/tests/comment/getCommentsPagesCount.php b/tests/phpunit/tests/comment/getCommentsPagesCount.php index 5fc5d52d470a0..eb03cfb3f07f6 100644 --- a/tests/phpunit/tests/comment/getCommentsPagesCount.php +++ b/tests/phpunit/tests/comment/getCommentsPagesCount.php @@ -13,8 +13,8 @@ class Tests_Comment_GetCommentsPagesCount extends WP_UnitTestCase { /** * setUp options */ - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->option_page_comments = get_option( 'page_comments' ); $this->option_page_comments = get_option( 'comments_per_page' ); $this->option_page_comments = get_option( 'thread_comments' ); @@ -26,18 +26,18 @@ function setUp() { /** * tearDown options */ - function tearDown() { + public function tear_down() { update_option( 'page_comments', $this->option_page_comments ); update_option( 'comments_per_page', $this->option_page_comments ); update_option( 'thread_comments', $this->option_page_comments ); update_option( 'posts_per_rss', $this->option_posts_per_rss ); - parent::tearDown(); + parent::tear_down(); } /** * Validate get_comments_pages_count for empty comments */ - function test_empty() { + public function test_empty() { // Setup post and comments. $post_id = self::factory()->post->create( array( @@ -52,19 +52,19 @@ function test_empty() { $comments = get_comments( array( 'post_id' => $post_id ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments, 10, false ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments, 1, false ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments, 0, false ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments, 10, true ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments, 5 ) ); - $this->assertEquals( 0, get_comment_pages_count( $comments ) ); - $this->assertequals( 0, get_comment_pages_count( null, 1 ) ); + $this->assertSame( 0, get_comment_pages_count( $comments, 10, false ) ); + $this->assertSame( 0, get_comment_pages_count( $comments, 1, false ) ); + $this->assertSame( 0, get_comment_pages_count( $comments, 0, false ) ); + $this->assertSame( 0, get_comment_pages_count( $comments, 10, true ) ); + $this->assertSame( 0, get_comment_pages_count( $comments, 5 ) ); + $this->assertSame( 0, get_comment_pages_count( $comments ) ); + $this->assertSame( 0, get_comment_pages_count( null, 1 ) ); } /** * Validate get_comments_pages_count for treaded comments */ - function test_threaded_comments() { + public function test_threaded_comments() { // Setup post and comments. $post = self::factory()->post->create_and_get( array( @@ -84,7 +84,7 @@ function test_threaded_comments() { /** * Validate get_comments_pages_count for option tread_comments */ - function test_option_thread_comments() { + public function test_option_thread_comments() { // Setup post and comments. $post = self::factory()->post->create_and_get( @@ -115,7 +115,7 @@ function test_option_thread_comments() { /** * Validate $wp_query logic of get_comment_pages_count */ - function test_wp_query_comments_per_page() { + public function test_wp_query_comments_per_page() { global $wp_query; update_option( 'posts_per_rss', 100 ); @@ -164,7 +164,7 @@ function test_wp_query_comments_per_page() { /** * Validate max_num_comment_pages logic of get_comment_pages_count */ - function test_max_num_comment_pages() { + public function test_max_num_comment_pages() { global $wp_query; $wp_query = new WP_Query(); diff --git a/tests/phpunit/tests/comment/getPageOfComment.php b/tests/phpunit/tests/comment/getPageOfComment.php index 5059625660dc6..7cdf85ba41279 100644 --- a/tests/phpunit/tests/comment/getPageOfComment.php +++ b/tests/phpunit/tests/comment/getPageOfComment.php @@ -28,11 +28,11 @@ public function test_last_comment() { self::factory()->comment->create_post_comments( $p, 1, array( 'comment_date' => '2013-09-15 00:00:00' ) ); $comment_first = self::factory()->comment->create_post_comments( $p, 1, array( 'comment_date' => '2013-09-14 00:00:00' ) ); - $this->assertEquals( 4, get_page_of_comment( $comment_last[0], array( 'per_page' => 3 ) ) ); - $this->assertEquals( 2, get_page_of_comment( $comment_last[0], array( 'per_page' => 10 ) ) ); + $this->assertSame( 4, get_page_of_comment( $comment_last[0], array( 'per_page' => 3 ) ) ); + $this->assertSame( 2, get_page_of_comment( $comment_last[0], array( 'per_page' => 10 ) ) ); - $this->assertEquals( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 3 ) ) ); - $this->assertEquals( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 10 ) ) ); + $this->assertSame( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 3 ) ) ); + $this->assertSame( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 10 ) ) ); } public function test_type_pings() { @@ -63,7 +63,7 @@ public function test_type_pings() { $now -= 10 * $i; } - $this->assertEquals( + $this->assertSame( 2, get_page_of_comment( $trackbacks[0], @@ -73,7 +73,7 @@ public function test_type_pings() { ) ) ); - $this->assertEquals( + $this->assertSame( 3, get_page_of_comment( $pingbacks[0], @@ -83,7 +83,7 @@ public function test_type_pings() { ) ) ); - $this->assertEquals( + $this->assertSame( 5, get_page_of_comment( $trackbacks[0], @@ -148,7 +148,7 @@ public function test_cache_hits_should_be_sensitive_to_comment_type() { 'type' => 'trackback', ) ); - $this->assertEquals( 2, $page_trackbacks ); + $this->assertSame( 2, $page_trackbacks ); $num_queries = $wpdb->num_queries; $page_comments = get_page_of_comment( @@ -158,7 +158,7 @@ public function test_cache_hits_should_be_sensitive_to_comment_type() { 'type' => 'comment', ) ); - $this->assertEquals( 1, $page_comments ); + $this->assertSame( 1, $page_comments ); $this->assertNotEquals( $num_queries, $wpdb->num_queries ); } @@ -243,11 +243,11 @@ public function test_cache_should_be_invalidated_when_older_comment_is_published ) ); - $this->assertEquals( 1, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); + $this->assertSame( 1, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); wp_set_comment_status( $c3, '1' ); - $this->assertEquals( 2, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); + $this->assertSame( 2, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); } /** @@ -275,10 +275,10 @@ public function test_query_should_be_limited_to_comments_on_the_proper_post() { } $found_0 = get_page_of_comment( $comments_0[0], array( 'per_page' => 2 ) ); - $this->assertEquals( 3, $found_0 ); + $this->assertSame( 3, $found_0 ); $found_1 = get_page_of_comment( $comments_1[1], array( 'per_page' => 2 ) ); - $this->assertEquals( 2, $found_1 ); + $this->assertSame( 2, $found_1 ); } /** @@ -357,7 +357,7 @@ public function test_comments_per_page_option_should_be_fallback_when_query_var_ update_option( 'page_comments', 1 ); update_option( 'comments_per_page', 2 ); - $this->assertEquals( 2, get_page_of_comment( $c1 ) ); + $this->assertSame( 2, get_page_of_comment( $c1 ) ); } /** @@ -397,7 +397,7 @@ public function test_should_ignore_comment_order() { update_option( 'page_comments', 1 ); update_option( 'comments_per_page', 1 ); - $this->assertEquals( 2, get_page_of_comment( $c3 ) ); + $this->assertSame( 2, get_page_of_comment( $c3 ) ); } /** @@ -437,6 +437,113 @@ public function test_should_ignore_default_comment_page() { update_option( 'page_comments', 1 ); update_option( 'comments_per_page', 1 ); - $this->assertEquals( 2, get_page_of_comment( $c3 ) ); + $this->assertSame( 2, get_page_of_comment( $c3 ) ); + } + + /** + * @ticket 8973 + */ + public function test_page_number_when_unapproved_comments_are_included_for_current_commenter() { + $post = self::factory()->post->create(); + $comment_args = array( + 'comment_post_ID' => $post, + 'comment_approved' => 0, + 'comment_author_email' => 'foo@bar.test', + 'comment_author' => 'Foo', + 'comment_author_url' => 'https://bar.test', + ); + + for ( $i = 1; $i < 4; $i++ ) { + self::factory()->comment->create( + array_merge( + $comment_args, + array( + 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', time() - ( $i * 1000 ) ), + ) + ) + ); + } + + $new_unapproved = self::factory()->comment->create( + $comment_args + ); + + add_filter( 'wp_get_current_commenter', array( $this, 'get_current_commenter' ) ); + + $page = get_page_of_comment( $new_unapproved, array( 'per_page' => 3 ) ); + $comments = get_comments( + array( + 'number' => 3, + 'paged' => $page, + 'post_id' => $post, + 'status' => 'approve', + 'include_unapproved' => array( 'foo@bar.test' ), + 'orderby' => 'comment_date_gmt', + 'order' => 'ASC', + ) + ); + + remove_filter( 'wp_get_current_commenter', array( $this, 'get_current_commenter' ) ); + + $this->assertContains( (string) $new_unapproved, wp_list_pluck( $comments, 'comment_ID' ) ); + } + + public function get_current_commenter() { + return array( + 'comment_author_email' => 'foo@bar.test', + 'comment_author' => 'Foo', + 'comment_author_url' => 'https://bar.test', + ); + } + + /** + * @ticket 8973 + */ + public function test_page_number_when_unapproved_comments_are_included_for_current_user() { + $current_user = get_current_user_id(); + $post = self::factory()->post->create(); + $user = self::factory()->user->create_and_get(); + $comment_args = array( + 'comment_post_ID' => $post, + 'comment_approved' => 0, + 'comment_author_email' => $user->user_email, + 'comment_author' => $user->display_name, + 'comment_author_url' => $user->user_url, + 'user_id' => $user->ID, + ); + + for ( $i = 1; $i < 4; $i++ ) { + self::factory()->comment->create( + array_merge( + $comment_args, + array( + 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', time() - ( $i * 1000 ) ), + ) + ) + ); + } + + $new_unapproved = self::factory()->comment->create( + $comment_args + ); + + wp_set_current_user( $user->ID ); + + $page = get_page_of_comment( $new_unapproved, array( 'per_page' => 3 ) ); + $comments = get_comments( + array( + 'number' => 3, + 'paged' => $page, + 'post_id' => $post, + 'status' => 'approve', + 'include_unapproved' => array( $user->ID ), + 'orderby' => 'comment_date_gmt', + 'order' => 'ASC', + ) + ); + + $this->assertContains( (string) $new_unapproved, wp_list_pluck( $comments, 'comment_ID' ) ); + + wp_set_current_user( $current_user ); } } diff --git a/tests/phpunit/tests/comment/isAvatarCommentType.php b/tests/phpunit/tests/comment/isAvatarCommentType.php index b01e019315b96..fe7e7482d30b3 100644 --- a/tests/phpunit/tests/comment/isAvatarCommentType.php +++ b/tests/phpunit/tests/comment/isAvatarCommentType.php @@ -11,7 +11,7 @@ * Tests_Comment_IsAvatarCommentType class. * * @group comment - * @covers is_avatar_comment_type + * @covers ::is_avatar_comment_type * * @since 5.1.0 */ diff --git a/tests/phpunit/tests/comment/lastCommentModified.php b/tests/phpunit/tests/comment/lastCommentModified.php index bbb6c265fba26..4369743cbb6e8 100644 --- a/tests/phpunit/tests/comment/lastCommentModified.php +++ b/tests/phpunit/tests/comment/lastCommentModified.php @@ -2,7 +2,7 @@ /** * @group comment - * @group 38027 + * @ticket 38027 */ class Tests_Comment_Last_Modified extends WP_UnitTestCase { public function test_no_comments() { diff --git a/tests/phpunit/tests/comment/metaCache.php b/tests/phpunit/tests/comment/metaCache.php index a455654e11fec..bcfd6b5fdbce5 100644 --- a/tests/phpunit/tests/comment/metaCache.php +++ b/tests/phpunit/tests/comment/metaCache.php @@ -233,7 +233,7 @@ public function test_add_metadata_sets_comments_last_changed() { wp_cache_delete( 'last_changed', 'comment' ); - $this->assertInternalType( 'integer', add_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); + $this->assertIsInt( add_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); $this->assertNotFalse( wp_cache_get_last_changed( 'comment' ) ); } @@ -245,7 +245,7 @@ public function test_update_metadata_sets_comments_last_changed() { wp_cache_delete( 'last_changed', 'comment' ); - $this->assertInternalType( 'integer', update_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); + $this->assertIsInt( update_metadata( 'comment', $comment_id, 'foo', 'bar' ) ); $this->assertNotFalse( wp_cache_get_last_changed( 'comment' ) ); } diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index d8f96b1c82cc9..68265dfdacf46 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -9,14 +9,10 @@ class Tests_Comment_Query extends WP_UnitTestCase { protected static $post_id; protected $comment_id; - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$post_id = $factory->post->create(); } - function setUp() { - parent::setUp(); - } - public function test_query() { $c1 = self::factory()->comment->create( array( @@ -60,7 +56,7 @@ public function test_query() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } public function test_query_post_id_0() { @@ -79,7 +75,7 @@ public function test_query_post_id_0() { ) ); - $this->assertEqualSets( array( $c1 ), $found ); + $this->assertSameSets( array( $c1 ), $found ); } /** @@ -129,7 +125,7 @@ public function test_query_type_empty_string() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } /** @@ -179,7 +175,7 @@ public function test_query_type_comment() { ) ); - $this->assertEqualSets( array( $c1 ), $found ); + $this->assertSameSets( array( $c1 ), $found ); } public function test_query_type_pingback() { @@ -219,7 +215,7 @@ public function test_query_type_pingback() { ) ); - $this->assertEqualSets( array( $c2, $c3 ), $found ); + $this->assertSameSets( array( $c2, $c3 ), $found ); } @@ -260,7 +256,7 @@ public function test_query_type_trackback() { ) ); - $this->assertEqualSets( array( $c2, $c3 ), $found ); + $this->assertSameSets( array( $c2, $c3 ), $found ); } @@ -311,7 +307,7 @@ public function test_query_type_pings() { ) ); - $this->assertEqualSets( array( $c2, $c3 ), $found ); + $this->assertSameSets( array( $c2, $c3 ), $found ); } /** @@ -370,7 +366,7 @@ public function test_type_array_comments_and_custom() { ) ); - $this->assertEqualSets( array( $c1, $c4, $c6 ), $found ); + $this->assertSameSets( array( $c1, $c4, $c6 ), $found ); } /** @@ -427,7 +423,7 @@ public function test_type_not__in_array_custom() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); } /** @@ -485,7 +481,7 @@ public function test_type__in_array_and_not_type_array_custom() { ) ); - $this->assertEqualSets( array( $c1 ), $found ); + $this->assertSameSets( array( $c1 ), $found ); } /** @@ -543,7 +539,7 @@ public function test_type_array_and_type__not_in_array_custom() { ) ); - $this->assertEqualSets( array( $c2, $c3 ), $found ); + $this->assertSameSets( array( $c2, $c3 ), $found ); } /** @@ -600,7 +596,7 @@ public function test_type__not_in_custom() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); } /** @@ -650,7 +646,7 @@ public function test_type_array_comments_and_pings() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** @@ -686,7 +682,7 @@ public function test_type_array_comment_pings() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** @@ -722,7 +718,7 @@ public function test_type_array_pingback() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } /** @@ -758,7 +754,7 @@ public function test_type_array_custom_pingpack() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } /** @@ -794,7 +790,7 @@ public function test_type_array_pings() { ) ); - $this->assertEqualSets( array( $c2, $c3 ), $found ); + $this->assertSameSets( array( $c2, $c3 ), $found ); } /** @@ -838,7 +834,7 @@ public function test_type_status_approved_array_comment_pings() { ) ); - $this->assertEqualSets( array( $c3, $c2 ), $found ); + $this->assertSameSets( array( $c3, $c2 ), $found ); } /** @@ -874,7 +870,7 @@ public function test_type_array_trackback() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } /** @@ -910,7 +906,7 @@ public function test_type_array_custom_trackback() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } /** @@ -954,7 +950,7 @@ public function test_type_array_pings_approved() { ) ); - $this->assertEqualSets( array( $c3, $c2 ), $found ); + $this->assertSameSets( array( $c3, $c2 ), $found ); } /** @@ -988,7 +984,7 @@ public function test_status_empty_string() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $found ); + $this->assertSameSets( array( $c1, $c2 ), $found ); } /** @@ -1016,7 +1012,7 @@ public function test_status_hold() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } /** @@ -1044,7 +1040,7 @@ public function test_status_approve() { ) ); - $this->assertEquals( array( $c1 ), $found ); + $this->assertSame( array( $c1 ), $found ); } public function test_status_custom() { @@ -1075,7 +1071,7 @@ public function test_status_custom() { ) ); - $this->assertEquals( array( $c2 ), $found ); + $this->assertSame( array( $c2 ), $found ); } public function test_status_all() { @@ -1106,7 +1102,7 @@ public function test_status_all() { ) ); - $this->assertEqualSets( array( $c1, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c3 ), $found ); } public function test_status_default_to_all() { @@ -1136,7 +1132,7 @@ public function test_status_default_to_all() { ) ); - $this->assertEqualSets( array( $c1, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c3 ), $found ); } /** @@ -1170,7 +1166,7 @@ public function test_status_comma_any() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** @@ -1204,7 +1200,7 @@ public function test_status_comma_separated() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $found ); + $this->assertSameSets( array( $c1, $c2 ), $found ); } /** @@ -1238,7 +1234,7 @@ public function test_status_array() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $found ); + $this->assertSameSets( array( $c1, $c2 ), $found ); } /** @@ -1288,29 +1284,32 @@ public function test_multiple_post_fields_should_all_be_respected() { $this->assertSame( array( $comments[2] ), $q->comments ); } - function test_get_comments_for_post() { + public function test_get_comments_for_post() { $limit = 5; $post_id = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id, $limit ); + $comments = get_comments( array( 'post_id' => $post_id ) ); - $this->assertEquals( $limit, count( $comments ) ); + $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id, $comment->comment_post_ID ); } $post_id2 = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id2, $limit ); + $comments = get_comments( array( 'post_id' => $post_id2 ) ); - $this->assertEquals( $limit, count( $comments ) ); + $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id2, $comment->comment_post_ID ); } $post_id3 = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '0' ) ); + $comments = get_comments( array( 'post_id' => $post_id3 ) ); - $this->assertEquals( $limit, count( $comments ) ); + $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } @@ -1321,7 +1320,7 @@ function test_get_comments_for_post() { 'status' => 'hold', ) ); - $this->assertEquals( $limit, count( $comments ) ); + $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } @@ -1332,11 +1331,11 @@ function test_get_comments_for_post() { 'status' => 'approve', ) ); - $this->assertEquals( 0, count( $comments ) ); + $this->assertCount( 0, $comments ); self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '1' ) ); $comments = get_comments( array( 'post_id' => $post_id3 ) ); - $this->assertEquals( $limit * 2, count( $comments ) ); + $this->assertCount( $limit * 2, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } @@ -1345,7 +1344,7 @@ function test_get_comments_for_post() { /** * @ticket 21003 */ - function test_orderby_meta() { + public function test_orderby_meta() { $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); $comment_id2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); $comment_id3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); @@ -1363,7 +1362,7 @@ function test_orderby_meta() { 'orderby' => array( 'key' ), ) ); - $this->assertEquals( 2, count( $comments ) ); + $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id2, $comments[0]->comment_ID ); $this->assertEquals( $comment_id, $comments[1]->comment_ID ); @@ -1373,7 +1372,7 @@ function test_orderby_meta() { 'orderby' => array( 'meta_value' ), ) ); - $this->assertEquals( 2, count( $comments ) ); + $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id2, $comments[0]->comment_ID ); $this->assertEquals( $comment_id, $comments[1]->comment_ID ); @@ -1384,7 +1383,7 @@ function test_orderby_meta() { 'order' => 'ASC', ) ); - $this->assertEquals( 2, count( $comments ) ); + $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id, $comments[0]->comment_ID ); $this->assertEquals( $comment_id2, $comments[1]->comment_ID ); @@ -1395,7 +1394,7 @@ function test_orderby_meta() { 'order' => 'ASC', ) ); - $this->assertEquals( 2, count( $comments ) ); + $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id, $comments[0]->comment_ID ); $this->assertEquals( $comment_id2, $comments[1]->comment_ID ); @@ -1423,7 +1422,7 @@ function test_orderby_meta() { 'orderby' => array( 'key' ), ) ); - $this->assertEquals( 1, count( $comments ) ); + $this->assertCount( 1, $comments ); $comments = get_comments( array( @@ -1431,7 +1430,7 @@ function test_orderby_meta() { 'orderby' => array( 'meta_value' ), ) ); - $this->assertEquals( 1, count( $comments ) ); + $this->assertCount( 1, $comments ); } /** @@ -1458,7 +1457,7 @@ public function test_orderby_clause_key() { ) ); - $this->assertEquals( array( $comments[1], $comments[2], $comments[0] ), $found ); + $this->assertSame( array( $comments[1], $comments[2], $comments[0] ), $found ); } /** @@ -1502,7 +1501,7 @@ public function test_orderby_clause_key_as_secondary_sort() { ) ); - $this->assertEquals( array( $c3, $c1, $c2 ), $found ); + $this->assertSame( array( $c3, $c1, $c2 ), $found ); } /** @@ -1539,7 +1538,7 @@ public function test_orderby_more_than_one_clause_key() { ) ); - $this->assertEquals( array( $comments[2], $comments[0], $comments[1] ), $found ); + $this->assertSame( array( $comments[2], $comments[0], $comments[1] ), $found ); } /** @@ -1565,7 +1564,7 @@ public function test_meta_query_should_work_with_comment__in() { ) ); - $this->assertEquals( array( $comments[2] ), $q->get_comments() ); + $this->assertSame( array( $comments[2] ), $q->get_comments() ); } /** @@ -1591,13 +1590,13 @@ public function test_meta_query_should_work_with_comment__not_in() { ) ); - $this->assertEquals( array( $comments[0] ), $q->get_comments() ); + $this->assertSame( array( $comments[0] ), $q->get_comments() ); } /** * @ticket 27064 */ - function test_get_comments_by_user() { + public function test_get_comments_by_user() { $users = self::factory()->user->create_many( 2 ); self::factory()->comment->create( array( @@ -1684,13 +1683,13 @@ public function test_get_comments_by_author_url() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $comments ); + $this->assertSameSets( array( $c1, $c2 ), $comments ); } /** * @ticket 28434 */ - function test_fields_ids_query() { + public function test_fields_ids_query() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, @@ -1714,19 +1713,19 @@ function test_fields_ids_query() { ); // Ensure we are dealing with integers, and not objects. - $this->assertInternalType( 'integer', $comment_1 ); - $this->assertInternalType( 'integer', $comment_2 ); - $this->assertInternalType( 'integer', $comment_3 ); + $this->assertIsInt( $comment_1 ); + $this->assertIsInt( $comment_2 ); + $this->assertIsInt( $comment_3 ); $comment_ids = get_comments( array( 'fields' => 'ids' ) ); $this->assertCount( 3, $comment_ids ); - $this->assertEqualSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); + $this->assertSameSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); } /** * @ticket 29189 */ - function test_fields_comment__in() { + public function test_fields_comment__in() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, @@ -1756,13 +1755,13 @@ function test_fields_comment__in() { ) ); - $this->assertEqualSets( array( $comment_1, $comment_3 ), $comment_ids ); + $this->assertSameSets( array( $comment_1, $comment_3 ), $comment_ids ); } /** * @ticket 29189 */ - function test_fields_comment__not_in() { + public function test_fields_comment__not_in() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, @@ -1792,13 +1791,13 @@ function test_fields_comment__not_in() { ) ); - $this->assertEqualSets( array( $comment_1 ), $comment_ids ); + $this->assertSameSets( array( $comment_1 ), $comment_ids ); } /** * @ticket 29189 */ - function test_fields_post__in() { + public function test_fields_post__in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); @@ -1832,13 +1831,13 @@ function test_fields_post__in() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $comment_ids ); + $this->assertSameSets( array( $c1, $c2 ), $comment_ids ); } /** * @ticket 29189 */ - function test_fields_post__not_in() { + public function test_fields_post__not_in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); @@ -1872,13 +1871,13 @@ function test_fields_post__not_in() { ) ); - $this->assertEqualSets( array( $c3 ), $comment_ids ); + $this->assertSameSets( array( $c3 ), $comment_ids ); } /** * @ticket 29885 */ - function test_fields_post_author__in() { + public function test_fields_post_author__in() { $author_id1 = 105; $author_id2 = 106; @@ -1915,13 +1914,13 @@ function test_fields_post_author__in() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $comment_ids ); + $this->assertSameSets( array( $c1, $c2 ), $comment_ids ); } /** * @ticket 29885 */ - function test_fields_post_author__not_in() { + public function test_fields_post_author__not_in() { $author_id1 = 111; $author_id2 = 112; @@ -1958,13 +1957,13 @@ function test_fields_post_author__not_in() { ) ); - $this->assertEqualSets( array( $c3 ), $comment_ids ); + $this->assertSameSets( array( $c3 ), $comment_ids ); } /** * @ticket 29885 */ - function test_fields_author__in() { + public function test_fields_author__in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); @@ -2006,13 +2005,13 @@ function test_fields_author__in() { ) ); - $this->assertEqualSets( array( $c1, $c3 ), $comment_ids ); + $this->assertSameSets( array( $c1, $c3 ), $comment_ids ); } /** * @ticket 29885 */ - function test_fields_author__not_in() { + public function test_fields_author__not_in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); @@ -2054,7 +2053,7 @@ function test_fields_author__not_in() { ) ); - $this->assertEqualSets( array( $c3, $c4 ), $comment_ids ); + $this->assertSameSets( array( $c3, $c4 ), $comment_ids ); } /** @@ -2085,7 +2084,7 @@ public function test_get_comments_with_status_all() { $comments_approved_1 = get_comments( array( 'status' => 'all' ) ); $comment_ids = get_comments( array( 'fields' => 'ids' ) ); - $this->assertEqualSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); + $this->assertSameSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); } /** @@ -2129,7 +2128,7 @@ public function test_get_comments_with_include_unapproved_user_id() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** @@ -2180,7 +2179,7 @@ public function test_get_comments_with_include_unapproved_user_id_array() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** @@ -2231,7 +2230,7 @@ public function test_get_comments_with_include_unapproved_user_id_comma_separate ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** @@ -2281,7 +2280,7 @@ public function test_get_comments_with_include_unapproved_author_email() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** @@ -2340,7 +2339,7 @@ public function test_get_comments_with_include_unapproved_mixed_array() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** @@ -2399,7 +2398,7 @@ public function test_get_comments_with_include_unapproved_mixed_comma_separated( ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } public function test_search() { @@ -2472,7 +2471,7 @@ public function test_search() { ) ); - $this->assertEqualSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); + $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } /** @@ -2485,7 +2484,7 @@ public function test_search_false_should_be_ignored() { 'search' => false, ) ); - $this->assertNotContains( 'comment_author LIKE', $q->request ); + $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** @@ -2498,7 +2497,7 @@ public function test_search_null_should_be_ignored() { 'search' => null, ) ); - $this->assertNotContains( 'comment_author LIKE', $q->request ); + $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** @@ -2511,7 +2510,7 @@ public function test_search_empty_string_should_be_ignored() { 'search' => false, ) ); - $this->assertNotContains( 'comment_author LIKE', $q->request ); + $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** @@ -2525,7 +2524,7 @@ public function test_search_int_0_should_not_be_ignored() { 'search' => 0, ) ); - $this->assertContains( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); + $this->assertStringContainsString( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); } /** @@ -2539,7 +2538,7 @@ public function test_search_string_0_should_not_be_ignored() { 'search' => '0', ) ); - $this->assertContains( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); + $this->assertStringContainsString( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); } public function test_orderby_default() { @@ -2548,7 +2547,7 @@ public function test_orderby_default() { $q = new WP_Comment_Query(); $q->query( array() ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } public function test_orderby_single() { @@ -2561,7 +2560,7 @@ public function test_orderby_single() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent", $q->request ); } public function test_orderby_single_invalid() { @@ -2574,7 +2573,7 @@ public function test_orderby_single_invalid() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } public function test_orderby_space_separated() { @@ -2587,7 +2586,7 @@ public function test_orderby_space_separated() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } public function test_orderby_comma_separated() { @@ -2600,7 +2599,7 @@ public function test_orderby_comma_separated() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } public function test_orderby_flat_array() { @@ -2613,7 +2612,7 @@ public function test_orderby_flat_array() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } public function test_orderby_array_contains_invalid_item() { @@ -2626,7 +2625,7 @@ public function test_orderby_array_contains_invalid_item() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } public function test_orderby_array_contains_all_invalid_items() { @@ -2639,7 +2638,7 @@ public function test_orderby_array_contains_all_invalid_items() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } /** @@ -2653,7 +2652,7 @@ public function test_orderby_none() { ) ); - $this->assertNotContains( 'ORDER BY', $q->request ); + $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** @@ -2667,7 +2666,7 @@ public function test_orderby_empty_array() { ) ); - $this->assertNotContains( 'ORDER BY', $q->request ); + $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** @@ -2681,7 +2680,7 @@ public function test_orderby_false() { ) ); - $this->assertNotContains( 'ORDER BY', $q->request ); + $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** @@ -2702,7 +2701,7 @@ public function test_orderby_array() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID DESC", $q->request ); } /** @@ -2723,7 +2722,7 @@ public function test_orderby_array_should_discard_invalid_columns() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_ID DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_ID DESC", $q->request ); } /** @@ -2744,7 +2743,7 @@ public function test_orderby_array_should_convert_invalid_order_to_DESC() { ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt DESC, $wpdb->comments.comment_ID DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt DESC, $wpdb->comments.comment_ID DESC", $q->request ); } /** @@ -2764,7 +2763,7 @@ public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_sho ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID ASC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID ASC", $q->request ); } /** @@ -2784,7 +2783,7 @@ public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_sho ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date ASC, $wpdb->comments.comment_ID ASC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date ASC, $wpdb->comments.comment_ID ASC", $q->request ); } /** @@ -2803,7 +2802,7 @@ public function test_orderby_array_should_sort_by_comment_ID_DESC_as_fallback_wh ) ); - $this->assertContains( "ORDER BY $wpdb->comments.comment_agent ASC, $wpdb->comments.comment_ID DESC", $q->request ); + $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent ASC, $wpdb->comments.comment_ID DESC", $q->request ); } /** @@ -2896,7 +2895,7 @@ public function test_count() { ) ); - $this->assertEquals( 2, $found ); + $this->assertSame( 2, $found ); } /** @@ -2937,7 +2936,7 @@ public function test_count_with_meta_query() { ) ); - $this->assertEquals( 2, $found ); + $this->assertSame( 2, $found ); } /** @@ -3052,7 +3051,7 @@ public function test_post_type_single_value() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); _unregister_post_type( 'post-type-1' ); _unregister_post_type( 'post-type-2' ); @@ -3079,7 +3078,7 @@ public function test_post_type_singleton_array() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); _unregister_post_type( 'post-type-1' ); _unregister_post_type( 'post-type-2' ); @@ -3109,7 +3108,7 @@ public function test_post_type_array() { ) ); - $this->assertEqualSets( array_merge( $c1, $c3 ), $found ); + $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } public function test_post_name_single_value() { @@ -3127,7 +3126,7 @@ public function test_post_name_single_value() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); } /** @@ -3148,7 +3147,7 @@ public function test_post_name_singleton_array() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); } /** @@ -3171,7 +3170,7 @@ public function test_post_name_array() { ) ); - $this->assertEqualSets( array_merge( $c1, $c3 ), $found ); + $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } public function test_post_status_single_value() { @@ -3189,7 +3188,7 @@ public function test_post_status_single_value() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); } /** @@ -3210,7 +3209,7 @@ public function test_post_status_singleton_array() { ) ); - $this->assertEqualSets( $c2, $found ); + $this->assertSameSets( $c2, $found ); } /** @@ -3233,7 +3232,7 @@ public function test_post_status_array() { ) ); - $this->assertEqualSets( array_merge( $c1, $c3 ), $found ); + $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } /** @@ -3256,7 +3255,7 @@ public function test_post_type_any_should_override_other_post_types() { 'post_type' => array( 'any', 'post-type-1' ), ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $found ); + $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** @@ -3279,7 +3278,7 @@ public function test_post_type_any_as_part_of_an_array_of_post_types() { 'post_type' => array( 'any' ), ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $found ); + $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** @@ -3299,7 +3298,7 @@ public function test_post_status_any_should_override_other_post_statuses() { 'post_status' => array( 'any', 'draft' ), ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $found ); + $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** @@ -3319,7 +3318,7 @@ public function test_post_status_any_as_part_of_an_array_of_post_statuses() { 'post_status' => array( 'any' ), ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $found ); + $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** @@ -3332,9 +3331,9 @@ public function test_comment_query_object() { $this->assertNull( $query1->query_vars ); $this->assertEmpty( $query1->comments ); $comments = $query1->query( array( 'status' => 'all' ) ); - $this->assertInternalType( 'array', $query1->query_vars ); + $this->assertIsArray( $query1->query_vars ); $this->assertNotEmpty( $query1->comments ); - $this->assertInternalType( 'array', $query1->comments ); + $this->assertIsArray( $query1->comments ); $query2 = new WP_Comment_Query( array( 'status' => 'all' ) ); $this->assertNotEmpty( $query2->query_vars ); @@ -3443,7 +3442,7 @@ public function test_it_should_be_possible_to_modify_meta_query_using_pre_get_co remove_action( 'pre_get_comments', array( $this, 'modify_meta_query' ) ); - $this->assertEqualSets( array( $comments[1] ), $q->comments ); + $this->assertSameSets( array( $comments[1] ), $q->comments ); } public function modify_meta_query( $q ) { @@ -3481,7 +3480,7 @@ public function test_it_should_be_possible_to_modify_meta_params_using_pre_get_c remove_action( 'pre_get_comments', array( $this, 'modify_meta_params' ) ); - $this->assertEqualSets( array( $comments[1] ), $q->comments ); + $this->assertSameSets( array( $comments[1] ), $q->comments ); } public function modify_meta_params( $q ) { @@ -3515,7 +3514,7 @@ public function test_parent__in() { ) ); - $this->assertEqualSets( array( $c2 ), $ids->comments ); + $this->assertSameSets( array( $c2 ), $ids->comments ); } /** @@ -3557,7 +3556,7 @@ public function test_parent__in_commas() { ) ); - $this->assertEqualSets( array( $c3, $c4 ), $ids->comments ); + $this->assertSameSets( array( $c3, $c4 ), $ids->comments ); } /** @@ -3587,7 +3586,7 @@ public function test_parent__not_in() { ) ); - $this->assertEqualSets( array( $c1 ), $ids->comments ); + $this->assertSameSets( array( $c1 ), $ids->comments ); } /** @@ -3630,7 +3629,7 @@ public function test_parent__not_in_commas() { ) ); - $this->assertEqualSets( array( $c1, $c2 ), $ids->comments ); + $this->assertSameSets( array( $c1, $c2 ), $ids->comments ); } /** @@ -3672,7 +3671,7 @@ public function test_orderby_comment__in() { ) ); - $this->assertEquals( array( $c2, $c3 ), $ids->comments ); + $this->assertSame( array( $c2, $c3 ), $ids->comments ); } @@ -3689,8 +3688,8 @@ public function test_no_found_rows_should_default_to_true() { ) ); - $this->assertEquals( 0, $q->found_comments ); - $this->assertEquals( 0, $q->max_num_pages ); + $this->assertSame( 0, $q->found_comments ); + $this->assertSame( 0, $q->max_num_pages ); } /** @@ -3707,8 +3706,8 @@ public function test_should_respect_no_found_rows_true() { ) ); - $this->assertEquals( 0, $q->found_comments ); - $this->assertEquals( 0, $q->max_num_pages ); + $this->assertSame( 0, $q->found_comments ); + $this->assertSame( 0, $q->max_num_pages ); } /** @@ -3725,7 +3724,7 @@ public function test_should_respect_no_found_rows_false() { ) ); - $this->assertEquals( 3, $q->found_comments ); + $this->assertSame( 3, $q->found_comments ); $this->assertEquals( 2, $q->max_num_pages ); } @@ -3795,7 +3794,7 @@ public function test_hierarchical_should_skip_child_comments_in_offset() { ) ); - $this->assertEquals( array( $top_level_comments[0], $top_level_comments[1] ), $q->comments ); + $this->assertSame( array( $top_level_comments[0], $top_level_comments[1] ), $q->comments ); } /** @@ -4158,7 +4157,7 @@ public function test_cache_should_be_hit_when_querying_descendants() { ); $q2_ids = wp_list_pluck( $q2->comments, 'comment_ID' ); - $this->assertEqualSets( $q1_ids, $q2_ids ); + $this->assertSameSets( $q1_ids, $q2_ids ); $this->assertSame( $num_queries, $wpdb->num_queries ); } @@ -4220,7 +4219,7 @@ public function test_hierarchy_should_be_filled_when_cache_is_incomplete() { ) ); $q2_ids = wp_list_pluck( $q2->comments, 'comment_ID' ); - $this->assertEqualSets( $q1_ids, $q2_ids ); + $this->assertSameSets( $q1_ids, $q2_ids ); } /** @@ -4284,11 +4283,11 @@ public function test_fill_hierarchy_should_disregard_offset_and_number() { $found_1 = $found[ $c1 ]; $children_1 = $found_1->get_children(); - $this->assertEqualSets( array( $c2 ), array_keys( $children_1 ) ); + $this->assertSameSets( array( $c2 ), array_keys( $children_1 ) ); $found_3 = $found[ $c3 ]; $children_3 = $found_3->get_children(); - $this->assertEqualSets( array( $c4, $c5 ), array_keys( $children_3 ) ); + $this->assertSameSets( array( $c4, $c5 ), array_keys( $children_3 ) ); } /** @@ -4438,7 +4437,7 @@ public function test_created_comment_should_invalidate_query_cache() { ); $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array( $c ), $q->comments ); + $this->assertSameSets( array( $c ), $q->comments ); } public function test_updated_comment_should_invalidate_query_cache() { @@ -4478,7 +4477,7 @@ public function test_updated_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array( $c ), $q->comments ); + $this->assertSameSets( array( $c ), $q->comments ); } public function test_deleted_comment_should_invalidate_query_cache() { @@ -4511,7 +4510,7 @@ public function test_deleted_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array(), $q->comments ); + $this->assertSameSets( array(), $q->comments ); } public function test_trashed_comment_should_invalidate_query_cache() { @@ -4544,7 +4543,7 @@ public function test_trashed_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array(), $q->comments ); + $this->assertSameSets( array(), $q->comments ); } public function test_untrashed_comment_should_invalidate_query_cache() { @@ -4579,7 +4578,7 @@ public function test_untrashed_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array( $c ), $q->comments ); + $this->assertSameSets( array( $c ), $q->comments ); } public function test_spammed_comment_should_invalidate_query_cache() { @@ -4612,7 +4611,7 @@ public function test_spammed_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array(), $q->comments ); + $this->assertSameSets( array(), $q->comments ); } public function test_unspammed_comment_should_invalidate_query_cache() { @@ -4647,7 +4646,7 @@ public function test_unspammed_comment_should_invalidate_query_cache() { $num_queries++; $this->assertSame( $num_queries, $wpdb->num_queries ); - $this->assertEqualSets( array( $c ), $q->comments ); + $this->assertSameSets( array( $c ), $q->comments ); } /** @@ -4676,7 +4675,7 @@ public function test_count_query_should_miss_noncount_cache() { 'count' => true, ) ); - $this->assertEquals( $number_of_queries + 1, $wpdb->num_queries ); + $this->assertSame( $number_of_queries + 1, $wpdb->num_queries ); } /** @@ -4705,7 +4704,7 @@ public function test_count_query_should_hit_count_cache() { 'count' => true, ) ); - $this->assertEquals( $number_of_queries, $wpdb->num_queries ); + $this->assertSame( $number_of_queries, $wpdb->num_queries ); } /** @@ -4733,7 +4732,7 @@ public function test_different_values_of_fields_should_share_cached_values() { ) ); - $this->assertEquals( $number_of_queries, $wpdb->num_queries ); + $this->assertSame( $number_of_queries, $wpdb->num_queries ); } /** @@ -4763,7 +4762,7 @@ public function test_add_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( $c1, $cached ); + $this->assertSameSets( $c1, $cached ); foreach ( $c2 as $cid ) { add_comment_meta( $cid, 'sauce', 'fire' ); @@ -4782,7 +4781,7 @@ public function test_add_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $found ); + $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** @@ -4812,7 +4811,7 @@ public function test_update_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $cached ); + $this->assertSameSets( array_merge( $c1, $c2 ), $cached ); foreach ( $c2 as $cid ) { update_comment_meta( $cid, 'sauce', 'foo' ); @@ -4831,7 +4830,7 @@ public function test_update_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( $c1, $found ); + $this->assertSameSets( $c1, $found ); } /** @@ -4861,7 +4860,7 @@ public function test_delete_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( array_merge( $c1, $c2 ), $cached ); + $this->assertSameSets( array_merge( $c1, $c2 ), $cached ); foreach ( $c2 as $cid ) { delete_comment_meta( $cid, 'sauce' ); @@ -4880,7 +4879,7 @@ public function test_delete_comment_meta_should_invalidate_query_cache() { ) ); - $this->assertEqualSets( $c1, $found ); + $this->assertSameSets( $c1, $found ); } /** @@ -4904,8 +4903,8 @@ public function test_comments_pre_query_filter_should_bypass_database_query() { // We manually inserted a non-existing site and overrode the results with it. $this->assertSame( array( 555 ), $results ); - // Make sure manually setting total_users doesn't get overwritten. - $this->assertEquals( 1, $q->found_comments ); + // Make sure manually setting found_comments doesn't get overwritten. + $this->assertSame( 1, $q->found_comments ); } public static function filter_comments_pre_query( $comments, $query ) { @@ -4913,4 +4912,33 @@ public static function filter_comments_pre_query( $comments, $query ) { return array( 555 ); } + + /** + * @ticket 50521 + */ + public function test_comments_pre_query_filter_should_set_comments_property() { + add_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query_and_set_comments' ), 10, 2 ); + + $q = new WP_Comment_Query(); + $results = $q->query( array() ); + + remove_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query_and_set_comments' ), 10 ); + + // Make sure the comments property is the same as the results. + $this->assertSame( $results, $q->comments ); + + // Make sure the comment type is `foobar`. + $this->assertSame( 'foobar', $q->comments[0]->comment_type ); + } + + public static function filter_comments_pre_query_and_set_comments( $comments, $query ) { + $c = self::factory()->comment->create( + array( + 'comment_type' => 'foobar', + 'comment_approved' => '1', + ) + ); + + return array( get_comment( $c ) ); + } } diff --git a/tests/phpunit/tests/comment/slashes.php b/tests/phpunit/tests/comment/slashes.php index faaba42149943..5b0f061b070f0 100644 --- a/tests/phpunit/tests/comment/slashes.php +++ b/tests/phpunit/tests/comment/slashes.php @@ -6,11 +6,19 @@ * @ticket 21767 */ class Tests_Comment_Slashes extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + protected static $author_id; + protected static $post_id; + + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { // We need an admin user to bypass comment flood protection. - $this->author_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); - wp_set_current_user( $this->author_id ); + self::$author_id = $factory->user->create( array( 'role' => 'administrator' ) ); + self::$post_id = $factory->post->create(); + } + + public function set_up() { + parent::set_up(); + + wp_set_current_user( self::$author_id ); // It is important to test with both even and odd numbered slashes, // as KSES does a strip-then-add slashes in some of its function calls. @@ -26,12 +34,12 @@ function setUp() { /** * Tests the extended model function that expects slashed data. */ - function test_wp_new_comment() { - $post_id = self::factory()->post->create(); + public function test_wp_new_comment() { + $post_id = self::$post_id; // Not testing comment_author_email or comment_author_url // as slashes are not permitted in that data. - $data = array( + $data = array( 'comment_post_ID' => $post_id, 'comment_author' => $this->slash_1, 'comment_author_url' => '', @@ -39,14 +47,14 @@ function test_wp_new_comment() { 'comment_type' => '', 'comment_content' => $this->slash_7, ); - $id = wp_new_comment( $data ); + $comment_id = wp_new_comment( $data ); - $comment = get_comment( $id ); + $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_1 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_7 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content ); - $data = array( + $data = array( 'comment_post_ID' => $post_id, 'comment_author' => $this->slash_2, 'comment_author_url' => '', @@ -54,19 +62,19 @@ function test_wp_new_comment() { 'comment_type' => '', 'comment_content' => $this->slash_4, ); - $id = wp_new_comment( $data ); + $comment_id = wp_new_comment( $data ); - $comment = get_comment( $id ); + $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_2 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_4 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_4 ), $comment->comment_content ); } /** * Tests the controller function that expects slashed data. */ - function test_edit_comment() { - $post_id = self::factory()->post->create(); + public function test_edit_comment() { + $post_id = self::$post_id; $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => $post_id, @@ -88,8 +96,8 @@ function test_edit_comment() { edit_comment(); $comment = get_comment( $comment_id ); - $this->assertEquals( $this->slash_1, $comment->comment_author ); - $this->assertEquals( $this->slash_7, $comment->comment_content ); + $this->assertSame( $this->slash_1, $comment->comment_author ); + $this->assertSame( $this->slash_7, $comment->comment_content ); $_POST = array(); $_POST['comment_ID'] = $comment_id; @@ -104,15 +112,15 @@ function test_edit_comment() { edit_comment(); $comment = get_comment( $comment_id ); - $this->assertEquals( $this->slash_2, $comment->comment_author ); - $this->assertEquals( $this->slash_4, $comment->comment_content ); + $this->assertSame( $this->slash_2, $comment->comment_author ); + $this->assertSame( $this->slash_4, $comment->comment_content ); } /** * Tests the model function that expects slashed data. */ - function test_wp_insert_comment() { - $post_id = self::factory()->post->create(); + public function test_wp_insert_comment() { + $post_id = self::$post_id; $comment_id = wp_insert_comment( array( @@ -123,8 +131,8 @@ function test_wp_insert_comment() { ); $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_1 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_7 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content ); $comment_id = wp_insert_comment( array( @@ -135,15 +143,15 @@ function test_wp_insert_comment() { ); $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_2 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_4 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_4 ), $comment->comment_content ); } /** * Tests the model function that expects slashed data. */ - function test_wp_update_comment() { - $post_id = self::factory()->post->create(); + public function test_wp_update_comment() { + $post_id = self::$post_id; $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => $post_id, @@ -159,8 +167,8 @@ function test_wp_update_comment() { ); $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_1 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_7 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_1 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_7 ), $comment->comment_content ); wp_update_comment( array( @@ -171,8 +179,8 @@ function test_wp_update_comment() { ); $comment = get_comment( $comment_id ); - $this->assertEquals( wp_unslash( $this->slash_2 ), $comment->comment_author ); - $this->assertEquals( wp_unslash( $this->slash_4 ), $comment->comment_content ); + $this->assertSame( wp_unslash( $this->slash_2 ), $comment->comment_author ); + $this->assertSame( wp_unslash( $this->slash_4 ), $comment->comment_content ); } } diff --git a/tests/phpunit/tests/comment/template.php b/tests/phpunit/tests/comment/template.php index b5c52bd5dff0a..93e88ca107fce 100644 --- a/tests/phpunit/tests/comment/template.php +++ b/tests/phpunit/tests/comment/template.php @@ -3,71 +3,86 @@ * @group comment */ class Tests_Comment_Template extends WP_UnitTestCase { + /** + * Shared post ID. + * + * @var int + */ + public static $post_id; + + /** + * Set up shared fixtures. + * + * @param WP_UnitTest_Factory $factory Unit test factory. + */ + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + self::$post_id = self::factory()->post->create(); + } - function test_get_comments_number() { - $post_id = self::factory()->post->create(); + public function test_get_comments_number() { + $post_id = self::$post_id; - $this->assertEquals( 0, get_comments_number( 0 ) ); - $this->assertEquals( 0, get_comments_number( $post_id ) ); - $this->assertEquals( 0, get_comments_number( get_post( $post_id ) ) ); + $this->assertSame( 0, get_comments_number( 0 ) ); + $this->assertSame( '0', get_comments_number( $post_id ) ); + $this->assertSame( '0', get_comments_number( get_post( $post_id ) ) ); self::factory()->comment->create_post_comments( $post_id, 12 ); - $this->assertEquals( 12, get_comments_number( $post_id ) ); - $this->assertEquals( 12, get_comments_number( get_post( $post_id ) ) ); + $this->assertSame( '12', get_comments_number( $post_id ) ); + $this->assertSame( '12', get_comments_number( get_post( $post_id ) ) ); } - function test_get_comments_number_without_arg() { - $post_id = self::factory()->post->create(); + public function test_get_comments_number_without_arg() { + $post_id = self::$post_id; $permalink = get_permalink( $post_id ); $this->go_to( $permalink ); - $this->assertEquals( 0, get_comments_number() ); + $this->assertSame( '0', get_comments_number() ); self::factory()->comment->create_post_comments( $post_id, 12 ); $this->go_to( $permalink ); - $this->assertEquals( 12, get_comments_number() ); + $this->assertSame( '12', get_comments_number() ); } /** * @ticket 48772 */ - function test_get_comments_number_text_with_post_id() { - $post_id = $this->factory->post->create(); + public function test_get_comments_number_text_with_post_id() { + $post_id = self::$post_id; $this->factory->comment->create_post_comments( $post_id, 6 ); $comments_number_text = get_comments_number_text( false, false, false, $post_id ); - $this->assertEquals( sprintf( _n( '%s Comment', '%s Comments', 6 ), '6' ), $comments_number_text ); + $this->assertSame( sprintf( _n( '%s Comment', '%s Comments', 6 ), '6' ), $comments_number_text ); ob_start(); comments_number( false, false, false, $post_id ); $comments_number_text = ob_get_clean(); - $this->assertEquals( sprintf( _n( '%s Comment', '%s Comments', 6 ), '6' ), $comments_number_text ); + $this->assertSame( sprintf( _n( '%s Comment', '%s Comments', 6 ), '6' ), $comments_number_text ); } /** * @ticket 13651 */ - function test_get_comments_number_text_declension_with_default_args() { - $post_id = $this->factory->post->create(); + public function test_get_comments_number_text_declension_with_default_args() { + $post_id = self::$post_id; $permalink = get_permalink( $post_id ); $this->go_to( $permalink ); - $this->assertEquals( __( 'No Comments' ), get_comments_number_text() ); + $this->assertSame( __( 'No Comments' ), get_comments_number_text() ); $this->factory->comment->create_post_comments( $post_id, 1 ); $this->go_to( $permalink ); - $this->assertEquals( __( '1 Comment' ), get_comments_number_text() ); + $this->assertSame( __( '1 Comment' ), get_comments_number_text() ); $this->factory->comment->create_post_comments( $post_id, 1 ); $this->go_to( $permalink ); - $this->assertEquals( sprintf( _n( '%s Comment', '%s Comments', 2 ), '2' ), get_comments_number_text() ); + $this->assertSame( sprintf( _n( '%s Comment', '%s Comments', 2 ), '2' ), get_comments_number_text() ); } @@ -75,21 +90,21 @@ function test_get_comments_number_text_declension_with_default_args() { * @ticket 13651 * @dataProvider data_get_comments_number_text_declension */ - function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) { - $post_id = $this->factory->post->create(); + public function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) { + $post_id = self::$post_id; $permalink = get_permalink( $post_id ); $this->factory->comment->create_post_comments( $post_id, $number ); $this->go_to( $permalink ); - add_filter( 'gettext_with_context', array( $this, '_enable_comment_number_declension' ), 10, 4 ); + add_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ), 10, 4 ); - $this->assertEquals( $output, get_comments_number_text( false, false, $input ) ); + $this->assertSame( $output, get_comments_number_text( false, false, $input ) ); - remove_filter( 'gettext_with_context', array( $this, '_enable_comment_number_declension' ), 10, 4 ); + remove_filter( 'gettext_with_context', array( $this, 'enable_comment_number_declension' ), 10, 4 ); } - function _enable_comment_number_declension( $translation, $text, $context, $domain ) { + public function enable_comment_number_declension( $translation, $text, $context, $domain ) { if ( 'Comment number declension: on or off' === $context ) { $translation = 'on'; } @@ -108,7 +123,7 @@ function _enable_comment_number_declension( $translation, $text, $context, $doma * } * } */ - function data_get_comments_number_text_declension() { + public function data_get_comments_number_text_declension() { return array( array( 2, diff --git a/tests/phpunit/tests/comment/walker.php b/tests/phpunit/tests/comment/walker.php index 27fea21b18d58..1027a96d14908 100644 --- a/tests/phpunit/tests/comment/walker.php +++ b/tests/phpunit/tests/comment/walker.php @@ -5,8 +5,8 @@ */ class Tests_Comment_Walker extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->post_id = self::factory()->post->create(); } @@ -14,7 +14,7 @@ function setUp() { /** * @ticket 14041 */ - function test_has_children() { + public function test_has_children() { $comment_parent = self::factory()->comment->create( array( 'comment_post_ID' => $this->post_id ) ); $comment_child = self::factory()->comment->create( array( diff --git a/tests/phpunit/tests/comment/wpAllowComment.php b/tests/phpunit/tests/comment/wpAllowComment.php index a1404b624c565..c7c32758b6578 100644 --- a/tests/phpunit/tests/comment/wpAllowComment.php +++ b/tests/phpunit/tests/comment/wpAllowComment.php @@ -7,11 +7,9 @@ class Tests_Comment_WpAllowComment extends WP_UnitTestCase { protected static $post_id; protected static $comment_id; - function setUp() { - parent::setUp(); - - self::$post_id = self::factory()->post->create(); - self::$comment_id = self::factory()->comment->create( + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + self::$post_id = $factory->post->create(); + self::$comment_id = $factory->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', @@ -22,14 +20,14 @@ function setUp() { ) ); - update_option( 'comment_whitelist', 0 ); + update_option( 'comment_previously_approved', 0 ); } - function tearDown() { + public static function wpTeardownAfterClass() { wp_delete_post( self::$post_id, true ); wp_delete_comment( self::$comment_id, true ); - update_option( 'comment_whitelist', 1 ); + update_option( 'comment_previously_approved', 1 ); } public function test_allow_comment_if_comment_author_emails_differ() { @@ -52,10 +50,9 @@ public function test_allow_comment_if_comment_author_emails_differ() { $this->assertSame( 1, $result ); } - /** - * @expectedException WPDieException - */ public function test_die_as_duplicate_if_comment_author_name_and_emails_match() { + $this->expectException( 'WPDieException' ); + $now = time(); $comment_data = array( 'comment_post_ID' => self::$post_id, diff --git a/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php b/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php new file mode 100644 index 0000000000000..c900e0aaf4791 --- /dev/null +++ b/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php @@ -0,0 +1,49 @@ +comment->create_many( 3 ); + $comment_id_list = implode( ',', $comment_ids ); + + $wpdb->query( + "UPDATE {$wpdb->comments} + SET comment_type = '' + WHERE comment_type = 'comment' + AND comment_ID in ({$comment_id_list})" // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + ); + + clean_comment_cache( $comment_ids ); + + foreach ( $comment_ids as $comment_id ) { + $comment = get_comment( $comment_id ); + $this->assertEmpty( $comment->comment_type ); + } + + add_filter( 'wp_update_comment_type_batch_size', array( $this, 'filter_comment_type_batch_size' ) ); + add_filter( 'schedule_event', '__return_null' ); + + _wp_batch_update_comment_type(); + + remove_filter( 'wp_update_comment_type_batch_size', array( $this, 'filter_comment_type_batch_size' ) ); + remove_filter( 'schedule_event', '__return_null' ); + + foreach ( $comment_ids as $comment_id ) { + $updated_comment = get_comment( $comment_id ); + $this->assertSame( 'comment', $updated_comment->comment_type ); + } + } + + public function filter_comment_type_batch_size() { + return 3; + } +} diff --git a/tests/phpunit/tests/comment/wpBlacklistCheck.php b/tests/phpunit/tests/comment/wpBlacklistCheck.php index 6b708d651fdf0..86a449825df2d 100644 --- a/tests/phpunit/tests/comment/wpBlacklistCheck.php +++ b/tests/phpunit/tests/comment/wpBlacklistCheck.php @@ -3,9 +3,9 @@ /** * @group comment */ -class Tests_WP_Blacklist_Check extends WP_UnitTestCase { +class Tests_WP_Blocklist_Check extends WP_UnitTestCase { - public function test_should_return_true_when_content_matches_blacklist_keys() { + public function test_should_return_true_when_content_matches_disallowed_keys() { $author = 'Sting'; $author_email = 'sting@example.com'; $author_url = 'http://example.com'; @@ -13,9 +13,9 @@ public function test_should_return_true_when_content_matches_blacklist_keys() { $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', "well\nfoo" ); + update_option( 'disallowed_keys', "well\nfoo" ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertTrue( $result ); } @@ -23,7 +23,7 @@ public function test_should_return_true_when_content_matches_blacklist_keys() { /** * @ticket 37208 */ - public function test_should_return_true_when_content_with_html_matches_blacklist_keys() { + public function test_should_return_true_when_content_with_html_matches_disallowed_keys() { $author = 'Sting'; $author_email = 'sting@example.com'; $author_url = 'http://example.com'; @@ -31,14 +31,14 @@ public function test_should_return_true_when_content_with_html_matches_blacklist $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', "halfway\nfoo" ); + update_option( 'disallowed_keys', "halfway\nfoo" ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertTrue( $result ); } - public function test_should_return_true_when_author_matches_blacklist_keys() { + public function test_should_return_true_when_author_matches_disallowed_keys() { $author = 'Sideshow Mel'; $author_email = 'mel@example.com'; $author_url = 'http://example.com'; @@ -46,14 +46,14 @@ public function test_should_return_true_when_author_matches_blacklist_keys() { $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', "sideshow\nfoo" ); + update_option( 'disallowed_keys', "sideshow\nfoo" ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertTrue( $result ); } - public function test_should_return_true_when_url_matches_blacklist_keys() { + public function test_should_return_true_when_url_matches_disallowed_keys() { $author = 'Rainier Wolfcastle'; $author_email = 'rainier@wolfcastle.com'; $author_url = 'http://example.com'; @@ -61,9 +61,9 @@ public function test_should_return_true_when_url_matches_blacklist_keys() { $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', "example\nfoo" ); + update_option( 'disallowed_keys', "example\nfoo" ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertTrue( $result ); } @@ -71,7 +71,7 @@ public function test_should_return_true_when_url_matches_blacklist_keys() { /** * @ticket 37208 */ - public function test_should_return_true_when_link_matches_blacklist_keys() { + public function test_should_return_true_when_link_matches_disallowed_keys() { $author = 'Rainier Wolfcastle'; $author_email = 'rainier@wolfcastle.com'; $author_url = 'http://example.com'; @@ -79,9 +79,9 @@ public function test_should_return_true_when_link_matches_blacklist_keys() { $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', '/spam/' ); + update_option( 'disallowed_keys', '/spam/' ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertTrue( $result ); } @@ -94,9 +94,9 @@ public function test_should_return_false_when_no_match() { $author_ip = '192.168.0.1'; $user_agent = ''; - update_option( 'blacklist_keys', "sideshow\nfoobar" ); + update_option( 'disallowed_keys', "sideshow\nfoobar" ); - $result = wp_blacklist_check( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); + $result = wp_check_comment_disallowed_list( $author, $author_email, $author_url, $comment, $author_ip, $user_agent ); $this->assertFalse( $result ); } diff --git a/tests/phpunit/tests/comment/wpComment.php b/tests/phpunit/tests/comment/wpComment.php index 853d3a01d3e71..9e0dec75e479e 100644 --- a/tests/phpunit/tests/comment/wpComment.php +++ b/tests/phpunit/tests/comment/wpComment.php @@ -6,7 +6,7 @@ class Tests_Term_WpComment extends WP_UnitTestCase { protected static $comment_id; - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { global $wpdb; // Ensure that there is a comment with ID 1. @@ -22,7 +22,7 @@ public static function wpSetUpBeforeClass( $factory ) { clean_comment_cache( 1 ); } - self::$comment_id = self::factory()->comment->create(); + self::$comment_id = $factory->comment->create(); } /** diff --git a/tests/phpunit/tests/comment/wpCountComments.php b/tests/phpunit/tests/comment/wpCountComments.php index f0e8f458be4d6..5586889ba27ca 100644 --- a/tests/phpunit/tests/comment/wpCountComments.php +++ b/tests/phpunit/tests/comment/wpCountComments.php @@ -5,13 +5,13 @@ class Tests_WP_Count_Comments extends WP_UnitTestCase { public function test_wp_count_comments() { $count = wp_count_comments(); - $this->assertEquals( 0, $count->approved ); - $this->assertEquals( 0, $count->moderated ); - $this->assertEquals( 0, $count->spam ); - $this->assertEquals( 0, $count->trash ); - $this->assertEquals( 0, $count->{'post-trashed'} ); - $this->assertEquals( 0, $count->total_comments ); - $this->assertEquals( 0, $count->all ); + $this->assertSame( 0, $count->approved ); + $this->assertSame( 0, $count->moderated ); + $this->assertSame( 0, $count->spam ); + $this->assertSame( 0, $count->trash ); + $this->assertSame( 0, $count->{'post-trashed'} ); + $this->assertSame( 0, $count->total_comments ); + $this->assertSame( 0, $count->all ); } public function test_wp_count_comments_approved() { @@ -23,13 +23,13 @@ public function test_wp_count_comments_approved() { $count = wp_count_comments(); - $this->assertEquals( 1, $count->approved ); - $this->assertEquals( 0, $count->moderated ); - $this->assertEquals( 0, $count->spam ); - $this->assertEquals( 0, $count->trash ); - $this->assertEquals( 0, $count->{'post-trashed'} ); - $this->assertEquals( 1, $count->total_comments ); - $this->assertEquals( 1, $count->all ); + $this->assertSame( 1, $count->approved ); + $this->assertSame( 0, $count->moderated ); + $this->assertSame( 0, $count->spam ); + $this->assertSame( 0, $count->trash ); + $this->assertSame( 0, $count->{'post-trashed'} ); + $this->assertSame( 1, $count->total_comments ); + $this->assertSame( 1, $count->all ); } public function test_wp_count_comments_awaiting() { @@ -41,13 +41,13 @@ public function test_wp_count_comments_awaiting() { $count = wp_count_comments(); - $this->assertEquals( 0, $count->approved ); - $this->assertEquals( 1, $count->moderated ); - $this->assertEquals( 0, $count->spam ); - $this->assertEquals( 0, $count->trash ); - $this->assertEquals( 0, $count->{'post-trashed'} ); - $this->assertEquals( 1, $count->total_comments ); - $this->assertEquals( 1, $count->all ); + $this->assertSame( 0, $count->approved ); + $this->assertSame( 1, $count->moderated ); + $this->assertSame( 0, $count->spam ); + $this->assertSame( 0, $count->trash ); + $this->assertSame( 0, $count->{'post-trashed'} ); + $this->assertSame( 1, $count->total_comments ); + $this->assertSame( 1, $count->all ); } public function test_wp_count_comments_spam() { @@ -59,13 +59,13 @@ public function test_wp_count_comments_spam() { $count = wp_count_comments(); - $this->assertEquals( 0, $count->approved ); - $this->assertEquals( 0, $count->moderated ); - $this->assertEquals( 1, $count->spam ); - $this->assertEquals( 0, $count->trash ); - $this->assertEquals( 0, $count->{'post-trashed'} ); - $this->assertEquals( 1, $count->total_comments ); - $this->assertEquals( 0, $count->all ); + $this->assertSame( 0, $count->approved ); + $this->assertSame( 0, $count->moderated ); + $this->assertSame( 1, $count->spam ); + $this->assertSame( 0, $count->trash ); + $this->assertSame( 0, $count->{'post-trashed'} ); + $this->assertSame( 1, $count->total_comments ); + $this->assertSame( 0, $count->all ); } public function test_wp_count_comments_trash() { @@ -77,13 +77,13 @@ public function test_wp_count_comments_trash() { $count = wp_count_comments(); - $this->assertEquals( 0, $count->approved ); - $this->assertEquals( 0, $count->moderated ); - $this->assertEquals( 0, $count->spam ); - $this->assertEquals( 1, $count->trash ); - $this->assertEquals( 0, $count->{'post-trashed'} ); - $this->assertEquals( 0, $count->total_comments ); - $this->assertEquals( 0, $count->all ); + $this->assertSame( 0, $count->approved ); + $this->assertSame( 0, $count->moderated ); + $this->assertSame( 0, $count->spam ); + $this->assertSame( 1, $count->trash ); + $this->assertSame( 0, $count->{'post-trashed'} ); + $this->assertSame( 0, $count->total_comments ); + $this->assertSame( 0, $count->all ); } public function test_wp_count_comments_post_trashed() { @@ -95,13 +95,13 @@ public function test_wp_count_comments_post_trashed() { $count = wp_count_comments(); - $this->assertEquals( 0, $count->approved ); - $this->assertEquals( 0, $count->moderated ); - $this->assertEquals( 0, $count->spam ); - $this->assertEquals( 0, $count->trash ); - $this->assertEquals( 1, $count->{'post-trashed'} ); - $this->assertEquals( 0, $count->total_comments ); - $this->assertEquals( 0, $count->all ); + $this->assertSame( 0, $count->approved ); + $this->assertSame( 0, $count->moderated ); + $this->assertSame( 0, $count->spam ); + $this->assertSame( 0, $count->trash ); + $this->assertSame( 1, $count->{'post-trashed'} ); + $this->assertSame( 0, $count->total_comments ); + $this->assertSame( 0, $count->all ); } public function test_wp_count_comments_cache() { @@ -119,88 +119,88 @@ public function test_wp_count_comments_cache() { $count1 = wp_count_comments( $post_id ); - $this->assertEquals( 1, $count1->approved ); - $this->assertEquals( 0, $count1->moderated ); - $this->assertEquals( 0, $count1->spam ); - $this->assertEquals( 0, $count1->trash ); - $this->assertEquals( 0, $count1->{'post-trashed'} ); - $this->assertEquals( 1, $count1->total_comments ); - $this->assertEquals( 1, $count1->all ); + $this->assertSame( 1, $count1->approved ); + $this->assertSame( 0, $count1->moderated ); + $this->assertSame( 0, $count1->spam ); + $this->assertSame( 0, $count1->trash ); + $this->assertSame( 0, $count1->{'post-trashed'} ); + $this->assertSame( 1, $count1->total_comments ); + $this->assertSame( 1, $count1->all ); $all_count1 = wp_count_comments(); - $this->assertEquals( 1, $all_count1->approved ); - $this->assertEquals( 0, $all_count1->moderated ); - $this->assertEquals( 0, $all_count1->spam ); - $this->assertEquals( 0, $all_count1->trash ); - $this->assertEquals( 0, $all_count1->{'post-trashed'} ); - $this->assertEquals( 1, $all_count1->total_comments ); - $this->assertEquals( 1, $all_count1->all ); + $this->assertSame( 1, $all_count1->approved ); + $this->assertSame( 0, $all_count1->moderated ); + $this->assertSame( 0, $all_count1->spam ); + $this->assertSame( 0, $all_count1->trash ); + $this->assertSame( 0, $all_count1->{'post-trashed'} ); + $this->assertSame( 1, $all_count1->total_comments ); + $this->assertSame( 1, $all_count1->all ); wp_spam_comment( $comment_id ); $count2 = wp_count_comments( $post_id ); - $this->assertEquals( 0, $count2->approved ); - $this->assertEquals( 0, $count2->moderated ); - $this->assertEquals( 1, $count2->spam ); - $this->assertEquals( 0, $count2->trash ); - $this->assertEquals( 0, $count2->{'post-trashed'} ); - $this->assertEquals( 1, $count2->total_comments ); - $this->assertEquals( 0, $count2->all ); + $this->assertSame( 0, $count2->approved ); + $this->assertSame( 0, $count2->moderated ); + $this->assertSame( 1, $count2->spam ); + $this->assertSame( 0, $count2->trash ); + $this->assertSame( 0, $count2->{'post-trashed'} ); + $this->assertSame( 1, $count2->total_comments ); + $this->assertSame( 0, $count2->all ); $all_count2 = wp_count_comments(); - $this->assertEquals( 0, $all_count2->approved ); - $this->assertEquals( 0, $all_count2->moderated ); - $this->assertEquals( 1, $all_count2->spam ); - $this->assertEquals( 0, $all_count2->trash ); - $this->assertEquals( 0, $all_count2->{'post-trashed'} ); - $this->assertEquals( 1, $all_count2->total_comments ); - $this->assertEquals( 0, $all_count2->all ); + $this->assertSame( 0, $all_count2->approved ); + $this->assertSame( 0, $all_count2->moderated ); + $this->assertSame( 1, $all_count2->spam ); + $this->assertSame( 0, $all_count2->trash ); + $this->assertSame( 0, $all_count2->{'post-trashed'} ); + $this->assertSame( 1, $all_count2->total_comments ); + $this->assertSame( 0, $all_count2->all ); wp_trash_comment( $comment_id ); $count3 = wp_count_comments( $post_id ); - $this->assertEquals( 0, $count3->approved ); - $this->assertEquals( 0, $count3->moderated ); - $this->assertEquals( 0, $count3->spam ); - $this->assertEquals( 1, $count3->trash ); - $this->assertEquals( 0, $count3->{'post-trashed'} ); - $this->assertEquals( 0, $count3->total_comments ); - $this->assertEquals( 0, $count3->all ); + $this->assertSame( 0, $count3->approved ); + $this->assertSame( 0, $count3->moderated ); + $this->assertSame( 0, $count3->spam ); + $this->assertSame( 1, $count3->trash ); + $this->assertSame( 0, $count3->{'post-trashed'} ); + $this->assertSame( 0, $count3->total_comments ); + $this->assertSame( 0, $count3->all ); $all_count3 = wp_count_comments(); - $this->assertEquals( 0, $all_count3->approved ); - $this->assertEquals( 0, $all_count3->moderated ); - $this->assertEquals( 0, $all_count3->spam ); - $this->assertEquals( 1, $all_count3->trash ); - $this->assertEquals( 0, $all_count3->{'post-trashed'} ); - $this->assertEquals( 0, $all_count3->total_comments ); - $this->assertEquals( 0, $all_count3->all ); + $this->assertSame( 0, $all_count3->approved ); + $this->assertSame( 0, $all_count3->moderated ); + $this->assertSame( 0, $all_count3->spam ); + $this->assertSame( 1, $all_count3->trash ); + $this->assertSame( 0, $all_count3->{'post-trashed'} ); + $this->assertSame( 0, $all_count3->total_comments ); + $this->assertSame( 0, $all_count3->all ); wp_untrash_comment( $comment_id ); $count4 = wp_count_comments( $post_id ); - $this->assertEquals( 0, $count4->approved ); - $this->assertEquals( 0, $count4->moderated ); - $this->assertEquals( 1, $count4->spam ); - $this->assertEquals( 0, $count4->trash ); - $this->assertEquals( 0, $count4->{'post-trashed'} ); - $this->assertEquals( 1, $count4->total_comments ); - $this->assertEquals( 0, $count4->all ); + $this->assertSame( 0, $count4->approved ); + $this->assertSame( 0, $count4->moderated ); + $this->assertSame( 1, $count4->spam ); + $this->assertSame( 0, $count4->trash ); + $this->assertSame( 0, $count4->{'post-trashed'} ); + $this->assertSame( 1, $count4->total_comments ); + $this->assertSame( 0, $count4->all ); $all_count4 = wp_count_comments(); - $this->assertEquals( 0, $all_count4->approved ); - $this->assertEquals( 0, $all_count4->moderated ); - $this->assertEquals( 1, $all_count4->spam ); - $this->assertEquals( 0, $all_count4->trash ); - $this->assertEquals( 0, $all_count4->{'post-trashed'} ); - $this->assertEquals( 1, $all_count4->total_comments ); - $this->assertEquals( 0, $all_count4->all ); + $this->assertSame( 0, $all_count4->approved ); + $this->assertSame( 0, $all_count4->moderated ); + $this->assertSame( 1, $all_count4->spam ); + $this->assertSame( 0, $all_count4->trash ); + $this->assertSame( 0, $all_count4->{'post-trashed'} ); + $this->assertSame( 1, $all_count4->total_comments ); + $this->assertSame( 0, $all_count4->all ); } } diff --git a/tests/phpunit/tests/compat.php b/tests/phpunit/tests/compat.php deleted file mode 100644 index adff52bdacca8..0000000000000 --- a/tests/phpunit/tests/compat.php +++ /dev/null @@ -1,329 +0,0 @@ -assertEquals( $expected_character_length, _mb_strlen( $string, 'UTF-8' ) ); - } - - /** - * @dataProvider utf8_string_lengths - */ - function test_mb_strlen_via_regex( $string, $expected_character_length ) { - _wp_can_use_pcre_u( false ); - $this->assertEquals( $expected_character_length, _mb_strlen( $string, 'UTF-8' ) ); - _wp_can_use_pcre_u( 'reset' ); - } - - /** - * @dataProvider utf8_string_lengths - */ - function test_8bit_mb_strlen( $string, $expected_character_length, $expected_byte_length ) { - $this->assertEquals( $expected_byte_length, _mb_strlen( $string, '8bit' ) ); - } - - /** - * @dataProvider utf8_substrings - */ - function test_mb_substr( $string, $start, $length, $expected_character_substring ) { - $this->assertEquals( $expected_character_substring, _mb_substr( $string, $start, $length, 'UTF-8' ) ); - } - - /** - * @dataProvider utf8_substrings - */ - function test_mb_substr_via_regex( $string, $start, $length, $expected_character_substring ) { - _wp_can_use_pcre_u( false ); - $this->assertEquals( $expected_character_substring, _mb_substr( $string, $start, $length, 'UTF-8' ) ); - _wp_can_use_pcre_u( 'reset' ); - } - - /** - * @dataProvider utf8_substrings - */ - function test_8bit_mb_substr( $string, $start, $length, $expected_character_substring, $expected_byte_substring ) { - $this->assertEquals( $expected_byte_substring, _mb_substr( $string, $start, $length, '8bit' ) ); - } - - function test_mb_substr_phpcore() { - /* https://github.com/php/php-src/blob/php-5.6.8/ext/mbstring/tests/mb_substr_basic.phpt */ - $string_ascii = 'ABCDEF'; - $string_mb = base64_decode( '5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=' ); - - $this->assertEquals( 'DEF', _mb_substr( $string_ascii, 3 ) ); - $this->assertEquals( 'DEF', _mb_substr( $string_ascii, 3, 5, 'ISO-8859-1' ) ); - - // Specific latin-1 as that is the default the core PHP test operates under. - $this->assertEquals( 'peacrOiqng==', base64_encode( _mb_substr( $string_mb, 2, 7, 'latin-1' ) ) ); - $this->assertEquals( '6Kqe44OG44Kt44K544OI44Gn44GZ', base64_encode( _mb_substr( $string_mb, 2, 7, 'utf-8' ) ) ); - - /* https://github.com/php/php-src/blob/php-5.6.8/ext/mbstring/tests/mb_substr_variation1.phpt */ - $start = 0; - $length = 5; - $unset_var = 10; - unset( $unset_var ); - $heredoc = <<assertEquals( $outputs[ $iterator ], _mb_substr( $input, $start, $length ) ); - $iterator++; - } - - } - - function test_hash_hmac_simple() { - $this->assertEquals( '140d1cb79fa12e2a31f32d35ad0a2723', _hash_hmac( 'md5', 'simple', 'key' ) ); - $this->assertEquals( '993003b95758e0ac2eba451a4c5877eb1bb7b92a', _hash_hmac( 'sha1', 'simple', 'key' ) ); - } - - function test_hash_hmac_padding() { - $this->assertEquals( '3c1399103807cf12ec38228614416a8c', _hash_hmac( 'md5', 'simple', '65 character key 65 character key 65 character key 65 character k' ) ); - $this->assertEquals( '4428826d20003e309d6c2a6515891370daf184ea', _hash_hmac( 'sha1', 'simple', '65 character key 65 character key 65 character key 65 character k' ) ); - } - - function test_hash_hmac_output() { - $this->assertEquals( array( 1 => '140d1cb79fa12e2a31f32d35ad0a2723' ), unpack( 'H32', _hash_hmac( 'md5', 'simple', 'key', true ) ) ); - $this->assertEquals( array( 1 => '993003b95758e0ac2eba451a4c5877eb1bb7b92a' ), unpack( 'H40', _hash_hmac( 'sha1', 'simple', 'key', true ) ) ); - } - - /** - * @expectedException PHPUnit_Framework_Error_Deprecated - */ - function test_json_encode_decode() { - require_once ABSPATH . WPINC . '/class-json.php'; - $json = new Services_JSON(); - // Super basic test to verify Services_JSON is intact and working. - $this->assertEquals( '["foo"]', $json->encodeUnsafe( array( 'foo' ) ) ); - $this->assertEquals( array( 'foo' ), $json->decode( '["foo"]' ) ); - } - - /** - * Test that is_countable() is always available (either from PHP or WP). - * - * @ticket 43583 - */ - function test_is_countable_availability() { - $this->assertTrue( function_exists( 'is_countable' ) ); - } - - /** - * Test is_countable() polyfill. - * - * @ticket 43583 - * - * @dataProvider countable_variable_test_data - * - * @param mixed $variable Variable to check. - * @param bool $is_countable The expected return value of PHP 7.3 is_countable() function. - */ - function test_is_countable_functionality( $variable, $is_countable ) { - $this->assertSame( is_countable( $variable ), $is_countable ); - } - - /** - * Data provider for test_is_countable_functionality(). - * - * @ticket 43583 - * - * @return array { - * @type array { - * @type mixed $variable Variable to check. - * @type bool $is_countable The expected return value of PHP 7.3 is_countable() function. - * } - * } - */ - public function countable_variable_test_data() { - return array( - array( true, false ), - array( new stdClass(), false ), - array( new ArrayIteratorFake(), true ), - array( new CountableFake(), true ), - array( 16, false ), - array( null, false ), - array( array( 1, 2, 3 ), true ), - array( (array) 1, true ), - array( (object) array( 'foo', 'bar', 'baz' ), false ), - ); - } - - /** - * Test is_countable() polyfill for ResourceBundle. - * - * @ticket 43583 - */ - function test_is_countable_ResourceBundle() { - if ( ! class_exists( 'ResourceBundle' ) ) { - $this->markTestSkipped( 'The intl extension is not loaded. ResourceBundle not tested for is_countable().' ); - } - - $this->assertTrue( is_countable( new ResourceBundle( 'en', null ) ) ); - } - - /** - * Test is_countable() polyfill for SimpleXMLElement. - * - * @ticket 43583 - */ - function test_is_countable_SimpleXMLElement() { - if ( ! class_exists( 'SimpleXMLElement' ) ) { - $this->markTestSkipped( 'The xml extension is not loaded. SimpleXMLElement not tested for is_countable().' ); - } - - $this->assertTrue( is_countable( new SimpleXMLElement( '12' ) ) ); - } - - /** - * Test that is_iterable() is always available (either from PHP or WP). - * - * @ticket 43619 - */ - function test_is_iterable_availability() { - $this->assertTrue( function_exists( 'is_iterable' ) ); - } - - /** - * Test is_iterable() polyfill. - * - * @ticket 43619 - * - * @dataProvider iterable_variable_test_data - * - * @param mixed $variable Variable to check. - * @param bool $is_iterable The expected return value of PHP 7.1 is_iterable() function. - */ - function test_is_iterable_functionality( $variable, $is_iterable ) { - $this->assertSame( is_iterable( $variable ), $is_iterable ); - } - - /** - * Data provider for test_is_iterable_functionality(). - * - * @ticket 43619 - * - * @return array { - * @type array { - * @type mixed $variable Variable to check. - * @type bool $is_iterable The expected return value of PHP 7.1 is_iterable() function. - * } - * } - */ - public function iterable_variable_test_data() { - return array( - array( array(), true ), - array( array( 1, 2, 3 ), true ), - array( new ArrayIterator( array( 1, 2, 3 ) ), true ), - array( 1, false ), - array( 3.14, false ), - array( new stdClass(), false ), - ); - } -} - -/* used in test_mb_substr_phpcore */ -class ClassA { - public function __toString() { - return 'Class A object'; - } -} - -class ArrayIteratorFake extends ArrayIterator { -} - -class CountableFake implements Countable { - public function count() { - return 16; - } -} diff --git a/tests/phpunit/tests/compat/hashHmac.php b/tests/phpunit/tests/compat/hashHmac.php new file mode 100644 index 0000000000000..f9a61d5faca63 --- /dev/null +++ b/tests/phpunit/tests/compat/hashHmac.php @@ -0,0 +1,65 @@ +assertTrue( function_exists( 'hash_hmac' ) ); + } + + public function test_hash_hmac_simple() { + $data = 'simple'; + $key = 'key'; + + $this->assertSame( + '140d1cb79fa12e2a31f32d35ad0a2723', + _hash_hmac( 'md5', $data, $key ), + 'MD5 hash does not match' + ); + $this->assertSame( + '993003b95758e0ac2eba451a4c5877eb1bb7b92a', + _hash_hmac( 'sha1', $data, $key ), + 'sha1 hash does not match' + ); + } + + public function test_hash_hmac_padding() { + $data = 'simple'; + $key = '65 character key 65 character key 65 character key 65 character k'; + + $this->assertSame( + '3c1399103807cf12ec38228614416a8c', + _hash_hmac( 'md5', $data, $key ), + 'MD5 hash does not match' + ); + $this->assertSame( + '4428826d20003e309d6c2a6515891370daf184ea', + _hash_hmac( 'sha1', $data, $key ), + 'sha1 hash does not match' + ); + } + + public function test_hash_hmac_output() { + $data = 'simple'; + $key = 'key'; + + $this->assertSame( + array( 1 => '140d1cb79fa12e2a31f32d35ad0a2723' ), + unpack( 'H32', _hash_hmac( 'md5', $data, $key, true ) ), + 'unpacked MD5 hash does not match' + ); + $this->assertSame( + array( 1 => '993003b95758e0ac2eba451a4c5877eb1bb7b92a' ), + unpack( 'H40', _hash_hmac( 'sha1', $data, $key, true ) ), + 'unpacked sha1 hash does not match' + ); + } +} diff --git a/tests/phpunit/tests/compat/isCountable.php b/tests/phpunit/tests/compat/isCountable.php new file mode 100644 index 0000000000000..66bf3c8c6c09f --- /dev/null +++ b/tests/phpunit/tests/compat/isCountable.php @@ -0,0 +1,117 @@ +assertTrue( function_exists( 'is_countable' ) ); + } + + /** + * Test is_countable() polyfill. + * + * @ticket 43583 + * + * @dataProvider data_is_countable_functionality + * + * @param mixed $variable Variable to check. + * @param bool $is_countable The expected return value of PHP 7.3 is_countable() function. + */ + public function test_is_countable_functionality( $variable, $is_countable ) { + $this->assertSame( $is_countable, is_countable( $variable ) ); + } + + /** + * Data provider for test_is_countable_functionality(). + * + * @ticket 43583 + * + * @return array { + * @type array { + * @type mixed $variable Variable to check. + * @type bool $is_countable The expected return value of PHP 7.3 is_countable() function. + * } + * } + */ + public function data_is_countable_functionality() { + return array( + 'boolean true' => array( + 'variable' => true, + 'is_countable' => false, + ), + 'plain stdClass object' => array( + 'variable' => new stdClass(), + 'is_countable' => false, + ), + 'Array iterator object' => array( + 'variable' => new ArrayIteratorFakeForIsCountable(), + 'is_countable' => true, + ), + 'Countable object' => array( + 'variable' => new CountableFakeForIsCountable(), + 'is_countable' => true, + ), + 'integer 16' => array( + 'variable' => 16, + 'is_countable' => false, + ), + 'null' => array( + 'variable' => null, + 'is_countable' => false, + ), + 'non-empty array, 3 items' => array( + 'variable' => array( 1, 2, 3 ), + 'is_countable' => true, + ), + 'non-empty array, 1 item via cast' => array( + 'variable' => (array) 1, + 'is_countable' => true, + ), + 'array cast to object' => array( + 'variable' => (object) array( 'foo', 'bar', 'baz' ), + 'is_countable' => false, + ), + ); + } + + /** + * Test is_countable() polyfill for ResourceBundle. + * + * @ticket 43583 + * + * @requires extension intl + */ + public function test_is_countable_ResourceBundle() { + $this->assertTrue( is_countable( new ResourceBundle( 'en', null ) ) ); + } + + /** + * Test is_countable() polyfill for SimpleXMLElement. + * + * @ticket 43583 + * + * @requires extension simplexml + */ + public function test_is_countable_SimpleXMLElement() { + $this->assertTrue( is_countable( new SimpleXMLElement( '12' ) ) ); + } +} + +class ArrayIteratorFakeForIsCountable extends ArrayIterator { +} + +class CountableFakeForIsCountable implements Countable { + #[ReturnTypeWillChange] + public function count() { + return 16; + } +} diff --git a/tests/phpunit/tests/compat/isIterable.php b/tests/phpunit/tests/compat/isIterable.php new file mode 100644 index 0000000000000..e09bb18278ccb --- /dev/null +++ b/tests/phpunit/tests/compat/isIterable.php @@ -0,0 +1,77 @@ +assertTrue( function_exists( 'is_iterable' ) ); + } + + /** + * Test is_iterable() polyfill. + * + * @ticket 43619 + * + * @dataProvider data_is_iterable_functionality + * + * @param mixed $variable Variable to check. + * @param bool $is_iterable The expected return value of PHP 7.1 is_iterable() function. + */ + public function test_is_iterable_functionality( $variable, $is_iterable ) { + $this->assertSame( $is_iterable, is_iterable( $variable ) ); + } + + /** + * Data provider for test_is_iterable_functionality(). + * + * @ticket 43619 + * + * @return array { + * @type array { + * @type mixed $variable Variable to check. + * @type bool $is_iterable The expected return value of PHP 7.1 is_iterable() function. + * } + * } + */ + public function data_is_iterable_functionality() { + return array( + 'empty array' => array( + 'variable' => array(), + 'is_iterable' => true, + ), + 'non-empty array' => array( + 'variable' => array( 1, 2, 3 ), + 'is_iterable' => true, + ), + 'Iterator object' => array( + 'variable' => new ArrayIterator( array( 1, 2, 3 ) ), + 'is_iterable' => true, + ), + 'null' => array( + 'variable' => null, + 'is_iterable' => false, + ), + 'integer 1' => array( + 'variable' => 1, + 'is_iterable' => false, + ), + 'float 3.14' => array( + 'variable' => 3.14, + 'is_iterable' => false, + ), + 'plain stdClass object' => array( + 'variable' => new stdClass(), + 'is_iterable' => false, + ), + ); + } +} diff --git a/tests/phpunit/tests/compat/jsonEncodeDecode.php b/tests/phpunit/tests/compat/jsonEncodeDecode.php new file mode 100644 index 0000000000000..be51c6022b193 --- /dev/null +++ b/tests/phpunit/tests/compat/jsonEncodeDecode.php @@ -0,0 +1,36 @@ +setExpectedDeprecated( 'class-json.php' ); + $this->setExpectedDeprecated( 'Services_JSON::__construct' ); + $this->setExpectedDeprecated( 'Services_JSON::encodeUnsafe' ); + $this->setExpectedDeprecated( 'Services_JSON::_encode' ); + $this->setExpectedDeprecated( 'Services_JSON::reduce_string' ); + $this->setExpectedDeprecated( 'Services_JSON::decode' ); + $this->setExpectedDeprecated( 'Services_JSON::isError' ); + $this->setExpectedDeprecated( 'Services_JSON::strlen8' ); + $this->setExpectedDeprecated( 'Services_JSON::substr8' ); + + require_once ABSPATH . WPINC . '/class-json.php'; + $json = new Services_JSON(); + + // Super basic test to verify Services_JSON is intact and working. + $this->assertSame( + '["foo"]', + $json->encodeUnsafe( array( 'foo' ) ), + 'encodeUnsafe() did not return expected output' + ); + $this->assertSame( + array( 'foo' ), + $json->decode( '["foo"]' ), + 'decode() did not return expected output' + ); + } +} diff --git a/tests/phpunit/tests/compat/mbStrlen.php b/tests/phpunit/tests/compat/mbStrlen.php new file mode 100644 index 0000000000000..e34b44534b1e4 --- /dev/null +++ b/tests/phpunit/tests/compat/mbStrlen.php @@ -0,0 +1,91 @@ +assertTrue( function_exists( 'mb_strlen' ) ); + } + + /** + * @dataProvider utf8_string_lengths + */ + public function test_mb_strlen( $string, $expected_character_length ) { + $this->assertSame( $expected_character_length, _mb_strlen( $string, 'UTF-8' ) ); + } + + /** + * @dataProvider utf8_string_lengths + */ + public function test_mb_strlen_via_regex( $string, $expected_character_length ) { + _wp_can_use_pcre_u( false ); + $this->assertSame( $expected_character_length, _mb_strlen( $string, 'UTF-8' ) ); + _wp_can_use_pcre_u( 'reset' ); + } + + /** + * @dataProvider utf8_string_lengths + */ + public function test_8bit_mb_strlen( $string, $expected_character_length, $expected_byte_length ) { + $this->assertSame( $expected_byte_length, _mb_strlen( $string, '8bit' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function utf8_string_lengths() { + return array( + array( + 'string' => 'баба', + 'expected_character_length' => 4, + 'expected_byte_length' => 8, + ), + array( + 'string' => 'баб', + 'expected_character_length' => 3, + 'expected_byte_length' => 6, + ), + array( + 'string' => 'I am your б', + 'expected_character_length' => 11, + 'expected_byte_length' => 12, + ), + array( + 'string' => '1111111111', + 'expected_character_length' => 10, + 'expected_byte_length' => 10, + ), + array( + 'string' => '²²²²²²²²²²', + 'expected_character_length' => 10, + 'expected_byte_length' => 20, + ), + array( + 'string' => '3333333333', + 'expected_character_length' => 10, + 'expected_byte_length' => 30, + ), + array( + 'string' => 'šŸœšŸœšŸœšŸœšŸœšŸœšŸœšŸœšŸœšŸœ', + 'expected_character_length' => 10, + 'expected_byte_length' => 40, + ), + array( + 'string' => '1Ā²ļ¼“šŸœ1Ā²ļ¼“šŸœ1Ā²ļ¼“šŸœ', + 'expected_character_length' => 12, + 'expected_byte_length' => 30, + ), + ); + } +} diff --git a/tests/phpunit/tests/compat/mbSubstr.php b/tests/phpunit/tests/compat/mbSubstr.php new file mode 100644 index 0000000000000..f03f5f0f193bf --- /dev/null +++ b/tests/phpunit/tests/compat/mbSubstr.php @@ -0,0 +1,241 @@ +assertTrue( function_exists( 'mb_substr' ) ); + } + + /** + * @dataProvider utf8_substrings + */ + public function test_mb_substr( $string, $start, $length, $expected_character_substring ) { + $this->assertSame( $expected_character_substring, _mb_substr( $string, $start, $length, 'UTF-8' ) ); + } + + /** + * @dataProvider utf8_substrings + */ + public function test_mb_substr_via_regex( $string, $start, $length, $expected_character_substring ) { + _wp_can_use_pcre_u( false ); + $this->assertSame( $expected_character_substring, _mb_substr( $string, $start, $length, 'UTF-8' ) ); + _wp_can_use_pcre_u( 'reset' ); + } + + /** + * @dataProvider utf8_substrings + */ + public function test_8bit_mb_substr( $string, $start, $length, $expected_character_substring, $expected_byte_substring ) { + $this->assertSame( $expected_byte_substring, _mb_substr( $string, $start, $length, '8bit' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function utf8_substrings() { + return array( + array( + 'string' => 'баба', + 'start' => 0, + 'length' => 3, + 'expected_character_substring' => 'баб', + 'expected_byte_substring' => "б\xD0", + ), + array( + 'string' => 'баба', + 'start' => 0, + 'length' => -1, + 'expected_character_substring' => 'баб', + 'expected_byte_substring' => "баб\xD0", + ), + array( + 'string' => 'баба', + 'start' => 1, + 'length' => null, + 'expected_character_substring' => 'аба', + 'expected_byte_substring' => "\xB1аба", + ), + array( + 'string' => 'баба', + 'start' => -3, + 'length' => null, + 'expected_character_substring' => 'аба', + 'expected_byte_substring' => "\xB1а", + ), + array( + 'string' => 'баба', + 'start' => -3, + 'length' => 2, + 'expected_character_substring' => 'аб', + 'expected_byte_substring' => "\xB1\xD0", + ), + array( + 'string' => 'баба', + 'start' => -1, + 'length' => 2, + 'expected_character_substring' => 'а', + 'expected_byte_substring' => "\xB0", + ), + array( + 'string' => 'I am your баба', + 'start' => 0, + 'length' => 11, + 'expected_character_substring' => 'I am your б', + 'expected_byte_substring' => "I am your \xD0", + ), + ); + } + + /** + * @link https://github.com/php/php-src/blob/php-5.6.8/ext/mbstring/tests/mb_substr_basic.phpt + */ + public function test_mb_substr_phpcore_basic() { + $string_ascii = 'ABCDEF'; + $string_mb = base64_decode( '5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=' ); + + $this->assertSame( + 'DEF', + _mb_substr( $string_ascii, 3 ), + 'Substring does not match expected for offset 3' + ); + $this->assertSame( + 'DEF', + _mb_substr( $string_ascii, 3, 5, 'ISO-8859-1' ), + 'Substring does not match expected for offset 3, length 5, with iso charset' + ); + + // Specific latin-1 as that is the default the core PHP test operates under. + $this->assertSame( + 'peacrOiqng==', + base64_encode( _mb_substr( $string_mb, 2, 7, 'latin-1' ) ), + 'Substring does not match expected for offset 2, length 7, with latin-1 charset' + ); + $this->assertSame( + '6Kqe44OG44Kt44K544OI44Gn44GZ', + base64_encode( _mb_substr( $string_mb, 2, 7, 'utf-8' ) ), + 'Substring does not match expected for offset 2, length 7, with utf-8 charset' + ); + } + + /** + * @link https://github.com/php/php-src/blob/php-5.6.8/ext/mbstring/tests/mb_substr_variation1.phpt + * + * @dataProvider data_mb_substr_phpcore_input_type_handling + * + * @param mixed $input Input to pass to the function. + * @param string $expected Expected function output. + */ + public function test_mb_substr_phpcore_input_type_handling( $input, $expected ) { + $start = 0; + $length = 5; + + $this->assertSame( $expected, _mb_substr( $input, $start, $length ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_mb_substr_phpcore_input_type_handling() { + $heredoc = << array( + 'input' => 0, + 'expected' => '0', + ), + 'integer 1' => array( + 'input' => 1, + 'expected' => '1', + ), + 'positive integer' => array( + 'input' => 12345, + 'expected' => '12345', + ), + 'negative integer' => array( + 'input' => -2345, + 'expected' => '-2345', + ), + // Float data. + 'positive float with fraction' => array( + 'input' => 10.5, + 'expected' => '10.5', + ), + 'negative float with fraction' => array( + 'input' => -10.5, + 'expected' => '-10.5', + ), + 'float scientific whole number' => array( + 'input' => 12.3456789000e10, + 'expected' => '12345', + ), + 'float scientific with fraction' => array( + 'input' => 12.3456789000E-10, + 'expected' => '1.234', + ), + 'float, fraction only' => array( + 'input' => .5, + 'expected' => '0.5', + ), + // Null data. + 'null' => array( + 'input' => null, + 'expected' => '', + ), + // Boolean data. + 'boolean true' => array( + 'input' => true, + 'expected' => '1', + ), + 'boolean false' => array( + 'input' => false, + 'expected' => '', + ), + // Empty data. + 'empty string' => array( + 'input' => '', + 'expected' => '', + ), + // String data. + 'double quoted string' => array( + 'input' => "string'", + 'expected' => 'strin', + ), + 'single quoted string' => array( + 'input' => 'string', + 'expected' => 'strin', + ), + 'heredoc string' => array( + 'input' => $heredoc, + 'expected' => 'hello', + ), + // Object data. + 'object with __toString method' => array( + 'input' => new ClassWithToStringForMbSubstr(), + 'expected' => 'Class', + ), + ); + } +} + +/* used in data_mb_substr_phpcore_input_type_handling() */ +class ClassWithToStringForMbSubstr { + public function __toString() { + return 'Class object'; + } +} diff --git a/tests/phpunit/tests/cron.php b/tests/phpunit/tests/cron.php index 3242bd3c7689e..36d5edd7dd386 100644 --- a/tests/phpunit/tests/cron.php +++ b/tests/phpunit/tests/cron.php @@ -16,41 +16,41 @@ class Tests_Cron extends WP_UnitTestCase { */ private $plus_thirty_minutes; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); // Make sure the schedule is clear. _set_cron_array( array() ); $this->preflight_cron_array = array(); $this->plus_thirty_minutes = strtotime( '+30 minutes' ); } - function tearDown() { + public function tear_down() { // Make sure the schedule is clear. _set_cron_array( array() ); - parent::tearDown(); + parent::tear_down(); } - function test_wp_get_schedule_empty() { + public function test_wp_get_schedule_empty() { // Nothing scheduled. $hook = __FUNCTION__; $this->assertFalse( wp_get_schedule( $hook ) ); } - function test_schedule_event_single() { + public function test_schedule_event_single() { // Schedule an event and make sure it's returned by wp_next_scheduled(). $hook = __FUNCTION__; $timestamp = strtotime( '+1 hour' ); $scheduled = wp_schedule_single_event( $timestamp, $hook ); $this->assertTrue( $scheduled ); - $this->assertEquals( $timestamp, wp_next_scheduled( $hook ) ); + $this->assertSame( $timestamp, wp_next_scheduled( $hook ) ); // It's a non-recurring event. - $this->assertEquals( '', wp_get_schedule( $hook ) ); + $this->assertFalse( wp_get_schedule( $hook ) ); } - function test_schedule_event_single_args() { + public function test_schedule_event_single_args() { // Schedule an event with arguments and make sure it's returned by wp_next_scheduled(). $hook = 'event'; $timestamp = strtotime( '+1 hour' ); @@ -59,16 +59,16 @@ function test_schedule_event_single_args() { $scheduled = wp_schedule_single_event( $timestamp, $hook, $args ); $this->assertTrue( $scheduled ); // This returns the timestamp only if we provide matching args. - $this->assertEquals( $timestamp, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $timestamp, wp_next_scheduled( $hook, $args ) ); // These don't match so return nothing. - $this->assertEquals( false, wp_next_scheduled( $hook ) ); - $this->assertEquals( false, wp_next_scheduled( $hook, array( 'bar' ) ) ); + $this->assertFalse( wp_next_scheduled( $hook ) ); + $this->assertFalse( wp_next_scheduled( $hook, array( 'bar' ) ) ); // It's a non-recurring event. - $this->assertEquals( '', wp_get_schedule( $hook, $args ) ); + $this->assertFalse( wp_get_schedule( $hook, $args ) ); } - function test_schedule_event() { + public function test_schedule_event() { // Schedule an event and make sure it's returned by wp_next_scheduled(). $hook = __FUNCTION__; $recur = 'hourly'; @@ -77,12 +77,12 @@ function test_schedule_event() { $scheduled = wp_schedule_event( $timestamp, $recur, $hook ); $this->assertTrue( $scheduled ); // It's scheduled for the right time. - $this->assertEquals( $timestamp, wp_next_scheduled( $hook ) ); + $this->assertSame( $timestamp, wp_next_scheduled( $hook ) ); // It's a recurring event. - $this->assertEquals( $recur, wp_get_schedule( $hook ) ); + $this->assertSame( $recur, wp_get_schedule( $hook ) ); } - function test_schedule_event_args() { + public function test_schedule_event_args() { // Schedule an event and make sure it's returned by wp_next_scheduled(). $hook = 'event'; $timestamp = strtotime( '+1 hour' ); @@ -92,30 +92,77 @@ function test_schedule_event_args() { $scheduled = wp_schedule_event( $timestamp, 'hourly', $hook, $args ); $this->assertTrue( $scheduled ); // This returns the timestamp only if we provide matching args. - $this->assertEquals( $timestamp, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $timestamp, wp_next_scheduled( $hook, $args ) ); // These don't match so return nothing. - $this->assertEquals( false, wp_next_scheduled( $hook ) ); - $this->assertEquals( false, wp_next_scheduled( $hook, array( 'bar' ) ) ); + $this->assertFalse( wp_next_scheduled( $hook ) ); + $this->assertFalse( wp_next_scheduled( $hook, array( 'bar' ) ) ); + + $this->assertSame( $recur, wp_get_schedule( $hook, $args ) ); + } + + /** + * Tests that a call to wp_schedule_event() on a site without any scheduled events + * does not result in a PHP deprecation warning on PHP 8.1 or higher. + * + * The warning that we should not see: + * `Deprecated: Automatic conversion of false to array is deprecated`. + * + * @ticket 53635 + * + * @covers ::wp_schedule_event + */ + public function test_wp_schedule_event_without_cron_option_does_not_throw_warning() { + delete_option( 'cron' ); - $this->assertEquals( $recur, wp_get_schedule( $hook, $args ) ); + // Verify that the cause of the error is in place. + $this->assertFalse( _get_cron_array(), '_get_cron_array() does not return false' ); + $hook = __FUNCTION__; + $timestamp = strtotime( '+10 minutes' ); + + // Add an event. + $this->assertTrue( wp_schedule_event( $timestamp, 'daily', $hook ) ); } - function test_unschedule_event() { + /** + * Tests that a call to wp_schedule_single_event() on a site without any scheduled events + * does not result in the value "false" being added into the cron array. + * + * @ticket 53950 + * + * @covers ::wp_schedule_single_event + */ + public function test_wp_schedule_single_event_without_cron_option() { + delete_option( 'cron' ); + + // Verify that the cause of the error is in place. + $this->assertFalse( _get_cron_array(), '_get_cron_array() does not return false' ); + + $hook = __FUNCTION__; + $timestamp = strtotime( '+10 minutes' ); + + // Add an event. + $this->assertTrue( wp_schedule_single_event( $timestamp, $hook ), 'Scheduling single event failed' ); + + // Verify that "false" is not a value in the final cron array. + $this->assertNotContains( false, get_option( 'cron' ), 'Resulting cron array contains the value "false"' ); + } + + public function test_unschedule_event() { // Schedule an event and make sure it's returned by wp_next_scheduled(). $hook = __FUNCTION__; $timestamp = strtotime( '+1 hour' ); wp_schedule_single_event( $timestamp, $hook ); - $this->assertEquals( $timestamp, wp_next_scheduled( $hook ) ); + $this->assertSame( $timestamp, wp_next_scheduled( $hook ) ); // Now unschedule it and make sure it's gone. $unscheduled = wp_unschedule_event( $timestamp, $hook ); $this->assertTrue( $unscheduled ); - $this->assertEquals( false, wp_next_scheduled( $hook ) ); + $this->assertFalse( wp_next_scheduled( $hook ) ); } - function test_clear_schedule() { + public function test_clear_schedule() { $hook = __FUNCTION__; $args = array( 'arg1' ); @@ -126,15 +173,15 @@ function test_clear_schedule() { wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args ); // Make sure they're returned by wp_next_scheduled(). - $this->assertTrue( wp_next_scheduled( $hook ) > 0 ); - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the no args events and make sure it's gone. $hook_unscheduled = wp_clear_scheduled_hook( $hook ); $this->assertSame( 2, $hook_unscheduled ); $this->assertFalse( wp_next_scheduled( $hook ) ); // The args events should still be there. - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the args events and make sure they're gone too. // Note: wp_clear_scheduled_hook() expects args passed directly, rather than as an array. @@ -142,7 +189,7 @@ function test_clear_schedule() { $this->assertFalse( wp_next_scheduled( $hook, $args ) ); } - function test_clear_undefined_schedule() { + public function test_clear_undefined_schedule() { $hook = __FUNCTION__; $args = array( 'arg1' ); @@ -154,7 +201,7 @@ function test_clear_undefined_schedule() { $this->assertSame( 0, $hook_unscheduled ); } - function test_clear_schedule_multiple_args() { + public function test_clear_schedule_multiple_args() { $hook = __FUNCTION__; $args = array( 'arg1', 'arg2' ); @@ -165,14 +212,14 @@ function test_clear_schedule_multiple_args() { wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args ); // Make sure they're returned by wp_next_scheduled(). - $this->assertTrue( wp_next_scheduled( $hook ) > 0 ); - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the no args events and make sure it's gone. wp_clear_scheduled_hook( $hook ); $this->assertFalse( wp_next_scheduled( $hook ) ); // The args events should still be there. - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the args events and make sure they're gone too. // Note: wp_clear_scheduled_hook() used to expect args passed directly, rather than as an array pre WP 3.0. @@ -183,7 +230,7 @@ function test_clear_schedule_multiple_args() { /** * @ticket 10468 */ - function test_clear_schedule_new_args() { + public function test_clear_schedule_new_args() { $hook = __FUNCTION__; $args = array( 'arg1' ); $multi_hook = __FUNCTION__ . '_multi'; @@ -198,14 +245,14 @@ function test_clear_schedule_new_args() { wp_schedule_single_event( strtotime( '+6 hour' ), $multi_hook, $multi_args ); // Make sure they're returned by wp_next_scheduled(). - $this->assertTrue( wp_next_scheduled( $hook ) > 0 ); - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the no args events and make sure it's gone. wp_clear_scheduled_hook( $hook ); $this->assertFalse( wp_next_scheduled( $hook ) ); // The args events should still be there. - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule for the args events and make sure they're gone too. // wp_clear_scheduled_hook() should take args as an array like the other functions. @@ -221,7 +268,7 @@ function test_clear_schedule_new_args() { /** * @ticket 18997 */ - function test_unschedule_hook() { + public function test_unschedule_hook() { $hook = __FUNCTION__; $args = array( rand_str() ); @@ -232,8 +279,8 @@ function test_unschedule_hook() { wp_schedule_single_event( strtotime( '+4 hour' ), $hook, $args ); // Make sure they're returned by wp_next_scheduled(). - $this->assertTrue( wp_next_scheduled( $hook ) > 0 ); - $this->assertTrue( wp_next_scheduled( $hook, $args ) > 0 ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook ) ); + $this->assertGreaterThan( 0, wp_next_scheduled( $hook, $args ) ); // Clear the schedule and make sure it's gone. $unschedule_hook = wp_unschedule_hook( $hook ); @@ -241,11 +288,11 @@ function test_unschedule_hook() { $this->assertFalse( wp_next_scheduled( $hook ) ); } - function test_unschedule_undefined_hook() { + public function test_unschedule_undefined_hook() { $hook = __FUNCTION__; $unrelated_hook = __FUNCTION__ . '_two'; - // Attempt to clear schedule on non-existant hook. + // Attempt to clear schedule on non-existent hook. $unschedule_hook = wp_unschedule_hook( $hook ); $this->assertSame( 0, $unschedule_hook ); $this->assertFalse( wp_next_scheduled( $hook ) ); @@ -262,7 +309,7 @@ function test_unschedule_undefined_hook() { /** * @ticket 6966 */ - function test_duplicate_event() { + public function test_duplicate_event() { // Duplicate events close together should be skipped. $hook = __FUNCTION__; $args = array( 'arg1' ); @@ -271,17 +318,21 @@ function test_duplicate_event() { // First one works. $this->assertTrue( wp_schedule_single_event( $ts1, $hook, $args ) ); - // Second one is ignored. + + // Subsequent ones are ignored. $this->assertFalse( wp_schedule_single_event( $ts2, $hook, $args ) ); + $subsequent = wp_schedule_single_event( $ts2, $hook, $args, true ); + $this->assertWPError( $subsequent ); + $this->assertSame( 'duplicate_event', $subsequent->get_error_code() ); // The next event should be at +5 minutes, not +3. - $this->assertEquals( $ts1, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $ts1, wp_next_scheduled( $hook, $args ) ); } /** * @ticket 6966 */ - function test_not_duplicate_event() { + public function test_not_duplicate_event() { // Duplicate events far apart should work normally. $hook = __FUNCTION__; $args = array( 'arg1' ); @@ -294,13 +345,13 @@ function test_not_duplicate_event() { $this->assertTrue( wp_schedule_single_event( $ts2, $hook, $args ) ); // The next event should be at +3 minutes, even though that one was scheduled second. - $this->assertEquals( $ts2, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $ts2, wp_next_scheduled( $hook, $args ) ); wp_unschedule_event( $ts2, $hook, $args ); // Following event at +30 minutes should be there too. - $this->assertEquals( $ts1, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $ts1, wp_next_scheduled( $hook, $args ) ); } - function test_not_duplicate_event_reversed() { + public function test_not_duplicate_event_reversed() { // Duplicate events far apart should work normally regardless of order. $hook = __FUNCTION__; $args = array( 'arg1' ); @@ -313,10 +364,10 @@ function test_not_duplicate_event_reversed() { $this->assertTrue( wp_schedule_single_event( $ts2, $hook, $args ) ); // The next event should be at +3 minutes. - $this->assertEquals( $ts1, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $ts1, wp_next_scheduled( $hook, $args ) ); wp_unschedule_event( $ts1, $hook, $args ); // Following event should be there too. - $this->assertEquals( $ts2, wp_next_scheduled( $hook, $args ) ); + $this->assertSame( $ts2, wp_next_scheduled( $hook, $args ) ); } /** @@ -325,7 +376,7 @@ function test_not_duplicate_event_reversed() { * * @ticket 32656 */ - function test_pre_schedule_event_filter() { + public function test_pre_schedule_event_filter() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts1 = strtotime( '+30 minutes' ); @@ -333,7 +384,7 @@ function test_pre_schedule_event_filter() { $expected = _get_cron_array(); - add_filter( 'pre_schedule_event', array( $this, '_filter_pre_schedule_event_filter' ), 10, 2 ); + add_filter( 'pre_schedule_event', array( $this, 'filter_pre_schedule_event_filter' ), 10, 2 ); $this->assertTrue( wp_schedule_single_event( $ts1, $hook, $args ) ); $this->assertTrue( wp_schedule_event( $ts2, 'hourly', $hook ) ); @@ -359,7 +410,7 @@ function test_pre_schedule_event_filter() { /** * Filter the scheduling of events to use the preflight array. */ - function _filter_pre_schedule_event_filter( $null, $event ) { + public function filter_pre_schedule_event_filter( $null, $event ) { $key = md5( serialize( $event->args ) ); $this->preflight_cron_array[ $event->timestamp ][ $event->hook ][ $key ] = array( @@ -377,7 +428,7 @@ function _filter_pre_schedule_event_filter( $null, $event ) { * * @ticket 32656 */ - function test_pre_reschedule_event_filter() { + public function test_pre_reschedule_event_filter() { $hook = __FUNCTION__; $ts1 = strtotime( '+30 minutes' ); @@ -401,7 +452,7 @@ function test_pre_reschedule_event_filter() { * * @ticket 32656 */ - function test_pre_unschedule_event_filter() { + public function test_pre_unschedule_event_filter() { $hook = __FUNCTION__; $ts1 = strtotime( '+30 minutes' ); @@ -425,7 +476,7 @@ function test_pre_unschedule_event_filter() { * * @ticket 32656 */ - function test_pre_clear_scheduled_hook_filters() { + public function test_pre_clear_scheduled_hook_filters() { $hook = __FUNCTION__; $ts1 = strtotime( '+30 minutes' ); @@ -456,7 +507,7 @@ function test_pre_clear_scheduled_hook_filters() { * * @ticket 32656 */ - function test_pre_scheduled_event_hooks() { + public function test_pre_scheduled_event_hooks() { add_filter( 'pre_get_scheduled_event', array( $this, 'filter_pre_scheduled_event_hooks' ) ); $actual = wp_get_scheduled_event( 'preflight_event', array(), $this->plus_thirty_minutes ); @@ -470,10 +521,10 @@ function test_pre_scheduled_event_hooks() { ); $this->assertEquals( $expected, $actual ); - $this->assertEquals( $expected->timestamp, $actual2 ); + $this->assertSame( $expected->timestamp, $actual2 ); } - function filter_pre_scheduled_event_hooks() { + public function filter_pre_scheduled_event_hooks() { return (object) array( 'hook' => 'preflight_event', 'timestamp' => $this->plus_thirty_minutes, @@ -490,7 +541,7 @@ function filter_pre_scheduled_event_hooks() { * * @ticket 45976. */ - function test_get_scheduled_event_singles() { + public function test_get_scheduled_event_singles() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts_late = strtotime( '+30 minutes' ); @@ -533,7 +584,7 @@ function test_get_scheduled_event_singles() { * * @ticket 45976. */ - function test_get_scheduled_event_recurring() { + public function test_get_scheduled_event_recurring() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts_late = strtotime( '+30 minutes' ); @@ -577,7 +628,7 @@ function test_get_scheduled_event_recurring() { * * @ticket 45976. */ - function test_get_scheduled_event_false() { + public function test_get_scheduled_event_false() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts = strtotime( '+3 minutes' ); @@ -602,7 +653,7 @@ function test_get_scheduled_event_false() { * * @ticket 44818 */ - function test_duplicate_past_event() { + public function test_duplicate_past_event() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts1 = strtotime( '-14 minutes' ); @@ -617,6 +668,11 @@ function test_duplicate_past_event() { // Third event fails. $this->assertFalse( wp_schedule_single_event( $ts3, $hook, $args ) ); + + // Fourth event fails. + $subsequent = wp_schedule_single_event( $ts3, $hook, $args, true ); + $this->assertWPError( $subsequent ); + $this->assertSame( 'duplicate_event', $subsequent->get_error_code() ); } /** @@ -624,7 +680,7 @@ function test_duplicate_past_event() { * * @ticket 44818 */ - function test_duplicate_near_future_event() { + public function test_duplicate_near_future_event() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts1 = strtotime( '+4 minutes' ); @@ -639,6 +695,12 @@ function test_duplicate_near_future_event() { // Third event fails. $this->assertFalse( wp_schedule_single_event( $ts3, $hook, $args ) ); + + // Fourth event fails. + $subsequent = wp_schedule_single_event( $ts3, $hook, $args, true ); + $this->assertWPError( $subsequent ); + $this->assertSame( 'duplicate_event', $subsequent->get_error_code() ); + } /** @@ -646,7 +708,7 @@ function test_duplicate_near_future_event() { * * @ticket 44818 */ - function test_duplicate_future_event() { + public function test_duplicate_future_event() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts1 = strtotime( '+15 minutes' ); @@ -659,6 +721,10 @@ function test_duplicate_future_event() { // Events within ten minutes should fail. $this->assertFalse( wp_schedule_single_event( $ts2, $hook, $args ) ); $this->assertFalse( wp_schedule_single_event( $ts3, $hook, $args ) ); + + $subsequent = wp_schedule_single_event( $ts3, $hook, $args, true ); + $this->assertWPError( $subsequent ); + $this->assertSame( 'duplicate_event', $subsequent->get_error_code() ); } /** @@ -666,7 +732,7 @@ function test_duplicate_future_event() { * * @ticket 44818 */ - function test_not_duplicate_future_event() { + public function test_not_duplicate_future_event() { $hook = __FUNCTION__; $args = array( 'arg1' ); $ts1 = strtotime( '+15 minutes' ); @@ -680,4 +746,417 @@ function test_not_duplicate_future_event() { $this->assertTrue( wp_schedule_single_event( $ts2, $hook, $args ) ); $this->assertTrue( wp_schedule_single_event( $ts3, $hook, $args ) ); } + + /** + * @ticket 49961 + */ + public function test_invalid_timestamp_for_event_returns_error() { + $single_event = wp_schedule_single_event( -50, 'hook', array(), true ); + $event = wp_schedule_event( -50, 'daily', 'hook', array(), true ); + $rescheduled_event = wp_reschedule_event( -50, 'daily', 'hook', array(), true ); + $unscheduled_event = wp_unschedule_event( -50, 'hook', array(), true ); + + $this->assertWPError( $single_event ); + $this->assertSame( 'invalid_timestamp', $single_event->get_error_code() ); + + $this->assertWPError( $event ); + $this->assertSame( 'invalid_timestamp', $event->get_error_code() ); + + $this->assertWPError( $rescheduled_event ); + $this->assertSame( 'invalid_timestamp', $rescheduled_event->get_error_code() ); + + $this->assertWPError( $unscheduled_event ); + $this->assertSame( 'invalid_timestamp', $unscheduled_event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_invalid_recurrence_for_event_returns_error() { + $event = wp_schedule_event( time(), 'invalid', 'hook', array(), true ); + $rescheduled_event = wp_reschedule_event( time(), 'invalid', 'hook', array(), true ); + + $this->assertWPError( $event ); + $this->assertSame( 'invalid_schedule', $event->get_error_code() ); + + $this->assertWPError( $rescheduled_event ); + $this->assertSame( 'invalid_schedule', $rescheduled_event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_disallowed_event_returns_false_when_wp_error_is_set_to_false() { + add_filter( 'schedule_event', '__return_false' ); + + $single_event = wp_schedule_single_event( time(), 'hook', array() ); + $event = wp_schedule_event( time(), 'daily', 'hook', array() ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array() ); + + $this->assertFalse( $single_event ); + $this->assertFalse( $event ); + $this->assertFalse( $rescheduled_event ); + } + + /** + * @ticket 49961 + */ + public function test_disallowed_event_returns_error_when_wp_error_is_set_to_true() { + add_filter( 'schedule_event', '__return_false' ); + + $single_event = wp_schedule_single_event( time(), 'hook', array(), true ); + $event = wp_schedule_event( time(), 'daily', 'hook', array(), true ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array(), true ); + + $this->assertWPError( $single_event ); + $this->assertSame( 'schedule_event_false', $single_event->get_error_code() ); + + $this->assertWPError( $event ); + $this->assertSame( 'schedule_event_false', $event->get_error_code() ); + + $this->assertWPError( $rescheduled_event ); + $this->assertSame( 'schedule_event_false', $rescheduled_event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_schedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() { + $return_error = function( $pre, $event, $wp_error ) { + $this->assertFalse( $wp_error ); + + return new WP_Error( + 'my_error', + 'An error ocurred' + ); + }; + + // Add filters which return a WP_Error: + add_filter( 'pre_schedule_event', $return_error, 10, 3 ); + add_filter( 'pre_reschedule_event', $return_error, 10, 3 ); + + // Schedule events without the `$wp_error` parameter: + $single_event = wp_schedule_single_event( time(), 'hook', array() ); + $event = wp_schedule_event( time(), 'daily', 'hook', array() ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array() ); + + // Ensure boolean false is returned: + $this->assertFalse( $single_event ); + $this->assertFalse( $event ); + $this->assertFalse( $rescheduled_event ); + } + + /** + * @ticket 49961 + */ + public function test_schedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() { + $return_error = function( $pre, $event, $wp_error ) { + $this->assertTrue( $wp_error ); + + return new WP_Error( + 'my_error', + 'An error ocurred' + ); + }; + + // Add filters which return a WP_Error: + add_filter( 'pre_schedule_event', $return_error, 10, 3 ); + add_filter( 'pre_reschedule_event', $return_error, 10, 3 ); + + // Schedule events with the `$wp_error` parameter: + $single_event = wp_schedule_single_event( time(), 'hook', array(), true ); + $event = wp_schedule_event( time(), 'daily', 'hook', array(), true ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array(), true ); + + // Ensure the error object is returned: + $this->assertWPError( $single_event ); + $this->assertSame( 'my_error', $single_event->get_error_code() ); + + $this->assertWPError( $event ); + $this->assertSame( 'my_error', $event->get_error_code() ); + + $this->assertWPError( $rescheduled_event ); + $this->assertSame( 'my_error', $rescheduled_event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_schedule_short_circuit_with_false_returns_false_when_wp_error_is_set_to_false() { + // Add filters which return false: + add_filter( 'pre_schedule_event', '__return_false' ); + add_filter( 'pre_reschedule_event', '__return_false' ); + + // Schedule events without the `$wp_error` parameter: + $single_event = wp_schedule_single_event( time(), 'hook', array() ); + $event = wp_schedule_event( time(), 'daily', 'hook', array() ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array() ); + + // Ensure false is returned: + $this->assertFalse( $single_event ); + $this->assertFalse( $event ); + $this->assertFalse( $rescheduled_event ); + } + + /** + * @ticket 49961 + */ + public function test_schedule_short_circuit_with_false_returns_error_when_wp_error_is_set_to_true() { + // Add filters which return false: + add_filter( 'pre_schedule_event', '__return_false' ); + add_filter( 'pre_reschedule_event', '__return_false' ); + + // Schedule events with the `$wp_error` parameter: + $single_event = wp_schedule_single_event( time(), 'hook', array(), true ); + $event = wp_schedule_event( time(), 'daily', 'hook', array(), true ); + $rescheduled_event = wp_reschedule_event( time(), 'daily', 'hook', array(), true ); + + // Ensure an error object is returned: + $this->assertWPError( $single_event ); + $this->assertSame( 'pre_schedule_event_false', $single_event->get_error_code() ); + + $this->assertWPError( $event ); + $this->assertSame( 'pre_schedule_event_false', $event->get_error_code() ); + + $this->assertWPError( $rescheduled_event ); + $this->assertSame( 'pre_reschedule_event_false', $rescheduled_event->get_error_code() ); + } + + /** + * @ticket 49961 + * @expectedDeprecated wp_clear_scheduled_hook + */ + public function test_deprecated_argument_usage_of_wp_clear_scheduled_hook() { + $return_pre = function( $pre, $hook, $args, $wp_error ) { + $this->assertSame( array( 1, 2, 3 ), $args ); + $this->assertFalse( $wp_error ); + + return $pre; + }; + + add_filter( 'pre_clear_scheduled_hook', $return_pre, 10, 4 ); + + $cleared = wp_clear_scheduled_hook( 'hook', 1, 2, 3 ); + + $this->assertSame( 0, $cleared ); + } + + /** + * @ticket 49961 + */ + public function test_clear_scheduled_hook_returns_default_pre_filter_error_when_wp_error_is_set_to_true() { + add_filter( 'pre_unschedule_event', '__return_false' ); + + wp_schedule_single_event( strtotime( '+1 hour' ), 'test_hook' ); + wp_schedule_single_event( strtotime( '+2 hours' ), 'test_hook' ); + + $cleared = wp_clear_scheduled_hook( 'test_hook', array(), true ); + + $this->assertWPError( $cleared ); + $this->assertSame( + array( + 'pre_unschedule_event_false', + ), + $cleared->get_error_codes() + ); + $this->assertCount( 2, $cleared->get_error_messages() ); + } + + /** + * @ticket 49961 + */ + public function test_clear_scheduled_hook_returns_custom_pre_filter_error_when_wp_error_is_set_to_true() { + $return_error = function( $pre, $timestamp, $hook, $args, $wp_error ) { + $this->assertTrue( $wp_error ); + + return new WP_Error( 'error_code', 'error message' ); + }; + + add_filter( 'pre_unschedule_event', $return_error, 10, 5 ); + + wp_schedule_single_event( strtotime( '+1 hour' ), 'test_hook' ); + wp_schedule_single_event( strtotime( '+2 hours' ), 'test_hook' ); + + $cleared = wp_clear_scheduled_hook( 'test_hook', array(), true ); + + $this->assertWPError( $cleared ); + $this->assertSame( + array( + 'error_code', + ), + $cleared->get_error_codes() + ); + $this->assertSame( + array( + 'error message', + 'error message', + ), + $cleared->get_error_messages() + ); + } + + /** + * @ticket 49961 + */ + public function test_unschedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() { + $return_error = function( $pre, $hook, $wp_error ) { + $this->assertFalse( $wp_error ); + + return new WP_Error( + 'my_error', + 'An error ocurred' + ); + }; + + // Add a filter which returns a WP_Error: + add_filter( 'pre_unschedule_hook', $return_error, 10, 3 ); + + // Unschedule a hook without the `$wp_error` parameter: + $result = wp_unschedule_hook( 'hook' ); + + // Ensure boolean false is returned: + $this->assertFalse( $result ); + } + + /** + * @ticket 49961 + */ + public function test_unschedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() { + $return_error = function( $pre, $hook, $wp_error ) { + $this->assertTrue( $wp_error ); + + return new WP_Error( + 'my_error', + 'An error ocurred' + ); + }; + + // Add a filter which returns a WP_Error: + add_filter( 'pre_unschedule_hook', $return_error, 10, 3 ); + + // Unschedule a hook with the `$wp_error` parameter: + $result = wp_unschedule_hook( 'hook', true ); + + // Ensure the error object is returned: + $this->assertWPError( $result ); + $this->assertSame( 'my_error', $result->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_unschedule_short_circuit_with_false_returns_false_when_wp_error_is_set_to_false() { + // Add a filter which returns false: + add_filter( 'pre_unschedule_hook', '__return_false' ); + + // Unschedule a hook without the `$wp_error` parameter: + $result = wp_unschedule_hook( 'hook' ); + + // Ensure false is returned: + $this->assertFalse( $result ); + } + + /** + * @ticket 49961 + */ + public function test_unschedule_short_circuit_with_false_returns_error_when_wp_error_is_set_to_true() { + // Add a filter which returns false: + add_filter( 'pre_unschedule_hook', '__return_false' ); + + // Unchedule a hook with the `$wp_error` parameter: + $result = wp_unschedule_hook( 'hook', true ); + + // Ensure an error object is returned: + $this->assertWPError( $result ); + $this->assertSame( 'pre_unschedule_hook_false', $result->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_cron_array_error_is_returned_when_scheduling_single_event() { + // Force update_option() to fail by setting the new value to match the existing: + add_filter( + 'pre_update_option_cron', + static function() { + return get_option( 'cron' ); + } + ); + + // Attempt to schedule a valid event: + $event = wp_schedule_single_event( time(), 'hook', array(), true ); + + // Ensure an error object is returned: + $this->assertWPError( $event ); + $this->assertSame( 'could_not_set', $event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_cron_array_error_is_returned_when_scheduling_event() { + // Force update_option() to fail by setting the new value to match the existing: + add_filter( + 'pre_update_option_cron', + static function() { + return get_option( 'cron' ); + } + ); + + // Attempt to schedule a valid event: + $event = wp_schedule_event( time(), 'daily', 'hook', array(), true ); + + // Ensure an error object is returned: + $this->assertWPError( $event ); + $this->assertSame( 'could_not_set', $event->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_cron_array_error_is_returned_when_unscheduling_hook() { + // Schedule a valid event: + $event = wp_schedule_event( strtotime( '+1 hour' ), 'daily', 'hook', array(), true ); + + // Force update_option() to fail by setting the new value to match the existing: + add_filter( + 'pre_update_option_cron', + static function() { + return get_option( 'cron' ); + } + ); + + // Attempt to unschedule the hook: + $unscheduled = wp_unschedule_hook( 'hook', true ); + + // Ensure an error object is returned: + $this->assertTrue( $event ); + $this->assertWPError( $unscheduled ); + $this->assertSame( 'could_not_set', $unscheduled->get_error_code() ); + } + + /** + * @ticket 49961 + */ + public function test_cron_array_error_is_returned_when_unscheduling_event() { + // Schedule a valid event: + $event = wp_schedule_event( strtotime( '+1 hour' ), 'daily', 'hook', array(), true ); + + // Force update_option() to fail by setting the new value to match the existing: + add_filter( + 'pre_update_option_cron', + static function() { + return get_option( 'cron' ); + } + ); + + // Attempt to unschedule the event: + $unscheduled = wp_unschedule_event( wp_next_scheduled( 'hook' ), 'hook', array(), true ); + + // Ensure an error object is returned: + $this->assertTrue( $event ); + $this->assertWPError( $unscheduled ); + $this->assertSame( 'could_not_set', $unscheduled->get_error_code() ); + } + } diff --git a/tests/phpunit/tests/cron/setCronArray.php b/tests/phpunit/tests/cron/setCronArray.php new file mode 100644 index 0000000000000..30e7eddec3e43 --- /dev/null +++ b/tests/phpunit/tests/cron/setCronArray.php @@ -0,0 +1,175 @@ +assertTrue( _set_cron_array( $input ) ); + + $crons = get_option( 'cron' ); + $this->assertIsArray( $crons, 'Cron option is not an array.' ); + $this->assertArrayHasKey( 'version', $crons, 'Cron option does not have a "version" key.' ); + $this->assertCount( $expected, $crons, 'Cron option does not contain the expected nr of entries.' ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_set_cron_array_input_validation() { + return array( + 'null' => array( + 'input' => null, + 'expected' => 1, + ), + // Function _get_cron_array() may return `false`, so this is the PHP 8.1 "problem" test. + 'false' => array( + 'input' => false, + 'expected' => 1, + ), + 'empty array' => array( + 'input' => array(), + 'expected' => 1, + ), + 'cron array' => array( + 'input' => array( + 'version' => 2, + time() => array( + 'hookname' => array( + 'event key' => array( + 'schedule' => 'schedule', + 'args' => 'args', + 'interval' => 'interval', + ), + ), + ), + ), + 'expected' => 2, + ), + ); + } + + /** + * Tests that `_set_cron_array()` returns `false` when the cron option was not updated. + * + * @dataProvider data_set_cron_array_returns_false_when_not_updated + * + * @param array $input Cron array. + * @param mixed $wp_error Value to use for $wp_error. + */ + public function test_set_cron_array_returns_false_when_not_updated( $input, $wp_error ) { + $this->assertFalse( _set_cron_array( $input ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_set_cron_array_returns_false_when_not_updated() { + return array( + 'empty array' => array( + 'input' => array(), + 'wp_error' => false, + ), + 'cron array' => array( + 'input' => array( + 'version' => 2, + ), + 'wp_error' => 0, + ), + ); + } + + /** + * Tests that `_set_cron_array()` returns a WP_Error object when the cron option was not updated and `$wp_error` is truthy. + * + * @dataProvider data_set_cron_array_returns_WP_Error_when_not_updated + * + * @param array $input Cron array. + * @param mixed $wp_error Value to use for $wp_error. + */ + public function test_set_cron_array_returns_WP_Error_when_not_updated( $input, $wp_error ) { + $result = _set_cron_array( $input, $wp_error ); + $this->assertWPError( $result, 'Return value is not an instance of WP_Error.' ); + $this->assertSame( 'could_not_set', $result->get_error_code(), 'WP_Error error code does not match expected code.' ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_set_cron_array_returns_WP_Error_when_not_updated() { + return array( + 'empty array' => array( + 'input' => array(), + 'wp_error' => true, + ), + 'cron array' => array( + 'input' => array( + 'version' => 2, + ), + 'wp_error' => 1, + ), + ); + } + + /** + * Tests that `_set_cron_array()` returns true when the cron option was updated and `$wp_error` is truthy. + */ + public function test_set_cron_array_does_not_return_WP_Error_when_updated() { + $result = _set_cron_array( + array( + 'version' => 2, + time() => array( + 'hookname' => array( + 'event key' => array( + 'schedule' => 'schedule', + 'args' => 'args', + 'interval' => 'interval', + ), + ), + ), + ), + true + ); + + $this->assertTrue( $result ); + } +} diff --git a/tests/phpunit/tests/customize/control.php b/tests/phpunit/tests/customize/control.php index 950ef810a2002..c83418c301b00 100644 --- a/tests/phpunit/tests/customize/control.php +++ b/tests/phpunit/tests/customize/control.php @@ -24,8 +24,8 @@ class Test_WP_Customize_Control extends WP_UnitTestCase { /** * Set up. */ - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); wp_set_current_user( $this->factory()->user->create( array( 'role' => 'administrator' ) ) ); require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; $GLOBALS['wp_customize'] = new WP_Customize_Manager(); @@ -37,7 +37,7 @@ function setUp() { * * @see WP_Customize_Control::check_capabilities() */ - function test_check_capabilities() { + public function test_check_capabilities() { do_action( 'customize_register', $this->wp_customize ); $control = new WP_Customize_Control( $this->wp_customize, @@ -105,7 +105,7 @@ function test_check_capabilities() { /** * @ticket 38164 */ - function test_dropdown_pages() { + public function test_dropdown_pages() { do_action( 'customize_register', $this->wp_customize ); $this->assertInstanceOf( 'WP_Customize_Nav_Menus', $this->wp_customize->nav_menus ); @@ -118,14 +118,14 @@ function test_dropdown_pages() { ob_start(); $page_on_front_control->maybe_render(); $content = ob_get_clean(); - $this->assertNotContains( 'add-new-toggle', $content ); + $this->assertStringNotContainsString( 'add-new-toggle', $content ); // Ensure the add-new-toggle is absent if allow_addition param is set. $page_on_front_control->allow_addition = true; ob_start(); $page_on_front_control->maybe_render(); $content = ob_get_clean(); - $this->assertContains( 'add-new-toggle', $content ); + $this->assertStringContainsString( 'add-new-toggle', $content ); // Ensure that dropdown-pages delect is rendered even if there are no pages published (yet). foreach ( get_pages() as $page ) { @@ -135,7 +135,7 @@ function test_dropdown_pages() { ob_start(); $page_on_front_control->maybe_render(); $content = ob_get_clean(); - $this->assertContains( '', $auto_draft_page_id ), $content ); - $this->assertNotContains( 'Auto Draft Post', $content ); - $this->assertNotContains( 'Orphan Auto Draft Page', $content ); + $this->assertStringContainsString( sprintf( '', $auto_draft_page_id ), $content ); + $this->assertStringNotContainsString( 'Auto Draft Post', $content ); + $this->assertStringNotContainsString( 'Orphan Auto Draft Page', $content ); } /** * Tear down. */ - function tearDown() { + public function tear_down() { $this->wp_customize = null; unset( $GLOBALS['wp_customize'] ); - parent::tearDown(); + parent::tear_down(); } } diff --git a/tests/phpunit/tests/customize/custom-css-setting.php b/tests/phpunit/tests/customize/custom-css-setting.php index c8ade41de8bde..e23418ea61822 100644 --- a/tests/phpunit/tests/customize/custom-css-setting.php +++ b/tests/phpunit/tests/customize/custom-css-setting.php @@ -27,8 +27,8 @@ class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { * * @see WP_UnitTestCase::setup() */ - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; $user_id = self::factory()->user->create( @@ -54,15 +54,15 @@ function setUp() { /** * Tear down the test case. */ - function tearDown() { - parent::tearDown(); + public function tear_down() { $this->setting = null; + parent::tear_down(); } /** * Delete the $wp_customize global when cleaning up scope. */ - function clean_up_global_scope() { + public function clean_up_global_scope() { global $wp_customize; $wp_customize = null; parent::clean_up_global_scope(); @@ -75,13 +75,13 @@ function clean_up_global_scope() { * * Also checks for the post type and the Setting Type. * - * @covers WP_Customize_Custom_CSS_Setting::__construct() + * @covers WP_Customize_Custom_CSS_Setting::__construct */ - function test_construct() { + public function test_construct() { $this->assertTrue( post_type_exists( 'custom_css' ) ); - $this->assertEquals( 'custom_css', $this->setting->type ); - $this->assertEquals( get_stylesheet(), $this->setting->stylesheet ); - $this->assertEquals( 'edit_css', $this->setting->capability ); + $this->assertSame( 'custom_css', $this->setting->type ); + $this->assertSame( get_stylesheet(), $this->setting->stylesheet ); + $this->assertSame( 'edit_css', $this->setting->capability ); $exception = null; try { @@ -106,14 +106,14 @@ function test_construct() { * Test crud methods on WP_Customize_Custom_CSS_Setting. * * @covers ::wp_get_custom_css - * @covers WP_Customize_Custom_CSS_Setting::value() - * @covers WP_Customize_Custom_CSS_Setting::preview() - * @covers WP_Customize_Custom_CSS_Setting::update() + * @covers WP_Customize_Custom_CSS_Setting::value + * @covers WP_Customize_Custom_CSS_Setting::preview + * @covers WP_Customize_Custom_CSS_Setting::update */ - function test_crud() { + public function test_crud() { $this->setting->default = '/* Hello World */'; - $this->assertEquals( $this->setting->default, $this->setting->value() ); + $this->assertSame( $this->setting->default, $this->setting->value() ); $this->assertNull( wp_get_custom_css_post() ); $this->assertNull( wp_get_custom_css_post( $this->setting->stylesheet ) ); @@ -143,29 +143,29 @@ function test_crud() { remove_theme_mod( 'custom_css_post_id' ); - $this->assertEquals( $post_id, wp_get_custom_css_post()->ID ); - $this->assertEquals( $post_id, wp_get_custom_css_post( $this->setting->stylesheet )->ID ); - $this->assertEquals( $twentyten_post_id, wp_get_custom_css_post( 'twentyten' )->ID ); + $this->assertSame( $post_id, wp_get_custom_css_post()->ID ); + $this->assertSame( $post_id, wp_get_custom_css_post( $this->setting->stylesheet )->ID ); + $this->assertSame( $twentyten_post_id, wp_get_custom_css_post( 'twentyten' )->ID ); - $this->assertEquals( $original_css, wp_get_custom_css( $this->setting->stylesheet ) ); - $this->assertEquals( $original_css, $this->setting->value() ); - $this->assertEquals( $twentyten_css, wp_get_custom_css( 'twentyten' ) ); - $this->assertEquals( $twentyten_css, $twentyten_setting->value() ); + $this->assertSame( $original_css, wp_get_custom_css( $this->setting->stylesheet ) ); + $this->assertSame( $original_css, $this->setting->value() ); + $this->assertSame( $twentyten_css, wp_get_custom_css( 'twentyten' ) ); + $this->assertSame( $twentyten_css, $twentyten_setting->value() ); $updated_css = 'body { color: blue; }'; $this->wp_customize->set_post_value( $this->setting->id, $updated_css ); $saved = $this->setting->save(); $this->assertNotFalse( $saved ); - $this->assertEquals( $updated_css, $this->setting->value() ); - $this->assertEquals( $updated_css, wp_get_custom_css( $this->setting->stylesheet ) ); - $this->assertEquals( $updated_css, get_post( $post_id )->post_content ); + $this->assertSame( $updated_css, $this->setting->value() ); + $this->assertSame( $updated_css, wp_get_custom_css( $this->setting->stylesheet ) ); + $this->assertSame( $updated_css, get_post( $post_id )->post_content ); $previewed_css = 'body { color: red; }'; $this->wp_customize->set_post_value( $this->setting->id, $previewed_css ); $this->setting->preview(); - $this->assertEquals( $previewed_css, $this->setting->value() ); - $this->assertEquals( $previewed_css, wp_get_custom_css( $this->setting->stylesheet ) ); + $this->assertSame( $previewed_css, $this->setting->value() ); + $this->assertSame( $previewed_css, wp_get_custom_css( $this->setting->stylesheet ) ); // Make sure that wp_update_custom_css_post() works as expected for updates. $r = wp_update_custom_css_post( @@ -176,13 +176,13 @@ function test_crud() { ) ); $this->assertInstanceOf( 'WP_Post', $r ); - $this->assertEquals( $post_id, $r->ID ); - $this->assertEquals( 'body { color:red; }', get_post( $r )->post_content ); - $this->assertEquals( "body\n\tcolor:red;", get_post( $r )->post_content_filtered ); + $this->assertSame( $post_id, $r->ID ); + $this->assertSame( 'body { color:red; }', get_post( $r )->post_content ); + $this->assertSame( "body\n\tcolor:red;", get_post( $r )->post_content_filtered ); $r = wp_update_custom_css_post( 'body { content: "\o/"; }' ); - $this->assertEquals( $this->wp_customize->get_stylesheet(), get_post( $r )->post_name ); - $this->assertEquals( 'body { content: "\o/"; }', get_post( $r )->post_content ); - $this->assertEquals( '', get_post( $r )->post_content_filtered ); + $this->assertSame( $this->wp_customize->get_stylesheet(), get_post( $r )->post_name ); + $this->assertSame( 'body { content: "\o/"; }', get_post( $r )->post_content ); + $this->assertSame( '', get_post( $r )->post_content_filtered ); // Make sure that wp_update_custom_css_post() works as expected for insertion. $r = wp_update_custom_css_post( @@ -192,18 +192,18 @@ function test_crud() { ) ); $this->assertInstanceOf( 'WP_Post', $r ); - $this->assertEquals( 'other', get_post( $r )->post_name ); - $this->assertEquals( 'body { background:black; }', get_post( $r )->post_content ); - $this->assertEquals( 'publish', get_post( $r )->post_status ); + $this->assertSame( 'other', get_post( $r )->post_name ); + $this->assertSame( 'body { background:black; }', get_post( $r )->post_content ); + $this->assertSame( 'publish', get_post( $r )->post_status ); // Test deletion. wp_delete_post( $post_id ); $this->assertNull( wp_get_custom_css_post() ); $this->assertNull( wp_get_custom_css_post( get_stylesheet() ) ); - $this->assertEquals( $previewed_css, wp_get_custom_css( get_stylesheet() ), 'Previewed value remains in spite of deleted post.' ); + $this->assertSame( $previewed_css, wp_get_custom_css( get_stylesheet() ), 'Previewed value remains in spite of deleted post.' ); wp_delete_post( $twentyten_post_id ); $this->assertNull( wp_get_custom_css_post( 'twentyten' ) ); - $this->assertEquals( '', wp_get_custom_css( 'twentyten' ) ); + $this->assertSame( '', wp_get_custom_css( 'twentyten' ) ); } /** @@ -211,7 +211,7 @@ function test_crud() { * * @ticket 39032 */ - function test_custom_css_revision_saved() { + public function test_custom_css_revision_saved() { $inserted_css = 'body { background: black; }'; $updated_css = 'body { background: red; }'; @@ -245,7 +245,7 @@ function test_custom_css_revision_saved() { * * @ticket 39259 */ - function test_get_custom_css_post_queries_after_failed_lookup() { + public function test_get_custom_css_post_queries_after_failed_lookup() { set_theme_mod( 'custom_css_post_id', -1 ); $queries_before = get_num_queries(); wp_get_custom_css_post(); @@ -257,7 +257,7 @@ function test_get_custom_css_post_queries_after_failed_lookup() { * * @ticket 39259 */ - function test_update_custom_css_updates_theme_mod() { + public function test_update_custom_css_updates_theme_mod() { set_theme_mod( 'custom_css_post_id', -1 ); $post = wp_update_custom_css_post( 'body { background: blue; }' ); $this->assertSame( $post->ID, get_theme_mod( 'custom_css_post_id' ) ); @@ -266,12 +266,12 @@ function test_update_custom_css_updates_theme_mod() { /** * Test crud methods on WP_Customize_Custom_CSS_Setting. * - * @covers WP_Customize_Custom_CSS_Setting::value() + * @covers WP_Customize_Custom_CSS_Setting::value */ - function test_value_filter() { + public function test_value_filter() { add_filter( 'customize_value_custom_css', array( $this, 'filter_value' ), 10, 2 ); $this->setting->default = '/*default*/'; - $this->assertEquals( '/*default*//*filtered*/', $this->setting->value() ); + $this->assertSame( '/*default*//*filtered*/', $this->setting->value() ); $this->factory()->post->create( array( @@ -283,11 +283,11 @@ function test_value_filter() { ) ); remove_theme_mod( 'custom_css_post_id' ); - $this->assertEquals( '/*custom*//*filtered*/', $this->setting->value() ); + $this->assertSame( '/*custom*//*filtered*/', $this->setting->value() ); $this->wp_customize->set_post_value( $this->setting->id, '/*overridden*/' ); $this->setting->preview(); - $this->assertEquals( '/*overridden*/', $this->setting->value(), 'Expected value to not be filtered since post value is present.' ); + $this->assertSame( '/*overridden*/', $this->setting->value(), 'Expected value to not be filtered since post value is present.' ); } /** @@ -297,7 +297,7 @@ function test_value_filter() { * @param WP_Customize_Setting $setting Setting. * @return string */ - function filter_value( $value, $setting ) { + public function filter_value( $value, $setting ) { $this->assertInstanceOf( 'WP_Customize_Custom_CSS_Setting', $setting ); $value .= '/*filtered*/'; return $value; @@ -306,9 +306,9 @@ function filter_value( $value, $setting ) { /** * Test update filter on WP_Customize_Custom_CSS_Setting. * - * @covers WP_Customize_Custom_CSS_Setting::update() + * @covers WP_Customize_Custom_CSS_Setting::update */ - function test_update_filter() { + public function test_update_filter() { $original_css = 'body { color:red; }'; $post_id = $this->factory()->post->create( array( @@ -330,10 +330,10 @@ function test_update_filter() { $this->setting->save(); $post = get_post( $post_id ); - $this->assertEquals( $original_title, $post->post_title ); - $this->assertContains( $overridden_css, $post->post_content ); - $this->assertContains( '/* filtered post_content */', $post->post_content ); - $this->assertContains( '/* filtered post_content_filtered */', $post->post_content_filtered ); + $this->assertSame( $original_title, $post->post_title ); + $this->assertStringContainsString( $overridden_css, $post->post_content ); + $this->assertStringContainsString( '/* filtered post_content */', $post->post_content ); + $this->assertStringContainsString( '/* filtered post_content_filtered */', $post->post_content_filtered ); } /** @@ -343,14 +343,14 @@ function test_update_filter() { * @param string $args Args. * @return array Data. */ - function filter_update_custom_css_data( $data, $args ) { - $this->assertInternalType( 'array', $data ); - $this->assertEqualSets( array( 'css', 'preprocessed' ), array_keys( $data ) ); - $this->assertEquals( '', $data['preprocessed'] ); - $this->assertInternalType( 'array', $args ); - $this->assertEqualSets( array( 'css', 'preprocessed', 'stylesheet' ), array_keys( $args ) ); - $this->assertEquals( $args['css'], $data['css'] ); - $this->assertEquals( $args['preprocessed'], $data['preprocessed'] ); + public function filter_update_custom_css_data( $data, $args ) { + $this->assertIsArray( $data ); + $this->assertSameSets( array( 'css', 'preprocessed' ), array_keys( $data ) ); + $this->assertSame( '', $data['preprocessed'] ); + $this->assertIsArray( $args ); + $this->assertSameSets( array( 'css', 'preprocessed', 'stylesheet' ), array_keys( $args ) ); + $this->assertSame( $args['css'], $data['css'] ); + $this->assertSame( $args['preprocessed'], $data['preprocessed'] ); $data['css'] .= '/* filtered post_content */'; $data['preprocessed'] = '/* filtered post_content_filtered */'; @@ -364,9 +364,9 @@ function filter_update_custom_css_data( $data, $args ) { * Note that the $validity \WP_Error object must be reset each time * as it picks up the Errors and passes them to the next assertion. * - * @covers WP_Customize_Custom_CSS_Setting::validate() + * @covers WP_Customize_Custom_CSS_Setting::validate */ - function test_validate() { + public function test_validate() { // Empty CSS throws no errors. $result = $this->setting->validate( '' ); @@ -380,6 +380,6 @@ function test_validate() { // Check for markup. $unclosed_comment = $basic_css . ''; $result = $this->setting->validate( $unclosed_comment ); - $this->assertTrue( array_key_exists( 'illegal_markup', $result->errors ) ); + $this->assertArrayHasKey( 'illegal_markup', $result->errors ); } } diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php index 00dcd333c62b4..e3fd37059b488 100644 --- a/tests/phpunit/tests/customize/manager.php +++ b/tests/phpunit/tests/customize/manager.php @@ -45,7 +45,7 @@ class Tests_WP_Customize_Manager extends WP_UnitTestCase { * * @param WP_UnitTest_Factory $factory Factory. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$subscriber_user_id = $factory->user->create( array( 'role' => 'subscriber' ) ); self::$admin_user_id = $factory->user->create( array( 'role' => 'administrator' ) ); } @@ -53,28 +53,28 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Set up test. */ - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; $this->manager = $this->instantiate(); $this->undefined = new stdClass(); $orig_file = DIR_TESTDATA . '/images/canola.jpg'; - $this->test_file = '/tmp/canola.jpg'; + $this->test_file = get_temp_dir() . 'canola.jpg'; copy( $orig_file, $this->test_file ); $orig_file2 = DIR_TESTDATA . '/images/waffles.jpg'; - $this->test_file2 = '/tmp/waffles.jpg'; + $this->test_file2 = get_temp_dir() . 'waffles.jpg'; copy( $orig_file2, $this->test_file2 ); } /** * Tear down test. */ - function tearDown() { + public function tear_down() { $this->manager = null; unset( $GLOBALS['wp_customize'] ); $_REQUEST = array(); - parent::tearDown(); + parent::tear_down(); } /** @@ -83,7 +83,7 @@ function tearDown() { * @throws Exception If an inactive core Twenty* theme cannot be found. * @return string Theme slug (stylesheet). */ - function get_inactive_core_theme() { + private function get_inactive_core_theme() { $stylesheet = get_stylesheet(); foreach ( wp_get_themes() as $theme ) { if ( $theme->stylesheet !== $stylesheet && 0 === strpos( $theme->stylesheet, 'twenty' ) ) { @@ -98,7 +98,7 @@ function get_inactive_core_theme() { * * @return WP_Customize_Manager */ - function instantiate() { + private function instantiate() { $GLOBALS['wp_customize'] = new WP_Customize_Manager(); return $GLOBALS['wp_customize']; } @@ -106,9 +106,9 @@ function instantiate() { /** * Test WP_Customize_Manager::__construct(). * - * @covers WP_Customize_Manager::__construct() + * @covers WP_Customize_Manager::__construct */ - function test_constructor() { + public function test_constructor() { $uuid = wp_generate_uuid4(); $theme = 'twentyfifteen'; $messenger_channel = 'preview-123'; @@ -119,9 +119,9 @@ function test_constructor() { 'messenger_channel' => $messenger_channel, ) ); - $this->assertEquals( $uuid, $wp_customize->changeset_uuid() ); - $this->assertEquals( $theme, $wp_customize->get_stylesheet() ); - $this->assertEquals( $messenger_channel, $wp_customize->get_messenger_channel() ); + $this->assertSame( $uuid, $wp_customize->changeset_uuid() ); + $this->assertSame( $theme, $wp_customize->get_stylesheet() ); + $this->assertSame( $messenger_channel, $wp_customize->get_messenger_channel() ); $this->assertFalse( $wp_customize->autosaved() ); $this->assertTrue( $wp_customize->branching() ); @@ -137,13 +137,13 @@ function test_constructor() { $_REQUEST['theme'] = $theme; $_REQUEST['customize_messenger_channel'] = $messenger_channel; $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); - $this->assertEquals( $theme, $wp_customize->get_stylesheet() ); - $this->assertEquals( $messenger_channel, $wp_customize->get_messenger_channel() ); + $this->assertSame( $theme, $wp_customize->get_stylesheet() ); + $this->assertSame( $messenger_channel, $wp_customize->get_messenger_channel() ); $theme = 'twentyfourteen'; $_REQUEST['customize_theme'] = $theme; $wp_customize = new WP_Customize_Manager(); - $this->assertEquals( $theme, $wp_customize->get_stylesheet() ); + $this->assertSame( $theme, $wp_customize->get_stylesheet() ); $this->assertTrue( wp_is_uuid( $wp_customize->changeset_uuid(), 4 ) ); } @@ -151,8 +151,8 @@ function test_constructor() { * Test constructor when deferring UUID. * * @ticket 39896 - * @covers WP_Customize_Manager::establish_loaded_changeset() - * @covers WP_Customize_Manager::__construct() + * @covers WP_Customize_Manager::establish_loaded_changeset + * @covers WP_Customize_Manager::__construct */ public function test_constructor_deferred_changeset_uuid() { wp_set_current_user( self::$admin_user_id ); @@ -198,8 +198,8 @@ public function test_constructor_deferred_changeset_uuid() { 'branching' => false, // To cause drafted changeset to be autoloaded. ) ); - $this->assertEquals( $uuid2, $wp_customize->changeset_uuid() ); - $this->assertEquals( $post_id, $wp_customize->changeset_post_id() ); + $this->assertSame( $uuid2, $wp_customize->changeset_uuid() ); + $this->assertSame( $post_id, $wp_customize->changeset_post_id() ); $wp_customize = new WP_Customize_Manager( array( @@ -225,9 +225,9 @@ public function test_constructor_deferred_changeset_uuid() { /** * Test WP_Customize_Manager::setup_theme() for admin screen. * - * @covers WP_Customize_Manager::setup_theme() + * @covers WP_Customize_Manager::setup_theme */ - function test_setup_theme_in_customize_admin() { + public function test_setup_theme_in_customize_admin() { global $pagenow, $wp_customize; $pagenow = 'customize.php'; set_current_screen( 'customize' ); @@ -242,7 +242,7 @@ function test_setup_theme_in_customize_admin() { $exception = $e; } $this->assertInstanceOf( 'WPDieException', $exception ); - $this->assertContains( 'you are not allowed to customize this site', $exception->getMessage() ); + $this->assertStringContainsString( 'you are not allowed to customize this site', $exception->getMessage() ); // Bad changeset. $exception = null; @@ -254,7 +254,7 @@ function test_setup_theme_in_customize_admin() { $exception = $e; } $this->assertInstanceOf( 'WPDieException', $exception ); - $this->assertContains( 'Invalid changeset UUID', $exception->getMessage() ); + $this->assertStringContainsString( 'Invalid changeset UUID', $exception->getMessage() ); update_option( 'fresh_site', '0' ); $wp_customize = new WP_Customize_Manager(); @@ -264,7 +264,7 @@ function test_setup_theme_in_customize_admin() { // Make sure that starter content import gets queued on a fresh site. update_option( 'fresh_site', '1' ); $wp_customize->setup_theme(); - $this->assertEquals( 100, has_action( 'after_setup_theme', array( $wp_customize, 'import_theme_starter_content' ) ) ); + $this->assertSame( 100, has_action( 'after_setup_theme', array( $wp_customize, 'import_theme_starter_content' ) ) ); } /** @@ -273,13 +273,13 @@ function test_setup_theme_in_customize_admin() { * @see _delete_option_fresh_site() * @ticket 41039 */ - function test_fresh_site_flag_clearing() { + public function test_fresh_site_flag_clearing() { global $wp_customize, $wpdb; // Make sure fresh site flag is cleared when publishing a changeset. update_option( 'fresh_site', '1' ); do_action( 'customize_save_after', $wp_customize ); - $this->assertEquals( '0', get_option( 'fresh_site' ) ); + $this->assertSame( '0', get_option( 'fresh_site' ) ); // Simulate a new, uncached request. wp_cache_delete( 'alloptions', 'options' ); @@ -294,9 +294,9 @@ function test_fresh_site_flag_clearing() { /** * Test WP_Customize_Manager::setup_theme() for frontend. * - * @covers WP_Customize_Manager::setup_theme() + * @covers WP_Customize_Manager::setup_theme */ - function test_setup_theme_in_frontend() { + public function test_setup_theme_in_frontend() { global $wp_customize, $pagenow, $show_admin_bar; $pagenow = 'front'; set_current_screen( 'front' ); @@ -311,7 +311,7 @@ function test_setup_theme_in_frontend() { $exception = $e; } $this->assertInstanceOf( 'WPDieException', $exception ); - $this->assertContains( 'Non-existent changeset UUID', $exception->getMessage() ); + $this->assertStringContainsString( 'Non-existent changeset UUID', $exception->getMessage() ); wp_set_current_user( self::$admin_user_id ); $wp_customize = new WP_Customize_Manager( array( 'messenger_channel' => 'preview-1' ) ); @@ -329,21 +329,21 @@ function test_setup_theme_in_frontend() { * Test WP_Customize_Manager::settings_previewed(). * * @ticket 39221 - * @covers WP_Customize_Manager::settings_previewed() + * @covers WP_Customize_Manager::settings_previewed */ - function test_settings_previewed() { + public function test_settings_previewed() { $wp_customize = new WP_Customize_Manager( array( 'settings_previewed' => false ) ); - $this->assertSame( false, $wp_customize->settings_previewed() ); + $this->assertFalse( $wp_customize->settings_previewed() ); $wp_customize = new WP_Customize_Manager(); - $this->assertSame( true, $wp_customize->settings_previewed() ); + $this->assertTrue( $wp_customize->settings_previewed() ); } /** * Test WP_Customize_Manager::autosaved(). * * @ticket 39896 - * @covers WP_Customize_Manager::autosaved() + * @covers WP_Customize_Manager::autosaved */ public function test_autosaved() { $wp_customize = new WP_Customize_Manager(); @@ -360,7 +360,7 @@ public function test_autosaved() { * Test WP_Customize_Manager::branching(). * * @ticket 39896 - * @covers WP_Customize_Manager::branching() + * @covers WP_Customize_Manager::branching */ public function test_branching() { $wp_customize = new WP_Customize_Manager(); @@ -382,12 +382,12 @@ public function test_branching() { * Test WP_Customize_Manager::changeset_uuid(). * * @ticket 30937 - * @covers WP_Customize_Manager::changeset_uuid() + * @covers WP_Customize_Manager::changeset_uuid */ - function test_changeset_uuid() { + public function test_changeset_uuid() { $uuid = wp_generate_uuid4(); $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); - $this->assertEquals( $uuid, $wp_customize->changeset_uuid() ); + $this->assertSame( $uuid, $wp_customize->changeset_uuid() ); } /** @@ -396,9 +396,9 @@ function test_changeset_uuid() { * Ensure that post values are previewed even without being in preview. * * @ticket 30937 - * @covers WP_Customize_Manager::wp_loaded() + * @covers WP_Customize_Manager::wp_loaded */ - function test_wp_loaded() { + public function test_wp_loaded() { wp_set_current_user( self::$admin_user_id ); $wp_customize = new WP_Customize_Manager(); $title = 'Hello World'; @@ -406,17 +406,17 @@ function test_wp_loaded() { $this->assertNotEquals( $title, get_option( 'blogname' ) ); $wp_customize->wp_loaded(); $this->assertFalse( $wp_customize->is_preview() ); - $this->assertEquals( $title, $wp_customize->get_setting( 'blogname' )->value() ); - $this->assertEquals( $title, get_option( 'blogname' ) ); + $this->assertSame( $title, $wp_customize->get_setting( 'blogname' )->value() ); + $this->assertSame( $title, get_option( 'blogname' ) ); } /** * Test WP_Customize_Manager::find_changeset_post_id(). * * @ticket 30937 - * @covers WP_Customize_Manager::find_changeset_post_id() + * @covers WP_Customize_Manager::find_changeset_post_id */ - function test_find_changeset_post_id() { + public function test_find_changeset_post_id() { $uuid = wp_generate_uuid4(); $post_id = $this->factory()->post->create( array( @@ -429,7 +429,7 @@ function test_find_changeset_post_id() { $wp_customize = new WP_Customize_Manager(); $this->assertNull( $wp_customize->find_changeset_post_id( wp_generate_uuid4() ) ); - $this->assertEquals( $post_id, $wp_customize->find_changeset_post_id( $uuid ) ); + $this->assertSame( $post_id, $wp_customize->find_changeset_post_id( $uuid ) ); // Verify that the found post ID was cached under the given UUID, not the manager's UUID. $this->assertNotEquals( $post_id, $wp_customize->find_changeset_post_id( $wp_customize->changeset_uuid() ) ); @@ -439,9 +439,9 @@ function test_find_changeset_post_id() { * Test WP_Customize_Manager::changeset_post_id(). * * @ticket 30937 - * @covers WP_Customize_Manager::changeset_post_id() + * @covers WP_Customize_Manager::changeset_post_id */ - function test_changeset_post_id() { + public function test_changeset_post_id() { $uuid = wp_generate_uuid4(); $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); $this->assertNull( $wp_customize->changeset_post_id() ); @@ -456,20 +456,20 @@ function test_changeset_post_id() { 'post_content' => '{}', ) ); - $this->assertEquals( $post_id, $wp_customize->changeset_post_id() ); + $this->assertSame( $post_id, $wp_customize->changeset_post_id() ); } /** * Test WP_Customize_Manager::changeset_data(). * * @ticket 30937 - * @covers WP_Customize_Manager::changeset_data() + * @covers WP_Customize_Manager::changeset_data */ - function test_changeset_data() { + public function test_changeset_data() { wp_set_current_user( self::$admin_user_id ); $uuid = wp_generate_uuid4(); $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); - $this->assertEquals( array(), $wp_customize->changeset_data() ); + $this->assertSame( array(), $wp_customize->changeset_data() ); $uuid = wp_generate_uuid4(); $data = array( @@ -485,7 +485,7 @@ function test_changeset_data() { ) ); $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); - $this->assertEquals( $data, $wp_customize->changeset_data() ); + $this->assertSame( $data, $wp_customize->changeset_data() ); // Autosave. $wp_customize->set_post_value( 'blogname', 'Hola Mundo' ); @@ -506,7 +506,7 @@ function test_changeset_data() { ); $wp_customize->register_controls(); // That is, settings. $this->assertFalse( $wp_customize->autosaved() ); - $this->assertEquals( $data, $wp_customize->changeset_data() ); + $this->assertSame( $data, $wp_customize->changeset_data() ); // No change to data if not requesting autosave. $wp_customize = new WP_Customize_Manager( @@ -517,7 +517,7 @@ function test_changeset_data() { ); $this->assertTrue( $wp_customize->autosaved() ); $this->assertNotEquals( $data, $wp_customize->changeset_data() ); - $this->assertEquals( + $this->assertSame( array_merge( wp_list_pluck( $data, 'value' ), array( 'blogname' => 'Hola Mundo' ) @@ -533,16 +533,17 @@ function test_changeset_data() { 'autosaved' => true, ) ); - $this->assertEquals( $data, $wp_customize->changeset_data() ); + $this->assertSame( $data, $wp_customize->changeset_data() ); } /** * Test WP_Customize_Manager::import_theme_starter_content(). * - * @covers WP_Customize_Manager::import_theme_starter_content() - * @covers WP_Customize_Manager::_save_starter_content_changeset() + * @covers WP_Customize_Manager::import_theme_starter_content + * @covers WP_Customize_Manager::_save_starter_content_changeset + * @requires function imagejpeg */ - function test_import_theme_starter_content() { + public function test_import_theme_starter_content() { wp_set_current_user( self::$admin_user_id ); register_nav_menu( 'top', 'Top' ); add_theme_support( 'custom-logo' ); @@ -659,7 +660,7 @@ function test_import_theme_starter_content() { 'header_image_data', 'background_image', 'widget_text[2]', - 'widget_meta[3]', + 'widget_meta[2]', 'sidebars_widgets[sidebar-1]', 'nav_menus_created_posts', 'nav_menu[-1]', @@ -674,16 +675,16 @@ function test_import_theme_starter_content() { 'page_on_front', 'page_for_posts', ); - $this->assertEqualSets( $expected_setting_ids, array_keys( $changeset_values ) ); + $this->assertSameSets( $expected_setting_ids, array_keys( $changeset_values ) ); - foreach ( array( 'widget_text[2]', 'widget_meta[3]' ) as $setting_id ) { - $this->assertInternalType( 'array', $changeset_values[ $setting_id ] ); + foreach ( array( 'widget_text[2]', 'widget_meta[2]' ) as $setting_id ) { + $this->assertIsArray( $changeset_values[ $setting_id ] ); $instance_data = $wp_customize->widgets->sanitize_widget_instance( $changeset_values[ $setting_id ] ); - $this->assertInternalType( 'array', $instance_data ); + $this->assertIsArray( $instance_data ); $this->assertArrayHasKey( 'title', $instance_data ); } - $this->assertEquals( array( 'text-2', 'meta-3' ), $changeset_values['sidebars_widgets[sidebar-1]'] ); + $this->assertSame( array( 'text-2', 'meta-2' ), $changeset_values['sidebars_widgets[sidebar-1]'] ); $posts_by_name = array(); $this->assertCount( 7, $changeset_values['nav_menus_created_posts'] ); @@ -693,11 +694,11 @@ function test_import_theme_starter_content() { foreach ( $changeset_values['nav_menus_created_posts'] as $post_id ) { $post = get_post( $post_id ); if ( $post->ID === $existing_published_home_page_id ) { - $this->assertEquals( 'publish', $post->post_status ); + $this->assertSame( 'publish', $post->post_status ); } elseif ( $post->ID === $existing_canola_attachment_id ) { - $this->assertEquals( 'inherit', $post->post_status ); + $this->assertSame( 'inherit', $post->post_status ); } else { - $this->assertEquals( 'auto-draft', $post->post_status ); + $this->assertSame( 'auto-draft', $post->post_status ); $this->assertEmpty( $post->post_name ); } $post_name = $post->post_name; @@ -706,32 +707,32 @@ function test_import_theme_starter_content() { } $posts_by_name[ $post_name ] = $post->ID; } - $this->assertEquals( array( 'waffles', 'canola', 'home', 'about', 'blog', 'custom', 'unknown-cpt' ), array_keys( $posts_by_name ) ); - $this->assertEquals( 'Custom', get_post( $posts_by_name['custom'] )->post_title ); - $this->assertEquals( 'sample-page-template.php', get_page_template_slug( $posts_by_name['about'] ) ); - $this->assertEquals( '', get_page_template_slug( $posts_by_name['blog'] ) ); - $this->assertEquals( $posts_by_name['waffles'], get_post_thumbnail_id( $posts_by_name['custom'] ) ); - $this->assertEquals( 0, get_post_thumbnail_id( $posts_by_name['blog'] ) ); + $this->assertSame( array( 'waffles', 'canola', 'home', 'about', 'blog', 'custom', 'unknown-cpt' ), array_keys( $posts_by_name ) ); + $this->assertSame( 'Custom', get_post( $posts_by_name['custom'] )->post_title ); + $this->assertSame( 'sample-page-template.php', get_page_template_slug( $posts_by_name['about'] ) ); + $this->assertSame( '', get_page_template_slug( $posts_by_name['blog'] ) ); + $this->assertSame( $posts_by_name['waffles'], get_post_thumbnail_id( $posts_by_name['custom'] ) ); + $this->assertSame( 0, get_post_thumbnail_id( $posts_by_name['blog'] ) ); $attachment_metadata = wp_get_attachment_metadata( $posts_by_name['waffles'] ); - $this->assertEquals( 'Waffles', get_post( $posts_by_name['waffles'] )->post_title ); - $this->assertEquals( 'waffles', get_post_meta( $posts_by_name['waffles'], '_customize_draft_post_name', true ) ); + $this->assertSame( 'Waffles', get_post( $posts_by_name['waffles'] )->post_title ); + $this->assertSame( 'waffles', get_post_meta( $posts_by_name['waffles'], '_customize_draft_post_name', true ) ); $this->assertArrayHasKey( 'file', $attachment_metadata ); - $this->assertContains( 'waffles', $attachment_metadata['file'] ); + $this->assertStringContainsString( 'waffles', $attachment_metadata['file'] ); - $this->assertEquals( 'page', $changeset_values['show_on_front'] ); - $this->assertEquals( $posts_by_name['home'], $changeset_values['page_on_front'] ); - $this->assertEquals( $posts_by_name['blog'], $changeset_values['page_for_posts'] ); + $this->assertSame( 'page', $changeset_values['show_on_front'] ); + $this->assertSame( $posts_by_name['home'], $changeset_values['page_on_front'] ); + $this->assertSame( $posts_by_name['blog'], $changeset_values['page_for_posts'] ); - $this->assertEquals( -1, $changeset_values['nav_menu_locations[top]'] ); - $this->assertEquals( 0, $changeset_values['nav_menu_item[-1]']['object_id'] ); - $this->assertEquals( 'custom', $changeset_values['nav_menu_item[-1]']['type'] ); - $this->assertEquals( home_url( '/' ), $changeset_values['nav_menu_item[-1]']['url'] ); + $this->assertSame( -1, $changeset_values['nav_menu_locations[top]'] ); + $this->assertSame( 0, $changeset_values['nav_menu_item[-1]']['object_id'] ); + $this->assertSame( 'custom', $changeset_values['nav_menu_item[-1]']['type'] ); + $this->assertSame( home_url( '/' ), $changeset_values['nav_menu_item[-1]']['url'] ); $this->assertEmpty( $wp_customize->changeset_data() ); $this->assertNull( $wp_customize->changeset_post_id() ); - $this->assertEquals( 1000, has_action( 'customize_register', array( $wp_customize, '_save_starter_content_changeset' ) ) ); + $this->assertSame( 1000, has_action( 'customize_register', array( $wp_customize, '_save_starter_content_changeset' ) ) ); do_action( 'customize_register', $wp_customize ); // This will trigger the changeset save. - $this->assertInternalType( 'int', $wp_customize->changeset_post_id() ); + $this->assertIsInt( $wp_customize->changeset_post_id() ); $this->assertNotEmpty( $wp_customize->changeset_data() ); foreach ( $wp_customize->changeset_data() as $setting_id => $setting_params ) { $this->assertArrayHasKey( 'starter_content', $setting_params ); @@ -742,7 +743,7 @@ function test_import_theme_starter_content() { $wp_customize->import_theme_starter_content(); $changeset_data = $wp_customize->changeset_data(); // Auto-drafts should not get re-created and amended with each import. - $this->assertEqualSets( array_values( $posts_by_name ), $changeset_data['nav_menus_created_posts']['value'] ); + $this->assertSameSets( array_values( $posts_by_name ), $changeset_data['nav_menus_created_posts']['value'] ); // Test that saving non-starter content on top of the changeset clears the starter_content flag. $wp_customize->save_changeset_post( @@ -771,7 +772,7 @@ function test_import_theme_starter_content() { ) ); $changeset_data = $wp_customize->changeset_data(); - $this->assertEquals( $previous_blogname, $changeset_data['blogname']['value'] ); + $this->assertSame( $previous_blogname, $changeset_data['blogname']['value'] ); $this->assertArrayNotHasKey( 'starter_content', $changeset_data['blogname'] ); $this->assertNotEquals( $previous_blogdescription, $changeset_data['blogdescription']['value'] ); $this->assertArrayHasKey( 'starter_content', $changeset_data['blogdescription'] ); @@ -783,24 +784,24 @@ function test_import_theme_starter_content() { $this->assertEmpty( get_theme_mod( 'custom_logo' ) ); $this->assertEmpty( get_theme_mod( 'header_image' ) ); $this->assertEmpty( get_theme_mod( 'background_image' ) ); - $this->assertEquals( 'auto-draft', get_post( $posts_by_name['about'] )->post_status ); - $this->assertEquals( 'auto-draft', get_post( $posts_by_name['waffles'] )->post_status ); + $this->assertSame( 'auto-draft', get_post( $posts_by_name['about'] )->post_status ); + $this->assertSame( 'auto-draft', get_post( $posts_by_name['waffles'] )->post_status ); $this->assertNotEquals( $changeset_data['blogname']['value'], get_option( 'blogname' ) ); $r = $wp_customize->save_changeset_post( array( 'status' => 'publish' ) ); - $this->assertInternalType( 'array', $r ); - $this->assertEquals( 'publish', get_post( $posts_by_name['about'] )->post_status ); - $this->assertEquals( 'inherit', get_post( $posts_by_name['waffles'] )->post_status ); - $this->assertEquals( $changeset_data['blogname']['value'], get_option( 'blogname' ) ); + $this->assertIsArray( $r ); + $this->assertSame( 'publish', get_post( $posts_by_name['about'] )->post_status ); + $this->assertSame( 'inherit', get_post( $posts_by_name['waffles'] )->post_status ); + $this->assertSame( $changeset_data['blogname']['value'], get_option( 'blogname' ) ); $this->assertNotEmpty( get_theme_mod( 'custom_logo' ) ); $this->assertNotEmpty( get_theme_mod( 'header_image' ) ); $this->assertNotEmpty( get_theme_mod( 'background_image' ) ); $this->assertNotEmpty( get_custom_logo() ); $this->assertNotEmpty( get_header_image() ); $this->assertNotEmpty( get_background_image() ); - $this->assertContains( 'canola', get_custom_logo() ); - $this->assertContains( 'waffles', get_header_image() ); - $this->assertContains( 'waffles', get_background_image() ); - $this->assertEquals( 'waffles', get_post( $posts_by_name['waffles'] )->post_name ); + $this->assertStringContainsString( 'canola', get_custom_logo() ); + $this->assertStringContainsString( 'waffles', get_header_image() ); + $this->assertStringContainsString( 'waffles', get_background_image() ); + $this->assertSame( 'waffles', get_post( $posts_by_name['waffles'] )->post_name ); $this->assertEmpty( get_post_meta( $posts_by_name['waffles'], '_customize_draft_post_name', true ) ); } @@ -808,9 +809,9 @@ function test_import_theme_starter_content() { * Test WP_Customize_Manager::import_theme_starter_content() with nested arrays. * * @ticket 45484 - * @covers WP_Customize_Manager::import_theme_starter_content() + * @covers WP_Customize_Manager::import_theme_starter_content */ - function test_import_theme_starter_content_with_nested_arrays() { + public function test_import_theme_starter_content_with_nested_arrays() { wp_set_current_user( self::$admin_user_id ); $existing_published_home_page_id = $this->factory()->post->create( @@ -870,7 +871,7 @@ function test_import_theme_starter_content_with_nested_arrays() { 'nested_array_option', 'nested_array_theme_mod', ); - $this->assertEqualSets( $expected_setting_ids, array_keys( $changeset_values ) ); + $this->assertSameSets( $expected_setting_ids, array_keys( $changeset_values ) ); $this->assertSame( $existing_published_home_page_id, $changeset_values['array_option']['home_page_id'] ); $this->assertSame( $existing_published_home_page_id, $changeset_values['nested_array_option'][2]['home_page_id'] ); @@ -882,24 +883,24 @@ function test_import_theme_starter_content_with_nested_arrays() { * Test WP_Customize_Manager::customize_preview_init(). * * @ticket 30937 - * @covers WP_Customize_Manager::customize_preview_init() + * @covers WP_Customize_Manager::customize_preview_init */ - function test_customize_preview_init() { + public function test_customize_preview_init() { // Test authorized admin user. wp_set_current_user( self::$admin_user_id ); $did_action_customize_preview_init = did_action( 'customize_preview_init' ); $wp_customize = new WP_Customize_Manager(); $wp_customize->customize_preview_init(); - $this->assertEquals( $did_action_customize_preview_init + 1, did_action( 'customize_preview_init' ) ); + $this->assertSame( $did_action_customize_preview_init + 1, did_action( 'customize_preview_init' ) ); - $this->assertEquals( 10, has_action( 'wp_head', 'wp_no_robots' ) ); - $this->assertEquals( 10, has_action( 'wp_head', array( $wp_customize, 'remove_frameless_preview_messenger_channel' ) ) ); - $this->assertEquals( 10, has_filter( 'wp_headers', array( $wp_customize, 'filter_iframe_security_headers' ) ) ); - $this->assertEquals( 10, has_filter( 'wp_redirect', array( $wp_customize, 'add_state_query_params' ) ) ); + $this->assertSame( 10, has_filter( 'wp_robots', 'wp_robots_no_robots' ) ); + $this->assertSame( 10, has_action( 'wp_head', array( $wp_customize, 'remove_frameless_preview_messenger_channel' ) ) ); + $this->assertSame( 10, has_filter( 'wp_headers', array( $wp_customize, 'filter_iframe_security_headers' ) ) ); + $this->assertSame( 10, has_filter( 'wp_redirect', array( $wp_customize, 'add_state_query_params' ) ) ); $this->assertTrue( wp_script_is( 'customize-preview', 'enqueued' ) ); - $this->assertEquals( 10, has_action( 'wp_head', array( $wp_customize, 'customize_preview_loading_style' ) ) ); - $this->assertEquals( 20, has_action( 'wp_footer', array( $wp_customize, 'customize_preview_settings' ) ) ); + $this->assertSame( 10, has_action( 'wp_head', array( $wp_customize, 'customize_preview_loading_style' ) ) ); + $this->assertSame( 20, has_action( 'wp_footer', array( $wp_customize, 'customize_preview_settings' ) ) ); // Test unauthorized user outside preview (no messenger_channel). wp_set_current_user( self::$subscriber_user_id ); @@ -919,7 +920,7 @@ function test_customize_preview_init() { $exception = $e; } $this->assertNotNull( $exception ); - $this->assertContains( 'Unauthorized', $exception->getMessage() ); + $this->assertStringContainsString( 'Unauthorized', $exception->getMessage() ); } /** @@ -927,24 +928,24 @@ function test_customize_preview_init() { * * @ticket 30937 * @ticket 40020 - * @covers WP_Customize_Manager::filter_iframe_security_headers() + * @covers WP_Customize_Manager::filter_iframe_security_headers */ - function test_filter_iframe_security_headers() { + public function test_filter_iframe_security_headers() { $wp_customize = new WP_Customize_Manager(); $headers = $wp_customize->filter_iframe_security_headers( array() ); $this->assertArrayHasKey( 'X-Frame-Options', $headers ); $this->assertArrayHasKey( 'Content-Security-Policy', $headers ); - $this->assertEquals( 'SAMEORIGIN', $headers['X-Frame-Options'] ); - $this->assertEquals( "frame-ancestors 'self'", $headers['Content-Security-Policy'] ); + $this->assertSame( 'SAMEORIGIN', $headers['X-Frame-Options'] ); + $this->assertSame( "frame-ancestors 'self'", $headers['Content-Security-Policy'] ); } /** * Test WP_Customize_Manager::add_state_query_params(). * * @ticket 30937 - * @covers WP_Customize_Manager::add_state_query_params() + * @covers WP_Customize_Manager::add_state_query_params */ - function test_add_state_query_params() { + public function test_add_state_query_params() { $preview_theme = $this->get_inactive_core_theme(); $uuid = wp_generate_uuid4(); @@ -961,8 +962,8 @@ function test_add_state_query_params() { $this->assertArrayHasKey( 'customize_messenger_channel', $query_params ); $this->assertArrayHasKey( 'customize_changeset_uuid', $query_params ); $this->assertArrayNotHasKey( 'customize_theme', $query_params ); - $this->assertEquals( $uuid, $query_params['customize_changeset_uuid'] ); - $this->assertEquals( $messenger_channel, $query_params['customize_messenger_channel'] ); + $this->assertSame( $uuid, $query_params['customize_changeset_uuid'] ); + $this->assertSame( $messenger_channel, $query_params['customize_messenger_channel'] ); $uuid = wp_generate_uuid4(); $wp_customize = new WP_Customize_Manager( @@ -978,8 +979,8 @@ function test_add_state_query_params() { $this->assertArrayNotHasKey( 'customize_messenger_channel', $query_params ); $this->assertArrayHasKey( 'customize_changeset_uuid', $query_params ); $this->assertArrayHasKey( 'customize_theme', $query_params ); - $this->assertEquals( $uuid, $query_params['customize_changeset_uuid'] ); - $this->assertEquals( $preview_theme, $query_params['customize_theme'] ); + $this->assertSame( $uuid, $query_params['customize_changeset_uuid'] ); + $this->assertSame( $preview_theme, $query_params['customize_theme'] ); $uuid = wp_generate_uuid4(); $wp_customize = new WP_Customize_Manager( @@ -1001,9 +1002,9 @@ function test_add_state_query_params() { * Test WP_Customize_Manager::save_changeset_post(). * * @ticket 30937 - * @covers WP_Customize_Manager::save_changeset_post() + * @covers WP_Customize_Manager::save_changeset_post */ - function test_save_changeset_post_without_theme_activation() { + public function test_save_changeset_post_without_theme_activation() { global $wp_customize; wp_set_current_user( self::$admin_user_id ); @@ -1041,25 +1042,25 @@ function test_save_changeset_post_without_theme_activation() { 'data' => $pre_saved_data, ) ); - $this->assertInternalType( 'array', $r ); + $this->assertIsArray( $r ); - $this->assertEquals( $did_action['customize_save_validation_before'] + 1, did_action( 'customize_save_validation_before' ) ); + $this->assertSame( $did_action['customize_save_validation_before'] + 1, did_action( 'customize_save_validation_before' ) ); $post_id = $manager->find_changeset_post_id( $uuid ); $this->assertNotNull( $post_id ); $saved_data = json_decode( get_post( $post_id )->post_content, true ); - $this->assertEquals( $manager->unsanitized_post_values(), wp_list_pluck( $saved_data, 'value' ) ); - $this->assertEquals( $pre_saved_data['blogname']['value'], $saved_data['blogname']['value'] ); - $this->assertEquals( $pre_saved_data['blogdescription']['custom'], $saved_data['blogdescription']['custom'] ); + $this->assertSame( $manager->unsanitized_post_values(), wp_list_pluck( $saved_data, 'value' ) ); + $this->assertSame( $pre_saved_data['blogname']['value'], $saved_data['blogname']['value'] ); + $this->assertSame( $pre_saved_data['blogdescription']['custom'], $saved_data['blogdescription']['custom'] ); foreach ( $saved_data as $setting_id => $setting_params ) { $this->assertArrayHasKey( 'type', $setting_params ); - $this->assertEquals( 'option', $setting_params['type'] ); + $this->assertSame( 'option', $setting_params['type'] ); $this->assertArrayHasKey( 'user_id', $setting_params ); - $this->assertEquals( self::$admin_user_id, $setting_params['user_id'] ); + $this->assertSame( self::$admin_user_id, $setting_params['user_id'] ); } - $this->assertEquals( 'Auto Draft', get_post( $post_id )->post_title ); - $this->assertEquals( 'auto-draft', get_post( $post_id )->post_status ); - $this->assertEquals( $date, get_post( $post_id )->post_date_gmt ); + $this->assertSame( 'Auto Draft', get_post( $post_id )->post_title ); + $this->assertSame( 'auto-draft', get_post( $post_id )->post_status ); + $this->assertSame( $date, get_post( $post_id )->post_date_gmt ); $this->assertNotEquals( 'Changeset Title', get_option( 'blogname' ) ); $this->assertArrayHasKey( 'setting_validities', $r ); @@ -1097,24 +1098,24 @@ function test_save_changeset_post_without_theme_activation() { ) ); $this->assertInstanceOf( 'WP_Error', $r ); - $this->assertEquals( 'transaction_fail', $r->get_error_code() ); - $this->assertInternalType( 'array', $r->get_error_data() ); + $this->assertSame( 'transaction_fail', $r->get_error_code() ); + $this->assertIsArray( $r->get_error_data() ); $this->assertArrayHasKey( 'setting_validities', $r->get_error_data() ); $error_data = $r->get_error_data(); $this->assertArrayHasKey( 'blogname', $error_data['setting_validities'] ); $this->assertTrue( $error_data['setting_validities']['blogname'] ); $this->assertArrayHasKey( 'foo_unauthorized', $error_data['setting_validities'] ); $this->assertInstanceOf( 'WP_Error', $error_data['setting_validities']['foo_unauthorized'] ); - $this->assertEquals( 'unauthorized', $error_data['setting_validities']['foo_unauthorized']->get_error_code() ); + $this->assertSame( 'unauthorized', $error_data['setting_validities']['foo_unauthorized']->get_error_code() ); $this->assertArrayHasKey( 'bar_unknown', $error_data['setting_validities'] ); $this->assertInstanceOf( 'WP_Error', $error_data['setting_validities']['bar_unknown'] ); - $this->assertEquals( 'unrecognized', $error_data['setting_validities']['bar_unknown']->get_error_code() ); + $this->assertSame( 'unrecognized', $error_data['setting_validities']['bar_unknown']->get_error_code() ); $this->assertArrayHasKey( 'baz_illegal', $error_data['setting_validities'] ); $this->assertInstanceOf( 'WP_Error', $error_data['setting_validities']['baz_illegal'] ); - $this->assertEquals( 'illegal', $error_data['setting_validities']['baz_illegal']->get_error_code() ); + $this->assertSame( 'illegal', $error_data['setting_validities']['baz_illegal']->get_error_code() ); // Since transactional, ensure no changes have been made. - $this->assertEquals( $previous_saved_data, json_decode( get_post( $post_id )->post_content, true ) ); + $this->assertSame( $previous_saved_data, json_decode( get_post( $post_id )->post_content, true ) ); // Attempt a non-transactional/incremental update. $manager = new WP_Customize_Manager( @@ -1137,13 +1138,13 @@ function test_save_changeset_post_without_theme_activation() { ), ) ); - $this->assertInternalType( 'array', $r ); + $this->assertIsArray( $r ); $this->assertArrayHasKey( 'setting_validities', $r ); $this->assertTrue( $r['setting_validities']['blogname'] ); $this->assertInstanceOf( 'WP_Error', $r['setting_validities']['bar_unknown'] ); $saved_data = json_decode( get_post( $post_id )->post_content, true ); $this->assertNotEquals( $previous_saved_data, $saved_data ); - $this->assertEquals( 'Non-Transactional \o/ ', $saved_data['blogname']['value'] ); + $this->assertSame( 'Non-Transactional \o/ ', $saved_data['blogname']['value'] ); // Ensure the filter applies. $customize_changeset_save_data_call_count = $this->customize_changeset_save_data_call_count; @@ -1158,7 +1159,7 @@ function test_save_changeset_post_without_theme_activation() { ), ) ); - $this->assertEquals( $customize_changeset_save_data_call_count + 1, $this->customize_changeset_save_data_call_count ); + $this->assertSame( $customize_changeset_save_data_call_count + 1, $this->customize_changeset_save_data_call_count ); // Publish the changeset: actions will be doubled since also trashed. $expected_actions = array( @@ -1171,6 +1172,7 @@ function test_save_changeset_post_without_theme_activation() { 'save_post_customize_changeset' => 2, 'save_post' => 2, 'wp_insert_post' => 2, + 'wp_after_insert_post' => 2, 'trashed_post' => 1, ); $action_counts = array(); @@ -1204,18 +1206,18 @@ function test_save_changeset_post_without_theme_activation() { ), ) ); - $this->assertInternalType( 'array', $r ); - $this->assertEquals( 'Do it live \o/', get_option( 'blogname' ) ); - $this->assertEquals( 'trash', get_post_status( $post_id ) ); // Auto-trashed. - $this->assertEquals( $original_capabilities, wp_list_pluck( $manager->settings(), 'capability' ) ); - $this->assertContains( '', get_option( 'scratchpad' ) ); + $this->assertSame( 'Unfiltered', get_option( 'scratchpad' ) ); // Attempt scratchpad with user who doesn't have unfiltered_html. update_option( 'scratchpad', '' ); @@ -1976,7 +1978,7 @@ function test_save_changeset_post_with_varying_unfiltered_html_cap() { $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $wp_customize->changeset_uuid() ) ); do_action( 'customize_register', $wp_customize ); $wp_customize->save_changeset_post( array( 'status' => 'publish' ) ); - $this->assertEquals( 'Unfilteredevil', get_option( 'scratchpad' ) ); + $this->assertSame( 'Unfilteredevil', get_option( 'scratchpad' ) ); // Attempt publishing scratchpad as anonymous user when changeset was set by privileged user. update_option( 'scratchpad', '' ); @@ -1993,9 +1995,9 @@ function test_save_changeset_post_with_varying_unfiltered_html_cap() { wp_set_current_user( 0 ); $wp_customize = null; unset( $GLOBALS['wp_actions']['customize_register'] ); - $this->assertEquals( 'Unfilteredevil', apply_filters( 'content_save_pre', 'Unfiltered' ) ); + $this->assertSame( 'Unfilteredevil', apply_filters( 'content_save_pre', 'Unfiltered' ) ); wp_publish_post( $changeset_post_id ); // @todo If wp_update_post() is used here, then kses will corrupt the post_content. - $this->assertEquals( 'Unfiltered', get_option( 'scratchpad' ) ); + $this->assertSame( 'Unfiltered', get_option( 'scratchpad' ) ); } /** @@ -2006,11 +2008,11 @@ function test_save_changeset_post_with_varying_unfiltered_html_cap() { * publishing * * @ticket 39221 - * @covers ::_wp_customize_publish_changeset() + * @covers ::_wp_customize_publish_changeset * @see WP_Customize_Widgets::schedule_customize_register() * @see WP_Customize_Widgets::customize_register() */ - function test_wp_customize_publish_changeset() { + public function test_wp_customize_publish_changeset() { global $wp_customize; $wp_customize = null; @@ -2047,7 +2049,7 @@ function test_wp_customize_publish_changeset() { // Ensure that the value has actually been written to the DB. $updated_sidebars_widgets = get_option( 'sidebars_widgets' ); - $this->assertEquals( $new_sidebar_1, $updated_sidebars_widgets['sidebar-1'] ); + $this->assertSame( $new_sidebar_1, $updated_sidebars_widgets['sidebar-1'] ); } /** @@ -2056,7 +2058,7 @@ function test_wp_customize_publish_changeset() { * @ticket 41336 * @covers WP_Customize_Manager::save_changeset_post */ - function test_publish_changeset_with_future_status_when_future_date() { + public function test_publish_changeset_with_future_status_when_future_date() { $wp_customize = $this->create_test_manager( wp_generate_uuid4() ); $wp_customize->save_changeset_post( @@ -2077,7 +2079,7 @@ function test_publish_changeset_with_future_status_when_future_date() { * @covers WP_Customize_Manager::save_changeset_post * @covers WP_Customize_Manager::get_changeset_post_data */ - function test_save_changeset_post_for_bad_changeset() { + public function test_save_changeset_post_for_bad_changeset() { $uuid = wp_generate_uuid4(); $post_id = wp_insert_post( array( @@ -2099,7 +2101,7 @@ function test_save_changeset_post_for_bad_changeset() { $r = $manager->save_changeset_post( $args ); $this->assertInstanceOf( 'WP_Error', $r ); - $this->assertEquals( 'json_parse_error', $r->get_error_code() ); + $this->assertSame( 'json_parse_error', $r->get_error_code() ); wp_update_post( array( @@ -2109,7 +2111,7 @@ function test_save_changeset_post_for_bad_changeset() { ); $r = $manager->save_changeset_post( $args ); $this->assertInstanceOf( 'WP_Error', $r ); - $this->assertEquals( 'expected_array', $r->get_error_code() ); + $this->assertSame( 'expected_array', $r->get_error_code() ); } /** @@ -2148,7 +2150,7 @@ public function test_trash_changeset_post_preserves_properties() { * * @param WP_Customize_Manager $wp_customize Manager. */ - function register_scratchpad_setting( WP_Customize_Manager $wp_customize ) { + public function register_scratchpad_setting( WP_Customize_Manager $wp_customize ) { $wp_customize->add_setting( 'scratchpad', array( @@ -2165,7 +2167,7 @@ function register_scratchpad_setting( WP_Customize_Manager $wp_customize ) { * @param string $value Value. * @return string Value. */ - function filter_sanitize_scratchpad( $value ) { + public function filter_sanitize_scratchpad( $value ) { return apply_filters( 'content_save_pre', $value ); } @@ -2183,7 +2185,7 @@ function filter_sanitize_scratchpad( $value ) { * @param WP_Customize_Setting $setting Setting. * @return mixed Value. */ - function filter_customize_setting_to_log_current_user( $value, $setting ) { + public function filter_customize_setting_to_log_current_user( $value, $setting ) { $this->filtered_setting_current_user_ids[ $setting->id ] = get_current_user_id(); return $value; } @@ -2192,9 +2194,9 @@ function filter_customize_setting_to_log_current_user( $value, $setting ) { * Test WP_Customize_Manager::is_cross_domain(). * * @ticket 30937 - * @covers WP_Customize_Manager::is_cross_domain() + * @covers WP_Customize_Manager::is_cross_domain */ - function test_is_cross_domain() { + public function test_is_cross_domain() { $wp_customize = new WP_Customize_Manager(); update_option( 'home', 'http://example.com' ); @@ -2210,18 +2212,18 @@ function test_is_cross_domain() { * Test WP_Customize_Manager::get_allowed_urls(). * * @ticket 30937 - * @covers WP_Customize_Manager::get_allowed_urls() + * @covers WP_Customize_Manager::get_allowed_urls */ - function test_get_allowed_urls() { + public function test_get_allowed_urls() { $wp_customize = new WP_Customize_Manager(); $this->assertFalse( is_ssl() ); $this->assertFalse( $wp_customize->is_cross_domain() ); $allowed = $wp_customize->get_allowed_urls(); - $this->assertEquals( $allowed, array( home_url( '/', 'http' ) ) ); + $this->assertSame( $allowed, array( home_url( '/', 'http' ) ) ); add_filter( 'customize_allowed_urls', array( $this, 'filter_customize_allowed_urls' ) ); $allowed = $wp_customize->get_allowed_urls(); - $this->assertEqualSets( $allowed, array( 'http://headless.example.com/', home_url( '/', 'http' ) ) ); + $this->assertSameSets( $allowed, array( 'http://headless.example.com/', home_url( '/', 'http' ) ) ); } /** @@ -2230,7 +2232,7 @@ function test_get_allowed_urls() { * @param array $urls URLs. * @return array URLs. */ - function filter_customize_allowed_urls( $urls ) { + public function filter_customize_allowed_urls( $urls ) { $urls[] = 'http://headless.example.com/'; return $urls; } @@ -2240,7 +2242,7 @@ function filter_customize_allowed_urls( $urls ) { * * @group ajax */ - function test_doing_ajax() { + public function test_doing_ajax() { add_filter( 'wp_doing_ajax', '__return_true' ); $manager = $this->manager; @@ -2254,7 +2256,7 @@ function test_doing_ajax() { /** * Test ! WP_Customize_Manager::doing_ajax(). */ - function test_not_doing_ajax() { + public function test_not_doing_ajax() { add_filter( 'wp_doing_ajax', '__return_false' ); $manager = $this->manager; @@ -2266,7 +2268,7 @@ function test_not_doing_ajax() { * * @ticket 30988 */ - function test_unsanitized_post_values_from_input() { + public function test_unsanitized_post_values_from_input() { wp_set_current_user( self::$admin_user_id ); $manager = $this->manager; @@ -2276,12 +2278,12 @@ function test_unsanitized_post_values_from_input() { ); $_POST['customized'] = wp_slash( wp_json_encode( $customized ) ); $post_values = $manager->unsanitized_post_values(); - $this->assertEquals( $customized, $post_values ); + $this->assertSame( $customized, $post_values ); $this->assertEmpty( $manager->unsanitized_post_values( array( 'exclude_post_data' => true ) ) ); $manager->set_post_value( 'foo', 'BAR' ); $post_values = $manager->unsanitized_post_values(); - $this->assertEquals( 'BAR', $post_values['foo'] ); + $this->assertSame( 'BAR', $post_values['foo'] ); $this->assertEmpty( $manager->unsanitized_post_values( array( 'exclude_post_data' => true ) ) ); // If user is unprivileged, the post data is ignored. @@ -2293,9 +2295,9 @@ function test_unsanitized_post_values_from_input() { * Test WP_Customize_Manager::unsanitized_post_values(). * * @ticket 30937 - * @covers WP_Customize_Manager::unsanitized_post_values() + * @covers WP_Customize_Manager::unsanitized_post_values */ - function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { + public function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { wp_set_current_user( self::$admin_user_id ); $preview_theme = $this->get_inactive_core_theme(); @@ -2345,14 +2347,14 @@ function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { $this->assertArrayNotHasKey( 'background_color', $manager->unsanitized_post_values() ); - $this->assertEquals( + $this->assertSame( array( 'blogname' => 'Changeset Title', 'blogdescription' => 'Post Input Tagline', ), $manager->unsanitized_post_values() ); - $this->assertEquals( + $this->assertSame( array( 'blogdescription' => 'Post Input Tagline', ), @@ -2360,7 +2362,7 @@ function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { ); $manager->set_post_value( 'blogdescription', 'Post Override Tagline' ); - $this->assertEquals( + $this->assertSame( array( 'blogname' => 'Changeset Title', 'blogdescription' => 'Post Override Tagline', @@ -2368,7 +2370,7 @@ function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { $manager->unsanitized_post_values() ); - $this->assertEquals( + $this->assertSame( array( 'blogname' => 'Changeset Title', 'blogdescription' => 'Changeset Tagline', @@ -2401,7 +2403,7 @@ function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { ); $this->assertNotEmpty( $values ); $this->assertArrayHasKey( 'background_color', $values ); - $this->assertEquals( '#000000', $values['background_color'] ); + $this->assertSame( '#000000', $values['background_color'] ); $values = $manager->unsanitized_post_values( array( @@ -2419,7 +2421,7 @@ function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { * * @ticket 30988 */ - function test_post_value() { + public function test_post_value() { wp_set_current_user( self::$admin_user_id ); $posted_settings = array( 'foo' => 'OOF', @@ -2430,12 +2432,12 @@ function test_post_value() { $manager->add_setting( 'foo', array( 'default' => 'foo_default' ) ); $foo_setting = $manager->get_setting( 'foo' ); - $this->assertEquals( 'foo_default', $manager->get_setting( 'foo' )->value(), 'Expected non-previewed setting to return default when value() method called.' ); - $this->assertEquals( $posted_settings['foo'], $manager->post_value( $foo_setting, 'post_value_foo_default' ), 'Expected post_value($foo_setting) to return value supplied in $_POST[customized][foo]' ); + $this->assertSame( 'foo_default', $manager->get_setting( 'foo' )->value(), 'Expected non-previewed setting to return default when value() method called.' ); + $this->assertSame( $posted_settings['foo'], $manager->post_value( $foo_setting, 'post_value_foo_default' ), 'Expected post_value($foo_setting) to return value supplied in $_POST[customized][foo]' ); $manager->add_setting( 'bar', array( 'default' => 'bar_default' ) ); $bar_setting = $manager->get_setting( 'bar' ); - $this->assertEquals( 'post_value_bar_default', $manager->post_value( $bar_setting, 'post_value_bar_default' ), 'Expected post_value($bar_setting, $default) to return $default since no value supplied in $_POST[customized][bar]' ); + $this->assertSame( 'post_value_bar_default', $manager->post_value( $bar_setting, 'post_value_bar_default' ), 'Expected post_value($bar_setting, $default) to return $default since no value supplied in $_POST[customized][bar]' ); } /** @@ -2443,7 +2445,7 @@ function test_post_value() { * * @ticket 34893 */ - function test_invalid_post_value() { + public function test_invalid_post_value() { wp_set_current_user( self::$admin_user_id ); $default_value = 'foo_default'; $setting = $this->manager->add_setting( @@ -2453,26 +2455,26 @@ function test_invalid_post_value() { 'sanitize_callback' => array( $this, 'filter_customize_sanitize_foo' ), ) ); - $this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( $default_value, $setting->post_value( $default_value ) ); + $this->assertSame( $default_value, $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( $default_value, $setting->post_value( $default_value ) ); $post_value = 'bar'; $this->manager->set_post_value( 'foo', $post_value ); - $this->assertEquals( strtoupper( $post_value ), $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( strtoupper( $post_value ), $setting->post_value( $default_value ) ); + $this->assertSame( strtoupper( $post_value ), $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( strtoupper( $post_value ), $setting->post_value( $default_value ) ); $this->manager->set_post_value( 'foo', 'return_wp_error_in_sanitize' ); - $this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( $default_value, $setting->post_value( $default_value ) ); + $this->assertSame( $default_value, $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( $default_value, $setting->post_value( $default_value ) ); $this->manager->set_post_value( 'foo', 'return_null_in_sanitize' ); - $this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( $default_value, $setting->post_value( $default_value ) ); + $this->assertSame( $default_value, $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( $default_value, $setting->post_value( $default_value ) ); $post_value = ''; $this->manager->set_post_value( 'foo', $post_value ); - $this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( $default_value, $setting->post_value( $default_value ) ); + $this->assertSame( $default_value, $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( $default_value, $setting->post_value( $default_value ) ); } /** @@ -2481,7 +2483,7 @@ function test_invalid_post_value() { * @param mixed $value Value. * @return string|WP_Error */ - function filter_customize_sanitize_foo( $value ) { + public function filter_customize_sanitize_foo( $value ) { if ( 'return_null_in_sanitize' === $value ) { $value = null; } elseif ( is_string( $value ) ) { @@ -2500,7 +2502,7 @@ function filter_customize_sanitize_foo( $value ) { * @param mixed $value Value. * @return WP_Error */ - function filter_customize_validate_foo( $validity, $value ) { + public function filter_customize_validate_foo( $validity, $value ) { if ( false !== stripos( $value, 'add( 'invalid_value_in_validate', __( 'Invalid value.' ), array( 'source' => 'filter_customize_validate_foo' ) ); } @@ -2512,7 +2514,7 @@ function filter_customize_validate_foo( $validity, $value ) { * * @ticket 37247 */ - function test_post_value_validation_sanitization_order() { + public function test_post_value_validation_sanitization_order() { wp_set_current_user( self::$admin_user_id ); $default_value = '0'; $setting = $this->manager->add_setting( @@ -2522,8 +2524,8 @@ function test_post_value_validation_sanitization_order() { 'sanitize_callback' => array( $this, 'filter_customize_sanitize_numeric' ), ) ); - $this->assertEquals( $default_value, $this->manager->post_value( $setting, $default_value ) ); - $this->assertEquals( $default_value, $setting->post_value( $default_value ) ); + $this->assertSame( $default_value, $this->manager->post_value( $setting, $default_value ) ); + $this->assertSame( $default_value, $setting->post_value( $default_value ) ); $post_value = '42'; $this->manager->set_post_value( 'numeric', $post_value ); @@ -2537,7 +2539,7 @@ function test_post_value_validation_sanitization_order() { * @param mixed $value Value. * @return string|WP_Error */ - function filter_customize_sanitize_numeric( $value ) { + public function filter_customize_sanitize_numeric( $value ) { return absint( $value ); } @@ -2548,7 +2550,7 @@ function filter_customize_sanitize_numeric( $value ) { * @param mixed $value Value. * @return WP_Error */ - function filter_customize_validate_numeric( $validity, $value ) { + public function filter_customize_validate_numeric( $validity, $value ) { if ( ! is_string( $value ) || ! is_numeric( $value ) ) { $validity->add( 'invalid_value_in_validate', __( 'Invalid value.' ), array( 'source' => 'filter_customize_validate_numeric' ) ); } @@ -2560,7 +2562,7 @@ function filter_customize_validate_numeric( $validity, $value ) { * * @see WP_Customize_Manager::validate_setting_values() */ - function test_validate_setting_values() { + public function test_validate_setting_values() { wp_set_current_user( self::$admin_user_id ); $setting = $this->manager->add_setting( 'foo', @@ -2574,7 +2576,7 @@ function test_validate_setting_values() { $this->manager->set_post_value( 'foo', $post_value ); $validities = $this->manager->validate_setting_values( $this->manager->unsanitized_post_values() ); $this->assertCount( 1, $validities ); - $this->assertEquals( array( 'foo' => true ), $validities ); + $this->assertSame( array( 'foo' => true ), $validities ); $this->manager->set_post_value( 'foo', 'return_wp_error_in_sanitize' ); $invalid_settings = $this->manager->validate_setting_values( $this->manager->unsanitized_post_values() ); @@ -2582,8 +2584,8 @@ function test_validate_setting_values() { $this->assertArrayHasKey( $setting->id, $invalid_settings ); $this->assertInstanceOf( 'WP_Error', $invalid_settings[ $setting->id ] ); $error = $invalid_settings[ $setting->id ]; - $this->assertEquals( 'invalid_value_in_sanitize', $error->get_error_code() ); - $this->assertEquals( array( 'source' => 'filter_customize_sanitize_foo' ), $error->get_error_data() ); + $this->assertSame( 'invalid_value_in_sanitize', $error->get_error_code() ); + $this->assertSame( array( 'source' => 'filter_customize_sanitize_foo' ), $error->get_error_data() ); $this->manager->set_post_value( 'foo', 'return_null_in_sanitize' ); $invalid_settings = $this->manager->validate_setting_values( $this->manager->unsanitized_post_values() ); @@ -2599,17 +2601,17 @@ function test_validate_setting_values() { $this->assertArrayHasKey( $setting->id, $invalid_settings ); $this->assertInstanceOf( 'WP_Error', $invalid_settings[ $setting->id ] ); $error = $invalid_settings[ $setting->id ]; - $this->assertEquals( 'invalid_value_in_validate', $error->get_error_code() ); - $this->assertEquals( array( 'source' => 'filter_customize_validate_foo' ), $error->get_error_data() ); + $this->assertSame( 'invalid_value_in_validate', $error->get_error_code() ); + $this->assertSame( array( 'source' => 'filter_customize_validate_foo' ), $error->get_error_data() ); } /** * Test WP_Customize_Manager::validate_setting_values(). * * @ticket 37638 - * @covers WP_Customize_Manager::validate_setting_values() + * @covers WP_Customize_Manager::validate_setting_values */ - function test_late_validate_setting_values() { + public function test_late_validate_setting_values() { $setting = new Test_Setting_Without_Applying_Validate_Filter( $this->manager, 'required' ); $this->manager->add_setting( $setting ); @@ -2626,16 +2628,16 @@ function test_late_validate_setting_values() { $setting_validities = $this->manager->validate_setting_values( array( $setting->id => 'bad' ) ); $validity = $setting_validities[ $setting->id ]; $this->assertInstanceOf( 'WP_Error', $validity ); - $this->assertEquals( 'minlength', $validity->get_error_code() ); + $this->assertSame( 'minlength', $validity->get_error_code() ); } /** * Test WP_Customize_Manager::validate_setting_values(). * * @ticket 30937 - * @covers WP_Customize_Manager::validate_setting_values() + * @covers WP_Customize_Manager::validate_setting_values */ - function test_validate_setting_values_args() { + public function test_validate_setting_values_args() { wp_set_current_user( self::$admin_user_id ); $this->manager->register_controls(); @@ -2650,7 +2652,7 @@ function test_validate_setting_values_args() { $this->assertArrayHasKey( 'unknown', $validities ); $error = $validities['unknown']; $this->assertInstanceOf( 'WP_Error', $error ); - $this->assertEquals( 'unrecognized', $error->get_error_code() ); + $this->assertSame( 'unrecognized', $error->get_error_code() ); $this->manager->get_setting( 'blogname' )->capability = 'do_not_allow'; $validities = $this->manager->validate_setting_values( array( 'blogname' => 'X' ), array( 'validate_capability' => false ) ); @@ -2660,7 +2662,7 @@ function test_validate_setting_values_args() { $this->assertArrayHasKey( 'blogname', $validities ); $error = $validities['blogname']; $this->assertInstanceOf( 'WP_Error', $error ); - $this->assertEquals( 'unauthorized', $error->get_error_code() ); + $this->assertSame( 'unauthorized', $error->get_error_code() ); } /** @@ -2673,7 +2675,7 @@ function test_validate_setting_values_args() { * @param WP_Customize_Setting $setting Setting. * @return WP_Error Validity. */ - function late_validate_length( $validity, $value, $setting ) { + public function late_validate_length( $validity, $value, $setting ) { $this->assertInstanceOf( 'WP_Customize_Setting', $setting ); if ( strlen( $value ) < 10 ) { $validity->add( 'minlength', '' ); @@ -2686,7 +2688,7 @@ function late_validate_length( $validity, $value, $setting ) { * * @ticket 37247 */ - function test_validate_setting_values_validation_sanitization_order() { + public function test_validate_setting_values_validation_sanitization_order() { wp_set_current_user( self::$admin_user_id ); $setting = $this->manager->add_setting( 'numeric', @@ -2699,7 +2701,7 @@ function test_validate_setting_values_validation_sanitization_order() { $this->manager->set_post_value( 'numeric', $post_value ); $validities = $this->manager->validate_setting_values( $this->manager->unsanitized_post_values() ); $this->assertCount( 1, $validities ); - $this->assertEquals( array( 'numeric' => true ), $validities ); + $this->assertSame( array( 'numeric' => true ), $validities ); } /** @@ -2707,23 +2709,23 @@ function test_validate_setting_values_validation_sanitization_order() { * * @see WP_Customize_Manager::prepare_setting_validity_for_js() */ - function test_prepare_setting_validity_for_js() { + public function test_prepare_setting_validity_for_js() { $this->assertTrue( $this->manager->prepare_setting_validity_for_js( true ) ); $error = new WP_Error(); $error->add( 'bad_letter', 'Bad letter', 'A' ); $error->add( 'bad_letter', 'Bad letra', 123 ); $error->add( 'bad_number', 'Bad number', array( 'number' => 123 ) ); $validity = $this->manager->prepare_setting_validity_for_js( $error ); - $this->assertInternalType( 'array', $validity ); + $this->assertIsArray( $validity ); foreach ( $error->errors as $code => $messages ) { $this->assertArrayHasKey( $code, $validity ); - $this->assertInternalType( 'array', $validity[ $code ] ); - $this->assertEquals( join( ' ', $messages ), $validity[ $code ]['message'] ); + $this->assertIsArray( $validity[ $code ] ); + $this->assertSame( implode( ' ', $messages ), $validity[ $code ]['message'] ); $this->assertArrayHasKey( 'data', $validity[ $code ] ); - $this->assertEquals( $validity[ $code ]['data'], $error->get_error_data( $code ) ); + $this->assertSame( $validity[ $code ]['data'], $error->get_error_data( $code ) ); } $this->assertArrayHasKey( 'number', $validity['bad_number']['data'] ); - $this->assertEquals( 123, $validity['bad_number']['data']['number'] ); + $this->assertSame( 123, $validity['bad_number']['data']['number'] ); } /** @@ -2731,7 +2733,7 @@ function test_prepare_setting_validity_for_js() { * * @see WP_Customize_Manager::set_post_value() */ - function test_set_post_value() { + public function test_set_post_value() { wp_set_current_user( self::$admin_user_id ); $this->manager->add_setting( 'foo', @@ -2746,16 +2748,16 @@ function test_set_post_value() { add_action( 'customize_post_value_set_foo', array( $this, 'capture_customize_post_value_set_actions' ), 10, 2 ); $this->manager->set_post_value( $setting->id, '123abc' ); $this->assertCount( 2, $this->captured_customize_post_value_set_actions ); - $this->assertEquals( 'customize_post_value_set_foo', $this->captured_customize_post_value_set_actions[0]['action'] ); - $this->assertEquals( 'customize_post_value_set', $this->captured_customize_post_value_set_actions[1]['action'] ); - $this->assertEquals( array( '123abc', $this->manager ), $this->captured_customize_post_value_set_actions[0]['args'] ); - $this->assertEquals( array( $setting->id, '123abc', $this->manager ), $this->captured_customize_post_value_set_actions[1]['args'] ); + $this->assertSame( 'customize_post_value_set_foo', $this->captured_customize_post_value_set_actions[0]['action'] ); + $this->assertSame( 'customize_post_value_set', $this->captured_customize_post_value_set_actions[1]['action'] ); + $this->assertSame( array( '123abc', $this->manager ), $this->captured_customize_post_value_set_actions[0]['args'] ); + $this->assertSame( array( $setting->id, '123abc', $this->manager ), $this->captured_customize_post_value_set_actions[1]['args'] ); $unsanitized = $this->manager->unsanitized_post_values(); $this->assertArrayHasKey( $setting->id, $unsanitized ); - $this->assertEquals( '123abc', $unsanitized[ $setting->id ] ); - $this->assertEquals( 123, $setting->post_value() ); + $this->assertSame( '123abc', $unsanitized[ $setting->id ] ); + $this->assertSame( 123, $setting->post_value() ); } /** @@ -2766,8 +2768,8 @@ function test_set_post_value() { * @param mixed $value Value. * @return int Value. */ - function sanitize_foo_for_test_set_post_value( $value ) { - return intval( $value ); + public function sanitize_foo_for_test_set_post_value( $value ) { + return (int) $value; } /** @@ -2785,7 +2787,7 @@ function sanitize_foo_for_test_set_post_value( $value ) { * * @param mixed ...$args Optional arguments passed to the action. */ - function capture_customize_post_value_set_actions( ...$args ) { + public function capture_customize_post_value_set_actions( ...$args ) { $action = current_action(); $this->captured_customize_post_value_set_actions[] = compact( 'action', 'args' ); } @@ -2795,7 +2797,7 @@ function capture_customize_post_value_set_actions( ...$args ) { * * @ticket 30936 */ - function test_add_dynamic_settings() { + public function test_add_dynamic_settings() { $manager = $this->manager; $setting_ids = array( 'foo', 'bar' ); $manager->add_setting( 'foo', array( 'default' => 'foo_default' ) ); @@ -2806,17 +2808,17 @@ function test_add_dynamic_settings() { $this->action_customize_register_for_dynamic_settings(); $manager->add_dynamic_settings( $setting_ids ); $this->assertNotEmpty( $manager->get_setting( 'bar' ), 'Expected bar setting to be created since filters were added.' ); - $this->assertEquals( 'foo_default', $manager->get_setting( 'foo' )->default, 'Expected static foo setting to not get overridden by dynamic setting.' ); - $this->assertEquals( 'dynamic_bar_default', $manager->get_setting( 'bar' )->default, 'Expected dynamic setting bar to have default providd by filter.' ); + $this->assertSame( 'foo_default', $manager->get_setting( 'foo' )->default, 'Expected static foo setting to not get overridden by dynamic setting.' ); + $this->assertSame( 'dynamic_bar_default', $manager->get_setting( 'bar' )->default, 'Expected dynamic setting bar to have default providd by filter.' ); } /** * Test WP_Customize_Manager::has_published_pages(). * * @ticket 38013 - * @covers WP_Customize_Manager::has_published_pages() + * @covers WP_Customize_Manager::has_published_pages */ - function test_has_published_pages() { + public function test_has_published_pages() { foreach ( get_pages() as $page ) { wp_delete_post( $page->ID, true ); } @@ -2843,9 +2845,9 @@ function test_has_published_pages() { * Ensure that page stubs created via nav menus will cause has_published_pages to return true. * * @ticket 38013 - * @covers WP_Customize_Manager::has_published_pages() + * @covers WP_Customize_Manager::has_published_pages */ - function test_has_published_pages_when_nav_menus_created_posts() { + public function test_has_published_pages_when_nav_menus_created_posts() { foreach ( get_pages() as $page ) { wp_delete_post( $page->ID, true ); } @@ -2874,7 +2876,7 @@ function test_has_published_pages_when_nav_menus_created_posts() { * * @ticket 30936 */ - function test_register_dynamic_settings() { + public function test_register_dynamic_settings() { wp_set_current_user( self::$admin_user_id ); $posted_settings = array( 'foo' => 'OOF', @@ -2896,7 +2898,7 @@ function test_register_dynamic_settings() { /** * In lieu of closures, callback for customize_register action added in test_register_dynamic_settings(). */ - function action_customize_register_for_dynamic_settings() { + public function action_customize_register_for_dynamic_settings() { add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args_for_test_dynamic_settings' ), 10, 2 ); add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_customize_dynamic_setting_class_for_test_dynamic_settings' ), 10, 3 ); } @@ -2908,8 +2910,8 @@ function action_customize_register_for_dynamic_settings() { * @param string $setting_id Setting ID. * @return array */ - function filter_customize_dynamic_setting_args_for_test_dynamic_settings( $setting_args, $setting_id ) { - $this->assertInternalType( 'string', $setting_id ); + public function filter_customize_dynamic_setting_args_for_test_dynamic_settings( $setting_args, $setting_id ) { + $this->assertIsString( $setting_id ); if ( in_array( $setting_id, array( 'foo', 'bar' ), true ) ) { $setting_args = array( 'default' => "dynamic_{$setting_id}_default" ); } @@ -2924,10 +2926,10 @@ function filter_customize_dynamic_setting_args_for_test_dynamic_settings( $setti * @param array $setting_args Setting args. * @return string */ - function filter_customize_dynamic_setting_class_for_test_dynamic_settings( $setting_class, $setting_id, $setting_args ) { - $this->assertEquals( 'WP_Customize_Setting', $setting_class ); - $this->assertInternalType( 'string', $setting_id ); - $this->assertInternalType( 'array', $setting_args ); + public function filter_customize_dynamic_setting_class_for_test_dynamic_settings( $setting_class, $setting_id, $setting_args ) { + $this->assertSame( 'WP_Customize_Setting', $setting_class ); + $this->assertIsString( $setting_id ); + $this->assertIsArray( $setting_args ); return $setting_class; } @@ -2936,9 +2938,9 @@ function filter_customize_dynamic_setting_class_for_test_dynamic_settings( $sett * * @see WP_Customize_Manager::get_document_title_template() */ - function test_get_document_title_template() { + public function test_get_document_title_template() { $tpl = $this->manager->get_document_title_template(); - $this->assertContains( '%s', $tpl ); + $this->assertStringContainsString( '%s', $tpl ); } /** @@ -2947,13 +2949,13 @@ function test_get_document_title_template() { * @see WP_Customize_Manager::get_preview_url() * @see WP_Customize_Manager::set_preview_url() */ - function test_preview_url() { - $this->assertEquals( home_url( '/' ), $this->manager->get_preview_url() ); + public function test_preview_url() { + $this->assertSame( home_url( '/' ), $this->manager->get_preview_url() ); $preview_url = home_url( '/foo/bar/baz/' ); $this->manager->set_preview_url( $preview_url ); - $this->assertEquals( $preview_url, $this->manager->get_preview_url() ); + $this->assertSame( $preview_url, $this->manager->get_preview_url() ); $this->manager->set_preview_url( 'http://illegalsite.example.com/food/' ); - $this->assertEquals( home_url( '/' ), $this->manager->get_preview_url() ); + $this->assertSame( home_url( '/' ), $this->manager->get_preview_url() ); } /** @@ -2962,44 +2964,44 @@ function test_preview_url() { * @see WP_Customize_Manager::get_return_url() * @see WP_Customize_Manager::set_return_url() */ - function test_return_url() { + public function test_return_url() { wp_set_current_user( self::factory()->user->create( array( 'role' => 'author' ) ) ); - $this->assertEquals( home_url( '/' ), $this->manager->get_return_url() ); + $this->assertSame( home_url( '/' ), $this->manager->get_return_url() ); wp_set_current_user( self::$admin_user_id ); $this->assertTrue( current_user_can( 'edit_theme_options' ) ); - $this->assertEquals( home_url( '/' ), $this->manager->get_return_url() ); + $this->assertSame( home_url( '/' ), $this->manager->get_return_url() ); $preview_url = home_url( '/foo/' ); $this->manager->set_preview_url( $preview_url ); - $this->assertEquals( $preview_url, $this->manager->get_return_url() ); + $this->assertSame( $preview_url, $this->manager->get_return_url() ); $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'customize.php' ) ); - $this->assertEquals( $preview_url, $this->manager->get_return_url() ); + $this->assertSame( $preview_url, $this->manager->get_return_url() ); // See #35355. $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'wp-login.php' ) ); - $this->assertEquals( $preview_url, $this->manager->get_return_url() ); + $this->assertSame( $preview_url, $this->manager->get_return_url() ); $url = home_url( '/referred/' ); $_SERVER['HTTP_REFERER'] = wp_slash( $url ); - $this->assertEquals( $url, $this->manager->get_return_url() ); + $this->assertSame( $url, $this->manager->get_return_url() ); $url = 'http://badreferer.example.com/'; $_SERVER['HTTP_REFERER'] = wp_slash( $url ); $this->assertNotEquals( $url, $this->manager->get_return_url() ); - $this->assertEquals( $preview_url, $this->manager->get_return_url() ); + $this->assertSame( $preview_url, $this->manager->get_return_url() ); $this->manager->set_return_url( admin_url( 'edit.php?trashed=1' ) ); - $this->assertEquals( admin_url( 'edit.php' ), $this->manager->get_return_url() ); + $this->assertSame( admin_url( 'edit.php' ), $this->manager->get_return_url() ); } /** * @ticket 46686 */ - function test_return_url_with_deactivated_theme() { + public function test_return_url_with_deactivated_theme() { $this->manager->set_return_url( admin_url( 'themes.php?page=mytheme_documentation' ) ); - $this->assertEquals( admin_url( 'themes.php' ), $this->manager->get_return_url() ); + $this->assertSame( admin_url( 'themes.php' ), $this->manager->get_return_url() ); } /** @@ -3008,7 +3010,7 @@ function test_return_url_with_deactivated_theme() { * @see WP_Customize_Manager::get_autofocus() * @see WP_Customize_Manager::set_autofocus() */ - function test_autofocus() { + public function test_autofocus() { $this->assertEmpty( $this->manager->get_autofocus() ); $this->manager->set_autofocus( array( 'unrecognized' => 'food' ) ); @@ -3016,15 +3018,15 @@ function test_autofocus() { $autofocus = array( 'control' => 'blogname' ); $this->manager->set_autofocus( $autofocus ); - $this->assertEquals( $autofocus, $this->manager->get_autofocus() ); + $this->assertSame( $autofocus, $this->manager->get_autofocus() ); $autofocus = array( 'section' => 'colors' ); $this->manager->set_autofocus( $autofocus ); - $this->assertEquals( $autofocus, $this->manager->get_autofocus() ); + $this->assertSame( $autofocus, $this->manager->get_autofocus() ); $autofocus = array( 'panel' => 'widgets' ); $this->manager->set_autofocus( $autofocus ); - $this->assertEquals( $autofocus, $this->manager->get_autofocus() ); + $this->assertSame( $autofocus, $this->manager->get_autofocus() ); $autofocus = array( 'control' => array( 'blogname', 'blogdescription' ) ); $this->manager->set_autofocus( $autofocus ); @@ -3036,16 +3038,16 @@ function test_autofocus() { * * @see WP_Customize_Manager::get_nonces() */ - function test_nonces() { + public function test_nonces() { $nonces = $this->manager->get_nonces(); - $this->assertInternalType( 'array', $nonces ); + $this->assertIsArray( $nonces ); $this->assertArrayHasKey( 'save', $nonces ); $this->assertArrayHasKey( 'preview', $nonces ); add_filter( 'customize_refresh_nonces', array( $this, 'filter_customize_refresh_nonces' ), 10, 2 ); $nonces = $this->manager->get_nonces(); $this->assertArrayHasKey( 'foo', $nonces ); - $this->assertEquals( wp_create_nonce( 'foo' ), $nonces['foo'] ); + $this->assertSame( wp_create_nonce( 'foo' ), $nonces['foo'] ); } /** @@ -3055,7 +3057,7 @@ function test_nonces() { * @param WP_Customize_Manager $manager Manager. * @return array Nonces. */ - function filter_customize_refresh_nonces( $nonces, $manager ) { + public function filter_customize_refresh_nonces( $nonces, $manager ) { $this->assertInstanceOf( 'WP_Customize_Manager', $manager ); $nonces['foo'] = wp_create_nonce( 'foo' ); return $nonces; @@ -3066,7 +3068,7 @@ function filter_customize_refresh_nonces( $nonces, $manager ) { * * @see WP_Customize_Manager::customize_pane_settings() */ - function test_customize_pane_settings() { + public function test_customize_pane_settings() { wp_set_current_user( self::$admin_user_id ); $this->manager->register_controls(); $this->manager->prepare_controls(); @@ -3077,24 +3079,24 @@ function test_customize_pane_settings() { $this->manager->customize_pane_settings(); $content = ob_get_clean(); - $this->assertContains( 'var _wpCustomizeSettings =', $content ); - $this->assertContains( '"blogname"', $content ); - $this->assertContains( '"type":"option"', $content ); - $this->assertContains( '_wpCustomizeSettings.controls', $content ); - $this->assertContains( '_wpCustomizeSettings.settings', $content ); - $this->assertContains( '', $content ); + $this->assertStringContainsString( 'var _wpCustomizeSettings =', $content ); + $this->assertStringContainsString( '"blogname"', $content ); + $this->assertStringContainsString( '"type":"option"', $content ); + $this->assertStringContainsString( '_wpCustomizeSettings.controls', $content ); + $this->assertStringContainsString( '_wpCustomizeSettings.settings', $content ); + $this->assertStringContainsString( '', $content ); $this->assertNotEmpty( preg_match( '#var _wpCustomizeSettings\s*=\s*({.*?});\s*\n#', $content, $matches ) ); $json = $matches[1]; $data = json_decode( $json, true ); $this->assertNotEmpty( $data ); - $this->assertEqualSets( array( 'theme', 'url', 'browser', 'panels', 'sections', 'nonce', 'autofocus', 'documentTitleTmpl', 'previewableDevices', 'changeset', 'timeouts', 'dateFormat', 'timeFormat', 'initialClientTimestamp', 'initialServerDate', 'initialServerTimestamp', 'l10n' ), array_keys( $data ) ); - $this->assertEquals( $autofocus, $data['autofocus'] ); + $this->assertSameSets( array( 'theme', 'url', 'browser', 'panels', 'sections', 'nonce', 'autofocus', 'documentTitleTmpl', 'previewableDevices', 'changeset', 'timeouts', 'dateFormat', 'timeFormat', 'initialClientTimestamp', 'initialServerDate', 'initialServerTimestamp', 'l10n' ), array_keys( $data ) ); + $this->assertSame( $autofocus, $data['autofocus'] ); $this->assertArrayHasKey( 'save', $data['nonce'] ); $this->assertArrayHasKey( 'preview', $data['nonce'] ); - $this->assertEqualSets( + $this->assertSameSets( array( 'branching', 'autosaved', @@ -3115,9 +3117,9 @@ function test_customize_pane_settings() { * Test remove_frameless_preview_messenger_channel. * * @ticket 38867 - * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel() + * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel */ - function test_remove_frameless_preview_messenger_channel() { + public function test_remove_frameless_preview_messenger_channel() { wp_set_current_user( self::$admin_user_id ); $manager = new WP_Customize_Manager( array( 'messenger_channel' => null ) ); ob_start(); @@ -3129,7 +3131,7 @@ function test_remove_frameless_preview_messenger_channel() { ob_start(); $manager->remove_frameless_preview_messenger_channel(); $output = ob_get_clean(); - $this->assertContains( '\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** * @ticket 42804 */ - function test_wp_enqueue_script_with_html5_support_does_not_contain_type_attribute() { + public function test_wp_enqueue_script_with_html5_support_does_not_contain_type_attribute() { add_theme_support( 'html5', array( 'script' ) ); $GLOBALS['wp_scripts'] = new WP_Scripts(); @@ -69,9 +75,9 @@ function test_wp_enqueue_script_with_html5_support_does_not_contain_type_attribu wp_enqueue_script( 'empty-deps-no-version', 'example.com' ); $ver = get_bloginfo( 'version' ); - $expected = "\n"; + $expected = "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -90,30 +96,30 @@ public function test_protocols() { // Try with an HTTP reference. wp_enqueue_script( 'jquery-http', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ); - $expected .= "\n"; + $expected .= "\n"; // Try with an HTTPS reference. wp_enqueue_script( 'jquery-https', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ); - $expected .= "\n"; + $expected .= "\n"; // Try with an automatic protocol reference (//). wp_enqueue_script( 'jquery-doubleslash', '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ); - $expected .= "\n"; + $expected .= "\n"; // Try with a local resource and an automatic protocol reference (//). $url = '//my_plugin/script.js'; wp_enqueue_script( 'plugin-script', $url ); - $expected .= "\n"; + $expected .= "\n"; // Try with a bad protocol. wp_enqueue_script( 'jquery-ftp', 'ftp://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ); - $expected .= "\n"; + $expected .= "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); // Cleanup. $wp_scripts->base_url = $base_url_backup; @@ -138,7 +144,7 @@ public function test_script_concatenation() { $ver = get_bloginfo( 'version' ); $expected = "\n"; - $this->assertEquals( $expected, $print_scripts ); + $this->assertSame( $expected, $print_scripts ); } /** @@ -146,18 +152,18 @@ public function test_script_concatenation() { * * @ticket 16024 */ - function test_wp_script_add_data_with_data_key() { + public function test_wp_script_add_data_with_data_key() { // Enqueue and add data. wp_enqueue_script( 'test-only-data', 'example.com', array(), null ); wp_script_add_data( 'test-only-data', 'data', 'testing' ); - $expected = "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** @@ -165,17 +171,17 @@ function test_wp_script_add_data_with_data_key() { * * @ticket 16024 */ - function test_wp_script_add_data_with_conditional_key() { + public function test_wp_script_add_data_with_conditional_key() { // Enqueue and add conditional comments. wp_enqueue_script( 'test-only-conditional', 'example.com', array(), null ); wp_script_add_data( 'test-only-conditional', 'conditional', 'gt IE 7' ); - $expected = "\n"; + $expected = "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** @@ -183,19 +189,19 @@ function test_wp_script_add_data_with_conditional_key() { * * @ticket 16024 */ - function test_wp_script_add_data_with_data_and_conditional_keys() { + public function test_wp_script_add_data_with_data_and_conditional_keys() { // Enqueue and add data plus conditional comments for both. wp_enqueue_script( 'test-conditional-with-data', 'example.com', array(), null ); wp_script_add_data( 'test-conditional-with-data', 'data', 'testing' ); wp_script_add_data( 'test-conditional-with-data', 'conditional', 'lt IE 9' ); - $expected = "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** @@ -203,17 +209,17 @@ function test_wp_script_add_data_with_data_and_conditional_keys() { * * @ticket 16024 */ - function test_wp_script_add_data_with_invalid_key() { + public function test_wp_script_add_data_with_invalid_key() { // Enqueue and add an invalid key. wp_enqueue_script( 'test-invalid', 'example.com', array(), null ); wp_script_add_data( 'test-invalid', 'invalid', 'testing' ); - $expected = "\n"; + $expected = "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); // No scripts left to print. - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** @@ -221,7 +227,7 @@ function test_wp_script_add_data_with_invalid_key() { * * @ticket 31126 */ - function test_wp_register_script() { + public function test_wp_register_script() { $this->assertTrue( wp_register_script( 'duplicate-handler', 'http://example.com' ) ); $this->assertFalse( wp_register_script( 'duplicate-handler', 'http://example.com' ) ); } @@ -229,9 +235,9 @@ function test_wp_register_script() { /** * @ticket 35229 */ - function test_wp_register_script_with_handle_without_source() { - $expected = "\n"; - $expected .= "\n"; + public function test_wp_register_script_with_handle_without_source() { + $expected = "\n"; + $expected .= "\n"; wp_register_script( 'handle-one', 'http://example.com', array(), 1 ); wp_register_script( 'handle-two', 'http://example.com', array(), 2 ); @@ -239,13 +245,13 @@ function test_wp_register_script_with_handle_without_source() { wp_enqueue_script( 'handle-three' ); - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 35643 */ - function test_wp_enqueue_script_footer_alias() { + public function test_wp_enqueue_script_footer_alias() { wp_register_script( 'foo', false, array( 'bar', 'baz' ), '1.0', true ); wp_register_script( 'bar', home_url( 'bar.js' ), array(), '1.0', true ); wp_register_script( 'baz', home_url( 'baz.js' ), array(), '1.0', true ); @@ -256,14 +262,18 @@ function test_wp_enqueue_script_footer_alias() { $footer = get_echo( 'wp_print_footer_scripts' ); $this->assertEmpty( $header ); - $this->assertContains( home_url( 'bar.js' ), $footer ); - $this->assertContains( home_url( 'baz.js' ), $footer ); + $this->assertStringContainsString( home_url( 'bar.js' ), $footer ); + $this->assertStringContainsString( home_url( 'baz.js' ), $footer ); } /** * Test mismatch of groups in dependencies outputs all scripts in right order. * * @ticket 35873 + * + * @covers WP_Dependencies::add + * @covers WP_Dependencies::enqueue + * @covers WP_Dependencies::do_items */ public function test_group_mismatch_in_deps() { $scripts = new WP_Scripts; @@ -309,7 +319,7 @@ public function test_group_mismatch_in_deps() { /** * @ticket 35873 */ - function test_wp_register_script_with_dependencies_in_head_and_footer() { + public function test_wp_register_script_with_dependencies_in_head_and_footer() { wp_register_script( 'parent', '/parent.js', array( 'child-head' ), null, true ); // In footer. wp_register_script( 'child-head', '/child-head.js', array( 'child-footer' ), null, false ); // In head. wp_register_script( 'child-footer', '/child-footer.js', array(), null, true ); // In footer. @@ -319,18 +329,18 @@ function test_wp_register_script_with_dependencies_in_head_and_footer() { $header = get_echo( 'wp_print_head_scripts' ); $footer = get_echo( 'wp_print_footer_scripts' ); - $expected_header = "\n"; - $expected_header .= "\n"; - $expected_footer = "\n"; + $expected_header = "\n"; + $expected_header .= "\n"; + $expected_footer = "\n"; - $this->assertEquals( $expected_header, $header ); - $this->assertEquals( $expected_footer, $footer ); + $this->assertSame( $expected_header, $header ); + $this->assertSame( $expected_footer, $footer ); } /** * @ticket 35956 */ - function test_wp_register_script_with_dependencies_in_head_and_footer_in_reversed_order() { + public function test_wp_register_script_with_dependencies_in_head_and_footer_in_reversed_order() { wp_register_script( 'child-head', '/child-head.js', array(), null, false ); // In head. wp_register_script( 'child-footer', '/child-footer.js', array(), null, true ); // In footer. wp_register_script( 'parent', '/parent.js', array( 'child-head', 'child-footer' ), null, true ); // In footer. @@ -340,18 +350,18 @@ function test_wp_register_script_with_dependencies_in_head_and_footer_in_reverse $header = get_echo( 'wp_print_head_scripts' ); $footer = get_echo( 'wp_print_footer_scripts' ); - $expected_header = "\n"; - $expected_footer = "\n"; - $expected_footer .= "\n"; + $expected_header = "\n"; + $expected_footer = "\n"; + $expected_footer .= "\n"; - $this->assertEquals( $expected_header, $header ); - $this->assertEquals( $expected_footer, $footer ); + $this->assertSame( $expected_header, $header ); + $this->assertSame( $expected_footer, $footer ); } /** * @ticket 35956 */ - function test_wp_register_script_with_dependencies_in_head_and_footer_in_reversed_order_and_two_parent_scripts() { + public function test_wp_register_script_with_dependencies_in_head_and_footer_in_reversed_order_and_two_parent_scripts() { wp_register_script( 'grandchild-head', '/grandchild-head.js', array(), null, false ); // In head. wp_register_script( 'child-head', '/child-head.js', array(), null, false ); // In head. wp_register_script( 'child-footer', '/child-footer.js', array( 'grandchild-head' ), null, true ); // In footer. @@ -366,23 +376,23 @@ function test_wp_register_script_with_dependencies_in_head_and_footer_in_reverse $header = get_echo( 'wp_print_head_scripts' ); $footer = get_echo( 'wp_print_footer_scripts' ); - $expected_header = "\n"; - $expected_header .= "\n"; - $expected_header .= "\n"; - $expected_header .= "\n"; + $expected_header = "\n"; + $expected_header .= "\n"; + $expected_header .= "\n"; + $expected_header .= "\n"; - $expected_footer = "\n"; - $expected_footer .= "\n"; - $expected_footer .= "\n"; + $expected_footer = "\n"; + $expected_footer .= "\n"; + $expected_footer .= "\n"; - $this->assertEquals( $expected_header, $header ); - $this->assertEquals( $expected_footer, $footer ); + $this->assertSame( $expected_header, $header ); + $this->assertSame( $expected_footer, $footer ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_returns_bool() { + public function test_wp_add_inline_script_returns_bool() { $this->assertFalse( wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ) ); wp_enqueue_script( 'test-example', 'example.com', array(), null ); $this->assertTrue( wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ) ); @@ -391,125 +401,125 @@ function test_wp_add_inline_script_returns_bool() { /** * @ticket 14853 */ - function test_wp_add_inline_script_unknown_handle() { + public function test_wp_add_inline_script_unknown_handle() { $this->assertFalse( wp_add_inline_script( 'test-invalid', 'console.log("before");', 'before' ) ); - $this->assertEquals( '', get_echo( 'wp_print_scripts' ) ); + $this->assertSame( '', get_echo( 'wp_print_scripts' ) ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_before() { + public function test_wp_add_inline_script_before() { wp_enqueue_script( 'test-example', 'example.com', array(), null ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); - $expected = "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_after() { + public function test_wp_add_inline_script_after() { wp_enqueue_script( 'test-example', 'example.com', array(), null ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_before_and_after() { + public function test_wp_add_inline_script_before_and_after() { wp_enqueue_script( 'test-example', 'example.com', array(), null ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 44551 */ - function test_wp_add_inline_script_before_for_handle_without_source() { + public function test_wp_add_inline_script_before_for_handle_without_source() { wp_register_script( 'test-example', '' ); wp_enqueue_script( 'test-example' ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); - $expected = "\n"; + $expected = "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 44551 */ - function test_wp_add_inline_script_after_for_handle_without_source() { + public function test_wp_add_inline_script_after_for_handle_without_source() { wp_register_script( 'test-example', '' ); wp_enqueue_script( 'test-example' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; + $expected = "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 44551 */ - function test_wp_add_inline_script_before_and_after_for_handle_without_source() { + public function test_wp_add_inline_script_before_and_after_for_handle_without_source() { wp_register_script( 'test-example', '' ); wp_enqueue_script( 'test-example' ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_multiple() { + public function test_wp_add_inline_script_multiple() { wp_enqueue_script( 'test-example', 'example.com', array(), null ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** * @ticket 14853 */ - function test_wp_add_inline_script_localized_data_is_added_first() { + public function test_wp_add_inline_script_localized_data_is_added_first() { wp_enqueue_script( 'test-example', 'example.com', array(), null ); wp_localize_script( 'test-example', 'testExample', array( 'foo' => 'bar' ) ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_add_inline_script( 'test-example', 'console.log("after");' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -529,13 +539,13 @@ public function test_wp_add_inline_script_before_with_concat() { wp_add_inline_script( 'two', 'console.log("before two");', 'before' ); $ver = get_bloginfo( 'version' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -554,12 +564,12 @@ public function test_wp_add_inline_script_before_with_concat2() { wp_add_inline_script( 'one', 'console.log("before one");', 'before' ); $ver = get_bloginfo( 'version' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -581,13 +591,13 @@ public function test_wp_add_inline_script_after_with_concat() { $ver = get_bloginfo( 'version' ); $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -600,13 +610,13 @@ public function test_wp_add_inline_script_after_and_before_with_concat_and_condi $wp_scripts->default_dirs = array( '/wp-admin/js/', '/wp-includes/js/' ); // Default dirs as in wp-includes/script-loader.php. $expected_localized = "\n"; $expected = "\n"; wp_enqueue_script( 'test-example', 'example.com', array(), null ); @@ -615,8 +625,8 @@ public function test_wp_add_inline_script_after_and_before_with_concat_and_condi wp_add_inline_script( 'test-example', 'console.log("after");' ); wp_script_add_data( 'test-example', 'conditional', 'gte IE 9' ); - $this->assertEquals( $expected_localized, get_echo( 'wp_print_scripts' ) ); - $this->assertEquals( $expected, $wp_scripts->print_html ); + $this->assertSame( $expected_localized, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, $wp_scripts->print_html ); $this->assertTrue( $wp_scripts->do_concat ); } @@ -633,8 +643,8 @@ public function test_wp_add_inline_script_after_with_concat_and_core_dependency( $ver = get_bloginfo( 'version' ); $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; wp_enqueue_script( 'test-example', 'http://example.com', array( 'jquery' ), null ); wp_add_inline_script( 'test-example', 'console.log("after");' ); @@ -642,7 +652,7 @@ public function test_wp_add_inline_script_after_with_concat_and_core_dependency( wp_print_scripts(); $print_scripts = get_echo( '_print_scripts' ); - $this->assertEquals( $expected, $print_scripts ); + $this->assertSame( $expected, $print_scripts ); } /** @@ -659,8 +669,8 @@ public function test_wp_add_inline_script_after_with_concat_and_conditional_and_ $ver = get_bloginfo( 'version' ); $expected = "\n"; $expected .= "\n"; wp_enqueue_script( 'test-example', 'http://example.com', array( 'jquery' ), null ); @@ -670,7 +680,7 @@ public function test_wp_add_inline_script_after_with_concat_and_conditional_and_ wp_print_scripts(); $print_scripts = get_echo( '_print_scripts' ); - $this->assertEquals( $expected, $print_scripts ); + $this->assertSame( $expected, $print_scripts ); } /** @@ -687,8 +697,8 @@ public function test_wp_add_inline_script_before_with_concat_and_core_dependency $ver = get_bloginfo( 'version' ); $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; wp_enqueue_script( 'test-example', 'http://example.com', array( 'jquery' ), null ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); @@ -696,7 +706,7 @@ public function test_wp_add_inline_script_before_with_concat_and_core_dependency wp_print_scripts(); $print_scripts = get_echo( '_print_scripts' ); - $this->assertEquals( $expected, $print_scripts ); + $this->assertSame( $expected, $print_scripts ); } /** @@ -711,26 +721,47 @@ public function test_wp_add_inline_script_before_after_concat_with_core_dependen $wp_scripts->base_url = ''; $wp_scripts->do_concat = true; + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $ver = get_bloginfo( 'version' ); - $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; wp_enqueue_script( 'test-example', 'http://example.com', array( 'jquery' ), null ); wp_add_inline_script( 'test-example', 'console.log("before");', 'before' ); wp_enqueue_script( 'test-example2', 'http://example2.com', array( 'wp-a11y' ), null ); wp_add_inline_script( 'test-example2', 'console.log("after");', 'after' ); - $print_scripts = get_echo( 'wp_print_scripts' ); - $print_scripts .= get_echo( '_print_scripts' ); + // Effectively ignore the output until retrieving it later via `getActualOutput()`. + $this->expectOutputRegex( '`.`' ); + + wp_print_scripts(); + _print_scripts(); + $print_scripts = $this->getActualOutput(); /* * We've replaced wp-a11y.js with @wordpress/a11y package (see #45066), @@ -744,7 +775,7 @@ public function test_wp_add_inline_script_before_after_concat_with_core_dependen $print_scripts // Printed scripts. ); - $this->assertEquals( $expected, $print_scripts ); + $this->assertSameIgnoreEOL( $expected, $print_scripts ); } /** @@ -759,8 +790,18 @@ public function test_wp_add_inline_script_customize_dependency() { $wp_scripts->base_url = ''; $wp_scripts->do_concat = true; - $expected_tail = "\n"; - $expected_tail .= "\n"; + $expected_tail .= "\n"; @@ -768,11 +809,15 @@ public function test_wp_add_inline_script_customize_dependency() { wp_enqueue_script( $handle, '/customize-dependency.js', array( 'customize-controls' ), null ); wp_add_inline_script( $handle, 'tryCustomizeDependency()' ); - $print_scripts = get_echo( 'wp_print_scripts' ); - $print_scripts .= get_echo( '_print_scripts' ); + // Effectively ignore the output until retrieving it later via `getActualOutput()`. + $this->expectOutputRegex( '`.`' ); + + wp_print_scripts(); + _print_scripts(); + $print_scripts = $this->getActualOutput(); - $tail = substr( $print_scripts, strrpos( $print_scripts, "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected = "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -817,11 +862,11 @@ public function test_wp_add_inline_script_before_third_core_script_prints_two_co $ver = get_bloginfo( 'version' ); $expected = "\n"; - $expected .= "\n"; - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -832,21 +877,23 @@ public function test_wp_set_script_translations() { wp_enqueue_script( 'test-example', '/wp-includes/js/script.js', array(), null ); wp_set_script_translations( 'test-example', 'default', DIR_TESTDATA . '/languages' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'default', + 'test-example', file_get_contents( DIR_TESTDATA . '/languages/en_US-813e104eb47e13dd4cc5af844c618754.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -857,21 +904,23 @@ public function test_wp_set_script_translations_for_plugin() { wp_enqueue_script( 'plugin-example', '/wp-content/plugins/my-plugin/js/script.js', array(), null ); wp_set_script_translations( 'plugin-example', 'internationalized-plugin', DIR_TESTDATA . '/languages/plugins' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'internationalized-plugin', + 'plugin-example', file_get_contents( DIR_TESTDATA . '/languages/plugins/internationalized-plugin-en_US-2f86cb96a0233e7cb3b6f03ad573be0b.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -882,21 +931,23 @@ public function test_wp_set_script_translations_for_theme() { wp_enqueue_script( 'theme-example', '/wp-content/themes/my-theme/js/script.js', array(), null ); wp_set_script_translations( 'theme-example', 'internationalized-theme', DIR_TESTDATA . '/languages/themes' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'internationalized-theme', + 'theme-example', file_get_contents( DIR_TESTDATA . '/languages/themes/internationalized-theme-en_US-2f86cb96a0233e7cb3b6f03ad573be0b.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -907,21 +958,23 @@ public function test_wp_set_script_translations_with_handle_file() { wp_enqueue_script( 'script-handle', '/wp-admin/js/script.js', array(), null ); wp_set_script_translations( 'script-handle', 'admin', DIR_TESTDATA . '/languages/' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'admin', + 'script-handle', file_get_contents( DIR_TESTDATA . '/languages/admin-en_US-script-handle.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -947,21 +1000,23 @@ public function test_wp_set_script_translations_when_translation_file_does_not_e wp_enqueue_script( 'test-example', '/wp-admin/js/script.js', array(), null ); wp_set_script_translations( 'test-example', 'admin', DIR_TESTDATA . '/languages/' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'admin', + 'test-example', '{ "locale_data": { "messages": { "": {} } } }', ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -974,21 +1029,23 @@ public function test_wp_set_script_translations_after_register() { wp_enqueue_script( 'test-example' ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'default', + 'test-example', file_get_contents( DIR_TESTDATA . '/languages/en_US-813e104eb47e13dd4cc5af844c618754.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** @@ -1001,37 +1058,39 @@ public function test_wp_set_script_translations_dependency() { wp_enqueue_script( 'test-example', '/wp-includes/js/script2.js', array( 'test-dependency' ), null ); - $expected = "\n"; + $expected = "\n"; $expected .= str_replace( array( '__DOMAIN__', + '__HANDLE__', '__JSON_TRANSLATIONS__', ), array( 'default', + 'test-dependency', file_get_contents( DIR_TESTDATA . '/languages/en_US-813e104eb47e13dd4cc5af844c618754.json' ), ), $this->wp_scripts_print_translations_output ); - $expected .= "\n"; - $expected .= "\n"; + $expected .= "\n"; + $expected .= "\n"; - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_scripts' ) ); } /** * Testing `wp_enqueue_code_editor` with file path. * * @ticket 41871 - * @covers ::wp_enqueue_code_editor() + * @covers ::wp_enqueue_code_editor */ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { $real_file = WP_PLUGIN_DIR . '/hello.php'; $wp_enqueue_code_editor = wp_enqueue_code_editor( array( 'file' => $real_file ) ); $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); - $this->assertEqualSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); + $this->assertSameSets( array( 'autoCloseBrackets', 'autoCloseTags', @@ -1053,7 +1112,7 @@ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { ); $this->assertEmpty( $wp_enqueue_code_editor['codemirror']['gutters'] ); - $this->assertEqualSets( + $this->assertSameSets( array( 'errors', 'box-model', @@ -1065,7 +1124,7 @@ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { array_keys( $wp_enqueue_code_editor['csslint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'boss', 'curly', @@ -1087,7 +1146,7 @@ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { array_keys( $wp_enqueue_code_editor['jshint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'tagname-lowercase', 'attr-lowercase', @@ -1110,15 +1169,15 @@ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { * Testing `wp_enqueue_code_editor` with `compact`. * * @ticket 41871 - * @covers ::wp_enqueue_code_editor() + * @covers ::wp_enqueue_code_editor */ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() { $file = ''; $wp_enqueue_code_editor = wp_enqueue_code_editor( compact( 'file' ) ); $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); - $this->assertEqualSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); + $this->assertSameSets( array( 'continueComments', 'direction', @@ -1136,7 +1195,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will ); $this->assertEmpty( $wp_enqueue_code_editor['codemirror']['gutters'] ); - $this->assertEqualSets( + $this->assertSameSets( array( 'errors', 'box-model', @@ -1148,7 +1207,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will array_keys( $wp_enqueue_code_editor['csslint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'boss', 'curly', @@ -1170,7 +1229,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will array_keys( $wp_enqueue_code_editor['jshint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'tagname-lowercase', 'attr-lowercase', @@ -1193,7 +1252,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will * Testing `wp_enqueue_code_editor` with `array_merge`. * * @ticket 41871 - * @covers ::wp_enqueue_code_editor() + * @covers ::wp_enqueue_code_editor */ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_will_be_passed() { $wp_enqueue_code_editor = wp_enqueue_code_editor( @@ -1211,8 +1270,8 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); - $this->assertEqualSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); + $this->assertSameSets( array( 'autoCloseBrackets', 'continueComments', @@ -1233,7 +1292,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ array_keys( $wp_enqueue_code_editor['codemirror'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'errors', 'box-model', @@ -1245,7 +1304,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ array_keys( $wp_enqueue_code_editor['csslint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'boss', 'curly', @@ -1267,7 +1326,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ array_keys( $wp_enqueue_code_editor['jshint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'tagname-lowercase', 'attr-lowercase', @@ -1290,7 +1349,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ * Testing `wp_enqueue_code_editor` with `array`. * * @ticket 41871 - * @covers ::wp_enqueue_code_editor() + * @covers ::wp_enqueue_code_editor */ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { $wp_enqueue_code_editor = wp_enqueue_code_editor( @@ -1305,8 +1364,8 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); - $this->assertEqualSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'codemirror', 'csslint', 'jshint', 'htmlhint' ), array_keys( $wp_enqueue_code_editor ) ); + $this->assertSameSets( array( 'autoCloseBrackets', 'continueComments', @@ -1327,7 +1386,7 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { array_keys( $wp_enqueue_code_editor['codemirror'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'errors', 'box-model', @@ -1339,7 +1398,7 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { array_keys( $wp_enqueue_code_editor['csslint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'boss', 'curly', @@ -1361,7 +1420,7 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { array_keys( $wp_enqueue_code_editor['jshint'] ) ); - $this->assertEqualSets( + $this->assertSameSets( array( 'tagname-lowercase', 'attr-lowercase', @@ -1380,15 +1439,65 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { ); } - function test_no_source_mapping() { - $all_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( dirname( ABSPATH ) . '/build/' ) ); - $js_files = new RegexIterator( $all_files, '/\.js$/' ); - foreach ( $js_files as $js_file ) { - $contents = trim( file_get_contents( $js_file ) ); + /** + * @ticket 52534 + * @covers ::wp_localize_script + * + * @dataProvider data_wp_localize_script_data_formats + * + * @param mixed $l10n_data Localization data passed to wp_localize_script(). + * @param string $expected Expected transformation of localization data. + * @param string $warning Optional. Whether a PHP native warning/error is expected. Default false. + */ + public function test_wp_localize_script_data_formats( $l10n_data, $expected, $warning = false ) { + if ( $warning ) { + if ( PHP_VERSION_ID < 80000 ) { + $this->expectWarning(); + } else { + $this->expectError(); + } + } - // We allow data: URLs. - $found = preg_match( '/sourceMappingURL=((?!data:).)/', $contents ); - $this->assertSame( $found, 0, "sourceMappingURL found in $js_file" ); + if ( ! is_array( $l10n_data ) ) { + $this->setExpectedIncorrectUsage( 'WP_Scripts::localize' ); } + + wp_enqueue_script( 'test-example', 'example.com', array(), null ); + wp_localize_script( 'test-example', 'testExample', $l10n_data ); + + $expected = "\n"; + $expected .= "\n"; + + $this->assertSame( $expected, get_echo( 'wp_print_scripts' ) ); + } + + /** + * Data provider for test_wp_localize_script_data_formats(). + * + * @return array[] { + * Array of arguments for test. + * + * @type mixed $l10n_data Localization data passed to wp_localize_script(). + * @type string $expected Expected transformation of localization data. + * @type string $warning Optional. Whether a PHP native warning/error is expected. + * } + */ + public function data_wp_localize_script_data_formats() { + return array( + // Officially supported formats. + array( array( 'array value, no key' ), '["array value, no key"]' ), + array( array( 'foo' => 'bar' ), '{"foo":"bar"}' ), + array( array( 'foo' => array( 'bar' => 'foobar' ) ), '{"foo":{"bar":"foobar"}}' ), + array( array( 'foo' => 6.6 ), '{"foo":"6.6"}' ), + array( array( 'foo' => 6 ), '{"foo":"6"}' ), + + // Unofficially supported format. + array( 'string', '"string"' ), + + // Unsupported formats. + array( 1.5, '1.5', true ), + array( 1, '1', true ), + array( false, '[""]' ), + ); } } diff --git a/tests/phpunit/tests/dependencies/styles.php b/tests/phpunit/tests/dependencies/styles.php index 6f79a20a91def..f5eed18758c63 100644 --- a/tests/phpunit/tests/dependencies/styles.php +++ b/tests/phpunit/tests/dependencies/styles.php @@ -2,13 +2,18 @@ /** * @group dependencies * @group scripts + * @covers ::wp_enqueue_style + * @covers ::wp_register_style + * @covers ::wp_print_styles + * @covers ::wp_style_add_data + * @covers ::wp_add_inline_style */ class Tests_Dependencies_Styles extends WP_UnitTestCase { private $old_wp_styles; private $old_wp_scripts; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); if ( empty( $GLOBALS['wp_styles'] ) ) { $GLOBALS['wp_styles'] = null; @@ -32,7 +37,7 @@ function setUp() { $GLOBALS['wp_scripts']->default_version = get_bloginfo( 'version' ); } - function tearDown() { + public function tear_down() { $GLOBALS['wp_styles'] = $this->old_wp_styles; $GLOBALS['wp_scripts'] = $this->old_wp_scripts; @@ -43,7 +48,7 @@ function tearDown() { remove_theme_support( 'wp-block-styles' ); } - parent::tearDown(); + parent::tear_down(); } /** @@ -51,7 +56,7 @@ function tearDown() { * * @ticket 11315 */ - function test_wp_enqueue_style() { + public function test_wp_enqueue_style() { wp_enqueue_style( 'no-deps-no-version', 'example.com' ); wp_enqueue_style( 'no-deps-version', 'example.com', array(), 1.2 ); wp_enqueue_style( 'no-deps-null-version', 'example.com', array(), null ); @@ -63,16 +68,16 @@ function test_wp_enqueue_style() { $expected .= "\n"; $expected .= "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); // No styles left to print. - $this->assertEquals( '', get_echo( 'wp_print_styles' ) ); + $this->assertSame( '', get_echo( 'wp_print_styles' ) ); } /** * @ticket 42804 */ - function test_wp_enqueue_style_with_html5_support_does_not_contain_type_attribute() { + public function test_wp_enqueue_style_with_html5_support_does_not_contain_type_attribute() { add_theme_support( 'html5', array( 'style' ) ); $GLOBALS['wp_styles'] = new WP_Styles(); @@ -83,7 +88,7 @@ function test_wp_enqueue_style_with_html5_support_does_not_contain_type_attribut $ver = get_bloginfo( 'version' ); $expected = "\n"; - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } /** @@ -122,10 +127,10 @@ public function test_protocols() { $expected .= "\n"; // Go! - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); // No styles left to print. - $this->assertEquals( '', get_echo( 'wp_print_styles' ) ); + $this->assertSame( '', get_echo( 'wp_print_styles' ) ); // Cleanup. $wp_styles->base_url = $base_url_backup; @@ -151,7 +156,7 @@ public function test_inline_styles() { wp_add_inline_style( 'handle', $style ); // No styles left to print. - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } /** @@ -180,7 +185,7 @@ public function test_inline_styles_concat() { wp_add_inline_style( 'handle', $style ); wp_print_styles(); - $this->assertEquals( $expected, $wp_styles->print_html ); + $this->assertSame( $expected, $wp_styles->print_html ); } @@ -210,7 +215,7 @@ public function test_multiple_inline_styles() { wp_add_inline_style( 'handle', $style2 ); // No styles left to print. - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } @@ -235,7 +240,7 @@ public function test_plugin_doing_inline_styles_wrong() { wp_add_inline_style( 'handle', $style ); - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } @@ -250,7 +255,7 @@ public function test_unnecessary_style_tags() { wp_enqueue_style( 'handle', 'http://example.com', array(), 1 ); - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } @@ -272,7 +277,7 @@ public function test_conditional_inline_styles_are_also_conditional() { wp_style_add_data( 'handle', 'conditional', 'IE' ); wp_add_inline_style( 'handle', 'a { color: blue; }' ); - $this->assertEqualsIgnoreEOL( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSameIgnoreEOL( $expected, get_echo( 'wp_print_styles' ) ); } /** @@ -280,7 +285,7 @@ public function test_conditional_inline_styles_are_also_conditional() { * * @ticket 31126 */ - function test_wp_register_style() { + public function test_wp_register_style() { $this->assertTrue( wp_register_style( 'duplicate-handler', 'http://example.com' ) ); $this->assertFalse( wp_register_style( 'duplicate-handler', 'http://example.com' ) ); } @@ -288,7 +293,7 @@ function test_wp_register_style() { /** * @ticket 35229 */ - function test_wp_add_inline_style_for_handle_without_source() { + public function test_wp_add_inline_style_for_handle_without_source() { $style = 'a { color: blue; }'; $expected = "\n"; @@ -304,19 +309,19 @@ function test_wp_add_inline_style_for_handle_without_source() { wp_enqueue_style( 'handle-three' ); wp_add_inline_style( 'handle-three', $style ); - $this->assertEquals( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertSame( $expected, get_echo( 'wp_print_styles' ) ); } /** * @ticket 35921 * @dataProvider data_styles_with_media */ - function test_wp_enqueue_style_with_media( $expected, $media ) { + public function test_wp_enqueue_style_with_media( $expected, $media ) { wp_enqueue_style( 'handle', 'http://example.com', array(), 1, $media ); - $this->assertContains( $expected, get_echo( 'wp_print_styles' ) ); + $this->assertStringContainsString( $expected, get_echo( 'wp_print_styles' ) ); } - function data_styles_with_media() { + public function data_styles_with_media() { return array( array( "media='all'", @@ -349,8 +354,10 @@ function data_styles_with_media() { * Tests that visual block styles are enqueued in the editor even when there is not theme support for 'wp-block-styles'. * * Visual block styles should always be enqueued when editing to avoid the appearance of a broken editor. + * + * @covers ::wp_enqueue_style */ - function test_block_styles_for_editing_without_theme_support() { + public function test_block_styles_for_editing_without_theme_support() { // Confirm we are without theme support by default. $this->assertFalse( current_theme_supports( 'wp-block-styles' ) ); @@ -365,8 +372,10 @@ function test_block_styles_for_editing_without_theme_support() { * Tests that visual block styles are enqueued when there is theme support for 'wp-block-styles'. * * Visual block styles should always be enqueued when editing to avoid the appearance of a broken editor. + * + * @covers ::wp_common_block_scripts_and_styles */ - function test_block_styles_for_editing_with_theme_support() { + public function test_block_styles_for_editing_with_theme_support() { add_theme_support( 'wp-block-styles' ); wp_default_styles( $GLOBALS['wp_styles'] ); @@ -381,8 +390,10 @@ function test_block_styles_for_editing_with_theme_support() { * * Visual block styles should not be enqueued unless a theme opts in. * This way we avoid style conflicts with existing themes. + * + * @covers ::wp_enqueue_style */ - function test_no_block_styles_for_viewing_without_theme_support() { + public function test_no_block_styles_for_viewing_without_theme_support() { // Confirm we are without theme support by default. $this->assertFalse( current_theme_supports( 'wp-block-styles' ) ); @@ -397,8 +408,10 @@ function test_no_block_styles_for_viewing_without_theme_support() { * Tests that visual block styles are enqueued for viewing when there is theme support for 'wp-block-styles'. * * Visual block styles should be enqueued when a theme opts in. + * + * @covers ::wp_common_block_scripts_and_styles */ - function test_block_styles_for_viewing_with_theme_support() { + public function test_block_styles_for_viewing_with_theme_support() { add_theme_support( 'wp-block-styles' ); wp_default_styles( $GLOBALS['wp_styles'] ); @@ -407,4 +420,38 @@ function test_block_styles_for_viewing_with_theme_support() { wp_common_block_scripts_and_styles(); $this->assertTrue( wp_style_is( 'wp-block-library-theme' ) ); } + + /** + * Tests that the main "style.css" file gets enqueued when the site doesn't opt in to separate core block assets. + * + * @ticket 50263 + * + * @covers ::wp_default_styles + */ + public function test_block_styles_for_viewing_without_split_styles() { + add_filter( 'should_load_separate_core_block_assets', '__return_false' ); + wp_default_styles( $GLOBALS['wp_styles'] ); + + $this->assertSame( + '/' . WPINC . '/css/dist/block-library/style.css', + $GLOBALS['wp_styles']->registered['wp-block-library']->src + ); + } + + /** + * Tests that the "common.css" file gets enqueued when the site opts in to separate core block assets. + * + * @ticket 50263 + * + * @covers ::wp_default_styles + */ + public function test_block_styles_for_viewing_with_split_styles() { + add_filter( 'should_load_separate_core_block_assets', '__return_true' ); + wp_default_styles( $GLOBALS['wp_styles'] ); + + $this->assertSame( + '/' . WPINC . '/css/dist/block-library/common.css', + $GLOBALS['wp_styles']->registered['wp-block-library']->src + ); + } } diff --git a/tests/phpunit/tests/dependencies/wpInlineScriptTag.php b/tests/phpunit/tests/dependencies/wpInlineScriptTag.php new file mode 100644 index 0000000000000..1e517b637ddaf --- /dev/null +++ b/tests/phpunit/tests/dependencies/wpInlineScriptTag.php @@ -0,0 +1,122 @@ +assertSame( + '\n", + wp_get_inline_script_tag( + $this->event_handler, + array( + 'type' => 'application/javascript', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + '\n", + wp_get_inline_script_tag( + $this->event_handler, + array( + 'type' => 'application/javascript', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + } + + public function test_get_inline_script_tag_type_not_set() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + "\n", + wp_get_inline_script_tag( + $this->event_handler, + array( + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + } + + public function test_get_inline_script_tag_unescaped_src() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + "\n", + wp_get_inline_script_tag( $this->event_handler ) + ); + + remove_theme_support( 'html5' ); + } + + public function test_print_script_tag_prints_get_inline_script_tag() { + add_filter( + 'wp_inline_script_attributes', + static function ( $attributes ) { + if ( isset( $attributes['id'] ) && 'utils-js-extra' === $attributes['id'] ) { + $attributes['async'] = true; + } + return $attributes; + } + ); + + add_theme_support( 'html5', array( 'script' ) ); + + $attributes = array( + 'id' => 'utils-js-before', + 'nomodule' => true, + ); + + $this->assertSame( + wp_get_inline_script_tag( $this->event_handler, $attributes ), + get_echo( + 'wp_print_inline_script_tag', + array( + $this->event_handler, + $attributes, + ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + wp_get_inline_script_tag( $this->event_handler, $attributes ), + get_echo( + 'wp_print_inline_script_tag', + array( + $this->event_handler, + $attributes, + ) + ) + ); + } +} diff --git a/tests/phpunit/tests/dependencies/wpSanitizeScriptAttributes.php b/tests/phpunit/tests/dependencies/wpSanitizeScriptAttributes.php new file mode 100644 index 0000000000000..ef737f239ac7e --- /dev/null +++ b/tests/phpunit/tests/dependencies/wpSanitizeScriptAttributes.php @@ -0,0 +1,132 @@ +assertSame( + ' type="application/javascript" src="https://DOMAIN.TLD/PATH/FILE.js" nomodule', + wp_sanitize_script_attributes( + array( + 'type' => 'application/javascript', + 'src' => 'https://DOMAIN.TLD/PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + ' src="https://DOMAIN.TLD/PATH/FILE.js" type="application/javascript" nomodule="nomodule"', + wp_sanitize_script_attributes( + array( + 'src' => 'https://DOMAIN.TLD/PATH/FILE.js', + 'type' => 'application/javascript', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + } + + public function test_sanitize_script_attributes_type_not_set() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + ' src="https://DOMAIN.TLD/PATH/FILE.js" nomodule', + wp_sanitize_script_attributes( + array( + 'src' => 'https://DOMAIN.TLD/PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + ' src="https://DOMAIN.TLD/PATH/FILE.js" nomodule="nomodule"', + wp_sanitize_script_attributes( + array( + 'src' => 'https://DOMAIN.TLD/PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + } + + + public function test_sanitize_script_attributes_no_attributes() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + '', + wp_sanitize_script_attributes( array() ) + ); + + remove_theme_support( 'html5' ); + } + + public function test_sanitize_script_attributes_relative_src() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + ' src="PATH/FILE.js" nomodule', + wp_sanitize_script_attributes( + array( + 'src' => 'PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + } + + + public function test_sanitize_script_attributes_only_false_boolean_attributes() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + '', + wp_sanitize_script_attributes( + array( + 'async' => false, + 'nomodule' => false, + ) + ) + ); + + remove_theme_support( 'html5' ); + } + + public function test_sanitize_script_attributes_only_true_boolean_attributes() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + ' async nomodule', + wp_sanitize_script_attributes( + array( + 'async' => true, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + } + +} diff --git a/tests/phpunit/tests/dependencies/wpScriptTag.php b/tests/phpunit/tests/dependencies/wpScriptTag.php new file mode 100644 index 0000000000000..ee273f8fb3687 --- /dev/null +++ b/tests/phpunit/tests/dependencies/wpScriptTag.php @@ -0,0 +1,101 @@ +assertSame( + '' . "\n", + wp_get_script_tag( + array( + 'type' => 'application/javascript', + 'src' => 'https://localhost/PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + '' . "\n", + wp_get_script_tag( + array( + 'src' => 'https://localhost/PATH/FILE.js', + 'type' => 'application/javascript', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + } + + /** + * @covers ::wp_get_script_tag + */ + public function test_get_script_tag_type_not_set() { + add_theme_support( 'html5', array( 'script' ) ); + + $this->assertSame( + '' . "\n", + wp_get_script_tag( + array( + 'src' => 'https://localhost/PATH/FILE.js', + 'async' => false, + 'nomodule' => true, + ) + ) + ); + + remove_theme_support( 'html5' ); + } + + /** + * @covers ::wp_print_script_tag + */ + public function test_print_script_tag_prints_get_script_tag() { + add_filter( + 'wp_script_attributes', + static function ( $attributes ) { + if ( isset( $attributes['id'] ) && 'utils-js-extra' === $attributes['id'] ) { + $attributes['async'] = true; + } + return $attributes; + } + ); + + add_theme_support( 'html5', array( 'script' ) ); + + $attributes = array( + 'src' => 'https://localhost/PATH/FILE.js', + 'id' => 'utils-js-extra', + 'nomodule' => true, + ); + + $this->assertSame( + wp_get_script_tag( $attributes ), + get_echo( + 'wp_print_script_tag', + array( $attributes ) + ) + ); + + remove_theme_support( 'html5' ); + + $this->assertSame( + wp_get_script_tag( $attributes ), + get_echo( + 'wp_print_script_tag', + array( $attributes ) + ) + ); + } +} diff --git a/tests/phpunit/tests/editor/wpEditors.php b/tests/phpunit/tests/editor/wpEditors.php index 495701384c484..c4e9e50515fda 100644 --- a/tests/phpunit/tests/editor/wpEditors.php +++ b/tests/phpunit/tests/editor/wpEditors.php @@ -6,33 +6,28 @@ /** * @group editor + * + * @coversDefaultClass _WP_Editors */ -class Tests_WP_Editors extends WP_UnitTestCase { - public function wp_link_query_callback( $results ) { - return array_merge( - $results, - array( - array( - 'ID' => 123, - 'title' => 'foo', - 'permalink' => 'bar', - 'info' => 'baz', - ), - ) - ); - } +class Tests_Editor_wpEditors extends WP_UnitTestCase { + /** + * @covers ::wp_link_query + */ public function test_wp_link_query_returns_false_when_nothing_found() { $actual = _WP_Editors::wp_link_query( array( 's' => 'foobarbaz' ) ); $this->assertFalse( $actual ); } + /** + * @covers ::wp_link_query + */ public function test_wp_link_query_returns_search_results() { $post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) ); $actual = _WP_Editors::wp_link_query( array( 's' => $post->post_title ) ); - $this->assertEqualSets( + $this->assertSameSets( array( array( 'ID' => $post->ID, @@ -47,13 +42,15 @@ public function test_wp_link_query_returns_search_results() { /** * @ticket 41825 + * + * @covers ::wp_link_query */ public function test_wp_link_query_returns_filtered_result_when_nothing_found() { add_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) ); $actual = _WP_Editors::wp_link_query( array( 's' => 'foobarbaz' ) ); remove_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) ); - $this->assertEqualSets( + $this->assertSameSets( array( array( 'ID' => 123, @@ -66,6 +63,9 @@ public function test_wp_link_query_returns_filtered_result_when_nothing_found() ); } + /** + * @covers ::wp_link_query + */ public function test_wp_link_query_returns_filtered_search_results() { $post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) ); @@ -73,7 +73,7 @@ public function test_wp_link_query_returns_filtered_search_results() { $actual = _WP_Editors::wp_link_query( array( 's' => $post->post_title ) ); remove_filter( 'wp_link_query', array( $this, 'wp_link_query_callback' ) ); - $this->assertEqualSets( + $this->assertSameSets( array( array( 'ID' => $post->ID, @@ -91,4 +91,18 @@ public function test_wp_link_query_returns_filtered_search_results() { $actual ); } + + public function wp_link_query_callback( $results ) { + return array_merge( + $results, + array( + array( + 'ID' => 123, + 'title' => 'foo', + 'permalink' => 'bar', + 'info' => 'baz', + ), + ) + ); + } } diff --git a/tests/phpunit/tests/error-protection/recovery-mode-cookie-service.php b/tests/phpunit/tests/error-protection/wpRecoveryModeCookieService.php similarity index 75% rename from tests/phpunit/tests/error-protection/recovery-mode-cookie-service.php rename to tests/phpunit/tests/error-protection/wpRecoveryModeCookieService.php index 78f90997585bc..122a9193f2883 100644 --- a/tests/phpunit/tests/error-protection/recovery-mode-cookie-service.php +++ b/tests/phpunit/tests/error-protection/wpRecoveryModeCookieService.php @@ -3,10 +3,12 @@ /** * @group error-protection */ -class Tests_Recovery_Mode_Cookie_Service extends WP_UnitTestCase { +class Tests_Error_Protection_wpRecoveryModeCookieService extends WP_UnitTestCase { /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Cookie_Service::validate_cookie */ public function test_validate_cookie_returns_wp_error_if_invalid_format() { @@ -14,19 +16,21 @@ public function test_validate_cookie_returns_wp_error_if_invalid_format() { $error = $service->validate_cookie( 'gibbersih' ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_format', $error->get_error_code() ); + $this->assertSame( 'invalid_format', $error->get_error_code() ); $error = $service->validate_cookie( base64_encode( 'test|data|format' ) ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_format', $error->get_error_code() ); + $this->assertSame( 'invalid_format', $error->get_error_code() ); $error = $service->validate_cookie( base64_encode( 'test|data|format|to|long' ) ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_format', $error->get_error_code() ); + $this->assertSame( 'invalid_format', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Cookie_Service::validate_cookie */ public function test_validate_cookie_returns_wp_error_if_expired() { $service = new WP_Recovery_Mode_Cookie_Service(); @@ -39,11 +43,13 @@ public function test_validate_cookie_returns_wp_error_if_expired() { $error = $service->validate_cookie( $cookie ); $this->assertWPError( $error ); - $this->assertEquals( 'expired', $error->get_error_code() ); + $this->assertSame( 'expired', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Cookie_Service::validate_cookie */ public function test_validate_cookie_returns_wp_error_if_signature_mismatch() { $service = new WP_Recovery_Mode_Cookie_Service(); @@ -55,11 +61,13 @@ public function test_validate_cookie_returns_wp_error_if_signature_mismatch() { $error = $service->validate_cookie( $cookie ); $this->assertWPError( $error ); - $this->assertEquals( 'signature_mismatch', $error->get_error_code() ); + $this->assertSame( 'signature_mismatch', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Cookie_Service::validate_cookie */ public function test_validate_cookie_returns_wp_error_if_created_at_is_invalid_format() { $service = new WP_Recovery_Mode_Cookie_Service(); @@ -72,11 +80,13 @@ public function test_validate_cookie_returns_wp_error_if_created_at_is_invalid_f $error = $service->validate_cookie( $cookie ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_created_at', $error->get_error_code() ); + $this->assertSame( 'invalid_created_at', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Cookie_Service::validate_cookie */ public function test_validate_cookie_returns_true_for_valid_cookie() { diff --git a/tests/phpunit/tests/error-protection/recovery-mode-key-service.php b/tests/phpunit/tests/error-protection/wpRecoveryModeKeyService.php similarity index 74% rename from tests/phpunit/tests/error-protection/recovery-mode-key-service.php rename to tests/phpunit/tests/error-protection/wpRecoveryModeKeyService.php index c309a73a2065c..316655d7a36c7 100644 --- a/tests/phpunit/tests/error-protection/recovery-mode-key-service.php +++ b/tests/phpunit/tests/error-protection/wpRecoveryModeKeyService.php @@ -3,10 +3,13 @@ /** * @group error-protection */ -class Tests_Recovery_Mode_Key_Service extends WP_UnitTestCase { +class Tests_Error_Protection_wpRecoveryModeKeyService extends WP_UnitTestCase { /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::generate_recovery_mode_token + * @covers WP_Recovery_Mode_Key_Service::generate_and_store_recovery_mode_key */ public function test_generate_and_store_recovery_mode_key_returns_recovery_key() { $service = new WP_Recovery_Mode_Key_Service(); @@ -18,17 +21,21 @@ public function test_generate_and_store_recovery_mode_key_returns_recovery_key() /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_no_key_set() { $service = new WP_Recovery_Mode_Key_Service(); $error = $service->validate_recovery_mode_key( '', 'abcd', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'token_not_found', $error->get_error_code() ); + $this->assertSame( 'token_not_found', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_data_missing() { update_option( 'recovery_keys', 'gibberish' ); @@ -37,11 +44,13 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_data_missing $error = $service->validate_recovery_mode_key( '', 'abcd', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'token_not_found', $error->get_error_code() ); + $this->assertSame( 'token_not_found', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_bad() { update_option( 'recovery_keys', array( 'token' => 'gibberish' ) ); @@ -50,12 +59,14 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_bad() { $error = $service->validate_recovery_mode_key( 'token', 'abcd', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_recovery_key_format', $error->get_error_code() ); + $this->assertSame( 'invalid_recovery_key_format', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_stored_format_is_invalid() { @@ -66,11 +77,13 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_stored_forma $error = $service->validate_recovery_mode_key( $token, 'abcd', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'invalid_recovery_key_format', $error->get_error_code() ); + $this->assertSame( 'invalid_recovery_key_format', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_empty_key() { $service = new WP_Recovery_Mode_Key_Service(); @@ -79,11 +92,13 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_empty_key() $error = $service->validate_recovery_mode_key( $token, '', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'hash_mismatch', $error->get_error_code() ); + $this->assertSame( 'hash_mismatch', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_hash_mismatch() { $service = new WP_Recovery_Mode_Key_Service(); @@ -92,11 +107,13 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_hash_mismatc $error = $service->validate_recovery_mode_key( $token, 'abcd', HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'hash_mismatch', $error->get_error_code() ); + $this->assertSame( 'hash_mismatch', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_wp_error_if_expired() { $service = new WP_Recovery_Mode_Key_Service(); @@ -110,11 +127,13 @@ public function test_validate_recovery_mode_key_returns_wp_error_if_expired() { $error = $service->validate_recovery_mode_key( $token, $key, HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'key_expired', $error->get_error_code() ); + $this->assertSame( 'key_expired', $error->get_error_code() ); } /** * @ticket 46130 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_true_for_valid_key() { $service = new WP_Recovery_Mode_Key_Service(); @@ -125,6 +144,8 @@ public function test_validate_recovery_mode_key_returns_true_for_valid_key() { /** * @ticket 46595 + * + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_error_if_token_used_more_than_once() { $service = new WP_Recovery_Mode_Key_Service(); @@ -137,11 +158,15 @@ public function test_validate_recovery_mode_key_returns_error_if_token_used_more $error = $service->validate_recovery_mode_key( $token, $key, HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'token_not_found', $error->get_error_code() ); + $this->assertSame( 'token_not_found', $error->get_error_code() ); } /** * @ticket 46595 + * + * @covers WP_Recovery_Mode_Key_Service::generate_recovery_mode_token + * @covers WP_Recovery_Mode_Key_Service::generate_and_store_recovery_mode_key + * @covers WP_Recovery_Mode_Key_Service::validate_recovery_mode_key */ public function test_validate_recovery_mode_key_returns_error_if_token_used_more_than_once_more_than_key_stored() { $service = new WP_Recovery_Mode_Key_Service(); @@ -159,11 +184,13 @@ public function test_validate_recovery_mode_key_returns_error_if_token_used_more $error = $service->validate_recovery_mode_key( $token, $key, HOUR_IN_SECONDS ); $this->assertWPError( $error ); - $this->assertEquals( 'token_not_found', $error->get_error_code() ); + $this->assertSame( 'token_not_found', $error->get_error_code() ); } /** * @ticket 46595 + * + * @covers WP_Recovery_Mode_Key_Service::clean_expired_keys */ public function test_clean_expired_keys() { $service = new WP_Recovery_Mode_Key_Service(); diff --git a/tests/phpunit/tests/external-http/basic.php b/tests/phpunit/tests/external-http/basic.php index 56f8c24441430..61f1f2d1293e8 100644 --- a/tests/phpunit/tests/external-http/basic.php +++ b/tests/phpunit/tests/external-http/basic.php @@ -4,7 +4,12 @@ */ class Tests_External_HTTP_Basic extends WP_UnitTestCase { - function test_readme() { + /** + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_response_code + * @covers ::wp_remote_retrieve_body + */ + public function test_readme() { // This test is designed to only run on trunk/master. $this->skipOnAutomatedBranches(); diff --git a/tests/phpunit/tests/feed/atom.php b/tests/phpunit/tests/feed/atom.php index 56f15e5d0d3ff..0b26c7cb57bbe 100644 --- a/tests/phpunit/tests/feed/atom.php +++ b/tests/phpunit/tests/feed/atom.php @@ -8,15 +8,15 @@ * * @group feed */ -class Tests_Feeds_Atom extends WP_UnitTestCase { - static $user_id; - static $posts; - static $category; +class Tests_Feed_Atom extends WP_UnitTestCase { + public static $user_id; + public static $posts; + public static $category; /** * Setup a new user and attribute some posts. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { // Create a user. self::$user_id = $factory->user->create( array( @@ -56,8 +56,8 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Setup. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->post_count = (int) get_option( 'posts_per_rss' ); $this->excerpt_only = get_option( 'rss_use_excerpt' ); @@ -66,7 +66,7 @@ public function setUp() { /** * This is a bit of a hack used to buffer feed content. */ - function do_atom() { + private function do_atom() { ob_start(); // Nasty hack! In the future it would better to leverage do_feed( 'atom' ). global $post; @@ -85,7 +85,7 @@ function do_atom() { * Test the element to make sure its present and populated * with the expected child elements and attributes. */ - function test_feed_element() { + public function test_feed_element() { $this->go_to( '/?feed=atom' ); $feed = $this->do_atom(); $xml = xml_to_array( $feed ); @@ -97,39 +97,39 @@ function test_feed_element() { $this->assertCount( 1, $atom ); // Verify attributes. - $this->assertEquals( 'http://www.w3.org/2005/Atom', $atom[0]['attributes']['xmlns'] ); - $this->assertEquals( 'http://purl.org/syndication/thread/1.0', $atom[0]['attributes']['xmlns:thr'] ); - $this->assertEquals( site_url( '/wp-atom.php' ), $atom[0]['attributes']['xml:base'] ); + $this->assertSame( 'http://www.w3.org/2005/Atom', $atom[0]['attributes']['xmlns'] ); + $this->assertSame( 'http://purl.org/syndication/thread/1.0', $atom[0]['attributes']['xmlns:thr'] ); + $this->assertSame( site_url( '/wp-atom.php' ), $atom[0]['attributes']['xml:base'] ); // Verify the element is present and contains a child element. $title = xml_find( $xml, 'feed', 'title' ); - $this->assertEquals( get_option( 'blogname' ), $title[0]['content'] ); + $this->assertSame( get_option( 'blogname' ), $title[0]['content'] ); // Verify the <feed> element is present and contains a <updated> child element. $updated = xml_find( $xml, 'feed', 'updated' ); - $this->assertEquals( strtotime( get_lastpostmodified() ), strtotime( $updated[0]['content'] ) ); + $this->assertSame( strtotime( get_lastpostmodified() ), strtotime( $updated[0]['content'] ) ); // Verify the <feed> element is present and contains a <subtitle> child element. $subtitle = xml_find( $xml, 'feed', 'subtitle' ); - $this->assertEquals( get_option( 'blogdescription' ), $subtitle[0]['content'] ); + $this->assertSame( get_option( 'blogdescription' ), $subtitle[0]['content'] ); // Verify the <feed> element is present and contains two <link> child elements. $link = xml_find( $xml, 'feed', 'link' ); $this->assertCount( 2, $link ); // Verify the <feed> element is present and contains a <link rel="alternate"> child element. - $this->assertEquals( 'alternate', $link[0]['attributes']['rel'] ); - $this->assertEquals( home_url(), $link[0]['attributes']['href'] ); + $this->assertSame( 'alternate', $link[0]['attributes']['rel'] ); + $this->assertSame( home_url(), $link[0]['attributes']['href'] ); // Verify the <feed> element is present and contains a <link rel="href"> child element. - $this->assertEquals( 'self', $link[1]['attributes']['rel'] ); - $this->assertEquals( home_url( '/?feed=atom' ), $link[1]['attributes']['href'] ); + $this->assertSame( 'self', $link[1]['attributes']['rel'] ); + $this->assertSame( home_url( '/?feed=atom' ), $link[1]['attributes']['href'] ); } /** * Validate <entry> child elements. */ - function test_entry_elements() { + public function test_entry_elements() { $this->go_to( '/?feed=atom' ); $feed = $this->do_atom(); $xml = xml_to_array( $feed ); @@ -154,31 +154,31 @@ function test_entry_elements() { // Author. $author = xml_find( $entries[ $key ]['child'], 'author', 'name' ); $user = new WP_User( $post->post_author ); - $this->assertEquals( $user->display_name, $author[0]['content'] ); + $this->assertSame( $user->display_name, $author[0]['content'] ); // Title. $title = xml_find( $entries[ $key ]['child'], 'title' ); - $this->assertEquals( $post->post_title, $title[0]['content'] ); + $this->assertSame( $post->post_title, $title[0]['content'] ); // Link rel="alternate". $link_alts = xml_find( $entries[ $key ]['child'], 'link' ); foreach ( $link_alts as $link_alt ) { if ( 'alternate' === $link_alt['attributes']['rel'] ) { - $this->assertEquals( get_permalink( $post ), $link_alt['attributes']['href'] ); + $this->assertSame( get_permalink( $post ), $link_alt['attributes']['href'] ); } } // ID. $guid = xml_find( $entries[ $key ]['child'], 'id' ); - $this->assertEquals( $post->guid, $id[0]['content'] ); + $this->assertSame( $post->guid, $id[0]['content'] ); // Updated. $updated = xml_find( $entries[ $key ]['child'], 'updated' ); - $this->assertEquals( strtotime( $post->post_modified_gmt ), strtotime( $updated[0]['content'] ) ); + $this->assertSame( strtotime( $post->post_modified_gmt ), strtotime( $updated[0]['content'] ) ); // Published. $published = xml_find( $entries[ $key ]['child'], 'published' ); - $this->assertEquals( strtotime( $post->post_date_gmt ), strtotime( $published[0]['content'] ) ); + $this->assertSame( strtotime( $post->post_date_gmt ), strtotime( $published[0]['content'] ) ); // Category. foreach ( get_the_category( $post->ID ) as $term ) { @@ -186,21 +186,97 @@ function test_entry_elements() { } $categories = xml_find( $entries[ $key ]['child'], 'category' ); foreach ( $categories as $category ) { - $this->assertTrue( in_array( $category['attributes']['term'], $terms, true ) ); + $this->assertContains( $category['attributes']['term'], $terms ); } unset( $terms ); // Content. if ( ! $this->excerpt_only ) { $content = xml_find( $entries[ $key ]['child'], 'content' ); - $this->assertEquals( trim( apply_filters( 'the_content', $post->post_content ) ), trim( $content[0]['content'] ) ); + $this->assertSame( trim( apply_filters( 'the_content', $post->post_content ) ), trim( $content[0]['content'] ) ); } // Link rel="replies". $link_replies = xml_find( $entries[ $key ]['child'], 'link' ); foreach ( $link_replies as $link_reply ) { if ( 'replies' === $link_reply['attributes']['rel'] && 'application/atom+xml' === $link_reply['attributes']['type'] ) { - $this->assertEquals( get_post_comments_feed_link( $post->ID, 'atom' ), $link_reply['attributes']['href'] ); + $this->assertSame( get_post_comments_feed_link( $post->ID, 'atom' ), $link_reply['attributes']['href'] ); + } + } + } + } + + /** + * @ticket 33591 + */ + public function test_atom_enclosure_with_extended_url_length_type_parsing() { + $enclosures = array( + array( + // URL, length, type. + 'actual' => "https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4\n318465\nvideo/mp4", + 'expected' => array( + 'href' => 'https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4', + 'length' => 318465, + 'type' => 'video/mp4', + ), + ), + array( + // URL, type, length. + 'actual' => "https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4\nvideo/mp4\n318465", + 'expected' => array( + 'href' => 'https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4', + 'length' => 318465, + 'type' => 'video/mp4', + ), + ), + array( + // URL, length. + 'actual' => "https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4\n318465", + 'expected' => array( + 'href' => 'https://wordpress.dev/wp-content/uploads/2017/09/movie.mp4', + 'length' => 318465, + 'type' => '', + ), + ), + array( + // URL, type. + 'actual' => "https://wordpress.dev/wp-content/uploads/2017/01/audio.mp3\n\naudio/mpeg", + 'expected' => array( + 'href' => 'https://wordpress.dev/wp-content/uploads/2017/01/audio.mp3', + 'length' => 0, + 'type' => 'audio/mpeg', + ), + ), + array( + // URL. + 'actual' => 'https://wordpress.dev/wp-content/uploads/2016/01/test.mp4', + 'expected' => array( + 'href' => 'https://wordpress.dev/wp-content/uploads/2016/01/test.mp4', + 'length' => 0, + 'type' => '', + ), + ), + ); + + $post_id = end( self::$posts ); + foreach ( $enclosures as $enclosure ) { + add_post_meta( $post_id, 'enclosure', $enclosure['actual'] ); + } + $this->go_to( '/?feed=atom' ); + $feed = $this->do_atom(); + $xml = xml_to_array( $feed ); + $entries = xml_find( $xml, 'feed', 'entry' ); + $entries = array_slice( $entries, 0, 1 ); + + foreach ( $entries as $key => $entry ) { + $links = xml_find( $entries[ $key ]['child'], 'link' ); + $i = 0; + foreach ( (array) $links as $link ) { + if ( 'enclosure' === $link['attributes']['rel'] ) { + $this->assertSame( $enclosures[ $i ]['expected']['href'], $link['attributes']['href'] ); + $this->assertEquals( $enclosures[ $i ]['expected']['length'], $link['attributes']['length'] ); + $this->assertSame( $enclosures[ $i ]['expected']['type'], $link['attributes']['type'] ); + $i++; } } } diff --git a/tests/phpunit/tests/feed/rss2.php b/tests/phpunit/tests/feed/rss2.php index cadba0330e7da..742c78f3d7494 100644 --- a/tests/phpunit/tests/feed/rss2.php +++ b/tests/phpunit/tests/feed/rss2.php @@ -8,16 +8,16 @@ * * @group feed */ -class Tests_Feeds_RSS2 extends WP_UnitTestCase { - static $user_id; - static $posts; - static $category; - static $post_date; +class Tests_Feed_RSS2 extends WP_UnitTestCase { + public static $user_id; + public static $posts; + public static $category; + public static $post_date; /** * Setup a new user and attribute some posts. */ - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { // Create a user. self::$user_id = $factory->user->create( array( @@ -63,8 +63,8 @@ public static function wpSetUpBeforeClass( $factory ) { /** * Setup. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->post_count = (int) get_option( 'posts_per_rss' ); $this->excerpt_only = get_option( 'rss_use_excerpt' ); @@ -78,7 +78,7 @@ public function setUp() { /** * This is a bit of a hack used to buffer feed content. */ - function do_rss2() { + private function do_rss2() { ob_start(); // Nasty hack! In the future it would better to leverage do_feed( 'rss2' ). global $post; @@ -97,7 +97,7 @@ function do_rss2() { * Test the <rss> element to make sure its present and populated * with the expected child elements and attributes. */ - function test_rss_element() { + public function test_rss_element() { $this->go_to( '/?feed=rss2' ); $feed = $this->do_rss2(); $xml = xml_to_array( $feed ); @@ -106,15 +106,15 @@ function test_rss_element() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); - $this->assertEquals( '2.0', $rss[0]['attributes']['version'] ); - $this->assertEquals( 'http://purl.org/rss/1.0/modules/content/', $rss[0]['attributes']['xmlns:content'] ); - $this->assertEquals( 'http://wellformedweb.org/CommentAPI/', $rss[0]['attributes']['xmlns:wfw'] ); - $this->assertEquals( 'http://purl.org/dc/elements/1.1/', $rss[0]['attributes']['xmlns:dc'] ); + $this->assertSame( '2.0', $rss[0]['attributes']['version'] ); + $this->assertSame( 'http://purl.org/rss/1.0/modules/content/', $rss[0]['attributes']['xmlns:content'] ); + $this->assertSame( 'http://wellformedweb.org/CommentAPI/', $rss[0]['attributes']['xmlns:wfw'] ); + $this->assertSame( 'http://purl.org/dc/elements/1.1/', $rss[0]['attributes']['xmlns:dc'] ); // RSS should have exactly one child element (channel). - $this->assertEquals( 1, count( $rss[0]['child'] ) ); + $this->assertCount( 1, $rss[0]['child'] ); } /** @@ -122,7 +122,7 @@ function test_rss_element() { * * @return [type] [description] */ - function test_channel_element() { + public function test_channel_element() { $this->go_to( '/?feed=rss2' ); $feed = $this->do_rss2(); $xml = xml_to_array( $feed ); @@ -131,28 +131,28 @@ function test_channel_element() { $channel = xml_find( $xml, 'rss', 'channel' ); // The channel should be free of attributes. - $this->assertTrue( empty( $channel[0]['attributes'] ) ); + $this->assertArrayNotHasKey( 'attributes', $channel[0] ); // Verify the channel is present and contains a title child element. $title = xml_find( $xml, 'rss', 'channel', 'title' ); - $this->assertEquals( get_option( 'blogname' ), $title[0]['content'] ); + $this->assertSame( get_option( 'blogname' ), $title[0]['content'] ); $desc = xml_find( $xml, 'rss', 'channel', 'description' ); - $this->assertEquals( get_option( 'blogdescription' ), $desc[0]['content'] ); + $this->assertSame( get_option( 'blogdescription' ), $desc[0]['content'] ); $link = xml_find( $xml, 'rss', 'channel', 'link' ); - $this->assertEquals( get_option( 'siteurl' ), $link[0]['content'] ); + $this->assertSame( get_option( 'siteurl' ), $link[0]['content'] ); $pubdate = xml_find( $xml, 'rss', 'channel', 'lastBuildDate' ); - $this->assertEquals( strtotime( get_lastpostmodified() ), strtotime( $pubdate[0]['content'] ) ); + $this->assertSame( strtotime( get_lastpostmodified() ), strtotime( $pubdate[0]['content'] ) ); } /** * Test that translated feeds have a valid listed date. * - * @group 39141 + * @ticket 39141 */ - function test_channel_pubdate_element_translated() { + public function test_channel_pubdate_element_translated() { $original_locale = $GLOBALS['wp_locale']; /* @var WP_Locale $locale */ $locale = clone $GLOBALS['wp_locale']; @@ -172,10 +172,10 @@ function test_channel_pubdate_element_translated() { // Verify the date is untranslated. $pubdate = xml_find( $xml, 'rss', 'channel', 'lastBuildDate' ); - $this->assertNotContains( 'Tue_Translated', $pubdate[0]['content'] ); + $this->assertStringNotContainsString( 'Tue_Translated', $pubdate[0]['content'] ); } - function test_item_elements() { + public function test_item_elements() { $this->go_to( '/?feed=rss2' ); $feed = $this->do_rss2(); $xml = xml_to_array( $feed ); @@ -199,24 +199,24 @@ function test_item_elements() { // Title. $title = xml_find( $items[ $key ]['child'], 'title' ); - $this->assertEquals( $post->post_title, $title[0]['content'] ); + $this->assertSame( $post->post_title, $title[0]['content'] ); // Link. $link = xml_find( $items[ $key ]['child'], 'link' ); - $this->assertEquals( get_permalink( $post ), $link[0]['content'] ); + $this->assertSame( get_permalink( $post ), $link[0]['content'] ); // Comment link. $comments_link = xml_find( $items[ $key ]['child'], 'comments' ); - $this->assertEquals( get_permalink( $post ) . '#respond', $comments_link[0]['content'] ); + $this->assertSame( get_permalink( $post ) . '#respond', $comments_link[0]['content'] ); // Pub date. $pubdate = xml_find( $items[ $key ]['child'], 'pubDate' ); - $this->assertEquals( strtotime( $post->post_date_gmt ), strtotime( $pubdate[0]['content'] ) ); + $this->assertSame( strtotime( $post->post_date_gmt ), strtotime( $pubdate[0]['content'] ) ); // Author. $creator = xml_find( $items[ $key ]['child'], 'dc:creator' ); $user = new WP_User( $post->post_author ); - $this->assertEquals( $user->display_name, $creator[0]['content'] ); + $this->assertSame( $user->display_name, $creator[0]['content'] ); // Categories (perhaps multiple). $categories = xml_find( $items[ $key ]['child'], 'category' ); @@ -233,40 +233,40 @@ function test_item_elements() { } $cats = array_filter( $cats ); // Should be the same number of categories. - $this->assertEquals( count( $cats ), count( $categories ) ); + $this->assertSame( count( $cats ), count( $categories ) ); // ..with the same names. foreach ( $cats as $id => $cat ) { - $this->assertEquals( $cat, $categories[ $id ]['content'] ); + $this->assertSame( $cat, $categories[ $id ]['content'] ); } // GUID. $guid = xml_find( $items[ $key ]['child'], 'guid' ); - $this->assertEquals( 'false', $guid[0]['attributes']['isPermaLink'] ); - $this->assertEquals( $post->guid, $guid[0]['content'] ); + $this->assertSame( 'false', $guid[0]['attributes']['isPermaLink'] ); + $this->assertSame( $post->guid, $guid[0]['content'] ); // Description / Excerpt. if ( ! empty( $post->post_excerpt ) ) { $description = xml_find( $items[ $key ]['child'], 'description' ); - $this->assertEquals( trim( $post->post_excerpt ), trim( $description[0]['content'] ) ); + $this->assertSame( trim( $post->post_excerpt ), trim( $description[0]['content'] ) ); } // Post content. if ( ! $this->excerpt_only ) { $content = xml_find( $items[ $key ]['child'], 'content:encoded' ); - $this->assertEquals( trim( apply_filters( 'the_content', $post->post_content ) ), trim( $content[0]['content'] ) ); + $this->assertSame( trim( apply_filters( 'the_content', $post->post_content ) ), trim( $content[0]['content'] ) ); } // Comment RSS. $comment_rss = xml_find( $items[ $key ]['child'], 'wfw:commentRss' ); - $this->assertEquals( html_entity_decode( get_post_comments_feed_link( $post->ID ) ), $comment_rss[0]['content'] ); + $this->assertSame( html_entity_decode( get_post_comments_feed_link( $post->ID ) ), $comment_rss[0]['content'] ); } } /** * @ticket 9134 */ - function test_items_comments_closed() { + public function test_items_comments_closed() { add_filter( 'comments_open', '__return_false' ); $this->go_to( '/?feed=rss2' ); @@ -301,7 +301,7 @@ function test_items_comments_closed() { * * @ticket 30210 */ - function test_valid_home_feed_endpoint() { + public function test_valid_home_feed_endpoint() { // An example of a valid home feed endpoint. $this->go_to( 'feed/' ); @@ -320,7 +320,7 @@ function test_valid_home_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /* @@ -329,7 +329,7 @@ function test_valid_home_feed_endpoint() { * * @ticket 30210 */ - function test_valid_taxonomy_feed_endpoint() { + public function test_valid_taxonomy_feed_endpoint() { // An example of an valid taxonomy feed endpoint. $this->go_to( 'category/foo/feed/' ); @@ -348,7 +348,7 @@ function test_valid_taxonomy_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /* @@ -357,7 +357,7 @@ function test_valid_taxonomy_feed_endpoint() { * * @ticket 30210 */ - function test_valid_main_comment_feed_endpoint() { + public function test_valid_main_comment_feed_endpoint() { // Generate a bunch of comments. foreach ( self::$posts as $post ) { self::factory()->comment->create_post_comments( $post, 3 ); @@ -381,7 +381,7 @@ function test_valid_main_comment_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /* @@ -390,7 +390,7 @@ function test_valid_main_comment_feed_endpoint() { * * @ticket 30210 */ - function test_valid_archive_feed_endpoint() { + public function test_valid_archive_feed_endpoint() { // An example of an valid date archive feed endpoint. $this->go_to( '2003/05/27/feed/' ); @@ -409,7 +409,7 @@ function test_valid_archive_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /* @@ -418,7 +418,7 @@ function test_valid_archive_feed_endpoint() { * * @ticket 30210 */ - function test_valid_single_post_comment_feed_endpoint() { + public function test_valid_single_post_comment_feed_endpoint() { // An example of an valid date archive feed endpoint. $this->go_to( get_post_comments_feed_link( self::$posts[0] ) ); @@ -437,7 +437,7 @@ function test_valid_single_post_comment_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /* @@ -446,7 +446,7 @@ function test_valid_single_post_comment_feed_endpoint() { * * @ticket 30210 */ - function test_valid_search_feed_endpoint() { + public function test_valid_search_feed_endpoint() { // An example of an valid search feed endpoint. $this->go_to( '?s=Lorem&feed=rss' ); @@ -465,7 +465,7 @@ function test_valid_search_feed_endpoint() { $rss = xml_find( $xml, 'rss' ); // There should only be one <rss> child element. - $this->assertEquals( 1, count( $rss ) ); + $this->assertCount( 1, $rss ); } /** @@ -483,7 +483,7 @@ public function test_get_feed_build_date( $url, $element ) { // Get the <rss> child element of <xml>. $rss = xml_find( $xml, $element ); $last_build_date = $rss[0]['child'][0]['child'][4]['content']; - $this->assertEquals( strtotime( get_feed_build_date( 'r' ) ), strtotime( $last_build_date ) ); + $this->assertSame( strtotime( get_feed_build_date( 'r' ) ), strtotime( $last_build_date ) ); } diff --git a/tests/phpunit/tests/feed/wpSimplePieFile.php b/tests/phpunit/tests/feed/wpSimplePieFile.php new file mode 100644 index 0000000000000..f9748e3a7bcac --- /dev/null +++ b/tests/phpunit/tests/feed/wpSimplePieFile.php @@ -0,0 +1,121 @@ +<?php +/** + * Unit tests for methods in `WP_SimplePie_File`. + * + * @package WordPress + * @subpackage UnitTests + * @since 5.6.1 + */ + +/** + * Tests the `WP_SimplePie_File` class. + * + * @group feed + * @group wp-simplepie-file + * + * @since 5.6.1 + */ +class Tests_Feed_wpSimplePieFile extends WP_UnitTestCase { + public static function set_up_before_class() { + parent::set_up_before_class(); + + require_once ABSPATH . '/wp-includes/class-simplepie.php'; + require_once ABSPATH . '/wp-includes/class-wp-simplepie-file.php'; + } + + /** + * Test that single- and multiple-value headers are parsed in the way that SimplePie expects. + * + * @dataProvider data_header_parsing + * + * @covers WP_SimplePie_File::__construct + * + * @since 5.6.1 + * + * @ticket 51056 + */ + public function test_header_parsing( $callback, $header_field, $expected ) { + add_filter( 'pre_http_request', array( $this, $callback ) ); + + $file = new WP_SimplePie_File( 'https://wordpress.org/news/feed/' ); + + $this->assertSame( $expected, $file->headers[ $header_field ] ); + } + + /** + * Provide test cases for `test_header_parsing()`. + * + * @return array + */ + public function data_header_parsing() { + return array( + 'single content type header works' => array( + 'mocked_response_single_header_values', + 'content-type', + 'application/rss+xml; charset=UTF-8', + ), + + 'single generic header works' => array( + 'mocked_response_single_header_values', + 'link', + '<https://wordpress.org/news/wp-json/>; rel="https://api.w.org/"', + ), + + 'only the final content-type header should be used' => array( + 'mocked_response_multiple_header_values', + 'content-type', + 'application/rss+xml; charset=UTF-8', + ), + + 'multiple generic header values should be merged into a comma separated string' => array( + 'mocked_response_multiple_header_values', + 'link', + '<https://wordpress.org/news/wp-json/>; rel="https://api.w.org/", <https://wordpress.org/news/wp/v2/categories/3>; rel="alternate"; type="application/json"', + ), + ); + } + + /** + * Mock a feed HTTP response where headers only have one value. + */ + public function mocked_response_single_header_values() { + $single_value_headers = array( + 'content-type' => 'application/rss+xml; charset=UTF-8', + 'link' => '<https://wordpress.org/news/wp-json/>; rel="https://api.w.org/"', + ); + + return array( + 'headers' => new Requests_Utility_CaseInsensitiveDictionary( $single_value_headers ), + 'body' => file_get_contents( DIR_TESTDATA . '/feed/wordpress-org-news.xml' ), + 'response' => array( + 'code' => 200, + 'message' => 'OK', + ), + 'cookies' => array(), + 'filename' => null, + ); + } + + /** + * Mock a feed HTTP response where headers have multiple values. + */ + public function mocked_response_multiple_header_values() { + $response = $this->mocked_response_single_header_values(); + + $multiple_value_headers = array( + 'content-type' => array( + 'application/rss+xml; charset=ISO-8859-2', + 'application/rss+xml; charset=UTF-8', + ), + + 'link' => array( + '<https://wordpress.org/news/wp-json/>; rel="https://api.w.org/"', + '<https://wordpress.org/news/wp/v2/categories/3>; rel="alternate"; type="application/json"', + ), + ); + + $response['headers'] = new Requests_Utility_CaseInsensitiveDictionary( $multiple_value_headers ); + + return $response; + } +} diff --git a/tests/phpunit/tests/file.php b/tests/phpunit/tests/file.php index 9a2c63ecbf5c6..eb6168d9af5cd 100644 --- a/tests/phpunit/tests/file.php +++ b/tests/phpunit/tests/file.php @@ -5,12 +5,10 @@ */ class Tests_File extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); - $file = tempnam( '/tmp', 'foo' ); - $this->dir = dirname( $file ); - unlink( $file ); + $this->dir = untrailingslashit( get_temp_dir() ); $this->badchars = '"\'[]*&?$'; } @@ -19,7 +17,7 @@ function setUp() { * @group plugins * @group themes */ - function test_get_file_data() { + public function test_get_file_data() { $theme_headers = array( 'Name' => 'Theme Name', 'ThemeURI' => 'Theme URI', @@ -41,21 +39,23 @@ function test_get_file_data() { ); foreach ( $actual as $header => $value ) { - $this->assertEquals( $expected[ $header ], $value, $header ); + $this->assertSame( $expected[ $header ], $value, $header ); } } /** + * @ticket 19854 * @group plugins * @group themes */ - function test_get_file_data_cr_line_endings() { - $headers = array( + public function test_get_file_data_with_cr_line_endings() { + $headers = array( 'SomeHeader' => 'Some Header', 'Description' => 'Description', 'Author' => 'Author', ); - $actual = get_file_data( DIR_TESTDATA . '/formatting/cr-line-endings-file-header.php', $headers ); + + $actual = get_file_data( DIR_TESTDATA . '/formatting/file-header-cr-line-endings.php', $headers ); $expected = array( 'SomeHeader' => 'Some header value!', 'Description' => 'This file is using CR line endings for a testcase.', @@ -63,11 +63,31 @@ function test_get_file_data_cr_line_endings() { ); foreach ( $actual as $header => $value ) { - $this->assertEquals( $expected[ $header ], $value, $header ); + $this->assertSame( $expected[ $header ], $value, $header ); + } + } + + /** + * @ticket 47186 + * @group plugins + * @group themes + */ + public function test_get_file_data_with_php_open_tag_prefix() { + $headers = array( + 'TemplateName' => 'Template Name', + ); + + $actual = get_file_data( DIR_TESTDATA . '/formatting/file-header-php-open-tag-prefix.php', $headers ); + $expected = array( + 'TemplateName' => 'Something', + ); + + foreach ( $actual as $header => $value ) { + $this->assertSame( $expected[ $header ], $value, $header ); } } - function is_unique_writable_file( $path, $filename ) { + private function is_unique_writable_file( $path, $filename ) { $fullpath = $path . DIRECTORY_SEPARATOR . $filename; $fp = fopen( $fullpath, 'x' ); @@ -90,7 +110,7 @@ function is_unique_writable_file( $path, $filename ) { return $result; } - function test_unique_filename_is_valid() { + public function test_unique_filename_is_valid() { // Make sure it produces a valid, writable, unique filename. $filename = wp_unique_filename( $this->dir, __FUNCTION__ . '.txt' ); @@ -99,7 +119,7 @@ function test_unique_filename_is_valid() { unlink( $this->dir . DIRECTORY_SEPARATOR . $filename ); } - function test_unique_filename_is_unique() { + public function test_unique_filename_is_unique() { // Make sure it produces two unique filenames. $name = __FUNCTION__; @@ -115,48 +135,48 @@ function test_unique_filename_is_unique() { unlink( $this->dir . DIRECTORY_SEPARATOR . $filename2 ); } - function test_unique_filename_is_sanitized() { + public function test_unique_filename_is_sanitized() { $name = __FUNCTION__; $filename = wp_unique_filename( $this->dir, $name . $this->badchars . '.txt' ); // Make sure the bad characters were all stripped out. - $this->assertEquals( $name . '.txt', $filename ); + $this->assertSame( $name . '.txt', $filename ); $this->assertTrue( $this->is_unique_writable_file( $this->dir, $filename ) ); unlink( $this->dir . DIRECTORY_SEPARATOR . $filename ); } - function test_unique_filename_with_slashes() { + public function test_unique_filename_with_slashes() { $name = __FUNCTION__; // "foo/foo.txt" $filename = wp_unique_filename( $this->dir, $name . '/' . $name . '.txt' ); // The slash should be removed, i.e. "foofoo.txt". - $this->assertEquals( $name . $name . '.txt', $filename ); + $this->assertSame( $name . $name . '.txt', $filename ); $this->assertTrue( $this->is_unique_writable_file( $this->dir, $filename ) ); unlink( $this->dir . DIRECTORY_SEPARATOR . $filename ); } - function test_unique_filename_multiple_ext() { + public function test_unique_filename_multiple_ext() { $name = __FUNCTION__; $filename = wp_unique_filename( $this->dir, $name . '.php.txt' ); // "foo.php.txt" becomes "foo.php_.txt". - $this->assertEquals( $name . '.php_.txt', $filename ); + $this->assertSame( $name . '.php_.txt', $filename ); $this->assertTrue( $this->is_unique_writable_file( $this->dir, $filename ) ); unlink( $this->dir . DIRECTORY_SEPARATOR . $filename ); } - function test_unique_filename_no_ext() { + public function test_unique_filename_no_ext() { $name = __FUNCTION__; $filename = wp_unique_filename( $this->dir, $name ); - $this->assertEquals( $name, $filename ); + $this->assertSame( $name, $filename ); $this->assertTrue( $this->is_unique_writable_file( $this->dir, $filename ) ); @@ -166,13 +186,13 @@ function test_unique_filename_no_ext() { /** * @dataProvider data_wp_tempnam_filenames */ - function test_wp_tempnam( $case ) { + public function test_wp_tempnam( $case ) { $file = wp_tempnam( $case ); unlink( $file ); $this->assertNotEmpty( basename( basename( $file, '.tmp' ), '.zip' ) ); } - function data_wp_tempnam_filenames() { + public function data_wp_tempnam_filenames() { return array( array( '0.zip' ), array( '0.1.2.3.zip' ), @@ -186,7 +206,7 @@ function data_wp_tempnam_filenames() { /** * @ticket 47186 */ - function test_file_signature_functions_as_expected() { + public function test_file_signature_functions_as_expected() { $file = wp_tempnam(); file_put_contents( $file, 'WordPress' ); @@ -219,7 +239,7 @@ function test_file_signature_functions_as_expected() { /** * @ticket 47186 */ - function test_file_signature_expected_failure() { + public function test_file_signature_expected_failure() { $file = wp_tempnam(); file_put_contents( $file, 'WordPress' ); @@ -233,10 +253,10 @@ function test_file_signature_expected_failure() { } $this->assertWPError( $verify ); - $this->assertEquals( 'signature_verification_failed', $verify->get_error_code() ); + $this->assertSame( 'signature_verification_failed', $verify->get_error_code() ); } - function filter_trust_plus85Tq_key( $keys ) { + public function filter_trust_plus85Tq_key( $keys ) { // A static once-off key used to verify verify_file_signature() works as expected. $keys[] = '+85TqMhxQVAYVW4BSCVkJQvZH4q7z8I9lePbvngvf7A='; diff --git a/tests/phpunit/tests/filesystem/base.php b/tests/phpunit/tests/filesystem/base.php index f186cbb961740..52ab59e3cdf6e 100644 --- a/tests/phpunit/tests/filesystem/base.php +++ b/tests/phpunit/tests/filesystem/base.php @@ -4,32 +4,32 @@ * This class is designed to make use of MockFS, a Virtual in-memory filesystem compatible with WP_Filesystem */ abstract class WP_Filesystem_UnitTestCase extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'filesystem_method_file', array( $this, 'filter_abstraction_file' ) ); add_filter( 'filesystem_method', array( $this, 'filter_fs_method' ) ); WP_Filesystem(); } - function tearDown() { + public function tear_down() { global $wp_filesystem; remove_filter( 'filesystem_method_file', array( $this, 'filter_abstraction_file' ) ); remove_filter( 'filesystem_method', array( $this, 'filter_fs_method' ) ); unset( $wp_filesystem ); - parent::tearDown(); + parent::tear_down(); } - function filter_fs_method( $method ) { + public function filter_fs_method( $method ) { return 'MockFS'; } - function filter_abstraction_file( $file ) { + public function filter_abstraction_file( $file ) { return dirname( dirname( __DIR__ ) ) . '/includes/mock-fs.php'; } - function test_is_MockFS_sane() { + public function test_is_MockFS_sane() { global $wp_filesystem; - $this->assertTrue( is_a( $wp_filesystem, 'WP_Filesystem_MockFS' ) ); + $this->assertInstanceOf( 'WP_Filesystem_MockFS', $wp_filesystem ); $wp_filesystem->init( '/' ); diff --git a/tests/phpunit/tests/filesystem/findFolder.php b/tests/phpunit/tests/filesystem/findFolder.php index fce3d05950061..3db6107585787 100644 --- a/tests/phpunit/tests/filesystem/findFolder.php +++ b/tests/phpunit/tests/filesystem/findFolder.php @@ -6,9 +6,9 @@ * @group filesystem * @group wp-filesystem */ -class WP_Filesystem_find_folder_UnitTestCases extends WP_Filesystem_UnitTestCase { +class WP_Filesystem_Find_Folder_Test extends WP_Filesystem_UnitTestCase { - function test_ftp_has_root_access() { + public function test_ftp_has_root_access() { global $wp_filesystem; $fs = $wp_filesystem; $fs->init( @@ -20,14 +20,14 @@ function test_ftp_has_root_access() { ); $path = $fs->find_folder( '/var/www/wordpress/' ); - $this->assertEquals( '/var/www/wordpress/', $path ); + $this->assertSame( '/var/www/wordpress/', $path ); $path = $fs->find_folder( '/this/directory/doesnt/exist/' ); $this->assertFalse( $path ); } - function test_sibling_wordpress_in_subdir() { + public function test_sibling_wordpress_in_subdir() { global $wp_filesystem; $fs = $wp_filesystem; $fs->init( @@ -44,10 +44,10 @@ function test_sibling_wordpress_in_subdir() { ); $path = $fs->find_folder( '/var/www/example.com/wordpress/' ); - $this->assertEquals( '/www/example.com/wordpress/', $path ); + $this->assertSame( '/www/example.com/wordpress/', $path ); $path = $fs->find_folder( '/var/www/wp.example.com/wordpress/wp-content/' ); - $this->assertEquals( '/www/wp.example.com/wordpress/wp-content/', $path ); + $this->assertSame( '/www/wp.example.com/wordpress/wp-content/', $path ); } @@ -57,7 +57,7 @@ function test_sibling_wordpress_in_subdir() { * example.com at / * wp.example.com at /wp.example.com/wordpress/ */ - function test_subdir_of_another() { + public function test_subdir_of_another() { global $wp_filesystem; $fs = $wp_filesystem; $fs->init( @@ -72,10 +72,10 @@ function test_subdir_of_another() { ); $path = $fs->abspath( '/var/www/example.com/wp.example.com/wordpress/' ); - $this->assertEquals( '/wp.example.com/wordpress/', $path ); + $this->assertSame( '/wp.example.com/wordpress/', $path ); $path = $fs->abspath( '/var/www/example.com/' ); - $this->assertEquals( '/', $path ); + $this->assertSame( '/', $path ); } @@ -84,7 +84,7 @@ function test_subdir_of_another() { * * @ticket 20934 */ - function test_multiple_tokens_in_path1() { + public function test_multiple_tokens_in_path1() { global $wp_filesystem; $fs = $wp_filesystem; $fs->init( @@ -103,15 +103,15 @@ function test_multiple_tokens_in_path1() { // www.example.com $path = $fs->abspath( '/var/www/example.com/www/' ); - $this->assertEquals( '/example.com/www/', $path ); + $this->assertSame( '/example.com/www/', $path ); // sub.example.com $path = $fs->abspath( '/var/www/example.com/sub/' ); - $this->assertEquals( '/example.com/sub/', $path ); + $this->assertSame( '/example.com/sub/', $path ); // sub.example.com - Plugins. $path = $fs->find_folder( '/var/www/example.com/sub/wp-content/plugins/' ); - $this->assertEquals( '/example.com/sub/wp-content/plugins/', $path ); + $this->assertSame( '/example.com/sub/wp-content/plugins/', $path ); } } diff --git a/tests/phpunit/tests/filters.php b/tests/phpunit/tests/filters.php index 7de61629c2f27..6bcd43736524d 100644 --- a/tests/phpunit/tests/filters.php +++ b/tests/phpunit/tests/filters.php @@ -7,52 +7,52 @@ */ class Tests_Filters extends WP_UnitTestCase { - function test_simple_filter() { + public function test_simple_filter() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; add_filter( $tag, array( $a, 'filter' ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // Only one event occurred for the hook, with empty args. - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); // Only our hook was called. - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( array( $tag ), $a->get_tags() ); $argsvar = $a->get_args(); $args = array_pop( $argsvar ); - $this->assertEquals( array( $val ), $args ); + $this->assertSame( array( $val ), $args ); } - function test_remove_filter() { + public function test_remove_filter() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; add_filter( $tag, array( $a, 'filter' ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // Make sure our hook was called correctly. - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); // Now remove the filter, do it again, and make sure it's not called this time. remove_filter( $tag, array( $a, 'filter' ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); } - function test_has_filter() { + public function test_has_filter() { $tag = __FUNCTION__; $func = __FUNCTION__ . '_func'; $this->assertFalse( has_filter( $tag, $func ) ); $this->assertFalse( has_filter( $tag ) ); add_filter( $tag, $func ); - $this->assertEquals( 10, has_filter( $tag, $func ) ); + $this->assertSame( 10, has_filter( $tag, $func ) ); $this->assertTrue( has_filter( $tag ) ); remove_filter( $tag, $func ); $this->assertFalse( has_filter( $tag, $func ) ); @@ -60,7 +60,7 @@ function test_has_filter() { } // One tag with multiple filters. - function test_multiple_filters() { + public function test_multiple_filters() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; @@ -70,14 +70,14 @@ function test_multiple_filters() { add_filter( $tag, array( $a1, 'filter' ) ); add_filter( $tag, array( $a2, 'filter' ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // Both filters called once each. - $this->assertEquals( 1, $a1->get_call_count() ); - $this->assertEquals( 1, $a2->get_call_count() ); + $this->assertSame( 1, $a1->get_call_count() ); + $this->assertSame( 1, $a2->get_call_count() ); } - function test_filter_args_1() { + public function test_filter_args_1() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; @@ -85,14 +85,14 @@ function test_filter_args_1() { add_filter( $tag, array( $a, 'filter' ), 10, 2 ); // Call the filter with a single argument. - $this->assertEquals( $val, apply_filters( $tag, $val, $arg1 ) ); + $this->assertSame( $val, apply_filters( $tag, $val, $arg1 ) ); - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); $argsvar = $a->get_args(); - $this->assertEquals( array( $val, $arg1 ), array_pop( $argsvar ) ); + $this->assertSame( array( $val, $arg1 ), array_pop( $argsvar ) ); } - function test_filter_args_2() { + public function test_filter_args_2() { $a1 = new MockAction(); $a2 = new MockAction(); $tag = __FUNCTION__; @@ -104,20 +104,20 @@ function test_filter_args_2() { add_filter( $tag, array( $a1, 'filter' ), 10, 3 ); add_filter( $tag, array( $a2, 'filter' ) ); // Call the filter with two arguments. - $this->assertEquals( $val, apply_filters( $tag, $val, $arg1, $arg2 ) ); + $this->assertSame( $val, apply_filters( $tag, $val, $arg1, $arg2 ) ); // $a1 should be called with both args. - $this->assertEquals( 1, $a1->get_call_count() ); + $this->assertSame( 1, $a1->get_call_count() ); $argsvar1 = $a1->get_args(); - $this->assertEquals( array( $val, $arg1, $arg2 ), array_pop( $argsvar1 ) ); + $this->assertSame( array( $val, $arg1, $arg2 ), array_pop( $argsvar1 ) ); // $a2 should be called with one only. - $this->assertEquals( 1, $a2->get_call_count() ); + $this->assertSame( 1, $a2->get_call_count() ); $argsvar2 = $a2->get_args(); - $this->assertEquals( array( $val ), array_pop( $argsvar2 ) ); + $this->assertSame( array( $val ), array_pop( $argsvar2 ) ); } - function test_filter_priority() { + public function test_filter_priority() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; @@ -125,10 +125,10 @@ function test_filter_priority() { // Make two filters with different priorities. add_filter( $tag, array( $a, 'filter' ), 10 ); add_filter( $tag, array( $a, 'filter2' ), 9 ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // There should be two events, one per filter. - $this->assertEquals( 2, $a->get_call_count() ); + $this->assertSame( 2, $a->get_call_count() ); $expected = array( // 'filter2' is called first because it has priority 9. @@ -145,10 +145,10 @@ function test_filter_priority() { ), ); - $this->assertEquals( $expected, $a->get_events() ); + $this->assertSame( $expected, $a->get_events() ); } - function test_all_filter() { + public function test_all_filter() { $a = new MockAction(); $tag1 = __FUNCTION__ . '_1'; $tag2 = __FUNCTION__ . '_2'; @@ -157,49 +157,49 @@ function test_all_filter() { // Add an 'all' filter. add_filter( 'all', array( $a, 'filterall' ) ); // Apply some filters. - $this->assertEquals( $val, apply_filters( $tag1, $val ) ); - $this->assertEquals( $val, apply_filters( $tag2, $val ) ); - $this->assertEquals( $val, apply_filters( $tag1, $val ) ); - $this->assertEquals( $val, apply_filters( $tag1, $val ) ); + $this->assertSame( $val, apply_filters( $tag1, $val ) ); + $this->assertSame( $val, apply_filters( $tag2, $val ) ); + $this->assertSame( $val, apply_filters( $tag1, $val ) ); + $this->assertSame( $val, apply_filters( $tag1, $val ) ); // Our filter should have been called once for each apply_filters call. - $this->assertEquals( 4, $a->get_call_count() ); + $this->assertSame( 4, $a->get_call_count() ); // The right hooks should have been called in order. - $this->assertEquals( array( $tag1, $tag2, $tag1, $tag1 ), $a->get_tags() ); + $this->assertSame( array( $tag1, $tag2, $tag1, $tag1 ), $a->get_tags() ); remove_filter( 'all', array( $a, 'filterall' ) ); $this->assertFalse( has_filter( 'all', array( $a, 'filterall' ) ) ); } - function test_remove_all_filter() { + public function test_remove_all_filter() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; add_filter( 'all', array( $a, 'filterall' ) ); $this->assertTrue( has_filter( 'all' ) ); - $this->assertEquals( 10, has_filter( 'all', array( $a, 'filterall' ) ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( 10, has_filter( 'all', array( $a, 'filterall' ) ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // Make sure our hook was called correctly. - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); // Now remove the filter, do it again, and make sure it's not called this time. remove_filter( 'all', array( $a, 'filterall' ) ); $this->assertFalse( has_filter( 'all', array( $a, 'filterall' ) ) ); $this->assertFalse( has_filter( 'all' ) ); - $this->assertEquals( $val, apply_filters( $tag, $val ) ); + $this->assertSame( $val, apply_filters( $tag, $val ) ); // Call cound should remain at 1. - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( array( $tag ), $a->get_tags() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( array( $tag ), $a->get_tags() ); } /** * @ticket 20920 */ - function test_remove_all_filters_should_respect_the_priority_argument() { + public function test_remove_all_filters_should_respect_the_priority_argument() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; @@ -218,7 +218,7 @@ function test_remove_all_filters_should_respect_the_priority_argument() { /** * @ticket 9886 */ - function test_filter_ref_array() { + public function test_filter_ref_array() { $obj = new stdClass(); $a = new MockAction(); $tag = __FUNCTION__; @@ -231,13 +231,13 @@ function test_filter_ref_array() { $this->assertSame( $args[0][0], $obj ); // Just in case we don't trust assertSame(). $obj->foo = true; - $this->assertFalse( empty( $args[0][0]->foo ) ); + $this->assertNotEmpty( $args[0][0]->foo ); } /** * @ticket 12723 */ - function test_filter_ref_array_result() { + public function test_filter_ref_array_result() { $obj = new stdClass(); $a = new MockAction(); $b = new MockAction(); @@ -248,31 +248,26 @@ function test_filter_ref_array_result() { $result = apply_filters_ref_array( $tag, array( 'string', &$obj ) ); - $this->assertEquals( $result, 'string_append_append' ); + $this->assertSame( $result, 'string_append_append' ); $args = $a->get_args(); $this->assertSame( $args[0][1], $obj ); // Just in case we don't trust assertSame(). $obj->foo = true; - $this->assertFalse( empty( $args[0][1]->foo ) ); + $this->assertNotEmpty( $args[0][1]->foo ); $args = $b->get_args(); $this->assertSame( $args[0][1], $obj ); // Just in case we don't trust assertSame(). $obj->foo = true; - $this->assertFalse( empty( $args[0][1]->foo ) ); + $this->assertNotEmpty( $args[0][1]->foo ); } - function _self_removal( $tag ) { - remove_action( $tag, array( $this, '_self_removal' ), 10, 1 ); - return $tag; - } - /** * @ticket 29070 */ - function test_has_filter_after_remove_all_filters() { + public function test_has_filter_after_remove_all_filters() { $a = new MockAction(); $tag = __FUNCTION__; $val = __FUNCTION__ . '_val'; @@ -353,14 +348,14 @@ public function test_apply_filters_deprecated_without_filter() { * @ticket 39007 */ public function test_current_priority() { - add_action( 'test_current_priority', array( $this, '_current_priority_action' ), 99 ); + add_action( 'test_current_priority', array( $this, 'current_priority_action' ), 99 ); do_action( 'test_current_priority' ); - remove_action( 'test_current_priority', array( $this, '_current_priority_action' ), 99 ); + remove_action( 'test_current_priority', array( $this, 'current_priority_action' ), 99 ); $this->assertSame( 99, $this->current_priority ); } - public function _current_priority_action() { + public function current_priority_action() { global $wp_filter; $this->current_priority = $wp_filter[ current_filter() ]->current_priority(); } @@ -369,14 +364,14 @@ public function _current_priority_action() { * @ticket 39007 */ public function test_other_priority() { - add_action( 'test_current_priority', array( $this, '_other_priority_action' ), 99 ); + add_action( 'test_current_priority', array( $this, 'other_priority_action' ), 99 ); do_action( 'test_current_priority' ); - remove_action( 'test_current_priority', array( $this, '_other_priority_action' ), 99 ); + remove_action( 'test_current_priority', array( $this, 'other_priority_action' ), 99 ); - $this->assertSame( false, $this->current_priority ); + $this->assertFalse( $this->current_priority ); } - public function _other_priority_action() { + public function other_priority_action() { global $wp_filter; $this->current_priority = $wp_filter['the_content']->current_priority(); } diff --git a/tests/phpunit/tests/formatting/CapitalPDangit.php b/tests/phpunit/tests/formatting/CapitalPDangit.php deleted file mode 100644 index 06aec81b4983f..0000000000000 --- a/tests/phpunit/tests/formatting/CapitalPDangit.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled -- šŸ™ƒ - -/** - * @group formatting - */ -class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase { - function test_esc_attr_quotes() { - global $wp_current_filter; - $this->assertEquals( 'Something about WordPress', capital_P_dangit( 'Something about Wordpress' ) ); - $this->assertEquals( 'Something about (WordPress', capital_P_dangit( 'Something about (Wordpress' ) ); - $this->assertEquals( 'Something about ‘WordPress', capital_P_dangit( 'Something about ‘Wordpress' ) ); - $this->assertEquals( 'Something about “WordPress', capital_P_dangit( 'Something about “Wordpress' ) ); - $this->assertEquals( 'Something about >WordPress', capital_P_dangit( 'Something about >Wordpress' ) ); - $this->assertEquals( 'Wordpress', capital_P_dangit( 'Wordpress' ) ); - - $wp_current_filter = array( 'the_title' ); - $this->assertEquals( 'WordPress', capital_P_dangit( 'Wordpress' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/EscAttr.php b/tests/phpunit/tests/formatting/EscAttr.php deleted file mode 100644 index faba68169b7f3..0000000000000 --- a/tests/phpunit/tests/formatting/EscAttr.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_EscAttr extends WP_UnitTestCase { - function test_esc_attr_quotes() { - $attr = '"double quotes"'; - $this->assertEquals( '"double quotes"', esc_attr( $attr ) ); - - $attr = "'single quotes'"; - $this->assertEquals( ''single quotes'', esc_attr( $attr ) ); - - $attr = "'mixed' " . '"quotes"'; - $this->assertEquals( ''mixed' "quotes"', esc_attr( $attr ) ); - - // Handles double encoding? - $attr = '"double quotes"'; - $this->assertEquals( '"double quotes"', esc_attr( esc_attr( $attr ) ) ); - - $attr = "'single quotes'"; - $this->assertEquals( ''single quotes'', esc_attr( esc_attr( $attr ) ) ); - - $attr = "'mixed' " . '"quotes"'; - $this->assertEquals( ''mixed' "quotes"', esc_attr( esc_attr( $attr ) ) ); - } - - function test_esc_attr_amp() { - $out = esc_attr( 'foo & bar &baz;  ' ); - $this->assertEquals( 'foo & bar &baz;  ', $out ); - } -} diff --git a/tests/phpunit/tests/formatting/EscTextarea.php b/tests/phpunit/tests/formatting/EscTextarea.php deleted file mode 100644 index 5ca9608492826..0000000000000 --- a/tests/phpunit/tests/formatting/EscTextarea.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_EscTextarea extends WP_UnitTestCase { - - function _charset_iso_8859_1() { - return 'iso-8859-1'; - } - - /* - * Only fails in PHP 5.4 onwards - * @ticket 23688 - */ - function test_esc_textarea_charset_iso_8859_1() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; - $this->assertEquals( $iso8859_1, esc_textarea( $iso8859_1 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - } - - function _charset_utf_8() { - return 'UTF-8'; - } - - /* - * @ticket 23688 - */ - function test_esc_textarea_charset_utf_8() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; - $this->assertEquals( $utf8, esc_textarea( $utf8 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/EscUrl.php b/tests/phpunit/tests/formatting/EscUrl.php deleted file mode 100644 index bf11db84cbe0f..0000000000000 --- a/tests/phpunit/tests/formatting/EscUrl.php +++ /dev/null @@ -1,265 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_EscUrl extends WP_UnitTestCase { - - /** - * @ticket 23605 - */ - function test_spaces() { - $this->assertEquals( 'http://example.com/Mr%20WordPress', esc_url( 'http://example.com/Mr WordPress' ) ); - $this->assertEquals( 'http://example.com/Mr%20WordPress', esc_url( 'http://example.com/Mr%20WordPress' ) ); - $this->assertEquals( 'http://example.com/Mr%20%20WordPress', esc_url( 'http://example.com/Mr%20%20WordPress' ) ); - $this->assertEquals( 'http://example.com/Mr+WordPress', esc_url( 'http://example.com/Mr+WordPress' ) ); - $this->assertEquals( 'http://example.com/Mr+WordPress', esc_url( ' http://example.com/Mr+WordPress' ) ); - - $this->assertEquals( 'http://example.com/?foo=one%20two%20three&bar=four', esc_url( 'http://example.com/?foo=one two three&bar=four' ) ); - $this->assertEquals( 'http://example.com/?foo=one%20two%20three&bar=four', esc_url( 'http://example.com/?foo=one%20two%20three&bar=four' ) ); - } - - function test_bad_characters() { - $this->assertEquals( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) ); - $this->assertEquals( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0ago' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0Dgo' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0dgo' ) ); - // Nesting checks. - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) ); - $this->assertEquals( 'http://example.com/', esc_url( 'http://example.com/%0%0%0DAD' ) ); - $this->assertEquals( 'http://example.com/', esc_url( 'http://example.com/%0%0%0ADA' ) ); - $this->assertEquals( 'http://example.com/', esc_url( 'http://example.com/%0%0%0DAd' ) ); - $this->assertEquals( 'http://example.com/', esc_url( 'http://example.com/%0%0%0ADa' ) ); - } - - function test_relative() { - $this->assertEquals( '/example.php', esc_url( '/example.php' ) ); - $this->assertEquals( 'example.php', esc_url( 'example.php' ) ); - $this->assertEquals( '#fragment', esc_url( '#fragment' ) ); - $this->assertEquals( '?foo=bar', esc_url( '?foo=bar' ) ); - } - - function test_all_url_parts() { - $url = 'https://user:pass@host.example.com:1234/path;p=1?query=2&r[]=3#fragment'; - - $this->assertEquals( - array( - 'scheme' => 'https', - 'host' => 'host.example.com', - 'port' => 1234, - 'user' => 'user', - 'pass' => 'pass', - 'path' => '/path;p=1', - 'query' => 'query=2&r[]=3', - 'fragment' => 'fragment', - ), - parse_url( $url ) - ); - $this->assertEquals( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) ); - $this->assertEquals( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url( $url ) ); - } - - function test_bare() { - $this->assertEquals( 'http://example.com?foo', esc_url( 'example.com?foo' ) ); - $this->assertEquals( 'http://example.com', esc_url( 'example.com' ) ); - $this->assertEquals( 'http://localhost', esc_url( 'localhost' ) ); - $this->assertEquals( 'http://example.com/foo', esc_url( 'example.com/foo' ) ); - $this->assertEquals( 'http://баба.org/баба', esc_url( 'баба.org/баба' ) ); - } - - function test_encoding() { - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); - - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); - $this->assertEquals( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); - - $param = urlencode( 'http://example.com/?one=1&two=2' ); - $this->assertEquals( "http://example.com?url={$param}", esc_url( "http://example.com?url={$param}" ) ); - } - - function test_protocol() { - $this->assertEquals( 'http://example.com', esc_url( 'http://example.com' ) ); - $this->assertEquals( '', esc_url( 'nasty://example.com/' ) ); - $this->assertEquals( - '', - esc_url( - 'example.com', - array( - 'https', - ) - ) - ); - $this->assertEquals( - '', - esc_url( - 'http://example.com', - array( - 'https', - ) - ) - ); - $this->assertEquals( - 'https://example.com', - esc_url( - 'https://example.com', - array( - 'http', - 'https', - ) - ) - ); - - foreach ( wp_allowed_protocols() as $scheme ) { - $this->assertEquals( "{$scheme}://example.com", esc_url( "{$scheme}://example.com" ), $scheme ); - $this->assertEquals( - "{$scheme}://example.com", - esc_url( - "{$scheme}://example.com", - array( - $scheme, - ) - ), - $scheme - ); - } - - $this->assertTrue( ! in_array( 'data', wp_allowed_protocols(), true ) ); - $this->assertEquals( '', esc_url( 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D' ) ); - - $this->assertTrue( ! in_array( 'foo', wp_allowed_protocols(), true ) ); - $this->assertEquals( - 'foo://example.com', - esc_url( - 'foo://example.com', - array( - 'foo', - ) - ) - ); - - } - - /** - * @ticket 23187 - */ - function test_protocol_case() { - $this->assertEquals( 'http://example.com', esc_url( 'HTTP://example.com' ) ); - $this->assertEquals( 'http://example.com', esc_url( 'Http://example.com' ) ); - } - - function test_display_extras() { - $this->assertEquals( 'http://example.com/'quoted'', esc_url( 'http://example.com/\'quoted\'' ) ); - $this->assertEquals( 'http://example.com/\'quoted\'', esc_url( 'http://example.com/\'quoted\'', null, 'notdisplay' ) ); - } - - function test_non_ascii() { - $this->assertEquals( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) ); - $this->assertEquals( 'http://баба.org/баба', esc_url( 'http://баба.org/баба' ) ); - $this->assertEquals( 'http://müller.com/', esc_url( 'http://müller.com/' ) ); - } - - function test_feed() { - $this->assertEquals( '', esc_url( 'feed:javascript:alert(1)' ) ); - $this->assertEquals( '', esc_url( 'feed:javascript:feed:alert(1)' ) ); - $this->assertEquals( '', esc_url( 'feed:feed:javascript:alert(1)' ) ); - $this->assertEquals( 'feed:feed:alert(1)', esc_url( 'feed:feed:alert(1)' ) ); - $this->assertEquals( 'feed:http://wordpress.org/feed/', esc_url( 'feed:http://wordpress.org/feed/' ) ); - } - - /** - * @ticket 16859 - */ - function test_square_brackets() { - $this->assertEquals( '/example.php?one%5B%5D=two', esc_url( '/example.php?one[]=two' ) ); - $this->assertEquals( '?foo%5Bbar%5D=baz', esc_url( '?foo[bar]=baz' ) ); - $this->assertEquals( '//example.com/?foo%5Bbar%5D=baz', esc_url( '//example.com/?foo[bar]=baz' ) ); - $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'example.com/?foo[bar]=baz' ) ); - $this->assertEquals( 'http://localhost?foo%5Bbar%5D=baz', esc_url( 'localhost?foo[bar]=baz' ) ); - $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) ); - $this->assertEquals( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo%5Bbar%5D=baz' ) ); - $this->assertEquals( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) ); - $this->assertEquals( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz' ) ); - } - - /** - * Courtesy of http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding - */ - function test_reserved_characters() { - $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;="; - $this->assertEquals( $url, esc_url_raw( $url ) ); - } - - /** - * @ticket 21974 - */ - function test_protocol_relative_with_colon() { - $this->assertEquals( '//example.com/foo?foo=abc:def', esc_url( '//example.com/foo?foo=abc:def' ) ); - } - - /** - * @ticket 31632 - */ - function test_mailto_with_newline() { - $body = <<<EOT -Hi there, - -I thought you might want to sign up for this newsletter -EOT; - $body = str_replace( "\r\n", "\n", $body ); - $email_link = 'mailto:?body=' . rawurlencode( $body ); - $email_link = esc_url( $email_link ); - $this->assertEquals( 'mailto:?body=Hi%20there%2C%0A%0AI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); - } - - /** - * @ticket 31632 - */ - function test_mailto_in_http_url_with_newline() { - $body = <<<EOT -Hi there, - -I thought you might want to sign up for this newsletter -EOT; - $body = str_replace( "\r\n", "\n", $body ); - $email_link = 'http://example.com/mailto:?body=' . rawurlencode( $body ); - $email_link = esc_url( $email_link ); - $this->assertEquals( 'http://example.com/mailto:?body=Hi%20there%2CI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); - } - - /** - * @ticket 23605 - */ - function test_mailto_with_spaces() { - $body = 'Hi there, I thought you might want to sign up for this newsletter'; - - $email_link = 'mailto:?body=' . $body; - $email_link = esc_url( $email_link ); - $this->assertEquals( 'mailto:?body=Hi%20there,%20I%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); - } - - /** - * @ticket 28015 - */ - function test_invalid_charaters() { - $this->assertEmpty( esc_url_raw( '"^<>{}`' ) ); - } - - /** - * @ticket 34202 - */ - function test_ipv6_hosts() { - $this->assertEquals( '//[::127.0.0.1]', esc_url( '//[::127.0.0.1]' ) ); - $this->assertEquals( 'http://[::FFFF::127.0.0.1]', esc_url( 'http://[::FFFF::127.0.0.1]' ) ); - $this->assertEquals( 'http://[::127.0.0.1]', esc_url( 'http://[::127.0.0.1]' ) ); - $this->assertEquals( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]', esc_url( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]' ) ); - - // IPv6 with square brackets in the query? Why not. - $this->assertEquals( '//[::FFFF::127.0.0.1]/?foo%5Bbar%5D=baz', esc_url( '//[::FFFF::127.0.0.1]/?foo[bar]=baz' ) ); - $this->assertEquals( 'http://[::FFFF::127.0.0.1]/?foo%5Bbar%5D=baz', esc_url( 'http://[::FFFF::127.0.0.1]/?foo[bar]=baz' ) ); - } - -} diff --git a/tests/phpunit/tests/formatting/HtmlExcerpt.php b/tests/phpunit/tests/formatting/HtmlExcerpt.php deleted file mode 100644 index 9aeea365e53ef..0000000000000 --- a/tests/phpunit/tests/formatting/HtmlExcerpt.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_HtmlExcerpt extends WP_UnitTestCase { - function test_simple() { - $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba told me not to come', 4 ) ); - } - function test_html() { - $this->assertEquals( 'Baba', wp_html_excerpt( "<a href='http://baba.net/'>Baba</a> told me not to come", 4 ) ); - } - function test_entities() { - $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba & Dyado', 8 ) ); - $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba & Dyado', 8 ) ); - $this->assertEquals( 'Baba & D', wp_html_excerpt( 'Baba & Dyado', 12 ) ); - $this->assertEquals( 'Baba & Dyado', wp_html_excerpt( 'Baba & Dyado', 100 ) ); - } -} diff --git a/tests/phpunit/tests/formatting/JSEscape.php b/tests/phpunit/tests/formatting/JSEscape.php deleted file mode 100644 index febd0826179f0..0000000000000 --- a/tests/phpunit/tests/formatting/JSEscape.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_JSEscape extends WP_UnitTestCase { - function test_js_escape_simple() { - $out = esc_js( 'foo bar baz();' ); - $this->assertEquals( 'foo bar baz();', $out ); - } - - function test_js_escape_quotes() { - $out = esc_js( 'foo "bar" \'baz\'' ); - // Does it make any sense to change " into "? Why not \"? - $this->assertEquals( "foo "bar" \'baz\'", $out ); - } - - function test_js_escape_backslash() { - $bs = '\\'; - $out = esc_js( 'foo ' . $bs . 't bar ' . $bs . $bs . ' baz' ); - // \t becomes t - bug? - $this->assertEquals( 'foo t bar ' . $bs . $bs . ' baz', $out ); - } - - function test_js_escape_amp() { - $out = esc_js( 'foo & bar &baz;  ' ); - $this->assertEquals( 'foo & bar &baz;  ', $out ); - } - - function test_js_escape_quote_entity() { - $out = esc_js( 'foo ' bar ' baz &' ); - $this->assertEquals( "foo \\' bar \\' baz &", $out ); - } - - function test_js_no_carriage_return() { - $out = esc_js( "foo\rbar\nbaz\r" ); - // \r is stripped. - $this->assertequals( "foobar\\nbaz", $out ); - } - - function test_js_escape_rn() { - $out = esc_js( "foo\r\nbar\nbaz\r\n" ); - // \r is stripped. - $this->assertequals( "foo\\nbar\\nbaz\\n", $out ); - } -} diff --git a/tests/phpunit/tests/formatting/RemoveAccents.php b/tests/phpunit/tests/formatting/RemoveAccents.php deleted file mode 100644 index e68044d8c8ec2..0000000000000 --- a/tests/phpunit/tests/formatting/RemoveAccents.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_RemoveAccents extends WP_UnitTestCase { - public function test_remove_accents_simple() { - $this->assertEquals( 'abcdefghijkl', remove_accents( 'abcdefghijkl' ) ); - } - - /** - * @ticket 9591 - */ - public function test_remove_accents_latin1_supplement() { - $input = 'ĀŖĀŗĆ€ĆĆ‚ĆƒĆ„Ć…Ć†Ć‡ĆˆĆ‰ĆŠĆ‹ĆŒĆĆŽĆĆĆ‘Ć’Ć“Ć”Ć•Ć–Ć˜Ć™ĆšĆ›ĆœĆĆžĆŸĆ Ć”Ć¢Ć£Ć¤Ć„Ć¦Ć§ĆØĆ©ĆŖĆ«Ć¬Ć­Ć®ĆÆĆ°Ć±Ć²Ć³Ć“ĆµĆ¶ĆøĆ¹ĆŗĆ»Ć¼Ć½Ć¾Ćæ'; - $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; - - $this->assertEquals( $output, remove_accents( $input ), 'remove_accents replaces Latin-1 Supplement' ); - } - - public function test_remove_accents_latin_extended_a() { - $input = 'Ä€ÄÄ‚ÄƒÄ„Ä…Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄÄŽÄÄÄ‘Ä’Ä“Ä”Ä•Ä–Ä—Ä˜Ä™ÄšÄ›ÄœÄÄžÄŸÄ Ä”Ä¢Ä£Ä¤Ä„Ä¦Ä§ÄØÄ©ÄŖÄ«Ä¬Ä­Ä®ÄÆÄ°Ä±Ä²Ä³Ä“ÄµÄ¶Ä·ÄøÄ¹ÄŗÄ»Ä¼Ä½Ä¾ÄæÅ€ÅÅ‚ÅƒÅ„Å…Å†Å‡ÅˆÅ‰ÅŠÅ‹ÅŒÅÅŽÅÅÅ‘Å’Å“Å”Å•Å–Å—Å˜Å™ÅšÅ›ÅœÅÅžÅŸÅ Å”Å¢Å£Å¤Å„Å¦Å§ÅØÅ©ÅŖÅ«Å¬Å­Å®ÅÆÅ°Å±Å²Å³Å“ÅµÅ¶Å·ÅøÅ¹ÅŗÅ»Å¼Å½Å¾Åæ'; - $output = 'AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIJijJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOEoeRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZzs'; - - $this->assertEquals( $output, remove_accents( $input ), 'remove_accents replaces Latin Extended A' ); - } - - public function test_remove_accents_latin_extended_b() { - $this->assertEquals( 'SsTt', remove_accents( 'ȘșȚț' ), 'remove_accents replaces Latin Extended B' ); - } - - public function test_remove_accents_euro_pound_signs() { - $this->assertEquals( 'E', remove_accents( '€' ), 'remove_accents replaces euro sign' ); - $this->assertEquals( '', remove_accents( 'Ā£' ), 'remove_accents replaces pound sign' ); - } - - public function test_remove_accents_iso8859() { - // File is Latin1-encoded. - $file = DIR_TESTDATA . '/formatting/remove_accents.01.input.txt'; - $input = file_get_contents( $file ); - $input = trim( $input ); - $output = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyyOEoeAEDHTHssaedhth'; - - $this->assertEquals( $output, remove_accents( $input ), 'remove_accents from ISO-8859-1 text' ); - } - - /** - * @ticket 17738 - */ - public function test_remove_accents_vowels_diacritic() { - // Vowels with diacritic. - // Unmarked. - $this->assertEquals( 'OoUu', remove_accents( 'ƠƔƯư' ) ); - // Grave accent. - $this->assertEquals( 'AaAaEeOoOoUuYy', remove_accents( 'įŗ¦įŗ§įŗ°įŗ±į»€į»į»’į»“į»œį»į»Ŗį»«į»²į»³' ) ); - // Hook. - $this->assertEquals( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'įŗ¢įŗ£įŗØįŗ©įŗ²įŗ³įŗŗįŗ»į»‚į»ƒį»ˆį»‰į»Žį»į»”į»•į»žį»Ÿį»¦į»§į»¬į»­į»¶į»·' ) ); - // Tilde. - $this->assertEquals( 'AaAaEeEeOoOoUuYy', remove_accents( 'ẪẫẓẵẼẽỄễỖỗỠỔỮữỸỹ' ) ); - // Acute accent. - $this->assertEquals( 'AaAaEeOoOoUu', remove_accents( 'įŗ¤įŗ„įŗ®įŗÆįŗ¾įŗæį»į»‘į»šį»›į»Øį»©' ) ); - // Dot below. - $this->assertEquals( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'įŗ įŗ”įŗ¬įŗ­įŗ¶įŗ·įŗøįŗ¹į»†į»‡į»Šį»‹į»Œį»į»˜į»™į»¢į»£į»¤į»„į»°į»±į»“į»µ' ) ); - } - - /** - * @ticket 20772 - */ - public function test_remove_accents_hanyu_pinyin() { - // Vowels with diacritic (Chinese, Hanyu Pinyin). - // Macron. - $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'ÄÄ“Ä«ÅÅ«Ē–Ä€Ä’ÄŖÅŒÅŖĒ•' ) ); - // Acute accent. - $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'Ć”Ć©Ć­Ć³ĆŗĒ˜ĆĆ‰ĆĆ“ĆšĒ—' ) ); - // Caron. - $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'ĒŽÄ›ĒĒ’Ē”ĒšĒÄšĒĒ‘Ē“Ē™' ) ); - // Grave accent. - $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'Ć ĆØĆ¬Ć²Ć¹ĒœĆ€ĆˆĆŒĆ’Ć™Ē›' ) ); - // Unmarked. - $this->assertEquals( 'aaeiouuAEIOUU', remove_accents( 'aɑeiouüAEIOUÜ' ) ); - } - - function _remove_accents_germanic_umlauts_cb() { - return 'de_DE'; - } - - /** - * @ticket 3782 - */ - public function test_remove_accents_germanic_umlauts() { - add_filter( 'locale', array( $this, '_remove_accents_germanic_umlauts_cb' ) ); - - $this->assertEquals( 'AeOeUeaeoeuess', remove_accents( 'Ć„Ć–ĆœĆ¤Ć¶Ć¼ĆŸ' ) ); - - remove_filter( 'locale', array( $this, '_remove_accents_germanic_umlauts_cb' ) ); - } - - public function _set_locale_to_danish() { - return 'da_DK'; - } - - /** - * @ticket 23907 - */ - public function test_remove_danish_accents() { - add_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); - - $this->assertEquals( 'AeOeAaaeoeaa', remove_accents( 'Ć†Ć˜Ć…Ć¦ĆøĆ„' ) ); - - remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); - } - - public function _set_locale_to_catalan() { - return 'ca'; - } - - /** - * @ticket 37086 - */ - public function test_remove_catalan_middot() { - add_filter( 'locale', array( $this, '_set_locale_to_catalan' ) ); - - $this->assertEquals( 'allallalla', remove_accents( 'alĀ·lallaŀla' ) ); - - remove_filter( 'locale', array( $this, '_set_locale_to_catalan' ) ); - - $this->assertEquals( 'alĀ·lallalla', remove_accents( 'alĀ·lallaŀla' ) ); - } - - public function _set_locale_to_serbian() { - return 'sr_RS'; - } - - /** - * @ticket 38078 - */ - public function test_transcribe_serbian_crossed_d() { - add_filter( 'locale', array( $this, '_set_locale_to_serbian' ) ); - - $this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) ); - - remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) ); - - $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/SanitizeFileName.php b/tests/phpunit/tests/formatting/SanitizeFileName.php deleted file mode 100644 index b715960e76d0c..0000000000000 --- a/tests/phpunit/tests/formatting/SanitizeFileName.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_SanitizeFileName extends WP_UnitTestCase { - function test_munges_extensions() { - # r17990 - $file_name = sanitize_file_name( 'test.phtml.txt' ); - $this->assertEquals( 'test.phtml_.txt', $file_name ); - } - - function test_removes_special_chars() { - $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) ); - $string = 'test'; - foreach ( $special_chars as $char ) { - $string .= $char; - } - $string .= 'test'; - $this->assertEquals( 'testtest', sanitize_file_name( $string ) ); - } - - /** - * Test that spaces are correctly replaced with dashes. - * - * @ticket 16330 - */ - function test_replace_spaces() { - $urls = array( - 'unencoded space.png' => 'unencoded-space.png', - 'encoded-space.jpg' => 'encoded-space.jpg', - 'plus+space.jpg' => 'plusspace.jpg', - 'multi %20 +space.png' => 'multi-20-space.png', - ); - - foreach ( $urls as $test => $expected ) { - $this->assertEquals( $expected, sanitize_file_name( $test ) ); - } - } - - function test_replaces_any_number_of_hyphens_with_one_hyphen() { - $this->assertEquals( 'a-t-t', sanitize_file_name( 'a----t----t' ) ); - } - - function test_trims_trailing_hyphens() { - $this->assertEquals( 'a-t-t', sanitize_file_name( 'a----t----t----' ) ); - } - - function test_replaces_any_amount_of_whitespace_with_one_hyphen() { - $this->assertEquals( 'a-t', sanitize_file_name( 'a t' ) ); - $this->assertEquals( 'a-t', sanitize_file_name( "a \n\n\nt" ) ); - } - - /** - * @ticket 16226 - */ - function test_replaces_percent_sign() { - $this->assertEquals( 'a22b.jpg', sanitize_file_name( 'a%22b.jpg' ) ); - } - - function test_replaces_unnammed_file_extensions() { - // Test filenames with both supported and unsupported extensions. - $this->assertEquals( 'unnamed-file.exe', sanitize_file_name( '_.exe' ) ); - $this->assertEquals( 'unnamed-file.jpg', sanitize_file_name( '_.jpg' ) ); - } - - function test_replaces_unnammed_file_extensionless() { - // Test a filenames that becomes extensionless. - $this->assertEquals( 'no-extension', sanitize_file_name( '_.no-extension' ) ); - } - - /** - * @dataProvider data_wp_filenames - */ - function test_replaces_invalid_utf8_characters( $input, $expected ) { - $this->assertEquals( $expected, sanitize_file_name( $input ) ); - } - - function data_wp_filenames() { - return array( - array( urldecode( '%B1myfile.png' ), 'myfile.png' ), - array( urldecode( '%B1myfile' ), 'myfile' ), - array( 'demo bar.png', 'demo-bar.png' ), - array( 'demo' . json_decode( '"\u00a0"' ) . 'bar.png', 'demo-bar.png' ), - ); - } -} diff --git a/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php b/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php deleted file mode 100644 index c3059614e3200..0000000000000 --- a/tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { - function test_strips_html() { - $input = 'Captain <strong>Awesome</strong>'; - $expected = 'captain-awesome'; - $this->assertEquals( $expected, sanitize_title( $input ) ); - } - - function test_strips_unencoded_percent_signs() { - $this->assertEquals( 'fran%c3%a7ois', sanitize_title_with_dashes( 'fran%c3%a7%ois' ) ); - } - - function test_makes_title_lowercase() { - $this->assertEquals( 'abc', sanitize_title_with_dashes( 'ABC' ) ); - } - - function test_replaces_any_amount_of_whitespace_with_one_hyphen() { - $this->assertEquals( 'a-t', sanitize_title_with_dashes( 'a t' ) ); - $this->assertEquals( 'a-t', sanitize_title_with_dashes( "a \n\n\nt" ) ); - } - - function test_replaces_any_number_of_hyphens_with_one_hyphen() { - $this->assertEquals( 'a-t-t', sanitize_title_with_dashes( 'a----t----t' ) ); - } - - function test_trims_trailing_hyphens() { - $this->assertEquals( 'a-t-t', sanitize_title_with_dashes( 'a----t----t----' ) ); - } - - function test_handles_non_entity_ampersands() { - $this->assertEquals( 'penn-teller-bull', sanitize_title_with_dashes( 'penn & teller bull' ) ); - } - - public function test_strips_nbsp_ndash_and_amp() { - $this->assertEquals( 'no-entities-here', sanitize_title_with_dashes( 'No   Entities – Here &' ) ); - } - - public function test_strips_encoded_ampersand() { - $this->assertEquals( 'one-two', sanitize_title_with_dashes( 'One & Two', '', 'save' ) ); - } - - public function test_strips_url_encoded_ampersand() { - $this->assertEquals( 'one-two', sanitize_title_with_dashes( 'One { Two;', '', 'save' ) ); - } - - public function test_strips_trademark_symbol() { - $this->assertEquals( 'one-two', sanitize_title_with_dashes( 'One Twoā„¢;', '', 'save' ) ); - } - - public function test_strips_unencoded_ampersand_followed_by_encoded_ampersand() { - $this->assertEquals( 'one-two', sanitize_title_with_dashes( 'One && Two;', '', 'save' ) ); - } - - public function test_strips_unencoded_ampersand_when_not_surrounded_by_spaces() { - $this->assertEquals( 'onetwo', sanitize_title_with_dashes( 'One&Two', '', 'save' ) ); - } - - function test_replaces_nbsp() { - $this->assertEquals( 'dont-break-the-space', sanitize_title_with_dashes( "don'tĀ breakĀ theĀ space", '', 'save' ) ); - } - - /** - * @ticket 31790 - */ - function test_replaces_nbsp_entities() { - $this->assertEquals( 'dont-break-the-space', sanitize_title_with_dashes( "don't break the space", '', 'save' ) ); - } - - function test_replaces_ndash_mdash() { - $this->assertEquals( 'do-the-dash', sanitize_title_with_dashes( 'Do – the Dash', '', 'save' ) ); - $this->assertEquals( 'do-the-dash', sanitize_title_with_dashes( 'Do the — Dash', '', 'save' ) ); - } - - /** - * @ticket 31790 - */ - function test_replaces_ndash_mdash_entities() { - $this->assertEquals( 'do-the-dash', sanitize_title_with_dashes( 'Do – the – Dash', '', 'save' ) ); - $this->assertEquals( 'do-the-dash', sanitize_title_with_dashes( 'Do — the — Dash', '', 'save' ) ); - } - - function test_replaces_iexcel_iquest() { - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just Ā”a Slug', '', 'save' ) ); - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just a SlugĀæ', '', 'save' ) ); - } - - function test_replaces_angle_quotes() { - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( '‹Just a Slug›', '', 'save' ) ); - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Ā«Just a SlugĀ»', '', 'save' ) ); - } - - function test_replaces_curly_quotes() { - $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€œCurly Joeā€', '', 'save' ) ); - $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€˜Curly Joe’', '', 'save' ) ); - $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€žCurly Joeā€œ', '', 'save' ) ); - $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€šCurly Joe‛', '', 'save' ) ); - $this->assertEquals( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€žCurly Joeā€Ÿ', '', 'save' ) ); - } - - function test_replaces_copy_reg_deg_trade() { - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just Ā© a Slug', '', 'save' ) ); - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Ā® Just a Slug', '', 'save' ) ); - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just a ° Slug', '', 'save' ) ); - $this->assertEquals( 'just-a-slug', sanitize_title_with_dashes( 'Just ā„¢ a Slug', '', 'save' ) ); - } - - /** - * @ticket 10792 - */ - function test_replaces_forward_slash() { - $this->assertEquals( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon/McCartney', '', 'save' ) ); - $this->assertEquals( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon//McCartney', '', 'save' ) ); - $this->assertEquals( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon///McCartney', '', 'save' ) ); - $this->assertEquals( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon/-McCartney', '', 'save' ) ); - $this->assertEquals( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( '//songs by Lennon/McCartney', '', 'save' ) ); - } - - /** - * @ticket 19820 - */ - function test_replaces_multiply_sign() { - $this->assertEquals( '6x7-is-42', sanitize_title_with_dashes( '6Ɨ7 is 42', '', 'save' ) ); - } - - /** - * @ticket 20772 - */ - function test_replaces_standalone_diacritic() { - $this->assertEquals( 'aaaa', sanitize_title_with_dashes( 'aĢ„áǎaĢ€', '', 'save' ) ); - } - - /** - * @ticket 22395 - */ - function test_replaces_acute_accents() { - $this->assertEquals( 'aaaa', sanitize_title_with_dashes( 'ááaĀ“aˊ', '', 'save' ) ); - } - -} diff --git a/tests/phpunit/tests/formatting/Slashit.php b/tests/phpunit/tests/formatting/Slashit.php deleted file mode 100644 index 876d7fda228d2..0000000000000 --- a/tests/phpunit/tests/formatting/Slashit.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_Slashit extends WP_UnitTestCase { - function test_backslashes_middle_numbers() { - $this->assertEquals( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) ); - } - - function test_backslashes_alphas() { - $this->assertEquals( "\\a943\\b\\c", backslashit( 'a943bc' ) ); - } - - function test_double_backslashes_leading_numbers() { - $this->assertEquals( '\\\\95', backslashit( '95' ) ); - } - - function test_removes_trailing_slashes() { - $this->assertEquals( 'a', untrailingslashit( 'a/' ) ); - $this->assertEquals( 'a', untrailingslashit( 'a////' ) ); - } - - /** - * @ticket 22267 - */ - function test_removes_trailing_backslashes() { - $this->assertEquals( 'a', untrailingslashit( 'a\\' ) ); - $this->assertEquals( 'a', untrailingslashit( 'a\\\\\\\\' ) ); - } - - /** - * @ticket 22267 - */ - function test_removes_trailing_mixed_slashes() { - $this->assertEquals( 'a', untrailingslashit( 'a/\\' ) ); - $this->assertEquals( 'a', untrailingslashit( 'a\\/\\///\\\\//' ) ); - } - - function test_adds_trailing_slash() { - $this->assertEquals( 'a/', trailingslashit( 'a' ) ); - } - - function test_does_not_add_trailing_slash_if_one_exists() { - $this->assertEquals( 'a/', trailingslashit( 'a/' ) ); - } - - /** - * @ticket 22267 - */ - function test_converts_trailing_backslash_to_slash_if_one_exists() { - $this->assertEquals( 'a/', trailingslashit( 'a\\' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/StripSlashesDeep.php b/tests/phpunit/tests/formatting/StripSlashesDeep.php deleted file mode 100644 index aaebf3be557da..0000000000000 --- a/tests/phpunit/tests/formatting/StripSlashesDeep.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_StripSlashesDeep extends WP_UnitTestCase { - /** - * @ticket 18026 - */ - function test_preserves_original_datatype() { - - $this->assertEquals( true, stripslashes_deep( true ) ); - $this->assertEquals( false, stripslashes_deep( false ) ); - $this->assertEquals( 4, stripslashes_deep( 4 ) ); - $this->assertEquals( 'foo', stripslashes_deep( 'foo' ) ); - $arr = array( - 'a' => true, - 'b' => false, - 'c' => 4, - 'd' => 'foo', - ); - $arr['e'] = $arr; // Add a sub-array. - $this->assertEquals( $arr, stripslashes_deep( $arr ) ); // Keyed array. - $this->assertEquals( array_values( $arr ), stripslashes_deep( array_values( $arr ) ) ); // Non-keyed. - - $obj = new stdClass; - foreach ( $arr as $k => $v ) { - $obj->$k = $v; - } - $this->assertEquals( $obj, stripslashes_deep( $obj ) ); - } - - function test_strips_slashes() { - $old = "I can\'t see, isn\'t that it?"; - $new = "I can't see, isn't that it?"; - $this->assertEquals( $new, stripslashes_deep( $old ) ); - $this->assertEquals( $new, stripslashes_deep( "I can\\'t see, isn\\'t that it?" ) ); - $this->assertEquals( array( 'a' => $new ), stripslashes_deep( array( 'a' => $old ) ) ); // Keyed array. - $this->assertEquals( array( $new ), stripslashes_deep( array( $old ) ) ); // Non-keyed. - - $obj_old = new stdClass; - $obj_old->a = $old; - $obj_new = new stdClass; - $obj_new->a = $new; - $this->assertEquals( $obj_new, stripslashes_deep( $obj_old ) ); - } - - function test_permits_escaped_slash() { - $txt = "I can't see, isn\'t that it?"; - $this->assertEquals( $txt, stripslashes_deep( "I can\'t see, isn\\\'t that it?" ) ); - $this->assertEquals( $txt, stripslashes_deep( "I can\'t see, isn\\\\\'t that it?" ) ); - } -} diff --git a/tests/phpunit/tests/formatting/WpHtmlEditPre.php b/tests/phpunit/tests/formatting/WpHtmlEditPre.php deleted file mode 100644 index dc39ddf0501f8..0000000000000 --- a/tests/phpunit/tests/formatting/WpHtmlEditPre.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @group formatting - * @expectedDeprecated wp_htmledit_pre - */ -class Tests_Formatting_WpHtmlEditPre extends WP_UnitTestCase { - - function _charset_iso_8859_1() { - return 'iso-8859-1'; - } - - /* - * Only fails in PHP 5.4 onwards - * @ticket 23688 - */ - function test_wp_htmledit_pre_charset_iso_8859_1() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; - $this->assertEquals( $iso8859_1, wp_htmledit_pre( $iso8859_1 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - } - - function _charset_utf_8() { - return 'UTF-8'; - } - - /* - * @ticket 23688 - */ - function test_wp_htmledit_pre_charset_utf_8() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; - $this->assertEquals( $utf8, wp_htmledit_pre( $utf8 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/WpRichEditPre.php b/tests/phpunit/tests/formatting/WpRichEditPre.php deleted file mode 100644 index d5c2a072cb4a1..0000000000000 --- a/tests/phpunit/tests/formatting/WpRichEditPre.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @group formatting - * @expectedDeprecated wp_richedit_pre - */ -class Tests_Formatting_WpRichEditPre extends WP_UnitTestCase { - - function _charset_iso_8859_1() { - return 'iso-8859-1'; - } - - /* - * Only fails in PHP 5.4 onwards - * @ticket 23688 - */ - function test_wp_richedit_pre_charset_iso_8859_1() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; - $this->assertEquals( '<p>' . $iso8859_1 . "</p>\n", wp_richedit_pre( $iso8859_1 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_iso_8859_1' ) ); - } - - function _charset_utf_8() { - return 'UTF-8'; - } - - /* - * @ticket 23688 - */ - function test_wp_richedit_pre_charset_utf_8() { - add_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; - $this->assertEquals( '<p>' . $utf8 . "</p>\n", wp_richedit_pre( $utf8 ) ); - remove_filter( 'pre_option_blog_charset', array( $this, '_charset_utf_8' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/Zeroise.php b/tests/phpunit/tests/formatting/Zeroise.php deleted file mode 100644 index 212d006918889..0000000000000 --- a/tests/phpunit/tests/formatting/Zeroise.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Tests_Formatting_Zeroise extends WP_UnitTestCase { - function test_pads_with_leading_zeroes() { - $this->assertEquals( '00005', zeroise( 5, 5 ) ); - } - - function test_does_nothing_if_input_is_already_longer() { - $this->assertEquals( '5000000', zeroise( 5000000, 2 ) ); - } -} diff --git a/tests/phpunit/tests/formatting/balanceTags.php b/tests/phpunit/tests/formatting/balanceTags.php index b5dedb11f4c21..4726cf24db234 100644 --- a/tests/phpunit/tests/formatting/balanceTags.php +++ b/tests/phpunit/tests/formatting/balanceTags.php @@ -5,7 +5,7 @@ */ class Tests_Formatting_BalanceTags extends WP_UnitTestCase { - function nestable_tags() { + public function nestable_tags() { return array( array( 'blockquote' ), array( 'div' ), @@ -16,7 +16,7 @@ function nestable_tags() { } // This is a complete(?) listing of valid single/self-closing tags. - function single_tags() { + public function single_tags() { return array( array( 'area' ), array( 'base' ), @@ -37,7 +37,7 @@ function single_tags() { ); } - function supported_traditional_tag_names() { + public function supported_traditional_tag_names() { return array( array( 'a' ), array( 'div' ), @@ -49,7 +49,7 @@ function supported_traditional_tag_names() { ); } - function supported_custom_element_tag_names() { + public function supported_custom_element_tag_names() { return array( array( 'custom-element' ), array( 'my-custom-element' ), @@ -61,7 +61,7 @@ function supported_custom_element_tag_names() { ); } - function invalid_tag_names() { + public function invalid_tag_names() { return array( array( '<0-day>inside', '<0-day>inside' ), // Can't start with a number - handled by the "<3" fix. array( '<UPPERCASE-TAG>inside', '<UPPERCASE-TAG>inside' ), // Custom elements cannot be uppercase. @@ -73,7 +73,7 @@ function invalid_tag_names() { * * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name */ - function unsupported_valid_tag_names() { + public function unsupported_valid_tag_names() { return array( // We don't allow ending in a dash. array( '<what->inside' ), @@ -133,7 +133,7 @@ function unsupported_valid_tag_names() { * * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name */ - function supported_invalid_tag_names() { + public function supported_invalid_tag_names() { return array( // Reserved names for custom elements. array( 'annotation-xml' ), @@ -151,42 +151,42 @@ function supported_invalid_tag_names() { * @ticket 47014 * @dataProvider supported_traditional_tag_names */ - function test_detects_traditional_tag_names( $tag ) { + public function test_detects_traditional_tag_names( $tag ) { $normalized = strtolower( $tag ); - $this->assertEquals( "<$normalized>inside</$normalized>", balanceTags( "<$tag>inside", true ) ); + $this->assertSame( "<$normalized>inside</$normalized>", balanceTags( "<$tag>inside", true ) ); } /** * @ticket 47014 * @dataProvider supported_custom_element_tag_names */ - function test_detects_supported_custom_element_tag_names( $tag ) { - $this->assertEquals( "<$tag>inside</$tag>", balanceTags( "<$tag>inside", true ) ); + public function test_detects_supported_custom_element_tag_names( $tag ) { + $this->assertSame( "<$tag>inside</$tag>", balanceTags( "<$tag>inside", true ) ); } /** * @ticket 47014 * @dataProvider invalid_tag_names */ - function test_ignores_invalid_tag_names( $input, $output ) { - $this->assertEquals( $output, balanceTags( $input, true ) ); + public function test_ignores_invalid_tag_names( $input, $output ) { + $this->assertSame( $output, balanceTags( $input, true ) ); } /** * @ticket 47014 * @dataProvider unsupported_valid_tag_names */ - function test_ignores_unsupported_custom_tag_names( $tag ) { - $this->assertEquals( "<$tag>inside", balanceTags( "<$tag>inside", true ) ); + public function test_ignores_unsupported_custom_tag_names( $tag ) { + $this->assertSame( "<$tag>inside", balanceTags( "<$tag>inside", true ) ); } /** * @ticket 47014 * @dataProvider supported_invalid_tag_names */ - function test_detects_supported_invalid_tag_names( $tag ) { - $this->assertEquals( "<$tag>inside</$tag>", balanceTags( "<$tag>inside", true ) ); + public function test_detects_supported_invalid_tag_names( $tag ) { + $this->assertSame( "<$tag>inside</$tag>", balanceTags( "<$tag>inside", true ) ); } /** @@ -195,8 +195,8 @@ function test_detects_supported_invalid_tag_names( $tag ) { * @ticket 1597 * @dataProvider single_tags */ - function test_selfcloses_unclosed_known_single_tags( $tag ) { - $this->assertEquals( "<$tag />", balanceTags( "<$tag>", true ) ); + public function test_selfcloses_unclosed_known_single_tags( $tag ) { + $this->assertSame( "<$tag />", balanceTags( "<$tag>", true ) ); } /** @@ -206,14 +206,14 @@ function test_selfcloses_unclosed_known_single_tags( $tag ) { * @ticket 1597 * @dataProvider single_tags */ - function test_selfcloses_known_single_tags_having_closing_tag( $tag ) { - $this->assertEquals( "<$tag />", balanceTags( "<$tag></$tag>", true ) ); + public function test_selfcloses_known_single_tags_having_closing_tag( $tag ) { + $this->assertSame( "<$tag />", balanceTags( "<$tag></$tag>", true ) ); } /** * @ticket 1597 */ - function test_closes_unknown_single_tags_with_closing_tag() { + public function test_closes_unknown_single_tags_with_closing_tag() { $inputs = array( '<strong/>', @@ -232,11 +232,11 @@ function test_closes_unknown_single_tags_with_closing_tag() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_closes_unclosed_single_tags_having_attributes() { + public function test_closes_unclosed_single_tags_having_attributes() { $inputs = array( '<img src="/images/example.png">', '<input type="text" name="example">', @@ -247,11 +247,11 @@ function test_closes_unclosed_single_tags_having_attributes() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_allows_validly_closed_single_tags() { + public function test_allows_validly_closed_single_tags() { $inputs = array( '<br />', '<hr />', @@ -260,14 +260,14 @@ function test_allows_validly_closed_single_tags() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $inputs[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $inputs[ $key ], balanceTags( $inputs[ $key ], true ) ); } } /** * @dataProvider nestable_tags */ - function test_balances_nestable_tags( $tag ) { + public function test_balances_nestable_tags( $tag ) { $inputs = array( "<$tag>Test<$tag>Test</$tag>", "<$tag><$tag>Test", @@ -280,11 +280,11 @@ function test_balances_nestable_tags( $tag ) { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_allows_adjacent_nestable_tags() { + public function test_allows_adjacent_nestable_tags() { $inputs = array( '<blockquote><blockquote>Example quote</blockquote></blockquote>', '<div class="container"><div>This is allowed></div></div>', @@ -294,19 +294,19 @@ function test_allows_adjacent_nestable_tags() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $inputs[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $inputs[ $key ], balanceTags( $inputs[ $key ], true ) ); } } /** * @ticket 20401 */ - function test_allows_immediately_nested_object_tags() { + public function test_allows_immediately_nested_object_tags() { $object = '<object id="obj1"><param name="param1"/><object id="obj2"><param name="param2"/></object></object>'; - $this->assertEquals( $object, balanceTags( $object, true ) ); + $this->assertSame( $object, balanceTags( $object, true ) ); } - function test_balances_nested_non_nestable_tags() { + public function test_balances_nested_non_nestable_tags() { $inputs = array( '<b><b>This is bold</b></b>', '<b>Some text here <b>This is bold</b></b>', @@ -317,11 +317,11 @@ function test_balances_nested_non_nestable_tags() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_fixes_improper_closing_tag_sequence() { + public function test_fixes_improper_closing_tag_sequence() { $inputs = array( '<p>Here is a <strong class="part">bold <em>and emphasis</p></em></strong>', '<ul><li>Aaa</li><li>Bbb</ul></li>', @@ -332,32 +332,32 @@ function test_fixes_improper_closing_tag_sequence() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_adds_missing_closing_tags() { + public function test_adds_missing_closing_tags() { $inputs = array( '<b><i>Test</b>', '<p>Test', '<p>Test test</em> test</p>', '</p>Test', - '<p>Here is a <strong class="part">Test</p>', + '<p>We are <strong class="wp">#WordPressStrong</p>', ); $expected = array( '<b><i>Test</i></b>', '<p>Test</p>', '<p>Test test test</p>', 'Test', - '<p>Here is a <strong class="part">Test</strong></p>', + '<p>We are <strong class="wp">#WordPressStrong</strong></p>', ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } - function test_removes_extraneous_closing_tags() { + public function test_removes_extraneous_closing_tags() { $inputs = array( '<b>Test</b></b>', '<div>Test</div></div><div>Test', @@ -372,7 +372,7 @@ function test_removes_extraneous_closing_tags() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); + $this->assertSame( $expected[ $key ], balanceTags( $inputs[ $key ], true ) ); } } @@ -438,6 +438,6 @@ public function data_custom_elements() { * @param string $expected Expected. */ public function test_custom_elements( $source, $expected ) { - $this->assertEquals( $expected, balanceTags( $source, true ) ); + $this->assertSame( $expected, balanceTags( $source, true ) ); } } diff --git a/tests/phpunit/tests/formatting/capitalPDangit.php b/tests/phpunit/tests/formatting/capitalPDangit.php new file mode 100644 index 0000000000000..3e78e1a3649d0 --- /dev/null +++ b/tests/phpunit/tests/formatting/capitalPDangit.php @@ -0,0 +1,20 @@ +<?php +// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled -- šŸ™ƒ + +/** + * @group formatting + */ +class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase { + public function test_esc_attr_quotes() { + global $wp_current_filter; + $this->assertSame( 'Something about WordPress', capital_P_dangit( 'Something about Wordpress' ) ); + $this->assertSame( 'Something about (WordPress', capital_P_dangit( 'Something about (Wordpress' ) ); + $this->assertSame( 'Something about ‘WordPress', capital_P_dangit( 'Something about ‘Wordpress' ) ); + $this->assertSame( 'Something about “WordPress', capital_P_dangit( 'Something about “Wordpress' ) ); + $this->assertSame( 'Something about >WordPress', capital_P_dangit( 'Something about >Wordpress' ) ); + $this->assertSame( 'Wordpress', capital_P_dangit( 'Wordpress' ) ); + + $wp_current_filter = array( 'the_title' ); + $this->assertSame( 'WordPress', capital_P_dangit( 'Wordpress' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/CleanPre.php b/tests/phpunit/tests/formatting/cleanPre.php similarity index 64% rename from tests/phpunit/tests/formatting/CleanPre.php rename to tests/phpunit/tests/formatting/cleanPre.php index c49ad469e9e67..8444ae7bd5e71 100644 --- a/tests/phpunit/tests/formatting/CleanPre.php +++ b/tests/phpunit/tests/formatting/cleanPre.php @@ -9,32 +9,32 @@ */ class Tests_Formatting_CleanPre extends WP_UnitTestCase { - function test_removes_self_closing_br_with_space() { + public function test_removes_self_closing_br_with_space() { $source = 'a b c\n<br />sldfj<br />'; $res = 'a b c\nsldfj'; - $this->assertEquals( $res, clean_pre( $source ) ); + $this->assertSame( $res, clean_pre( $source ) ); } - function test_removes_self_closing_br_without_space() { + public function test_removes_self_closing_br_without_space() { $source = 'a b c\n<br/>sldfj<br/>'; $res = 'a b c\nsldfj'; - $this->assertEquals( $res, clean_pre( $source ) ); + $this->assertSame( $res, clean_pre( $source ) ); } // I don't think this can ever happen in production; // <br> is changed to <br /> elsewhere. Left in because // that replacement shouldn't happen (what if you want // HTML 4 output?). - function test_removes_html_br() { + public function test_removes_html_br() { $source = 'a b c\n<br>sldfj<br>'; $res = 'a b c\nsldfj'; - $this->assertEquals( $res, clean_pre( $source ) ); + $this->assertSame( $res, clean_pre( $source ) ); } - function test_removes_p() { + public function test_removes_p() { $source = "<p>isn't this exciting!</p><p>oh indeed!</p>"; $res = "\nisn't this exciting!\noh indeed!"; - $this->assertEquals( $res, clean_pre( $source ) ); + $this->assertSame( $res, clean_pre( $source ) ); } } diff --git a/tests/phpunit/tests/formatting/ConvertInvalidEntries.php b/tests/phpunit/tests/formatting/convertInvalidEntries.php similarity index 58% rename from tests/phpunit/tests/formatting/ConvertInvalidEntries.php rename to tests/phpunit/tests/formatting/convertInvalidEntries.php index 23192b8974711..9b243ee4213ac 100644 --- a/tests/phpunit/tests/formatting/ConvertInvalidEntries.php +++ b/tests/phpunit/tests/formatting/convertInvalidEntries.php @@ -4,22 +4,22 @@ * @group formatting */ class Tests_Formatting_ConvertInvalidEntities extends WP_UnitTestCase { - function test_replaces_windows1252_entities_with_unicode_ones() { + public function test_replaces_windows1252_entities_with_unicode_ones() { $input = '‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ'; $output = '‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ'; - $this->assertEquals( $output, convert_invalid_entities( $input ) ); + $this->assertSame( $output, convert_invalid_entities( $input ) ); } /** * @ticket 20503 */ - function test_replaces_latin_letter_z_with_caron() { + public function test_replaces_latin_letter_z_with_caron() { $input = 'Žž'; $output = 'Žž'; - $this->assertEquals( $output, convert_invalid_entities( $input ) ); + $this->assertSame( $output, convert_invalid_entities( $input ) ); } - function test_escapes_lone_ampersands() { - $this->assertEquals( 'at&t', convert_chars( 'at&t' ) ); + public function test_escapes_lone_ampersands() { + $this->assertSame( 'at&t', convert_chars( 'at&t' ) ); } } diff --git a/tests/phpunit/tests/formatting/Smilies.php b/tests/phpunit/tests/formatting/convertSmilies.php similarity index 91% rename from tests/phpunit/tests/formatting/Smilies.php rename to tests/phpunit/tests/formatting/convertSmilies.php index 29d6b7dfa9234..760625e40a066 100644 --- a/tests/phpunit/tests/formatting/Smilies.php +++ b/tests/phpunit/tests/formatting/convertSmilies.php @@ -4,7 +4,7 @@ * @group formatting * @group emoji */ -class Tests_Formatting_Smilies extends WP_UnitTestCase { +class Tests_Formatting_ConvertSmilies extends WP_UnitTestCase { /** * Basic Test Content DataProvider @@ -48,18 +48,18 @@ public function get_smilies_input_output() { * Basic Validation Test to confirm that smilies are converted to image * when use_smilies = 1 and not when use_smilies = 0 */ - function test_convert_standard_smilies( $in_txt, $converted_txt ) { + public function test_convert_standard_smilies( $in_txt, $converted_txt ) { // Standard smilies, use_smilies: ON. update_option( 'use_smilies', 1 ); smilies_init(); - $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $converted_txt, convert_smilies( $in_txt ) ); // Standard smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); - $this->assertEquals( $in_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $in_txt, convert_smilies( $in_txt ) ); } /** @@ -91,7 +91,7 @@ public function get_custom_smilies_input_output() { * * Validate Custom Smilies are converted to images when use_smilies = 1 */ - function test_convert_custom_smilies( $in_txt, $converted_txt ) { + public function test_convert_custom_smilies( $in_txt, $converted_txt ) { global $wpsmiliestrans; // Custom smilies, use_smilies: ON. @@ -112,12 +112,12 @@ function test_convert_custom_smilies( $in_txt, $converted_txt ) { smilies_init(); - $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $converted_txt, convert_smilies( $in_txt ) ); // Standard smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); - $this->assertEquals( $in_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $in_txt, convert_smilies( $in_txt ) ); $wpsmiliestrans = $trans_orig; // Reset original translations array. } @@ -153,7 +153,7 @@ public function test_ignore_smilies_in_tags( $element ) { update_option( 'use_smilies', 1 ); smilies_init(); - $this->assertEquals( $exp_str, convert_smilies( $in_str ) ); + $this->assertSame( $exp_str, convert_smilies( $in_str ) ); // Standard smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); @@ -205,12 +205,12 @@ public function test_smilies_combinations( $in_txt, $converted_txt ) { update_option( 'use_smilies', 1 ); smilies_init(); - $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $converted_txt, convert_smilies( $in_txt ) ); // Custom smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); - $this->assertEquals( $in_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $in_txt, convert_smilies( $in_txt ) ); } /** @@ -260,12 +260,12 @@ public function test_single_smilies_in_wpsmiliestrans( $in_txt, $converted_txt ) smilies_init(); - $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $converted_txt, convert_smilies( $in_txt ) ); // Standard smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); - $this->assertEquals( $in_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $in_txt, convert_smilies( $in_txt ) ); $wpsmiliestrans = $orig_trans; // Reset original translations array. } @@ -299,13 +299,13 @@ public function get_spaces_around_smilies() { * @ticket 22692 * @dataProvider get_spaces_around_smilies */ - function test_spaces_around_smilies( $in_txt, $converted_txt ) { + public function test_spaces_around_smilies( $in_txt, $converted_txt ) { // Standard smilies, use_smilies: ON. update_option( 'use_smilies', 1 ); smilies_init(); - $this->assertEquals( $converted_txt, convert_smilies( $in_txt ) ); + $this->assertSame( $converted_txt, convert_smilies( $in_txt ) ); // Standard smilies, use_smilies: OFF. update_option( 'use_smilies', 0 ); @@ -323,7 +323,7 @@ public function test_smilies_filter_removes_smilies() { $txt = ':oops: I did it again'; - $this->assertEquals( $txt, convert_smilies( $txt ) ); + $this->assertSame( $txt, convert_smilies( $txt ) ); } /** @@ -339,7 +339,7 @@ public function test_smilies_filter_adds_smilies() { $txt = 'You played with my <3'; $expected_txt = 'You played with my \xe2\x9d\xa4'; - $this->assertEquals( $expected_txt, convert_smilies( $txt ) ); + $this->assertSame( $expected_txt, convert_smilies( $txt ) ); } diff --git a/tests/phpunit/tests/formatting/date.php b/tests/phpunit/tests/formatting/date.php index fce5494f87725..9f0f975d4c09e 100644 --- a/tests/phpunit/tests/formatting/date.php +++ b/tests/phpunit/tests/formatting/date.php @@ -11,11 +11,11 @@ class Tests_Formatting_Date extends WP_UnitTestCase { * * @ticket 20328 */ - function test_get_date_from_gmt_outside_of_dst() { + public function test_get_date_from_gmt_outside_of_dst() { update_option( 'timezone_string', 'Europe/London' ); $local = '2012-01-01 12:34:56'; $gmt = $local; - $this->assertEquals( $local, get_date_from_gmt( $gmt ) ); + $this->assertSame( $local, get_date_from_gmt( $gmt ) ); } /** @@ -23,78 +23,78 @@ function test_get_date_from_gmt_outside_of_dst() { * * @ticket 20328 */ - function test_get_date_from_gmt_during_dst() { + public function test_get_date_from_gmt_during_dst() { update_option( 'timezone_string', 'Europe/London' ); $gmt = '2012-06-01 12:34:56'; $local = '2012-06-01 13:34:56'; - $this->assertEquals( $local, get_date_from_gmt( $gmt ) ); + $this->assertSame( $local, get_date_from_gmt( $gmt ) ); } /** * @ticket 20328 */ - function test_get_gmt_from_date_outside_of_dst() { + public function test_get_gmt_from_date_outside_of_dst() { update_option( 'timezone_string', 'Europe/London' ); $local = '2012-01-01 12:34:56'; $gmt = $local; - $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); + $this->assertSame( $gmt, get_gmt_from_date( $local ) ); } /** * @ticket 20328 */ - function test_get_gmt_from_date_during_dst() { + public function test_get_gmt_from_date_during_dst() { update_option( 'timezone_string', 'Europe/London' ); $local = '2012-06-01 12:34:56'; $gmt = '2012-06-01 11:34:56'; - $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); + $this->assertSame( $gmt, get_gmt_from_date( $local ) ); } /** * @ticket 34279 */ - function test_get_date_and_time_from_gmt_no_timezone() { + public function test_get_date_and_time_from_gmt_no_timezone() { $local = '2012-01-01 12:34:56'; $gmt = $local; - $this->assertEquals( $gmt, get_date_from_gmt( $local ) ); + $this->assertSame( $gmt, get_date_from_gmt( $local ) ); } /** * @ticket 34279 */ - function test_get_gmt_from_date_no_timezone() { + public function test_get_gmt_from_date_no_timezone() { $gmt = '2012-12-01 00:00:00'; $date = '2012-12-01'; - $this->assertEquals( $gmt, get_gmt_from_date( $date ) ); + $this->assertSame( $gmt, get_gmt_from_date( $date ) ); } /** * @ticket 34279 */ - function test_get_gmt_from_date_short_date() { + public function test_get_gmt_from_date_short_date() { update_option( 'timezone_string', 'Europe/London' ); $local = '2012-12-01'; $gmt = '2012-12-01 00:00:00'; - $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); + $this->assertSame( $gmt, get_gmt_from_date( $local ) ); } /** * @ticket 34279 */ - function test_get_gmt_from_date_string_date() { + public function test_get_gmt_from_date_string_date() { update_option( 'timezone_string', 'Europe/London' ); $local = 'now'; $gmt = gmdate( 'Y-m-d H:i:s' ); - $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); + $this->assertEqualsWithDelta( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 2, 'The dates should be equal' ); } /** * @ticket 34279 */ - function test_get_gmt_from_date_string_date_no_timezone() { + public function test_get_gmt_from_date_string_date_no_timezone() { $local = 'now'; $gmt = gmdate( 'Y-m-d H:i:s' ); - $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); + $this->assertEqualsWithDelta( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 2, 'The dates should be equal' ); } /** @@ -110,7 +110,7 @@ public function test_gmt_from_date_correct_time( $timezone_string, $gmt_offset ) $utc = $local->setTimezone( new DateTimeZone( 'UTC' ) ); $mysql_local = $local->format( 'Y-m-d H:i:s' ); - $this->assertEquals( $utc->format( DATE_RFC3339 ), get_gmt_from_date( $mysql_local, DATE_RFC3339 ) ); + $this->assertSame( $utc->format( DATE_RFC3339 ), get_gmt_from_date( $mysql_local, DATE_RFC3339 ) ); } /** @@ -126,7 +126,7 @@ public function test_date_from_gmt_correct_time( $timezone_string, $gmt_offset ) $utc = $local->setTimezone( new DateTimeZone( 'UTC' ) ); $mysql_utc = $utc->format( 'Y-m-d H:i:s' ); - $this->assertEquals( $local->format( DATE_RFC3339 ), get_date_from_gmt( $mysql_utc, DATE_RFC3339 ) ); + $this->assertSame( $local->format( DATE_RFC3339 ), get_date_from_gmt( $mysql_utc, DATE_RFC3339 ) ); } /** @@ -144,45 +144,45 @@ public function test_is8601_to_datetime_correct_time( $timezone_string, $gmt_off $local = new DateTimeImmutable( 'now', wp_timezone() ); $utc = $local->setTimezone( new DateTimeZone( 'UTC' ) ); - $this->assertEquals( + $this->assertSame( $local->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $local->format( $format ) ), 'Local time from local time.' ); - $this->assertEquals( + $this->assertSame( $utc->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $local->format( $format ), 'gmt' ), 'UTC time from local time.' ); - $this->assertEquals( + $this->assertSame( $local->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $local->format( $format_no_tz ) ), 'Local time from local time w/o timezone.' ); - $this->assertEquals( + $this->assertSame( $utc->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $local->format( $format_no_tz ), 'gmt' ), 'UTC time from local time w/o timezone.' ); - $this->assertEquals( + $this->assertSame( $local->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $utc->format( $format ) ), 'Local time from UTC time.' ); - $this->assertEquals( + $this->assertSame( $utc->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $utc->format( $format ), 'gmt' ), 'UTC time from UTC time.' ); - $this->assertEquals( + $this->assertSame( $local->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $utc->format( $format_no_tz ) . 'Z' ), 'Local time from UTC w/ Z timezone.' ); - $this->assertEquals( + $this->assertSame( $utc->format( 'Y-m-d H:i:s' ), iso8601_to_datetime( $utc->format( $format_no_tz ) . 'Z', 'gmt' ), 'UTC time from UTC w/ Z timezone.' diff --git a/tests/phpunit/tests/formatting/Emoji.php b/tests/phpunit/tests/formatting/emoji.php similarity index 70% rename from tests/phpunit/tests/formatting/Emoji.php rename to tests/phpunit/tests/formatting/emoji.php index fb47d46c1809f..85951a072660b 100644 --- a/tests/phpunit/tests/formatting/Emoji.php +++ b/tests/phpunit/tests/formatting/emoji.php @@ -6,17 +6,19 @@ */ class Tests_Formatting_Emoji extends WP_UnitTestCase { - private $png_cdn = 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/'; - private $svn_cdn = 'https://s.w.org/images/core/emoji/12.0.0-1/svg/'; + private $png_cdn = 'https://s.w.org/images/core/emoji/13.1.0/72x72/'; + private $svn_cdn = 'https://s.w.org/images/core/emoji/13.1.0/svg/'; /** * @ticket 36525 */ public function test_unfiltered_emoji_cdns() { + // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present: + self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); $output = get_echo( '_print_emoji_detection_script' ); - $this->assertContains( wp_json_encode( $this->png_cdn ), $output ); - $this->assertContains( wp_json_encode( $this->svn_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $this->png_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $this->svn_cdn ), $output ); } public function _filtered_emoji_svn_cdn( $cdn = '' ) { @@ -31,11 +33,13 @@ public function test_filtered_emoji_svn_cdn() { add_filter( 'emoji_svg_url', array( $this, '_filtered_emoji_svn_cdn' ) ); + // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present: + self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); $output = get_echo( '_print_emoji_detection_script' ); - $this->assertContains( wp_json_encode( $this->png_cdn ), $output ); - $this->assertNotContains( wp_json_encode( $this->svn_cdn ), $output ); - $this->assertContains( wp_json_encode( $filtered_svn_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $this->png_cdn ), $output ); + $this->assertStringNotContainsString( wp_json_encode( $this->svn_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $filtered_svn_cdn ), $output ); remove_filter( 'emoji_svg_url', array( $this, '_filtered_emoji_svn_cdn' ) ); } @@ -52,11 +56,13 @@ public function test_filtered_emoji_png_cdn() { add_filter( 'emoji_url', array( $this, '_filtered_emoji_png_cdn' ) ); + // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present: + self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); $output = get_echo( '_print_emoji_detection_script' ); - $this->assertContains( wp_json_encode( $filtered_png_cdn ), $output ); - $this->assertNotContains( wp_json_encode( $this->png_cdn ), $output ); - $this->assertContains( wp_json_encode( $this->svn_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $filtered_png_cdn ), $output ); + $this->assertStringNotContainsString( wp_json_encode( $this->png_cdn ), $output ); + $this->assertStringContainsString( wp_json_encode( $this->svn_cdn ), $output ); remove_filter( 'emoji_url', array( $this, '_filtered_emoji_png_cdn' ) ); } diff --git a/tests/phpunit/tests/formatting/ent2ncr.php b/tests/phpunit/tests/formatting/ent2ncr.php index ea9b8da0730dc..f5859974efb8e 100644 --- a/tests/phpunit/tests/formatting/ent2ncr.php +++ b/tests/phpunit/tests/formatting/ent2ncr.php @@ -3,21 +3,21 @@ /** * @group formatting */ -class Tests_Formatting_Ent2NCR extends WP_UnitTestCase { +class Tests_Formatting_Ent2ncr extends WP_UnitTestCase { /** * @dataProvider entities */ - function test_converts_named_entities_to_numeric_character_references( $entity, $ncr ) { + public function test_converts_named_entities_to_numeric_character_references( $entity, $ncr ) { $entity = '&' . $entity . ';'; $ncr = '&#' . $ncr . ';'; - $this->assertEquals( $ncr, ent2ncr( $entity ), $entity ); + $this->assertSame( $ncr, ent2ncr( $entity ), $entity ); } /** * Get test data from files, one test per line. * Comments start with "###". */ - function entities() { + public function entities() { $entities = file( DIR_TESTDATA . '/formatting/entities.txt' ); $data_provided = array(); foreach ( $entities as $line ) { diff --git a/tests/phpunit/tests/formatting/escAttr.php b/tests/phpunit/tests/formatting/escAttr.php new file mode 100644 index 0000000000000..e60c5e955294d --- /dev/null +++ b/tests/phpunit/tests/formatting/escAttr.php @@ -0,0 +1,32 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_EscAttr extends WP_UnitTestCase { + public function test_esc_attr_quotes() { + $attr = '"double quotes"'; + $this->assertSame( '"double quotes"', esc_attr( $attr ) ); + + $attr = "'single quotes'"; + $this->assertSame( ''single quotes'', esc_attr( $attr ) ); + + $attr = "'mixed' " . '"quotes"'; + $this->assertSame( ''mixed' "quotes"', esc_attr( $attr ) ); + + // Handles double encoding? + $attr = '"double quotes"'; + $this->assertSame( '"double quotes"', esc_attr( esc_attr( $attr ) ) ); + + $attr = "'single quotes'"; + $this->assertSame( ''single quotes'', esc_attr( esc_attr( $attr ) ) ); + + $attr = "'mixed' " . '"quotes"'; + $this->assertSame( ''mixed' "quotes"', esc_attr( esc_attr( $attr ) ) ); + } + + public function test_esc_attr_amp() { + $out = esc_attr( 'foo & bar &baz;  ' ); + $this->assertSame( 'foo & bar &baz;  ', $out ); + } +} diff --git a/tests/phpunit/tests/formatting/EscHtml.php b/tests/phpunit/tests/formatting/escHtml.php similarity index 72% rename from tests/phpunit/tests/formatting/EscHtml.php rename to tests/phpunit/tests/formatting/escHtml.php index 0f30343eef8cd..3c6b918cfca3d 100644 --- a/tests/phpunit/tests/formatting/EscHtml.php +++ b/tests/phpunit/tests/formatting/escHtml.php @@ -4,37 +4,37 @@ * @group formatting */ class Tests_Formatting_EscHtml extends WP_UnitTestCase { - function test_esc_html_basics() { + public function test_esc_html_basics() { // Simple string. $html = 'The quick brown fox.'; - $this->assertEquals( $html, esc_html( $html ) ); + $this->assertSame( $html, esc_html( $html ) ); // URL with &. $html = 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985'; $escaped = 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985'; - $this->assertEquals( $escaped, esc_html( $html ) ); + $this->assertSame( $escaped, esc_html( $html ) ); // SQL query. $html = "SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1"; $escaped = 'SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1'; - $this->assertEquals( $escaped, esc_html( $html ) ); + $this->assertSame( $escaped, esc_html( $html ) ); } - function test_escapes_ampersands() { + public function test_escapes_ampersands() { $source = 'penn & teller & at&t'; $res = 'penn & teller & at&t'; - $this->assertEquals( $res, esc_html( $source ) ); + $this->assertSame( $res, esc_html( $source ) ); } - function test_escapes_greater_and_less_than() { + public function test_escapes_greater_and_less_than() { $source = 'this > that < that <randomhtml />'; $res = 'this > that < that <randomhtml />'; - $this->assertEquals( $res, esc_html( $source ) ); + $this->assertSame( $res, esc_html( $source ) ); } - function test_ignores_existing_entities() { + public function test_ignores_existing_entities() { $source = '& £ " &'; $res = '& £ " &'; - $this->assertEquals( $res, esc_html( $source ) ); + $this->assertSame( $res, esc_html( $source ) ); } } diff --git a/tests/phpunit/tests/formatting/escJs.php b/tests/phpunit/tests/formatting/escJs.php new file mode 100644 index 0000000000000..ddb5420174304 --- /dev/null +++ b/tests/phpunit/tests/formatting/escJs.php @@ -0,0 +1,46 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_EscJs extends WP_UnitTestCase { + public function test_js_escape_simple() { + $out = esc_js( 'foo bar baz();' ); + $this->assertSame( 'foo bar baz();', $out ); + } + + public function test_js_escape_quotes() { + $out = esc_js( 'foo "bar" \'baz\'' ); + // Does it make any sense to change " into "? Why not \"? + $this->assertSame( "foo "bar" \'baz\'", $out ); + } + + public function test_js_escape_backslash() { + $bs = '\\'; + $out = esc_js( 'foo ' . $bs . 't bar ' . $bs . $bs . ' baz' ); + // \t becomes t - bug? + $this->assertSame( 'foo t bar ' . $bs . $bs . ' baz', $out ); + } + + public function test_js_escape_amp() { + $out = esc_js( 'foo & bar &baz;  ' ); + $this->assertSame( 'foo & bar &baz;  ', $out ); + } + + public function test_js_escape_quote_entity() { + $out = esc_js( 'foo ' bar ' baz &' ); + $this->assertSame( "foo \\' bar \\' baz &", $out ); + } + + public function test_js_no_carriage_return() { + $out = esc_js( "foo\rbar\nbaz\r" ); + // \r is stripped. + $this->assertSame( "foobar\\nbaz", $out ); + } + + public function test_js_escape_rn() { + $out = esc_js( "foo\r\nbar\nbaz\r\n" ); + // \r is stripped. + $this->assertSame( "foo\\nbar\\nbaz\\n", $out ); + } +} diff --git a/tests/phpunit/tests/formatting/escTextarea.php b/tests/phpunit/tests/formatting/escTextarea.php new file mode 100644 index 0000000000000..8582216ec8409 --- /dev/null +++ b/tests/phpunit/tests/formatting/escTextarea.php @@ -0,0 +1,36 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_EscTextarea extends WP_UnitTestCase { + + public function charset_iso_8859_1() { + return 'iso-8859-1'; + } + + /* + * Only fails in PHP 5.4 onwards + * @ticket 23688 + */ + public function test_esc_textarea_charset_iso_8859_1() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; + $this->assertSame( $iso8859_1, esc_textarea( $iso8859_1 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + } + + public function charset_utf_8() { + return 'UTF-8'; + } + + /* + * @ticket 23688 + */ + public function test_esc_textarea_charset_utf_8() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; + $this->assertSame( $utf8, esc_textarea( $utf8 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/escUrl.php b/tests/phpunit/tests/formatting/escUrl.php new file mode 100644 index 0000000000000..4958c115d30f9 --- /dev/null +++ b/tests/phpunit/tests/formatting/escUrl.php @@ -0,0 +1,265 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_EscUrl extends WP_UnitTestCase { + + /** + * @ticket 23605 + */ + public function test_spaces() { + $this->assertSame( 'http://example.com/Mr%20WordPress', esc_url( 'http://example.com/Mr WordPress' ) ); + $this->assertSame( 'http://example.com/Mr%20WordPress', esc_url( 'http://example.com/Mr%20WordPress' ) ); + $this->assertSame( 'http://example.com/Mr%20%20WordPress', esc_url( 'http://example.com/Mr%20%20WordPress' ) ); + $this->assertSame( 'http://example.com/Mr+WordPress', esc_url( 'http://example.com/Mr+WordPress' ) ); + $this->assertSame( 'http://example.com/Mr+WordPress', esc_url( ' http://example.com/Mr+WordPress' ) ); + + $this->assertSame( 'http://example.com/?foo=one%20two%20three&bar=four', esc_url( 'http://example.com/?foo=one two three&bar=four' ) ); + $this->assertSame( 'http://example.com/?foo=one%20two%20three&bar=four', esc_url( 'http://example.com/?foo=one%20two%20three&bar=four' ) ); + } + + public function test_bad_characters() { + $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) ); + $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0ago' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0Dgo' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0dgo' ) ); + // Nesting checks. + $this->assertSame( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', esc_url( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) ); + $this->assertSame( 'http://example.com/', esc_url( 'http://example.com/%0%0%0DAD' ) ); + $this->assertSame( 'http://example.com/', esc_url( 'http://example.com/%0%0%0ADA' ) ); + $this->assertSame( 'http://example.com/', esc_url( 'http://example.com/%0%0%0DAd' ) ); + $this->assertSame( 'http://example.com/', esc_url( 'http://example.com/%0%0%0ADa' ) ); + } + + public function test_relative() { + $this->assertSame( '/example.php', esc_url( '/example.php' ) ); + $this->assertSame( 'example.php', esc_url( 'example.php' ) ); + $this->assertSame( '#fragment', esc_url( '#fragment' ) ); + $this->assertSame( '?foo=bar', esc_url( '?foo=bar' ) ); + } + + public function test_all_url_parts() { + $url = 'https://user:pass@host.example.com:1234/path;p=1?query=2&r[]=3#fragment'; + + $this->assertSame( + array( + 'scheme' => 'https', + 'host' => 'host.example.com', + 'port' => 1234, + 'user' => 'user', + 'pass' => 'pass', + 'path' => '/path;p=1', + 'query' => 'query=2&r[]=3', + 'fragment' => 'fragment', + ), + parse_url( $url ) + ); + $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) ); + $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url( $url ) ); + } + + public function test_bare() { + $this->assertSame( 'http://example.com?foo', esc_url( 'example.com?foo' ) ); + $this->assertSame( 'http://example.com', esc_url( 'example.com' ) ); + $this->assertSame( 'http://localhost', esc_url( 'localhost' ) ); + $this->assertSame( 'http://example.com/foo', esc_url( 'example.com/foo' ) ); + $this->assertSame( 'http://баба.org/баба', esc_url( 'баба.org/баба' ) ); + } + + public function test_encoding() { + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); + + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); + $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); + + $param = urlencode( 'http://example.com/?one=1&two=2' ); + $this->assertSame( "http://example.com?url={$param}", esc_url( "http://example.com?url={$param}" ) ); + } + + public function test_protocol() { + $this->assertSame( 'http://example.com', esc_url( 'http://example.com' ) ); + $this->assertSame( '', esc_url( 'nasty://example.com/' ) ); + $this->assertSame( + '', + esc_url( + 'example.com', + array( + 'https', + ) + ) + ); + $this->assertSame( + '', + esc_url( + 'http://example.com', + array( + 'https', + ) + ) + ); + $this->assertSame( + 'https://example.com', + esc_url( + 'https://example.com', + array( + 'http', + 'https', + ) + ) + ); + + foreach ( wp_allowed_protocols() as $scheme ) { + $this->assertSame( "{$scheme}://example.com", esc_url( "{$scheme}://example.com" ), $scheme ); + $this->assertSame( + "{$scheme}://example.com", + esc_url( + "{$scheme}://example.com", + array( + $scheme, + ) + ), + $scheme + ); + } + + $this->assertNotContains( 'data', wp_allowed_protocols() ); + $this->assertSame( '', esc_url( 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D' ) ); + + $this->assertNotContains( 'foo', wp_allowed_protocols() ); + $this->assertSame( + 'foo://example.com', + esc_url( + 'foo://example.com', + array( + 'foo', + ) + ) + ); + + } + + /** + * @ticket 23187 + */ + public function test_protocol_case() { + $this->assertSame( 'http://example.com', esc_url( 'HTTP://example.com' ) ); + $this->assertSame( 'http://example.com', esc_url( 'Http://example.com' ) ); + } + + public function test_display_extras() { + $this->assertSame( 'http://example.com/'quoted'', esc_url( 'http://example.com/\'quoted\'' ) ); + $this->assertSame( 'http://example.com/\'quoted\'', esc_url( 'http://example.com/\'quoted\'', null, 'notdisplay' ) ); + } + + public function test_non_ascii() { + $this->assertSame( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) ); + $this->assertSame( 'http://баба.org/баба', esc_url( 'http://баба.org/баба' ) ); + $this->assertSame( 'http://müller.com/', esc_url( 'http://müller.com/' ) ); + } + + public function test_feed() { + $this->assertSame( '', esc_url( 'feed:javascript:alert(1)' ) ); + $this->assertSame( '', esc_url( 'feed:javascript:feed:alert(1)' ) ); + $this->assertSame( '', esc_url( 'feed:feed:javascript:alert(1)' ) ); + $this->assertSame( 'feed:feed:alert(1)', esc_url( 'feed:feed:alert(1)' ) ); + $this->assertSame( 'feed:http://wordpress.org/feed/', esc_url( 'feed:http://wordpress.org/feed/' ) ); + } + + /** + * @ticket 16859 + */ + public function test_square_brackets() { + $this->assertSame( '/example.php?one%5B%5D=two', esc_url( '/example.php?one[]=two' ) ); + $this->assertSame( '?foo%5Bbar%5D=baz', esc_url( '?foo[bar]=baz' ) ); + $this->assertSame( '//example.com/?foo%5Bbar%5D=baz', esc_url( '//example.com/?foo[bar]=baz' ) ); + $this->assertSame( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'example.com/?foo[bar]=baz' ) ); + $this->assertSame( 'http://localhost?foo%5Bbar%5D=baz', esc_url( 'localhost?foo[bar]=baz' ) ); + $this->assertSame( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo[bar]=baz' ) ); + $this->assertSame( 'http://example.com/?foo%5Bbar%5D=baz', esc_url( 'http://example.com/?foo%5Bbar%5D=baz' ) ); + $this->assertSame( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo[bar]=baz' ) ); + $this->assertSame( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz', esc_url( 'http://example.com/?baz=bar&foo%5Bbar%5D=baz' ) ); + } + + /** + * Courtesy of http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding + */ + public function test_reserved_characters() { + $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;="; + $this->assertSame( $url, esc_url_raw( $url ) ); + } + + /** + * @ticket 21974 + */ + public function test_protocol_relative_with_colon() { + $this->assertSame( '//example.com/foo?foo=abc:def', esc_url( '//example.com/foo?foo=abc:def' ) ); + } + + /** + * @ticket 31632 + */ + public function test_mailto_with_newline() { + $body = <<<EOT +Hi there, + +I thought you might want to sign up for this newsletter +EOT; + $body = str_replace( "\r\n", "\n", $body ); + $email_link = 'mailto:?body=' . rawurlencode( $body ); + $email_link = esc_url( $email_link ); + $this->assertSame( 'mailto:?body=Hi%20there%2C%0A%0AI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); + } + + /** + * @ticket 31632 + */ + public function test_mailto_in_http_url_with_newline() { + $body = <<<EOT +Hi there, + +I thought you might want to sign up for this newsletter +EOT; + $body = str_replace( "\r\n", "\n", $body ); + $email_link = 'http://example.com/mailto:?body=' . rawurlencode( $body ); + $email_link = esc_url( $email_link ); + $this->assertSame( 'http://example.com/mailto:?body=Hi%20there%2CI%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); + } + + /** + * @ticket 23605 + */ + public function test_mailto_with_spaces() { + $body = 'Hi there, I thought you might want to sign up for this newsletter'; + + $email_link = 'mailto:?body=' . $body; + $email_link = esc_url( $email_link ); + $this->assertSame( 'mailto:?body=Hi%20there,%20I%20thought%20you%20might%20want%20to%20sign%20up%20for%20this%20newsletter', $email_link ); + } + + /** + * @ticket 28015 + */ + public function test_invalid_charaters() { + $this->assertEmpty( esc_url_raw( '"^<>{}`' ) ); + } + + /** + * @ticket 34202 + */ + public function test_ipv6_hosts() { + $this->assertSame( '//[::127.0.0.1]', esc_url( '//[::127.0.0.1]' ) ); + $this->assertSame( 'http://[::FFFF::127.0.0.1]', esc_url( 'http://[::FFFF::127.0.0.1]' ) ); + $this->assertSame( 'http://[::127.0.0.1]', esc_url( 'http://[::127.0.0.1]' ) ); + $this->assertSame( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]', esc_url( 'http://[::DEAD:BEEF:DEAD:BEEF:DEAD:BEEF:DEAD:BEEF]' ) ); + + // IPv6 with square brackets in the query? Why not. + $this->assertSame( '//[::FFFF::127.0.0.1]/?foo%5Bbar%5D=baz', esc_url( '//[::FFFF::127.0.0.1]/?foo[bar]=baz' ) ); + $this->assertSame( 'http://[::FFFF::127.0.0.1]/?foo%5Bbar%5D=baz', esc_url( 'http://[::FFFF::127.0.0.1]/?foo[bar]=baz' ) ); + } + +} diff --git a/tests/phpunit/tests/formatting/escXml.php b/tests/phpunit/tests/formatting/escXml.php new file mode 100644 index 0000000000000..fa6738dca0983 --- /dev/null +++ b/tests/phpunit/tests/formatting/escXml.php @@ -0,0 +1,135 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_EscXml extends WP_UnitTestCase { + /** + * Test basic escaping + * + * @dataProvider _test_esc_xml_basics_dataprovider + * + * @param string $source The source string to be escaped. + * @param string $expected The expected escaped value of `$source`. + */ + public function test_esc_xml_basics( $source, $expected ) { + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + /** + * Data provider for `test_esc_xml_basics()`. + * + * @return array { + * @type string $source The source string to be escaped. + * @type string $expected The expected escaped value of `$source`. + * } + */ + public function _test_esc_xml_basics_dataprovider() { + return array( + // Simple string. + array( + 'The quick brown fox.', + 'The quick brown fox.', + ), + // URL with &. + array( + 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985', + 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985', + ), + // SQL query w/ single quotes. + array( + "SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1", + 'SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1', + ), + ); + } + + public function test_escapes_ampersands() { + $source = 'penn & teller & at&t'; + $expected = 'penn & teller & at&t'; + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + public function test_escapes_greater_and_less_than() { + $source = 'this > that < that <randomhtml />'; + $expected = 'this > that < that <randomhtml />'; + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + public function test_escapes_html_named_entities() { + $source = 'this & is a … followed by › and more and a &nonexistent; entity'; + $expected = 'this & is a … followed by › and more and a &nonexistent; entity'; + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + public function test_ignores_existing_entities() { + $source = '& £ " &'; + // note that _wp_specialchars() strips leading 0's from numeric character references. + $expected = '& £ " &'; + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + /** + * Test that CDATA Sections are not escaped. + * + * @dataProvider _test_ignores_cdata_sections_dataprovider + * + * @param string $source The source string to be escaped. + * @param string $expected The expected escaped value of `$source`. + */ + public function test_ignores_cdata_sections( $source, $expected ) { + $actual = esc_xml( $source ); + $this->assertSame( $expected, $actual ); + } + + /** + * Data provider for `test_ignores_cdata_sections()`. + * + * @return array { + * @type string $source The source string to be escaped. + * @type string $expected The expected escaped value of `$source`. + * } + */ + public function _test_ignores_cdata_sections_dataprovider() { + return array( + // basic CDATA Section containing chars that would otherwise be escaped if not in a CDATA Section + // not to mention the CDATA Section markup itself :-) + // $source contains embedded newlines to test that the regex that ignores CDATA Sections + // correctly handles that case. + array( + "This is\na<![CDATA[test of\nthe <emergency>]]>\nbroadcast system", + "This is\na<![CDATA[test of\nthe <emergency>]]>\nbroadcast system", + ), + // string with chars that should be escaped as well as a CDATA Section that should be not be. + array( + 'This is … a <![CDATA[test of the <emergency>]]> broadcast <system />', + 'This is … a <![CDATA[test of the <emergency>]]> broadcast <system />', + ), + // Same as above, but with the CDATA Section at the start of the string. + array( + '<![CDATA[test of the <emergency>]]> This is … a broadcast <system />', + '<![CDATA[test of the <emergency>]]> This is … a broadcast <system />', + ), + // Same as above, but with the CDATA Section at the end of the string. + array( + 'This is … a broadcast <system /><![CDATA[test of the <emergency>]]>', + 'This is … a broadcast <system /><![CDATA[test of the <emergency>]]>', + ), + // Multiple CDATA Sections. + array( + 'This is … a <![CDATA[test of the <emergency>]]> &broadcast; <![CDATA[<system />]]>', + 'This is … a <![CDATA[test of the <emergency>]]> &broadcast; <![CDATA[<system />]]>', + ), + // Ensure that ']]>' that does not mark the end of a CDATA Section is escaped. + array( + '<![CDATA[<&]]>]]>', + '<![CDATA[<&]]>]]>', + ), + ); + } +} diff --git a/tests/phpunit/tests/formatting/ExcerptRemoveBlocks.php b/tests/phpunit/tests/formatting/excerptRemoveBlocks.php similarity index 88% rename from tests/phpunit/tests/formatting/ExcerptRemoveBlocks.php rename to tests/phpunit/tests/formatting/excerptRemoveBlocks.php index 8a27f18e81c0b..56570475569a5 100644 --- a/tests/phpunit/tests/formatting/ExcerptRemoveBlocks.php +++ b/tests/phpunit/tests/formatting/excerptRemoveBlocks.php @@ -50,7 +50,7 @@ class Tests_Formatting_ExcerptRemoveBlocks extends WP_UnitTestCase { * * @return string Block output. */ - function render_fake_block() { + public function render_fake_block() { return get_the_excerpt( self::$post_id ); } @@ -59,8 +59,8 @@ function render_fake_block() { * * @since 5.2.0 */ - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); self::$post_id = $this->factory()->post->create( array( 'post_excerpt' => '', // Empty excerpt, so it has to be generated. @@ -80,11 +80,11 @@ function setUp() { * * @since 5.2.0 */ - function tearDown() { - parent::tearDown(); + public function tear_down() { $registry = WP_Block_Type_Registry::get_instance(); $registry->unregister( 'core/fake' ); - wp_delete_post( self::$post_id, true ); + + parent::tear_down(); } /** @@ -92,14 +92,14 @@ function tearDown() { * * @ticket 46133 */ - function test_excerpt_remove_blocks() { + public function test_excerpt_remove_blocks() { // Simple dynamic block.. $content = '<!-- wp:core/block /-->'; $this->assertEmpty( excerpt_remove_blocks( $content ) ); // Dynamic block with options, embedded in other content. - $this->assertEquals( $this->filtered_content, excerpt_remove_blocks( $this->content ) ); + $this->assertSame( $this->filtered_content, excerpt_remove_blocks( $this->content ) ); } /** @@ -117,7 +117,7 @@ function test_excerpt_remove_blocks() { * * @ticket 46133 */ - function test_excerpt_infinite_loop() { + public function test_excerpt_infinite_loop() { $query = new WP_Query( array( 'post__in' => array( self::$post_id ), diff --git a/tests/phpunit/tests/formatting/BlogInfo.php b/tests/phpunit/tests/formatting/getBloginfo.php similarity index 66% rename from tests/phpunit/tests/formatting/BlogInfo.php rename to tests/phpunit/tests/formatting/getBloginfo.php index 15b32fa682858..2c80cd99b892d 100644 --- a/tests/phpunit/tests/formatting/BlogInfo.php +++ b/tests/phpunit/tests/formatting/getBloginfo.php @@ -3,24 +3,24 @@ /** * @group formatting */ -class Tests_Formatting_BlogInfo extends WP_UnitTestCase { +class Tests_Formatting_GetBloginfo extends WP_UnitTestCase { /** * @dataProvider locales * @ticket 28303 */ - function test_get_bloginfo_language( $test_locale, $expected ) { + public function test_get_bloginfo_language( $test_locale, $expected ) { global $locale; $old_locale = $locale; $locale = $test_locale; - $this->assertEquals( $expected, get_bloginfo( 'language' ) ); + $this->assertSame( $expected, get_bloginfo( 'language' ) ); $locale = $old_locale; } - function locales() { + public function locales() { return array( // Locale, language code. array( 'en_US', 'en-US' ), @@ -36,7 +36,7 @@ function locales() { /** * @ticket 27942 */ - function test_bloginfo_sanitize_option() { + public function test_bloginfo_sanitize_option() { $old_values = array( 'blogname' => get_option( 'blogname' ), 'blogdescription' => get_option( 'blogdescription' ), @@ -54,16 +54,16 @@ function test_bloginfo_sanitize_option() { $sanitized_value = sanitize_option( 'blogname', $value ); update_option( 'blogname', $sanitized_value ); - $this->assertEquals( $expected, $sanitized_value ); - $this->assertEquals( $expected, get_bloginfo( 'name' ) ); - $this->assertEquals( $expected, get_bloginfo( 'name', 'display' ) ); + $this->assertSame( $expected, $sanitized_value ); + $this->assertSame( $expected, get_bloginfo( 'name' ) ); + $this->assertSame( $expected, get_bloginfo( 'name', 'display' ) ); $sanitized_value = sanitize_option( 'blogdescription', $value ); update_option( 'blogdescription', $sanitized_value ); - $this->assertEquals( $expected, $sanitized_value ); - $this->assertEquals( $expected, get_bloginfo( 'description' ) ); - $this->assertEquals( $expected, get_bloginfo( 'description', 'display' ) ); + $this->assertSame( $expected, $sanitized_value ); + $this->assertSame( $expected, get_bloginfo( 'description' ) ); + $this->assertSame( $expected, get_bloginfo( 'description', 'display' ) ); } // Restore old values. diff --git a/tests/phpunit/tests/formatting/GetUrlInContent.php b/tests/phpunit/tests/formatting/getUrlInContent.php similarity index 88% rename from tests/phpunit/tests/formatting/GetUrlInContent.php rename to tests/phpunit/tests/formatting/getUrlInContent.php index 7da4c9bdf0261..242fe2db9c03a 100644 --- a/tests/phpunit/tests/formatting/GetUrlInContent.php +++ b/tests/phpunit/tests/formatting/getUrlInContent.php @@ -44,7 +44,7 @@ public function get_input_output() { * * @dataProvider get_input_output */ - function test_get_url_in_content( $in_str, $exp_str ) { - $this->assertEquals( $exp_str, get_url_in_content( $in_str ) ); + public function test_get_url_in_content( $in_str, $exp_str ) { + $this->assertSame( $exp_str, get_url_in_content( $in_str ) ); } } diff --git a/tests/phpunit/tests/formatting/HumanTimeDiff.php b/tests/phpunit/tests/formatting/humanTimeDiff.php similarity index 87% rename from tests/phpunit/tests/formatting/HumanTimeDiff.php rename to tests/phpunit/tests/formatting/humanTimeDiff.php index 473f5325d3537..f4eb2e2ad6090 100644 --- a/tests/phpunit/tests/formatting/HumanTimeDiff.php +++ b/tests/phpunit/tests/formatting/humanTimeDiff.php @@ -11,13 +11,13 @@ class Tests_Formatting_HumanTimeDiff extends WP_UnitTestCase { * @ticket 38773 * @dataProvider data_test_human_time_diff */ - function test_human_time_diff( $expected, $stopdate, $message ) { + public function test_human_time_diff( $expected, $stopdate, $message ) { $startdate = new DateTime( '2016-01-01 12:00:00' ); - $this->assertEquals( $expected, human_time_diff( $startdate->format( 'U' ), $stopdate->format( 'U' ) ), $message ); + $this->assertSame( $expected, human_time_diff( $startdate->format( 'U' ), $stopdate->format( 'U' ) ), $message ); } // Data for test_human_time_diff. - function data_test_human_time_diff() { + public function data_test_human_time_diff() { return array( array( '37 seconds', diff --git a/tests/phpunit/tests/formatting/IsEmail.php b/tests/phpunit/tests/formatting/isEmail.php similarity index 71% rename from tests/phpunit/tests/formatting/IsEmail.php rename to tests/phpunit/tests/formatting/isEmail.php index 7d0c7773ee999..eea7b619262bc 100644 --- a/tests/phpunit/tests/formatting/IsEmail.php +++ b/tests/phpunit/tests/formatting/isEmail.php @@ -4,20 +4,21 @@ * @group formatting */ class Tests_Formatting_IsEmail extends WP_UnitTestCase { - function test_returns_the_email_address_if_it_is_valid() { + public function test_returns_the_email_address_if_it_is_valid() { $data = array( 'bob@example.com', 'phil@example.info', 'ace@204.32.222.14', 'kevin@many.subdomains.make.a.happy.man.edu', 'a@b.co', + 'bill+ted@example.com', ); foreach ( $data as $datum ) { - $this->assertEquals( $datum, is_email( $datum ), $datum ); + $this->assertSame( $datum, is_email( $datum ), $datum ); } } - function test_returns_false_if_given_an_invalid_email_address() { + public function test_returns_false_if_given_an_invalid_email_address() { $data = array( 'khaaaaaaaaaaaaaaan!', 'http://bob.example.com/', diff --git a/tests/phpunit/tests/formatting/isoDescrambler.php b/tests/phpunit/tests/formatting/isoDescrambler.php deleted file mode 100644 index 32a717b948ba5..0000000000000 --- a/tests/phpunit/tests/formatting/isoDescrambler.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -/** - * @group formatting - */ -class Test_WP_ISO_Descrambler extends WP_UnitTestCase { - /* - * Decodes text in RFC2047 "Q"-encoding, e.g. - * =?iso-8859-1?q?this=20is=20some=20text?= - */ - function test_decodes_iso_8859_1_rfc2047_q_encoding() { - $this->assertEquals( 'this is some text', wp_iso_descrambler( '=?iso-8859-1?q?this=20is=20some=20text?=' ) ); - } -} diff --git a/tests/phpunit/tests/formatting/LikeEscape.php b/tests/phpunit/tests/formatting/likeEscape.php similarity index 83% rename from tests/phpunit/tests/formatting/LikeEscape.php rename to tests/phpunit/tests/formatting/likeEscape.php index 1c696ba0a0e8d..d24f4e6675e1f 100644 --- a/tests/phpunit/tests/formatting/LikeEscape.php +++ b/tests/phpunit/tests/formatting/likeEscape.php @@ -8,7 +8,7 @@ class Tests_Formatting_LikeEscape extends WP_UnitTestCase { * @ticket 10041 * @expectedDeprecated like_escape */ - function test_like_escape() { + public function test_like_escape() { $inputs = array( 'howdy%', // Single percent. @@ -24,7 +24,7 @@ function test_like_escape() { ); foreach ( $inputs as $key => $input ) { - $this->assertEquals( $expected[ $key ], like_escape( $input ) ); + $this->assertSame( $expected[ $key ], like_escape( $input ) ); } } } diff --git a/tests/phpunit/tests/formatting/LinksAddTarget.php b/tests/phpunit/tests/formatting/linksAddTarget.php similarity index 69% rename from tests/phpunit/tests/formatting/LinksAddTarget.php rename to tests/phpunit/tests/formatting/linksAddTarget.php index 1ffae4566f9dc..ce8e506440dc9 100644 --- a/tests/phpunit/tests/formatting/LinksAddTarget.php +++ b/tests/phpunit/tests/formatting/linksAddTarget.php @@ -64,6 +64,30 @@ public function get_input_output() { array( 'span' ), 'MY CONTENT <div> SOME ADDITIONAL TEXT <a href="XYZ" src="ABC">LINK</a> HERE </div> <span src="ABC" target="_top">END TEXT</span>', ), + array( + 'MY CONTENT <aside> SOME ADDITIONAL TEXT <a href="XYZ" src="ABC">LINK</a> HERE </aside> END TEXT', + null, + null, + 'MY CONTENT <aside> SOME ADDITIONAL TEXT <a href="XYZ" src="ABC" target="_blank">LINK</a> HERE </aside> END TEXT', + ), + array( + 'MY CONTENT <aside class="_blank"> SOME ADDITIONAL TEXT <a href="XYZ" src="ABC">LINK</a> HERE </aside> END TEXT', + null, + null, + 'MY CONTENT <aside class="_blank"> SOME ADDITIONAL TEXT <a href="XYZ" src="ABC" target="_blank">LINK</a> HERE </aside> END TEXT', + ), + array( + 'MY CONTENT <blockquote>SOME</blockquote> ADDITIONAL TEXT <b>LINK</b> HERE END TEXT', + '_blank', + array( 'b' ), + 'MY CONTENT <blockquote>SOME</blockquote> ADDITIONAL TEXT <b target="_blank">LINK</b> HERE END TEXT', + ), + array( + 'MY CONTENT <blockquote target="_self">SOME</blockquote> ADDITIONAL TEXT <b>LINK</b> HERE END TEXT', + '_blank', + array( 'b' ), + 'MY CONTENT <blockquote target="_self">SOME</blockquote> ADDITIONAL TEXT <b target="_blank">LINK</b> HERE END TEXT', + ), ); } @@ -72,13 +96,13 @@ public function get_input_output() { * * @dataProvider get_input_output */ - function test_normalize_whitespace( $content, $target, $tags, $exp_str ) { + public function test_normalize_whitespace( $content, $target, $tags, $exp_str ) { if ( true === is_null( $target ) ) { - $this->assertEquals( $exp_str, links_add_target( $content ) ); + $this->assertSame( $exp_str, links_add_target( $content ) ); } elseif ( true === is_null( $tags ) ) { - $this->assertEquals( $exp_str, links_add_target( $content, $target ) ); + $this->assertSame( $exp_str, links_add_target( $content, $target ) ); } else { - $this->assertEquals( $exp_str, links_add_target( $content, $target, $tags ) ); + $this->assertSame( $exp_str, links_add_target( $content, $target, $tags ) ); } } } diff --git a/tests/phpunit/tests/formatting/MakeClickable.php b/tests/phpunit/tests/formatting/makeClickable.php similarity index 85% rename from tests/phpunit/tests/formatting/MakeClickable.php rename to tests/phpunit/tests/formatting/makeClickable.php index a9ae2969cd4e8..a0db9860760a0 100644 --- a/tests/phpunit/tests/formatting/MakeClickable.php +++ b/tests/phpunit/tests/formatting/makeClickable.php @@ -4,12 +4,12 @@ * @group formatting */ class Tests_Formatting_MakeClickable extends WP_UnitTestCase { - function test_mailto_xss() { + public function test_mailto_xss() { $in = 'testzzz@"STYLE="behavior:url(\'#default#time2\')"onBegin="alert(\'refresh-XSS\')"'; - $this->assertEquals( $in, make_clickable( $in ) ); + $this->assertSame( $in, make_clickable( $in ) ); } - function test_valid_mailto() { + public function test_valid_mailto() { $valid_emails = array( 'foo@example.com', 'foo.bar@example.com', @@ -18,11 +18,11 @@ function test_valid_mailto() { 'foo@example-example.com', ); foreach ( $valid_emails as $email ) { - $this->assertEquals( '<a href="mailto:' . $email . '">' . $email . '</a>', make_clickable( $email ) ); + $this->assertSame( '<a href="mailto:' . $email . '">' . $email . '</a>', make_clickable( $email ) ); } } - function test_invalid_mailto() { + public function test_invalid_mailto() { $invalid_emails = array( 'foo', 'foo@', @@ -32,7 +32,7 @@ function test_invalid_mailto() { 'foo@example', ); foreach ( $invalid_emails as $email ) { - $this->assertEquals( $email, make_clickable( $email ) ); + $this->assertSame( $email, make_clickable( $email ) ); } } @@ -40,7 +40,7 @@ function test_invalid_mailto() { * Tests that make_clickable() will not link trailing periods, commas, * and (semi-)colons in URLs with protocol (i.e. http://wordpress.org). */ - function test_strip_trailing_with_protocol() { + public function test_strip_trailing_with_protocol() { $urls_before = array( 'http://wordpress.org/hello.html', 'There was a spoon named http://wordpress.org. Alice!', @@ -59,7 +59,7 @@ function test_strip_trailing_with_protocol() { ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } @@ -67,7 +67,7 @@ function test_strip_trailing_with_protocol() { * Tests that make_clickable() will not link trailing periods, commas, * and (semi-)colons in URLs with protocol (i.e. http://wordpress.org). */ - function test_strip_trailing_with_protocol_nothing_afterwards() { + public function test_strip_trailing_with_protocol_nothing_afterwards() { $urls_before = array( 'http://wordpress.org/hello.html', 'There was a spoon named http://wordpress.org.', @@ -88,7 +88,7 @@ function test_strip_trailing_with_protocol_nothing_afterwards() { ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } @@ -96,7 +96,7 @@ function test_strip_trailing_with_protocol_nothing_afterwards() { * Tests that make_clickable() will not link trailing periods, commas, * and (semi-)colons in URLs without protocol (i.e. www.wordpress.org). */ - function test_strip_trailing_without_protocol() { + public function test_strip_trailing_without_protocol() { $urls_before = array( 'www.wordpress.org', 'There was a spoon named www.wordpress.org. Alice!', @@ -115,7 +115,7 @@ function test_strip_trailing_without_protocol() { ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } @@ -123,7 +123,7 @@ function test_strip_trailing_without_protocol() { * Tests that make_clickable() will not link trailing periods, commas, * and (semi-)colons in URLs without protocol (i.e. www.wordpress.org). */ - function test_strip_trailing_without_protocol_nothing_afterwards() { + public function test_strip_trailing_without_protocol_nothing_afterwards() { $urls_before = array( 'www.wordpress.org', 'There was a spoon named www.wordpress.org.', @@ -142,14 +142,14 @@ function test_strip_trailing_without_protocol_nothing_afterwards() { ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } /** * @ticket 4570 */ - function test_iri() { + public function test_iri() { $urls_before = array( 'http://www.詹姆斯.com/', 'http://bg.wikipedia.org/Баба', @@ -161,14 +161,14 @@ function test_iri() { '<a href="http://example.com/?a=баба&b=Š“ŃŠ“Š¾" rel="nofollow">http://example.com/?a=баба&b=Š“ŃŠ“Š¾</a>', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } /** * @ticket 10990 */ - function test_brackets_in_urls() { + public function test_brackets_in_urls() { $urls_before = array( 'http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)', '(http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software))', @@ -198,7 +198,7 @@ function test_brackets_in_urls() { Richard Hamming wrote about people getting more done with their doors closed, but', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } @@ -207,7 +207,7 @@ function test_brackets_in_urls() { * * @ticket 11211 */ - function test_real_world_examples() { + public function test_real_world_examples() { $urls_before = array( 'Example: WordPress, test (some text), I love example.com (http://example.org), it is brilliant', 'Example: WordPress, test (some text), I love example.com (http://example.com), it is brilliant', @@ -221,14 +221,14 @@ function test_real_world_examples() { 'In his famous speech ā€œYou and Your researchā€ (here: <a href="http://www.cs.virginia.edu/~robins/YouAndYourResearch.html" rel="nofollow">http://www.cs.virginia.edu/~robins/YouAndYourResearch.html</a>) Richard Hamming wrote about people getting more done with their doors closed...', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } /** * @ticket 14993 */ - function test_twitter_hash_bang() { + public function test_twitter_hash_bang() { $urls_before = array( 'http://twitter.com/#!/wordpress/status/25907440233', 'This is a really good tweet http://twitter.com/#!/wordpress/status/25907440233 !', @@ -240,11 +240,11 @@ function test_twitter_hash_bang() { 'This is a really good tweet <a href="http://twitter.com/#!/wordpress/status/25907440233" rel="nofollow">http://twitter.com/#!/wordpress/status/25907440233</a>!', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } - function test_wrapped_in_angles() { + public function test_wrapped_in_angles() { $before = array( 'URL wrapped in angle brackets <http://example.com/>', 'URL wrapped in angle brackets with padding < http://example.com/ >', @@ -256,11 +256,11 @@ function test_wrapped_in_angles() { 'mailto wrapped in angle brackets <foo@example.com>', ); foreach ( $before as $key => $url ) { - $this->assertEquals( $expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $expected[ $key ], make_clickable( $url ) ); } } - function test_preceded_by_punctuation() { + public function test_preceded_by_punctuation() { $before = array( 'Comma then URL,http://example.com/', 'Period then URL.http://example.com/', @@ -278,18 +278,18 @@ function test_preceded_by_punctuation() { 'Question mark then URL?<a href="http://example.com/" rel="nofollow">http://example.com/</a>', ); foreach ( $before as $key => $url ) { - $this->assertEquals( $expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $expected[ $key ], make_clickable( $url ) ); } } - function test_dont_break_attributes() { + public function test_dont_break_attributes() { $urls_before = array( "<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>", "(<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)", "http://trunk.domain/testing#something (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)", "http://trunk.domain/testing#something (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)", - "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>", + "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>", '<a href="http://example.com/example.gif" title="Image from http://example.com">Look at this image!</a>', ); $urls_expected = array( @@ -298,18 +298,18 @@ function test_dont_break_attributes() { "<a href=\"http://trunk.domain/testing#something\" rel=\"nofollow\">http://trunk.domain/testing#something</a> (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)", "<a href=\"http://trunk.domain/testing#something\" rel=\"nofollow\">http://trunk.domain/testing#something</a> (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)", - "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>", + "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>", '<a href="http://example.com/example.gif" title="Image from http://example.com">Look at this image!</a>', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } /** * @ticket 23756 */ - function test_no_links_inside_pre_or_code() { + public function test_no_links_inside_pre_or_code() { $before = array( '<pre>http://wordpress.org</pre>', '<code>http://wordpress.org</code>', @@ -343,14 +343,14 @@ function test_no_links_inside_pre_or_code() { ); foreach ( $before as $key => $url ) { - $this->assertEquals( $expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $expected[ $key ], make_clickable( $url ) ); } } /** * @ticket 16892 */ - function test_click_inside_html() { + public function test_click_inside_html() { $urls_before = array( '<span>http://example.com</span>', '<p>http://example.com/</p>', @@ -360,36 +360,36 @@ function test_click_inside_html() { '<p><a href="http://example.com/" rel="nofollow">http://example.com/</a></p>', ); foreach ( $urls_before as $key => $url ) { - $this->assertEquals( $urls_expected[ $key ], make_clickable( $url ) ); + $this->assertSame( $urls_expected[ $key ], make_clickable( $url ) ); } } - function test_no_links_within_links() { + public function test_no_links_within_links() { $in = array( 'Some text with a link <a href="http://example.com">http://example.com</a>', // '<a href="http://wordpress.org">This is already a link www.wordpress.org</a>', // Fails in 3.3.1 too. ); foreach ( $in as $text ) { - $this->assertEquals( $text, make_clickable( $text ) ); + $this->assertSame( $text, make_clickable( $text ) ); } } /** * @ticket 16892 */ - function test_no_segfault() { + public function test_no_segfault() { $in = str_repeat( 'http://example.com/2011/03/18/post-title/', 256 ); $out = make_clickable( $in ); - $this->assertEquals( $in, $out ); + $this->assertSame( $in, $out ); } /** * @ticket 19028 */ - function test_line_break_in_existing_clickable_link() { + public function test_line_break_in_existing_clickable_link() { $html = "<a href='mailto:someone@example.com'>someone@example.com</a>"; - $this->assertEquals( $html, make_clickable( $html ) ); + $this->assertSame( $html, make_clickable( $html ) ); } /** @@ -397,7 +397,7 @@ function test_line_break_in_existing_clickable_link() { * @dataProvider data_script_and_style_tags */ public function test_dont_link_script_and_style_tags( $tag ) { - $this->assertEquals( $tag, make_clickable( $tag ) ); + $this->assertSame( $tag, make_clickable( $tag ) ); } public function data_script_and_style_tags() { @@ -432,7 +432,7 @@ public function test_add_rel_ugc_in_comments( $content, $expected ) { comment_text( $comment_id ); $comment_text = ob_get_clean(); - $this->assertContains( $expected, make_clickable( $comment_text ) ); + $this->assertStringContainsString( $expected, make_clickable( $comment_text ) ); } public function data_add_rel_ugc_in_comments() { diff --git a/tests/phpunit/tests/formatting/MapDeep.php b/tests/phpunit/tests/formatting/mapDeep.php similarity index 91% rename from tests/phpunit/tests/formatting/MapDeep.php rename to tests/phpunit/tests/formatting/mapDeep.php index cacd62cf68026..0a291c97697a9 100644 --- a/tests/phpunit/tests/formatting/MapDeep.php +++ b/tests/phpunit/tests/formatting/mapDeep.php @@ -7,11 +7,11 @@ class Tests_Formatting_MapDeep extends WP_UnitTestCase { public function test_map_deep_with_any_function_over_empty_array_should_return_empty_array() { - $this->assertEquals( array(), map_deep( array(), array( $this, 'append_baba' ) ) ); + $this->assertSame( array(), map_deep( array(), array( $this, 'append_baba' ) ) ); } public function test_map_deep_should_map_each_element_of_array_one_level_deep() { - $this->assertEquals( + $this->assertSame( array( 'ababa', 'xbaba', @@ -27,7 +27,7 @@ public function test_map_deep_should_map_each_element_of_array_one_level_deep() } public function test_map_deep_should_map_each_element_of_array_two_levels_deep() { - $this->assertEquals( + $this->assertSame( array( 'ababa', array( @@ -67,11 +67,11 @@ public function test_map_deep_should_map_each_object_element_of_an_array() { } public function test_map_deep_should_apply_the_function_to_a_string() { - $this->assertEquals( 'xbaba', map_deep( 'x', array( $this, 'append_baba' ) ) ); + $this->assertSame( 'xbaba', map_deep( 'x', array( $this, 'append_baba' ) ) ); } public function test_map_deep_should_apply_the_function_to_an_integer() { - $this->assertEquals( '5baba', map_deep( 5, array( $this, 'append_baba' ) ) ); + $this->assertSame( '5baba', map_deep( 5, array( $this, 'append_baba' ) ) ); } public function test_map_deep_should_map_each_property_of_an_object() { @@ -157,7 +157,7 @@ public function test_map_deep_should_map_array_elements_passed_by_reference() { 'var0' => &$array_a['var0'], 'var1' => 'x', ); - $this->assertEquals( + $this->assertSame( array( 'var0' => 'ababa', 'var1' => 'xbaba', diff --git a/tests/phpunit/tests/formatting/NormalizeWhitespace.php b/tests/phpunit/tests/formatting/normalizeWhitespace.php similarity index 85% rename from tests/phpunit/tests/formatting/NormalizeWhitespace.php rename to tests/phpunit/tests/formatting/normalizeWhitespace.php index 9ed6b30ac2197..2e7668698a2b8 100644 --- a/tests/phpunit/tests/formatting/NormalizeWhitespace.php +++ b/tests/phpunit/tests/formatting/normalizeWhitespace.php @@ -46,7 +46,7 @@ public function get_input_output() { * * @dataProvider get_input_output */ - function test_normalize_whitespace( $in_str, $exp_str ) { - $this->assertEquals( $exp_str, normalize_whitespace( $in_str ) ); + public function test_normalize_whitespace( $in_str, $exp_str ) { + $this->assertSame( $exp_str, normalize_whitespace( $in_str ) ); } } diff --git a/tests/phpunit/tests/formatting/redirect.php b/tests/phpunit/tests/formatting/redirect.php index c79e1433ebb4c..e1004493bdf3e 100644 --- a/tests/phpunit/tests/formatting/redirect.php +++ b/tests/phpunit/tests/formatting/redirect.php @@ -6,17 +6,12 @@ * @group redirect */ class Tests_Formatting_Redirect extends WP_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'home_url', array( $this, 'home_url' ) ); } - function tearDown() { - remove_filter( 'home_url', array( $this, 'home_url' ) ); - parent::tearDown(); - } - - function home_url() { + public function home_url() { return 'http://example.com/'; } @@ -24,12 +19,13 @@ function home_url() { * @ticket 44317 * * @dataProvider get_bad_status_codes - * @expectedException WPDieException * * @param string $location The path or URL to redirect to. * @param int $status HTTP response status code to use. */ public function test_wp_redirect_bad_status_code( $location, $status ) { + $this->expectException( 'WPDieException' ); + wp_redirect( $location, $status ); } @@ -45,45 +41,45 @@ public function get_bad_status_codes() { ); } - function test_wp_sanitize_redirect() { - $this->assertEquals( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0Ago' ) ); - $this->assertEquals( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0ago' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0Dgo' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0dgo' ) ); - $this->assertEquals( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay', wp_sanitize_redirect( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay' ) ); - $this->assertEquals( 'http://example.com/watchtheutf8convert%F0%9D%8C%86', wp_sanitize_redirect( "http://example.com/watchtheutf8convert\xf0\x9d\x8c\x86" ) ); + public function test_wp_sanitize_redirect() { + $this->assertSame( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0Ago' ) ); + $this->assertSame( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0ago' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0Dgo' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0dgo' ) ); + $this->assertSame( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay', wp_sanitize_redirect( 'http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay' ) ); + $this->assertSame( 'http://example.com/watchtheutf8convert%F0%9D%8C%86', wp_sanitize_redirect( "http://example.com/watchtheutf8convert\xf0\x9d\x8c\x86" ) ); // Nesting checks. - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) ); - $this->assertEquals( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) ); - $this->assertEquals( 'http://example.com/whyisthisintheurl/?param[1]=foo', wp_sanitize_redirect( 'http://example.com/whyisthisintheurl/?param[1]=foo' ) ); - $this->assertEquals( 'http://[2606:2800:220:6d:26bf:1447:aa7]/', wp_sanitize_redirect( 'http://[2606:2800:220:6d:26bf:1447:aa7]/' ) ); - $this->assertEquals( 'http://example.com/search.php?search=(amistillhere)', wp_sanitize_redirect( 'http://example.com/search.php?search=(amistillhere)' ) ); - $this->assertEquals( 'http://example.com/@username', wp_sanitize_redirect( 'http://example.com/@username' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0ddgo' ) ); + $this->assertSame( 'http://example.com/watchthecarriagereturngo', wp_sanitize_redirect( 'http://example.com/watchthecarriagereturn%0%0DDgo' ) ); + $this->assertSame( 'http://example.com/whyisthisintheurl/?param[1]=foo', wp_sanitize_redirect( 'http://example.com/whyisthisintheurl/?param[1]=foo' ) ); + $this->assertSame( 'http://[2606:2800:220:6d:26bf:1447:aa7]/', wp_sanitize_redirect( 'http://[2606:2800:220:6d:26bf:1447:aa7]/' ) ); + $this->assertSame( 'http://example.com/search.php?search=(amistillhere)', wp_sanitize_redirect( 'http://example.com/search.php?search=(amistillhere)' ) ); + $this->assertSame( 'http://example.com/@username', wp_sanitize_redirect( 'http://example.com/@username' ) ); } /** - * @group 36998 + * @ticket 36998 */ - function test_wp_sanitize_redirect_should_encode_spaces() { - $this->assertEquals( 'http://example.com/test%20spaces', wp_sanitize_redirect( 'http://example.com/test%20spaces' ) ); - $this->assertEquals( 'http://example.com/test%20spaces%20in%20url', wp_sanitize_redirect( 'http://example.com/test spaces in url' ) ); + public function test_wp_sanitize_redirect_should_encode_spaces() { + $this->assertSame( 'http://example.com/test%20spaces', wp_sanitize_redirect( 'http://example.com/test%20spaces' ) ); + $this->assertSame( 'http://example.com/test%20spaces%20in%20url', wp_sanitize_redirect( 'http://example.com/test spaces in url' ) ); } /** * @dataProvider valid_url_provider */ - function test_wp_validate_redirect_valid_url( $url, $expected ) { - $this->assertEquals( $expected, wp_validate_redirect( $url ) ); + public function test_wp_validate_redirect_valid_url( $url, $expected ) { + $this->assertSame( $expected, wp_validate_redirect( $url ) ); } /** * @dataProvider invalid_url_provider */ - function test_wp_validate_redirect_invalid_url( $url ) { + public function test_wp_validate_redirect_invalid_url( $url ) { $this->assertEquals( false, wp_validate_redirect( $url, false ) ); } - function valid_url_provider() { + public function valid_url_provider() { return array( array( 'http://example.com', 'http://example.com' ), array( 'http://example.com/', 'http://example.com/' ), @@ -99,7 +95,7 @@ function valid_url_provider() { ); } - function invalid_url_provider() { + public function invalid_url_provider() { return array( // parse_url() fails. array( '' ), @@ -171,7 +167,7 @@ function invalid_url_provider() { * @ticket 47980 * @dataProvider relative_url_provider */ - function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) { + public function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) { // Backup the global. $unset = false; if ( ! isset( $_SERVER['REQUEST_URI'] ) ) { @@ -183,7 +179,7 @@ function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) // Set the global to current URI. $_SERVER['REQUEST_URI'] = $current_uri; - $this->assertEquals( $expected, wp_validate_redirect( $url, false ) ); + $this->assertSame( $expected, wp_validate_redirect( $url, false ) ); // Delete or reset the global as required. if ( $unset ) { @@ -202,7 +198,7 @@ function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) * string Expected destination. * } */ - function relative_url_provider() { + public function relative_url_provider() { return array( array( '/', diff --git a/tests/phpunit/tests/formatting/removeAccents.php b/tests/phpunit/tests/formatting/removeAccents.php new file mode 100644 index 0000000000000..19fd50586bd51 --- /dev/null +++ b/tests/phpunit/tests/formatting/removeAccents.php @@ -0,0 +1,146 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_RemoveAccents extends WP_UnitTestCase { + public function test_remove_accents_simple() { + $this->assertSame( 'abcdefghijkl', remove_accents( 'abcdefghijkl' ) ); + } + + /** + * @ticket 9591 + */ + public function test_remove_accents_latin1_supplement() { + $input = 'ĀŖĀŗĆ€ĆĆ‚ĆƒĆ„Ć…Ć†Ć‡ĆˆĆ‰ĆŠĆ‹ĆŒĆĆŽĆĆĆ‘Ć’Ć“Ć”Ć•Ć–Ć˜Ć™ĆšĆ›ĆœĆĆžĆŸĆ Ć”Ć¢Ć£Ć¤Ć„Ć¦Ć§ĆØĆ©ĆŖĆ«Ć¬Ć­Ć®ĆÆĆ°Ć±Ć²Ć³Ć“ĆµĆ¶ĆøĆ¹ĆŗĆ»Ć¼Ć½Ć¾Ćæ'; + $output = 'aoAAAAAAAECEEEEIIIIDNOOOOOOUUUUYTHsaaaaaaaeceeeeiiiidnoooooouuuuythy'; + + $this->assertSame( $output, remove_accents( $input ), 'remove_accents replaces Latin-1 Supplement' ); + } + + public function test_remove_accents_latin_extended_a() { + $input = 'Ä€ÄÄ‚ÄƒÄ„Ä…Ä†Ä‡ÄˆÄ‰ÄŠÄ‹ÄŒÄÄŽÄÄÄ‘Ä’Ä“Ä”Ä•Ä–Ä—Ä˜Ä™ÄšÄ›ÄœÄÄžÄŸÄ Ä”Ä¢Ä£Ä¤Ä„Ä¦Ä§ÄØÄ©ÄŖÄ«Ä¬Ä­Ä®ÄÆÄ°Ä±Ä²Ä³Ä“ÄµÄ¶Ä·ÄøÄ¹ÄŗÄ»Ä¼Ä½Ä¾ÄæÅ€ÅÅ‚ÅƒÅ„Å…Å†Å‡ÅˆÅ‰ÅŠÅ‹ÅŒÅÅŽÅÅÅ‘Å’Å“Å”Å•Å–Å—Å˜Å™ÅšÅ›ÅœÅÅžÅŸÅ Å”Å¢Å£Å¤Å„Å¦Å§ÅØÅ©ÅŖÅ«Å¬Å­Å®ÅÆÅ°Å±Å²Å³Å“ÅµÅ¶Å·ÅøÅ¹ÅŗÅ»Å¼Å½Å¾Åæ'; + $output = 'AaAaAaCcCcCcCcDdDdEeEeEeEeEeGgGgGgGgHhHhIiIiIiIiIiIJijJjKkkLlLlLlLlLlNnNnNnnNnOoOoOoOEoeRrRrRrSsSsSsSsTtTtTtUuUuUuUuUuUuWwYyYZzZzZzs'; + + $this->assertSame( $output, remove_accents( $input ), 'remove_accents replaces Latin Extended A' ); + } + + public function test_remove_accents_latin_extended_b() { + $this->assertSame( 'SsTt', remove_accents( 'ȘșȚț' ), 'remove_accents replaces Latin Extended B' ); + } + + public function test_remove_accents_euro_pound_signs() { + $this->assertSame( 'E', remove_accents( '€' ), 'remove_accents replaces euro sign' ); + $this->assertSame( '', remove_accents( 'Ā£' ), 'remove_accents replaces pound sign' ); + } + + public function test_remove_accents_iso8859() { + // File is Latin1-encoded. + $file = DIR_TESTDATA . '/formatting/remove_accents.01.input.txt'; + $input = file_get_contents( $file ); + $input = trim( $input ); + $output = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyyOEoeAEDHTHssaedhth'; + + $this->assertSame( $output, remove_accents( $input ), 'remove_accents from ISO-8859-1 text' ); + } + + /** + * @ticket 17738 + */ + public function test_remove_accents_vowels_diacritic() { + // Vowels with diacritic. + // Unmarked. + $this->assertSame( 'OoUu', remove_accents( 'ƠƔƯư' ) ); + // Grave accent. + $this->assertSame( 'AaAaEeOoOoUuYy', remove_accents( 'įŗ¦įŗ§įŗ°įŗ±į»€į»į»’į»“į»œį»į»Ŗį»«į»²į»³' ) ); + // Hook. + $this->assertSame( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'įŗ¢įŗ£įŗØįŗ©įŗ²įŗ³įŗŗįŗ»į»‚į»ƒį»ˆį»‰į»Žį»į»”į»•į»žį»Ÿį»¦į»§į»¬į»­į»¶į»·' ) ); + // Tilde. + $this->assertSame( 'AaAaEeEeOoOoUuYy', remove_accents( 'ẪẫẓẵẼẽỄễỖỗỠỔỮữỸỹ' ) ); + // Acute accent. + $this->assertSame( 'AaAaEeOoOoUu', remove_accents( 'įŗ¤įŗ„įŗ®įŗÆįŗ¾įŗæį»į»‘į»šį»›į»Øį»©' ) ); + // Dot below. + $this->assertSame( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'įŗ įŗ”įŗ¬įŗ­įŗ¶įŗ·įŗøįŗ¹į»†į»‡į»Šį»‹į»Œį»į»˜į»™į»¢į»£į»¤į»„į»°į»±į»“į»µ' ) ); + } + + /** + * @ticket 20772 + */ + public function test_remove_accents_hanyu_pinyin() { + // Vowels with diacritic (Chinese, Hanyu Pinyin). + // Macron. + $this->assertSame( 'aeiouuAEIOUU', remove_accents( 'ÄÄ“Ä«ÅÅ«Ē–Ä€Ä’ÄŖÅŒÅŖĒ•' ) ); + // Acute accent. + $this->assertSame( 'aeiouuAEIOUU', remove_accents( 'Ć”Ć©Ć­Ć³ĆŗĒ˜ĆĆ‰ĆĆ“ĆšĒ—' ) ); + // Caron. + $this->assertSame( 'aeiouuAEIOUU', remove_accents( 'ĒŽÄ›ĒĒ’Ē”ĒšĒÄšĒĒ‘Ē“Ē™' ) ); + // Grave accent. + $this->assertSame( 'aeiouuAEIOUU', remove_accents( 'Ć ĆØĆ¬Ć²Ć¹ĒœĆ€ĆˆĆŒĆ’Ć™Ē›' ) ); + // Unmarked. + $this->assertSame( 'aaeiouuAEIOUU', remove_accents( 'aɑeiouüAEIOUÜ' ) ); + } + + public function remove_accents_germanic_umlauts_cb() { + return 'de_DE'; + } + + /** + * @ticket 3782 + */ + public function test_remove_accents_germanic_umlauts() { + add_filter( 'locale', array( $this, 'remove_accents_germanic_umlauts_cb' ) ); + + $this->assertSame( 'AeOeUeaeoeuess', remove_accents( 'Ć„Ć–ĆœĆ¤Ć¶Ć¼ĆŸ' ) ); + + remove_filter( 'locale', array( $this, 'remove_accents_germanic_umlauts_cb' ) ); + } + + public function set_locale_to_danish() { + return 'da_DK'; + } + + /** + * @ticket 23907 + */ + public function test_remove_danish_accents() { + add_filter( 'locale', array( $this, 'set_locale_to_danish' ) ); + + $this->assertSame( 'AeOeAaaeoeaa', remove_accents( 'Ć†Ć˜Ć…Ć¦ĆøĆ„' ) ); + + remove_filter( 'locale', array( $this, 'set_locale_to_danish' ) ); + } + + public function set_locale_to_catalan() { + return 'ca'; + } + + /** + * @ticket 37086 + */ + public function test_remove_catalan_middot() { + add_filter( 'locale', array( $this, 'set_locale_to_catalan' ) ); + + $this->assertSame( 'allallalla', remove_accents( 'alĀ·lallaŀla' ) ); + + remove_filter( 'locale', array( $this, 'set_locale_to_catalan' ) ); + + $this->assertSame( 'alĀ·lallalla', remove_accents( 'alĀ·lallaŀla' ) ); + } + + public function set_locale_to_serbian() { + return 'sr_RS'; + } + + /** + * @ticket 38078 + */ + public function test_transcribe_serbian_crossed_d() { + add_filter( 'locale', array( $this, 'set_locale_to_serbian' ) ); + + $this->assertSame( 'DJdj', remove_accents( 'Đđ' ) ); + + remove_filter( 'locale', array( $this, 'set_locale_to_serbian' ) ); + + $this->assertSame( 'Dd', remove_accents( 'Đđ' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/sanitizeFileName.php b/tests/phpunit/tests/formatting/sanitizeFileName.php new file mode 100644 index 0000000000000..fbec256219bfa --- /dev/null +++ b/tests/phpunit/tests/formatting/sanitizeFileName.php @@ -0,0 +1,96 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_SanitizeFileName extends WP_UnitTestCase { + public function test_munges_extensions() { + // r17990 + $file_name = sanitize_file_name( 'test.phtml.txt' ); + $this->assertSame( 'test.phtml_.txt', $file_name ); + } + + public function test_removes_special_chars() { + $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', '’', 'Ā«', 'Ā»', 'ā€', 'ā€œ', chr( 0 ) ); + $string = 'test'; + foreach ( $special_chars as $char ) { + $string .= $char; + } + $string .= 'test'; + $this->assertSame( 'testtest', sanitize_file_name( $string ) ); + } + + /** + * @ticket 22363 + */ + public function test_removes_accents() { + $in = 'àÔâãäÄæçèéêëìíîïñòóÓõöøùúûüýÿ'; + $out = 'aaaaaaaeceeeeiiiinoooooouuuuyy'; + $this->assertSame( $out, sanitize_file_name( $in ) ); + } + + /** + * Test that spaces are correctly replaced with dashes. + * + * @ticket 16330 + */ + public function test_replaces_spaces() { + $urls = array( + 'unencoded space.png' => 'unencoded-space.png', + 'encoded-space.jpg' => 'encoded-space.jpg', + 'plus+space.jpg' => 'plusspace.jpg', + 'multi %20 +space.png' => 'multi-20-space.png', + ); + + foreach ( $urls as $test => $expected ) { + $this->assertSame( $expected, sanitize_file_name( $test ) ); + } + } + + public function test_replaces_any_number_of_hyphens_with_one_hyphen() { + $this->assertSame( 'a-t-t', sanitize_file_name( 'a----t----t' ) ); + } + + public function test_trims_trailing_hyphens() { + $this->assertSame( 'a-t-t', sanitize_file_name( 'a----t----t----' ) ); + } + + public function test_replaces_any_amount_of_whitespace_with_one_hyphen() { + $this->assertSame( 'a-t', sanitize_file_name( 'a t' ) ); + $this->assertSame( 'a-t', sanitize_file_name( "a \n\n\nt" ) ); + } + + /** + * @ticket 16226 + */ + public function test_replaces_percent_sign() { + $this->assertSame( 'a22b.jpg', sanitize_file_name( 'a%22b.jpg' ) ); + } + + public function test_replaces_unnamed_file_extensions() { + // Test filenames with both supported and unsupported extensions. + $this->assertSame( 'unnamed-file.exe', sanitize_file_name( '_.exe' ) ); + $this->assertSame( 'unnamed-file.jpg', sanitize_file_name( '_.jpg' ) ); + } + + public function test_replaces_unnamed_file_extensionless() { + // Test a filenames that becomes extensionless. + $this->assertSame( 'no-extension', sanitize_file_name( '_.no-extension' ) ); + } + + /** + * @dataProvider data_wp_filenames + */ + public function test_replaces_invalid_utf8_characters( $input, $expected ) { + $this->assertSame( $expected, sanitize_file_name( $input ) ); + } + + public function data_wp_filenames() { + return array( + array( urldecode( '%B1myfile.png' ), 'myfile.png' ), + array( urldecode( '%B1myfile' ), 'myfile' ), + array( 'demo bar.png', 'demo-bar.png' ), + array( 'demo' . json_decode( '"\u00a0"' ) . 'bar.png', 'demo-bar.png' ), + ); + } +} diff --git a/tests/phpunit/tests/formatting/SanitizeMimeType.php b/tests/phpunit/tests/formatting/sanitizeMimeType.php similarity index 86% rename from tests/phpunit/tests/formatting/SanitizeMimeType.php rename to tests/phpunit/tests/formatting/sanitizeMimeType.php index e8475ff6cf567..77c8b472056fa 100644 --- a/tests/phpunit/tests/formatting/SanitizeMimeType.php +++ b/tests/phpunit/tests/formatting/sanitizeMimeType.php @@ -8,7 +8,7 @@ class Tests_Formatting_SanitizeMimeType extends WP_UnitTestCase { /** * @ticket 17855 */ - function test_sanitize_valid_mime_type() { + public function test_sanitize_valid_mime_type() { $inputs = array( 'application/atom+xml', 'application/EDI-X12', @@ -35,7 +35,7 @@ function test_sanitize_valid_mime_type() { ); foreach ( $inputs as $input ) { - $this->assertEquals( $input, sanitize_mime_type( $input ) ); + $this->assertSame( $input, sanitize_mime_type( $input ) ); } } } diff --git a/tests/phpunit/tests/formatting/SanitizeOrderby.php b/tests/phpunit/tests/formatting/sanitizeOrderby.php similarity index 82% rename from tests/phpunit/tests/formatting/SanitizeOrderby.php rename to tests/phpunit/tests/formatting/sanitizeOrderby.php index 371d63b52e7b0..cede00788686c 100644 --- a/tests/phpunit/tests/formatting/SanitizeOrderby.php +++ b/tests/phpunit/tests/formatting/sanitizeOrderby.php @@ -9,10 +9,10 @@ class Tests_Formatting_SanitizeOrderby extends WP_UnitTestCase { * @covers ::sanitize_sql_orderby * @dataProvider valid_orderbys */ - function test_valid( $orderby ) { - $this->assertEquals( $orderby, sanitize_sql_orderby( $orderby ) ); + public function test_valid( $orderby ) { + $this->assertSame( $orderby, sanitize_sql_orderby( $orderby ) ); } - function valid_orderbys() { + public function valid_orderbys() { return array( array( '1' ), array( '1 ASC' ), @@ -36,10 +36,10 @@ function valid_orderbys() { * @covers ::sanitize_sql_orderby * @dataProvider invalid_orderbys */ - function test_invalid( $orderby ) { + public function test_invalid( $orderby ) { $this->assertFalse( sanitize_sql_orderby( $orderby ) ); } - function invalid_orderbys() { + public function invalid_orderbys() { return array( array( '' ), array( '1 2' ), diff --git a/tests/phpunit/tests/formatting/SanitizePost.php b/tests/phpunit/tests/formatting/sanitizePost.php similarity index 64% rename from tests/phpunit/tests/formatting/SanitizePost.php rename to tests/phpunit/tests/formatting/sanitizePost.php index 3034ebbd02d1c..1e69e703c1694 100644 --- a/tests/phpunit/tests/formatting/SanitizePost.php +++ b/tests/phpunit/tests/formatting/sanitizePost.php @@ -8,7 +8,7 @@ class Tests_Formatting_SanitizePost extends WP_UnitTestCase { /** * @ticket 22324 */ - function test_int_fields() { + public function test_int_fields() { $post = self::factory()->post->create_and_get(); $int_fields = array( 'ID' => 'integer', @@ -19,7 +19,14 @@ function test_int_fields() { ); foreach ( $int_fields as $field => $type ) { - $this->assertInternalType( $type, $post->$field, "field $field" ); + switch ( $type ) { + case 'integer': + $this->assertIsInt( $post->$field, "field $field" ); + break; + case 'string': + $this->assertIsString( $post->$field, "field $field" ); + break; + } } } } diff --git a/tests/phpunit/tests/formatting/SanitizeTextField.php b/tests/phpunit/tests/formatting/sanitizeTextField.php similarity index 91% rename from tests/phpunit/tests/formatting/SanitizeTextField.php rename to tests/phpunit/tests/formatting/sanitizeTextField.php index 441f52491b1a6..8d5d0ff0dd9d2 100644 --- a/tests/phpunit/tests/formatting/SanitizeTextField.php +++ b/tests/phpunit/tests/formatting/sanitizeTextField.php @@ -4,7 +4,7 @@ * @group formatting */ class Tests_Formatting_SanitizeTextField extends WP_UnitTestCase { - function data_sanitize_text_field() { + public function data_sanitize_text_field() { return array( array( 'Š¾Š Š°Š½Š³ŃƒŃ‚Š°Š½Š³', // Ensure UTF-8 text is safe. The Š  is D0 A0 and A0 is the non-breaking space. @@ -128,7 +128,7 @@ function data_sanitize_text_field() { * @ticket 32257 * @dataProvider data_sanitize_text_field */ - function test_sanitize_text_field( $string, $expected ) { + public function test_sanitize_text_field( $string, $expected ) { if ( is_array( $expected ) ) { $expected_oneline = $expected['oneline']; $expected_multiline = $expected['multiline']; @@ -136,8 +136,8 @@ function test_sanitize_text_field( $string, $expected ) { $expected_oneline = $expected; $expected_multiline = $expected; } - $this->assertEquals( $expected_oneline, sanitize_text_field( $string ) ); - $this->assertEqualsIgnoreEOL( $expected_multiline, sanitize_textarea_field( $string ) ); + $this->assertSame( $expected_oneline, sanitize_text_field( $string ) ); + $this->assertSameIgnoreEOL( $expected_multiline, sanitize_textarea_field( $string ) ); } } diff --git a/tests/phpunit/tests/formatting/SanitizeTitle.php b/tests/phpunit/tests/formatting/sanitizeTitle.php similarity index 50% rename from tests/phpunit/tests/formatting/SanitizeTitle.php rename to tests/phpunit/tests/formatting/sanitizeTitle.php index e536e14b4049a..7ce850f0fc6b7 100644 --- a/tests/phpunit/tests/formatting/SanitizeTitle.php +++ b/tests/phpunit/tests/formatting/sanitizeTitle.php @@ -4,15 +4,15 @@ * @group formatting */ class Tests_Formatting_SanitizeTitle extends WP_UnitTestCase { - function test_strips_html() { + public function test_strips_html() { $input = 'Captain <strong>Awesome</strong>'; $expected = 'captain-awesome'; - $this->assertEquals( $expected, sanitize_title( $input ) ); + $this->assertSame( $expected, sanitize_title( $input ) ); } - function test_titles_sanitized_to_nothing_are_replaced_with_optional_fallback() { + public function test_titles_sanitized_to_nothing_are_replaced_with_optional_fallback() { $input = '<strong></strong>'; $fallback = 'Captain Awesome'; - $this->assertEquals( $fallback, sanitize_title( $input, $fallback ) ); + $this->assertSame( $fallback, sanitize_title( $input, $fallback ) ); } } diff --git a/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php b/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php new file mode 100644 index 0000000000000..797a36f018ded --- /dev/null +++ b/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php @@ -0,0 +1,360 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { + public function test_strips_html() { + $input = 'Captain <strong>Awesome</strong>'; + $expected = 'captain-awesome'; + $this->assertSame( $expected, sanitize_title_with_dashes( $input ) ); + } + + public function test_strips_unencoded_percent_signs() { + $this->assertSame( 'fran%c3%a7ois', sanitize_title_with_dashes( 'fran%c3%a7%ois' ) ); + } + + public function test_makes_title_lowercase() { + $this->assertSame( 'abc', sanitize_title_with_dashes( 'ABC' ) ); + } + + public function test_replaces_any_amount_of_whitespace_with_one_hyphen() { + $this->assertSame( 'a-t', sanitize_title_with_dashes( 'a t' ) ); + $this->assertSame( 'a-t', sanitize_title_with_dashes( "a \n\n\nt" ) ); + } + + public function test_replaces_any_number_of_hyphens_with_one_hyphen() { + $this->assertSame( 'a-t-t', sanitize_title_with_dashes( 'a----t----t' ) ); + } + + public function test_trims_trailing_hyphens() { + $this->assertSame( 'a-t-t', sanitize_title_with_dashes( 'a----t----t----' ) ); + } + + public function test_handles_non_entity_ampersands() { + $this->assertSame( 'penn-teller-bull', sanitize_title_with_dashes( 'penn & teller bull' ) ); + } + + public function test_strips_nbsp_ndash_and_amp() { + $this->assertSame( 'no-entities-here', sanitize_title_with_dashes( 'No   Entities – Here &' ) ); + } + + public function test_strips_encoded_ampersand() { + $this->assertSame( 'one-two', sanitize_title_with_dashes( 'One & Two', '', 'save' ) ); + } + + public function test_strips_url_encoded_ampersand() { + $this->assertSame( 'one-two', sanitize_title_with_dashes( 'One { Two;', '', 'save' ) ); + } + + public function test_strips_trademark_symbol() { + $this->assertSame( 'one-two', sanitize_title_with_dashes( 'One Twoā„¢;', '', 'save' ) ); + } + + public function test_strips_unencoded_ampersand_followed_by_encoded_ampersand() { + $this->assertSame( 'one-two', sanitize_title_with_dashes( 'One && Two;', '', 'save' ) ); + } + + public function test_strips_unencoded_ampersand_when_not_surrounded_by_spaces() { + $this->assertSame( 'onetwo', sanitize_title_with_dashes( 'One&Two', '', 'save' ) ); + } + + public function test_replaces_nbsp() { + $this->assertSame( 'dont-break-the-space', sanitize_title_with_dashes( "don'tĀ breakĀ theĀ space", '', 'save' ) ); + } + + /** + * @ticket 31790 + */ + public function test_replaces_nbsp_entities() { + $this->assertSame( 'dont-break-the-space', sanitize_title_with_dashes( "don't break the space", '', 'save' ) ); + } + + public function test_replaces_ndash_mdash() { + $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do – the Dash', '', 'save' ) ); + $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do the — Dash', '', 'save' ) ); + } + + /** + * @ticket 31790 + */ + public function test_replaces_ndash_mdash_entities() { + $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do – the – Dash', '', 'save' ) ); + $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do — the — Dash', '', 'save' ) ); + } + + public function test_replaces_iexcel_iquest() { + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just Ā”a Slug', '', 'save' ) ); + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just a SlugĀæ', '', 'save' ) ); + } + + public function test_replaces_angle_quotes() { + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( '‹Just a Slug›', '', 'save' ) ); + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Ā«Just a SlugĀ»', '', 'save' ) ); + } + + public function test_replaces_curly_quotes() { + $this->assertSame( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€œCurly Joeā€', '', 'save' ) ); + $this->assertSame( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€˜Curly Joe’', '', 'save' ) ); + $this->assertSame( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€žCurly Joeā€œ', '', 'save' ) ); + $this->assertSame( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€šCurly Joe‛', '', 'save' ) ); + $this->assertSame( 'hey-its-curly-joe', sanitize_title_with_dashes( 'Hey its ā€žCurly Joeā€Ÿ', '', 'save' ) ); + } + + /** + * @ticket 49791 + */ + public function test_replaces_bullet() { + $this->assertSame( 'fancy-title-amazing', sanitize_title_with_dashes( 'Fancy Title • Amazing', '', 'save' ) ); + } + + public function test_replaces_copy_reg_deg_trade() { + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just Ā© a Slug', '', 'save' ) ); + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Ā® Just a Slug', '', 'save' ) ); + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just a ° Slug', '', 'save' ) ); + $this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just ā„¢ a Slug', '', 'save' ) ); + } + + /** + * @ticket 10792 + */ + public function test_replaces_forward_slash() { + $this->assertSame( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon/McCartney', '', 'save' ) ); + $this->assertSame( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon//McCartney', '', 'save' ) ); + $this->assertSame( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon///McCartney', '', 'save' ) ); + $this->assertSame( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( 'songs by Lennon/-McCartney', '', 'save' ) ); + $this->assertSame( 'songs-by-lennon-mccartney', sanitize_title_with_dashes( '//songs by Lennon/McCartney', '', 'save' ) ); + } + + /** + * @ticket 19820 + */ + public function test_replaces_multiply_sign() { + $this->assertSame( '6x7-is-42', sanitize_title_with_dashes( '6Ɨ7 is 42', '', 'save' ) ); + } + + /** + * @ticket 20772 + */ + public function test_replaces_standalone_diacritic() { + $this->assertSame( 'aaaa', sanitize_title_with_dashes( 'aĢ„áǎaĢ€', '', 'save' ) ); + } + + /** + * @ticket 22395 + */ + public function test_replaces_acute_accents() { + $this->assertSame( 'aaaa', sanitize_title_with_dashes( 'ááaĀ“aˊ', '', 'save' ) ); + } + + /** + * @ticket 47912 + * @dataProvider data_removes_non_visible_characters_without_width + * + * @param string $title The title to be sanitized. + * @param string $expected Expected sanitized title. + */ + public function test_removes_non_visible_characters_without_width( $title, $expected = '' ) { + $this->assertSame( $expected, sanitize_title_with_dashes( $title, '', 'save' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_removes_non_visible_characters_without_width() { + return array( + // Only the non-visible characters. + 'only %e2%80%8b' => array( '%e2%80%8b' ), + 'only %e2%80%8c' => array( '%e2%80%8c' ), + 'only %e2%80%8d' => array( '%e2%80%8d' ), + 'only %e2%80%8e' => array( '%e2%80%8e' ), + 'only %e2%80%8f' => array( '%e2%80%8f' ), + 'only %e2%80%aa' => array( '%e2%80%aa' ), + 'only %e2%80%ab' => array( '%e2%80%ab' ), + 'only %e2%80%ac' => array( '%e2%80%ac' ), + 'only %e2%80%ad' => array( '%e2%80%ad' ), + 'only %e2%80%ae' => array( '%e2%80%ae' ), + 'only %ef%bb%bf' => array( '%ef%bb%bf' ), + + // Non-visible characters within the title. + 'in middle of title' => array( + 'title' => 'Nonvisible %ef%bb%bfin middle of title', + 'expected' => 'nonvisible-in-middle-of-title', + ), + 'at start of title' => array( + 'title' => '%e2%80%8bNonvisible at start of title', + 'expected' => 'nonvisible-at-start-of-title', + ), + 'at end of title' => array( + 'title' => 'Nonvisible at end of title %e2%80%8b', + 'expected' => 'nonvisible-at-end-of-title', + ), + 'randomly in title' => array( + 'title' => 'Nonvisible%ef%bb%bf %e2%80%aerandomly %e2%80%8ein the %e2%80%8e title%e2%80%8e', + 'expected' => 'nonvisible-randomly-in-the-title', + ), + ); + } + + /** + * @ticket 47912 + * @dataProvider data_non_visible_characters_without_width_when_not_save + * + * @param string $title The title to be sanitized. + * @param string $expected Expected sanitized title. + */ + public function test_non_visible_characters_without_width_when_not_save( $title, $expected = '' ) { + $this->assertSame( $expected, sanitize_title_with_dashes( $title ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_non_visible_characters_without_width_when_not_save() { + return array( + // Just the non-visible characters. + 'only %e2%80%8b' => array( '%e2%80%8b', '%e2%80%8b' ), + 'only %e2%80%8c' => array( '%e2%80%8c', '%e2%80%8c' ), + 'only %e2%80%8d' => array( '%e2%80%8d', '%e2%80%8d' ), + 'only %e2%80%8e' => array( '%e2%80%8e', '%e2%80%8e' ), + 'only %e2%80%8f' => array( '%e2%80%8f', '%e2%80%8f' ), + 'only %e2%80%aa' => array( '%e2%80%aa', '%e2%80%aa' ), + 'only %e2%80%ab' => array( '%e2%80%ab', '%e2%80%ab' ), + 'only %e2%80%ac' => array( '%e2%80%ac', '%e2%80%ac' ), + 'only %e2%80%ad' => array( '%e2%80%ad', '%e2%80%ad' ), + 'only %e2%80%ae' => array( '%e2%80%ae', '%e2%80%ae' ), + 'only %ef%bb%bf' => array( '%ef%bb%bf', '%ef%bb%bf' ), + + // Non-visible characters within the title. + 'in middle of title' => array( + 'title' => 'Nonvisible %ef%bb%bfin middle of title', + 'expected' => 'nonvisible-%ef%bb%bfin-middle-of-title', + ), + 'at start of title' => array( + 'title' => '%e2%80%8bNonvisible at start of title', + 'expected' => '%e2%80%8bnonvisible-at-start-of-title', + ), + 'at end of title' => array( + 'title' => 'Nonvisible at end of title %e2%80%8b', + 'expected' => 'nonvisible-at-end-of-title-%e2%80%8b', + ), + 'randomly in title' => array( + 'title' => 'Nonvisible%ef%bb%bf %e2%80%aerandomly %e2%80%8ein the %e2%80%8e title%e2%80%8e', + 'expected' => 'nonvisible%ef%bb%bf-%e2%80%aerandomly-%e2%80%8ein-the-%e2%80%8e-title%e2%80%8e', + ), + ); + } + + /** + * @ticket 47912 + * @dataProvider data_converts_non_visible_characters_with_width_to_hyphen + * + * @param string $title The title to be sanitized. + * @param string $expected Expected sanitized title. + */ + public function test_converts_non_visible_characters_with_width_to_hyphen( $title, $expected = '' ) { + $this->assertSame( $expected, sanitize_title_with_dashes( $title, '', 'save' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_converts_non_visible_characters_with_width_to_hyphen() { + return array( + // Only the non-visible characters. + 'only %e2%80%80' => array( '%e2%80%80' ), + 'only %e2%80%81' => array( '%e2%80%81' ), + 'only %e2%80%82' => array( '%e2%80%82' ), + 'only %e2%80%83' => array( '%e2%80%83' ), + 'only %e2%80%84' => array( '%e2%80%84' ), + 'only %e2%80%85' => array( '%e2%80%85' ), + 'only %e2%80%86' => array( '%e2%80%86' ), + 'only %e2%80%87' => array( '%e2%80%87' ), + 'only %e2%80%88' => array( '%e2%80%88' ), + 'only %e2%80%89' => array( '%e2%80%89' ), + 'only %e2%80%8a' => array( '%e2%80%8a' ), + 'only %e2%80%a8' => array( '%e2%80%a8' ), + 'only %e2%80%a9' => array( '%e2%80%a9' ), + 'only %e2%80%af' => array( '%e2%80%af' ), + + // Non-visible characters within the title. + 'in middle of title' => array( + 'title' => 'Nonvisible %e2%80%82 in middle of title', + 'expected' => 'nonvisible-in-middle-of-title', + ), + 'at start of title' => array( + 'title' => '%e2%80%83Nonvisible at start of title', + 'expected' => 'nonvisible-at-start-of-title', + ), + 'at end of title' => array( + 'title' => 'Nonvisible at end of title %e2%80%81', + 'expected' => 'nonvisible-at-end-of-title', + ), + 'two end of title' => array( + 'title' => 'Nonvisible at end of title %e2%80%81 %e2%80%af', + 'expected' => 'nonvisible-at-end-of-title', + ), + 'randomly in title' => array( + 'title' => 'Nonvisible%e2%80%80 %e2%80%a9randomly %e2%80%87in the %e2%80%a8 title%e2%80%af', + 'expected' => 'nonvisible-randomly-in-the-title', + ), + ); + } + + /** + * @ticket 47912 + * @dataProvider data_non_visible_characters_with_width_to_hyphen_when_not_save + * + * @param string $title The title to be sanitized. + * @param string $expected Expected sanitized title. + */ + public function test_non_visible_characters_with_width_to_hyphen_when_not_save( $title, $expected = '' ) { + $this->assertSame( $expected, sanitize_title_with_dashes( $title ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_non_visible_characters_with_width_to_hyphen_when_not_save() { + return array( + // Just the non-visible characters. + 'only %e2%80%8b' => array( '%e2%80%8b', '%e2%80%8b' ), + 'only %e2%80%8c' => array( '%e2%80%8c', '%e2%80%8c' ), + 'only %e2%80%8d' => array( '%e2%80%8d', '%e2%80%8d' ), + 'only %e2%80%8e' => array( '%e2%80%8e', '%e2%80%8e' ), + 'only %e2%80%8f' => array( '%e2%80%8f', '%e2%80%8f' ), + 'only %e2%80%aa' => array( '%e2%80%aa', '%e2%80%aa' ), + 'only %e2%80%ab' => array( '%e2%80%ab', '%e2%80%ab' ), + 'only %e2%80%ac' => array( '%e2%80%ac', '%e2%80%ac' ), + 'only %e2%80%ad' => array( '%e2%80%ad', '%e2%80%ad' ), + 'only %e2%80%ae' => array( '%e2%80%ae', '%e2%80%ae' ), + 'only %ef%bb%bf' => array( '%ef%bb%bf', '%ef%bb%bf' ), + + // Non-visible characters within the title. + 'in middle of title' => array( + 'title' => 'Nonvisible %e2%80%82 in middle of title', + 'expected' => 'nonvisible-%e2%80%82-in-middle-of-title', + ), + 'at start of title' => array( + 'title' => '%e2%80%83Nonvisible at start of title', + 'expected' => '%e2%80%83nonvisible-at-start-of-title', + ), + 'at end of title' => array( + 'title' => 'Nonvisible at end of title %e2%80%81', + 'expected' => 'nonvisible-at-end-of-title-%e2%80%81', + ), + 'randomly in title' => array( + 'title' => 'Nonvisible%e2%80%80 %e2%80%aerandomly %e2%80%87in the %e2%80%a8 title%e2%80%af', + 'expected' => 'nonvisible%e2%80%80-%e2%80%aerandomly-%e2%80%87in-the-%e2%80%a8-title%e2%80%af', + ), + ); + } +} diff --git a/tests/phpunit/tests/formatting/SanitizeTrackbackUrls.php b/tests/phpunit/tests/formatting/sanitizeTrackbackUrls.php similarity index 58% rename from tests/phpunit/tests/formatting/SanitizeTrackbackUrls.php rename to tests/phpunit/tests/formatting/sanitizeTrackbackUrls.php index b70f71bb43fe4..8337a2a6622e3 100644 --- a/tests/phpunit/tests/formatting/SanitizeTrackbackUrls.php +++ b/tests/phpunit/tests/formatting/sanitizeTrackbackUrls.php @@ -8,11 +8,11 @@ class Tests_Formatting_SanitizeTrackbackUrls extends WP_UnitTestCase { * @ticket 21624 * @dataProvider breaks */ - function test_sanitize_trackback_urls_with_multiple_urls( $break ) { - $this->assertEquals( "http://example.com\nhttp://example.org", sanitize_trackback_urls( "http://example.com{$break}http://example.org" ) ); + public function test_sanitize_trackback_urls_with_multiple_urls( $break ) { + $this->assertSame( "http://example.com\nhttp://example.org", sanitize_trackback_urls( "http://example.com{$break}http://example.org" ) ); } - function breaks() { + public function breaks() { return array( array( "\r\n\t " ), array( "\r" ), diff --git a/tests/phpunit/tests/formatting/SanitizeUser.php b/tests/phpunit/tests/formatting/sanitizeUser.php similarity index 58% rename from tests/phpunit/tests/formatting/SanitizeUser.php rename to tests/phpunit/tests/formatting/sanitizeUser.php index b4e051c6786b5..e0ae998f5e97d 100644 --- a/tests/phpunit/tests/formatting/SanitizeUser.php +++ b/tests/phpunit/tests/formatting/sanitizeUser.php @@ -4,10 +4,10 @@ * @group formatting */ class Tests_Formatting_SanitizeUser extends WP_UnitTestCase { - function test_strips_html() { + public function test_strips_html() { $input = 'Captain <strong>Awesome</strong>'; $expected = is_multisite() ? 'captain awesome' : 'Captain Awesome'; - $this->assertEquals( $expected, sanitize_user( $input ) ); + $this->assertSame( $expected, sanitize_user( $input ) ); } public function test_strips_encoded_ampersand() { @@ -18,7 +18,7 @@ public function test_strips_encoded_ampersand() { $expected = strtolower( $expected ); } - $this->assertEquals( $expected, sanitize_user( 'AT&T' ) ); + $this->assertSame( $expected, sanitize_user( 'AT&T' ) ); } public function test_strips_encoded_ampersand_when_followed_by_semicolon() { @@ -29,14 +29,14 @@ public function test_strips_encoded_ampersand_when_followed_by_semicolon() { $expected = strtolower( $expected ); } - $this->assertEquals( $expected, sanitize_user( 'AT&T Test;' ) ); + $this->assertSame( $expected, sanitize_user( 'AT&T Test;' ) ); } - function test_strips_percent_encoded_octets() { + public function test_strips_percent_encoded_octets() { $expected = is_multisite() ? 'franois' : 'Franois'; - $this->assertEquals( $expected, sanitize_user( 'Fran%c3%a7ois' ) ); + $this->assertSame( $expected, sanitize_user( 'Fran%c3%a7ois' ) ); } - function test_optional_strict_mode_reduces_to_safe_ascii_subset() { - $this->assertEquals( 'abc', sanitize_user( '()~ab~ˆcˆ!', true ) ); + public function test_optional_strict_mode_reduces_to_safe_ascii_subset() { + $this->assertSame( 'abc', sanitize_user( '()~ab~ˆcˆ!', true ) ); } } diff --git a/tests/phpunit/tests/formatting/SeemsUtf8.php b/tests/phpunit/tests/formatting/seemsUtf8.php similarity index 80% rename from tests/phpunit/tests/formatting/SeemsUtf8.php rename to tests/phpunit/tests/formatting/seemsUtf8.php index 5571ba323459a..a5a6157fd283d 100644 --- a/tests/phpunit/tests/formatting/SeemsUtf8.php +++ b/tests/phpunit/tests/formatting/seemsUtf8.php @@ -10,12 +10,12 @@ class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase { * * @dataProvider utf8_strings */ - function test_returns_true_for_utf8_strings( $utf8_string ) { + public function test_returns_true_for_utf8_strings( $utf8_string ) { // From http://www.i18nguy.com/unicode-example.html $this->assertTrue( seems_utf8( $utf8_string ) ); } - function utf8_strings() { + public function utf8_strings() { $utf8_strings = file( DIR_TESTDATA . '/formatting/utf-8/utf-8.txt' ); foreach ( $utf8_strings as &$string ) { $string = (array) trim( $string ); @@ -27,11 +27,11 @@ function utf8_strings() { /** * @dataProvider big5_strings */ - function test_returns_false_for_non_utf8_strings( $big5_string ) { + public function test_returns_false_for_non_utf8_strings( $big5_string ) { $this->assertFalse( seems_utf8( $big5_string ) ); } - function big5_strings() { + public function big5_strings() { // Get data from formatting/big5.txt. $big5_strings = file( DIR_TESTDATA . '/formatting/big5.txt' ); foreach ( $big5_strings as &$string ) { diff --git a/tests/phpunit/tests/formatting/slashit.php b/tests/phpunit/tests/formatting/slashit.php new file mode 100644 index 0000000000000..9c32aa2c649e9 --- /dev/null +++ b/tests/phpunit/tests/formatting/slashit.php @@ -0,0 +1,54 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_Slashit extends WP_UnitTestCase { + public function test_backslashes_middle_numbers() { + $this->assertSame( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) ); + } + + public function test_backslashes_alphas() { + $this->assertSame( "\\a943\\b\\c", backslashit( 'a943bc' ) ); + } + + public function test_double_backslashes_leading_numbers() { + $this->assertSame( '\\\\95', backslashit( '95' ) ); + } + + public function test_removes_trailing_slashes() { + $this->assertSame( 'a', untrailingslashit( 'a/' ) ); + $this->assertSame( 'a', untrailingslashit( 'a////' ) ); + } + + /** + * @ticket 22267 + */ + public function test_removes_trailing_backslashes() { + $this->assertSame( 'a', untrailingslashit( 'a\\' ) ); + $this->assertSame( 'a', untrailingslashit( 'a\\\\\\\\' ) ); + } + + /** + * @ticket 22267 + */ + public function test_removes_trailing_mixed_slashes() { + $this->assertSame( 'a', untrailingslashit( 'a/\\' ) ); + $this->assertSame( 'a', untrailingslashit( 'a\\/\\///\\\\//' ) ); + } + + public function test_adds_trailing_slash() { + $this->assertSame( 'a/', trailingslashit( 'a' ) ); + } + + public function test_does_not_add_trailing_slash_if_one_exists() { + $this->assertSame( 'a/', trailingslashit( 'a/' ) ); + } + + /** + * @ticket 22267 + */ + public function test_converts_trailing_backslash_to_slash_if_one_exists() { + $this->assertSame( 'a/', trailingslashit( 'a\\' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/stripslashesDeep.php b/tests/phpunit/tests/formatting/stripslashesDeep.php new file mode 100644 index 0000000000000..c5ce91b44b925 --- /dev/null +++ b/tests/phpunit/tests/formatting/stripslashesDeep.php @@ -0,0 +1,54 @@ +<?php + +/** + * @group formatting + * @group slashes + */ +class Tests_Formatting_StripslashesDeep extends WP_UnitTestCase { + /** + * @ticket 18026 + */ + public function test_preserves_original_datatype() { + + $this->assertTrue( stripslashes_deep( true ) ); + $this->assertFalse( stripslashes_deep( false ) ); + $this->assertSame( 4, stripslashes_deep( 4 ) ); + $this->assertSame( 'foo', stripslashes_deep( 'foo' ) ); + $arr = array( + 'a' => true, + 'b' => false, + 'c' => 4, + 'd' => 'foo', + ); + $arr['e'] = $arr; // Add a sub-array. + $this->assertSame( $arr, stripslashes_deep( $arr ) ); // Keyed array. + $this->assertSame( array_values( $arr ), stripslashes_deep( array_values( $arr ) ) ); // Non-keyed. + + $obj = new stdClass; + foreach ( $arr as $k => $v ) { + $obj->$k = $v; + } + $this->assertSame( $obj, stripslashes_deep( $obj ) ); + } + + public function test_strips_slashes() { + $old = "I can\'t see, isn\'t that it?"; + $new = "I can't see, isn't that it?"; + $this->assertSame( $new, stripslashes_deep( $old ) ); + $this->assertSame( $new, stripslashes_deep( "I can\\'t see, isn\\'t that it?" ) ); + $this->assertSame( array( 'a' => $new ), stripslashes_deep( array( 'a' => $old ) ) ); // Keyed array. + $this->assertSame( array( $new ), stripslashes_deep( array( $old ) ) ); // Non-keyed. + + $obj_old = new stdClass; + $obj_old->a = $old; + $obj_new = new stdClass; + $obj_new->a = $new; + $this->assertEquals( $obj_new, stripslashes_deep( $obj_old ) ); + } + + public function test_permits_escaped_slash() { + $txt = "I can't see, isn\'t that it?"; + $this->assertSame( $txt, stripslashes_deep( "I can\'t see, isn\\\'t that it?" ) ); + $this->assertSame( $txt, stripslashes_deep( "I can\'t see, isn\\\\\'t that it?" ) ); + } +} diff --git a/tests/phpunit/tests/formatting/URLShorten.php b/tests/phpunit/tests/formatting/urlShorten.php similarity index 74% rename from tests/phpunit/tests/formatting/URLShorten.php rename to tests/phpunit/tests/formatting/urlShorten.php index dde9ce96553b8..5900e358e9762 100644 --- a/tests/phpunit/tests/formatting/URLShorten.php +++ b/tests/phpunit/tests/formatting/urlShorten.php @@ -3,8 +3,8 @@ /** * @group formatting */ -class Tests_Formatting_URLShorten extends WP_UnitTestCase { - function test_shorten_url() { +class Tests_Formatting_UrlShorten extends WP_UnitTestCase { + public function test_url_shorten() { $tests = array( 'wordpress\.org/about/philosophy' => 'wordpress\.org/about/philosophy', // No longer strips slashes. 'wordpress.org/about/philosophy' => 'wordpress.org/about/philosophy', @@ -14,10 +14,10 @@ function test_shorten_url() { 'http://wordpress.org/about/philosophy/#decisions' => 'wordpress.org/about/philosophy/#…', // Shorten to 32 if > 35 after cleaning. ); foreach ( $tests as $k => $v ) { - $this->assertEquals( $v, url_shorten( $k ) ); + $this->assertSame( $v, url_shorten( $k ) ); } // Shorten to 31 if > 34 after cleaning. - $this->assertEquals( 'wordpress.org/about/philosophy/#…', url_shorten( 'http://wordpress.org/about/philosophy/#decisions' ), 31 ); + $this->assertSame( 'wordpress.org/about/philosophy/#…', url_shorten( 'http://wordpress.org/about/philosophy/#decisions' ), 31 ); } } diff --git a/tests/phpunit/tests/formatting/UrlencodeDeep.php b/tests/phpunit/tests/formatting/urlencodeDeep.php similarity index 89% rename from tests/phpunit/tests/formatting/UrlencodeDeep.php rename to tests/phpunit/tests/formatting/urlencodeDeep.php index 1c36403a19bf4..27c0c750bbbfe 100644 --- a/tests/phpunit/tests/formatting/UrlencodeDeep.php +++ b/tests/phpunit/tests/formatting/urlencodeDeep.php @@ -28,7 +28,7 @@ public function data_test_values() { * @param string $expected */ public function test_urlencode_deep_should_encode_individual_value( $actual, $expected ) { - $this->assertEquals( $expected, urlencode_deep( $actual ) ); + $this->assertSame( $expected, urlencode_deep( $actual ) ); } /** @@ -40,7 +40,7 @@ public function test_urlencode_deep_should_encode_all_values_in_array() { $actual = wp_list_pluck( $data, 0 ); $expected = wp_list_pluck( $data, 1 ); - $this->assertEquals( $expected, urlencode_deep( $actual ) ); + $this->assertSame( $expected, urlencode_deep( $actual ) ); } } diff --git a/tests/phpunit/tests/formatting/Utf8UriEncode.php b/tests/phpunit/tests/formatting/utf8UriEncode.php similarity index 71% rename from tests/phpunit/tests/formatting/Utf8UriEncode.php rename to tests/phpunit/tests/formatting/utf8UriEncode.php index 43c925c5fa04f..310b906104acb 100644 --- a/tests/phpunit/tests/formatting/Utf8UriEncode.php +++ b/tests/phpunit/tests/formatting/utf8UriEncode.php @@ -11,19 +11,19 @@ class Tests_Formatting_Utf8UriEncode extends WP_UnitTestCase { * * @dataProvider data */ - function test_percent_encodes_non_reserved_characters( $utf8, $urlencoded ) { - $this->assertEquals( $urlencoded, utf8_uri_encode( $utf8 ) ); + public function test_percent_encodes_non_reserved_characters( $utf8, $urlencoded ) { + $this->assertSame( $urlencoded, utf8_uri_encode( $utf8 ) ); } /** * @dataProvider data */ - function test_output_is_not_longer_than_optional_length_argument( $utf8, $unused_for_this_test ) { + public function test_output_is_not_longer_than_optional_length_argument( $utf8, $unused_for_this_test ) { $max_length = 30; $this->assertTrue( strlen( utf8_uri_encode( $utf8, $max_length ) ) <= $max_length ); } - function data() { + public function data() { $utf8_urls = file( DIR_TESTDATA . '/formatting/utf-8/utf-8.txt' ); $urlencoded = file( DIR_TESTDATA . '/formatting/utf-8/urlencoded.txt' ); $data_provided = array(); diff --git a/tests/phpunit/tests/formatting/Autop.php b/tests/phpunit/tests/formatting/wpAutop.php similarity index 87% rename from tests/phpunit/tests/formatting/Autop.php rename to tests/phpunit/tests/formatting/wpAutop.php index 6a672345d7e1e..35567e87429b3 100644 --- a/tests/phpunit/tests/formatting/Autop.php +++ b/tests/phpunit/tests/formatting/wpAutop.php @@ -3,12 +3,12 @@ /** * @group formatting */ -class Tests_Formatting_Autop extends WP_UnitTestCase { +class Tests_Formatting_wpAutop extends WP_UnitTestCase { /** * @ticket 11008 */ - function test_first_post() { + public function test_first_post() { $expected = '<p>Welcome to WordPress! This post contains important information. After you read it, you can make it private to hide it from visitors but still have the information handy for future reference.</p> <p>First things first:</p> <ul> @@ -62,7 +62,7 @@ function test_first_post() { // On Windows environments, the EOL-style is \r\n. $expected = str_replace( "\r\n", "\n", $expected ); - $this->assertEquals( $expected, wpautop( $test_data ) ); + $this->assertSame( $expected, wpautop( $test_data ) ); } /** @@ -77,19 +77,19 @@ public function test_skip_pre_elements() { // Not wrapped in <p> tags. $str = "<pre>$code</pre>"; - $this->assertEquals( $str, trim( wpautop( $str ) ) ); + $this->assertSame( $str, trim( wpautop( $str ) ) ); // Text before/after is wrapped in <p> tags. $str = "Look at this code\n\n<pre>$code</pre>\n\nIsn't that cool?"; // Expected text after wpautop(). $expected = '<p>Look at this code</p>' . "\n<pre>" . $code . "</pre>\n" . '<p>Isn\'t that cool?</p>'; - $this->assertEquals( $expected, trim( wpautop( $str ) ) ); + $this->assertSame( $expected, trim( wpautop( $str ) ) ); // Make sure HTML breaks are maintained if manually inserted. $str = "Look at this code\n\n<pre>Line1<br />Line2<br>Line3<br/>Line4\nActual Line 2\nActual Line 3</pre>\n\nCool, huh?"; $expected = "<p>Look at this code</p>\n<pre>Line1<br />Line2<br>Line3<br/>Line4\nActual Line 2\nActual Line 3</pre>\n<p>Cool, huh?</p>"; - $this->assertEquals( $expected, trim( wpautop( $str ) ) ); + $this->assertSame( $expected, trim( wpautop( $str ) ) ); } /** @@ -99,7 +99,7 @@ public function test_skip_pre_elements() { */ public function test_skip_input_elements() { $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />'; - $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); + $this->assertSame( "<p>$str</p>", trim( wpautop( $str ) ) ); } /** @@ -183,9 +183,9 @@ public function test_source_track_elements() { "[/video]</p>\n" . '<p>Paragraph two.</p>'; - $this->assertEquals( $expected, trim( wpautop( $content ) ) ); - $this->assertEquals( $expected, trim( wpautop( $content2 ) ) ); - $this->assertEquals( $shortcode_expected, trim( wpautop( $shortcode_content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content2 ) ) ); + $this->assertSame( $shortcode_expected, trim( wpautop( $shortcode_content ) ) ); } /** @@ -263,8 +263,8 @@ public function test_param_embed_elements() { "</object></div>\n" . '<p>Paragraph two.</p>'; - $this->assertEquals( $expected1, trim( wpautop( $content1 ) ) ); - $this->assertEquals( $expected2, trim( wpautop( $content2 ) ) ); + $this->assertSame( $expected1, trim( wpautop( $content1 ) ) ); + $this->assertSame( $expected2, trim( wpautop( $content2 ) ) ); } /** @@ -274,7 +274,7 @@ public function test_param_embed_elements() { */ public function test_skip_select_option_elements() { $str = 'Country: <select id="state" name="state"><option value="1">Alabama</option><option value="2">Alaska</option><option value="3">Arizona</option><option value="4">Arkansas</option><option value="5">California</option></select>'; - $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); + $this->assertSame( "<p>$str</p>", trim( wpautop( $str ) ) ); } /** @@ -282,7 +282,7 @@ public function test_skip_select_option_elements() { * * @ticket 27268 */ - function test_that_wpautop_treats_block_level_elements_as_blocks() { + public function test_that_wpautop_treats_block_level_elements_as_blocks() { $blocks = array( 'table', 'thead', @@ -337,14 +337,14 @@ function test_that_wpautop_treats_block_level_elements_as_blocks() { $content[] = "<$block>foo</$block>"; } - $expected = join( "\n", $content ); - $input = join( "\n\n", $content ); // Whitespace difference. + $expected = implode( "\n", $content ); + $input = implode( "\n\n", $content ); // Whitespace difference. - $this->assertEquals( $expected, trim( wpautop( $input ) ) ); + $this->assertSame( $expected, trim( wpautop( $input ) ) ); - $input = join( '', $content ); // Whitespace difference. + $input = implode( '', $content ); // Whitespace difference. - $this->assertEquals( $expected, trim( wpautop( $input ) ) ); + $this->assertSame( $expected, trim( wpautop( $input ) ) ); // Check whitespace addition. $content = array(); @@ -353,10 +353,10 @@ function test_that_wpautop_treats_block_level_elements_as_blocks() { $content[] = "<$block/>"; } - $expected = join( "\n", $content ); - $input = join( '', $content ); + $expected = implode( "\n", $content ); + $input = implode( '', $content ); - $this->assertEquals( $expected, trim( wpautop( $input ) ) ); + $this->assertSame( $expected, trim( wpautop( $input ) ) ); // Check whitespace addition with attributes. $content = array(); @@ -365,10 +365,10 @@ function test_that_wpautop_treats_block_level_elements_as_blocks() { $content[] = "<$block attr='value'>foo</$block>"; } - $expected = join( "\n", $content ); - $input = join( '', $content ); + $expected = implode( "\n", $content ); + $input = implode( '', $content ); - $this->assertEquals( $expected, trim( wpautop( $input ) ) ); + $this->assertSame( $expected, trim( wpautop( $input ) ) ); } /** @@ -376,11 +376,11 @@ function test_that_wpautop_treats_block_level_elements_as_blocks() { * * @ticket 27268 */ - function test_that_wpautop_does_not_wrap_blockquotes_but_does_autop_their_contents() { + public function test_that_wpautop_does_not_wrap_blockquotes_but_does_autop_their_contents() { $content = '<blockquote>foo</blockquote>'; $expected = '<blockquote><p>foo</p></blockquote>'; - $this->assertEquals( $expected, trim( wpautop( $content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content ) ) ); } /** @@ -388,7 +388,7 @@ function test_that_wpautop_does_not_wrap_blockquotes_but_does_autop_their_conten * * @ticket 27268 */ - function test_that_wpautop_treats_inline_elements_as_inline() { + public function test_that_wpautop_treats_inline_elements_as_inline() { $inlines = array( 'a', 'em', @@ -426,10 +426,10 @@ function test_that_wpautop_treats_inline_elements_as_inline() { $expected[] = "<p><$inline>foo</$inline></p>"; } - $content = join( "\n\n", $content ); - $expected = join( "\n", $expected ); + $content = implode( "\n\n", $content ); + $expected = implode( "\n", $expected ); - $this->assertEquals( $expected, trim( wpautop( $content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content ) ) ); } /** @@ -438,11 +438,11 @@ function test_that_wpautop_treats_inline_elements_as_inline() { * @ticket 33106 * @dataProvider data_element_sanity */ - function test_element_sanity( $input, $output ) { - return $this->assertEquals( $output, wpautop( $input ) ); + public function test_element_sanity( $input, $output ) { + return $this->assertSame( $output, wpautop( $input ) ); } - function data_element_sanity() { + public function data_element_sanity() { return array( array( "Hello <a\nhref='world'>", @@ -490,7 +490,7 @@ function data_element_sanity() { * * @ticket 33377 */ - function test_that_wpautop_skips_line_breaks_after_br() { + public function test_that_wpautop_skips_line_breaks_after_br() { $content = ' line 1<br> line 2<br/> @@ -505,7 +505,7 @@ function test_that_wpautop_skips_line_breaks_after_br() { line 4<br /> line 5</p>'; - $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) ); + $this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) ); } /** @@ -513,7 +513,7 @@ function test_that_wpautop_skips_line_breaks_after_br() { * * @ticket 33377 */ - function test_that_wpautop_adds_a_paragraph_after_multiple_br() { + public function test_that_wpautop_adds_a_paragraph_after_multiple_br() { $content = ' line 1<br> <br/> @@ -524,18 +524,18 @@ function test_that_wpautop_adds_a_paragraph_after_multiple_br() { $expected = '<p>line 1</p> <p>line 2</p>'; - $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) ); + $this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) ); } /** * @ticket 4857 */ - function test_that_text_before_blocks_is_peed() { + public function test_that_text_before_blocks_is_peed() { $content = 'a<div>b</div>'; $expected = "<p>a</p>\n<div>b</div>"; - $this->assertEquals( $expected, trim( wpautop( $content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content ) ) ); } /** @@ -546,7 +546,7 @@ function test_that_text_before_blocks_is_peed() { * * @ticket 39307 */ - function test_that_wpautop_does_not_add_extra_closing_p_in_figure() { + public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() { $content1 = '<figure><img src="example.jpg" /><figcaption>Caption</figcaption></figure>'; $expected1 = $content1; @@ -558,18 +558,18 @@ function test_that_wpautop_does_not_add_extra_closing_p_in_figure() { $expected2 = '<figure> <img src="example.jpg" /><figcaption>Caption</figcaption></figure>'; - $this->assertEquals( $expected1, trim( wpautop( $content1 ) ) ); - $this->assertEqualsIgnoreEOL( $expected2, trim( wpautop( $content2 ) ) ); + $this->assertSame( $expected1, trim( wpautop( $content1 ) ) ); + $this->assertSameIgnoreEOL( $expected2, trim( wpautop( $content2 ) ) ); } /** * @ticket 14674 */ - function test_the_hr_is_not_peed() { + public function test_the_hr_is_not_peed() { $content = 'paragraph1<hr>paragraph2'; $expected = "<p>paragraph1</p>\n<hr>\n<p>paragraph2</p>"; - $this->assertEquals( $expected, trim( wpautop( $content ) ) ); + $this->assertSame( $expected, trim( wpautop( $content ) ) ); } /** @@ -577,7 +577,7 @@ function test_the_hr_is_not_peed() { * * @ticket 9437 */ - function test_that_wpautop_ignores_inline_svgs() { + public function test_that_wpautop_ignores_inline_svgs() { $content = '<svg xmlns="http://www.w3.org/2000/svg"> <circle cx="50" cy="50" r="30" fill="blue"> @@ -587,7 +587,7 @@ function test_that_wpautop_ignores_inline_svgs() { $expected = '<p>' . $content . '</p>'; - $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) ); + $this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) ); } /** @@ -595,7 +595,7 @@ function test_that_wpautop_ignores_inline_svgs() { * * @ticket 9437 */ - function test_that_wpautop_ignores_inline_scripts() { + public function test_that_wpautop_ignores_inline_scripts() { $content = '<script type="text/javascript"> var dummy = 1; @@ -603,6 +603,6 @@ function test_that_wpautop_ignores_inline_scripts() { $expected = '<p>' . $content . '</p>'; - $this->assertEqualsIgnoreEOL( $expected, trim( wpautop( $content ) ) ); + $this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) ); } } diff --git a/tests/phpunit/tests/formatting/WPBasename.php b/tests/phpunit/tests/formatting/wpBasename.php similarity index 53% rename from tests/phpunit/tests/formatting/WPBasename.php rename to tests/phpunit/tests/formatting/wpBasename.php index 780d2c7473c54..6bb7d5684b9ae 100644 --- a/tests/phpunit/tests/formatting/WPBasename.php +++ b/tests/phpunit/tests/formatting/wpBasename.php @@ -3,17 +3,17 @@ /** * @group formatting */ -class Tests_Formatting_WP_Basename extends WP_UnitTestCase { +class Tests_Formatting_wpBasename extends WP_UnitTestCase { - function test_wp_basename_unix() { - $this->assertEquals( + public function test_wp_basename_unix() { + $this->assertSame( 'file', wp_basename( '/home/test/file' ) ); } - function test_wp_basename_unix_utf8_support() { - $this->assertEquals( + public function test_wp_basename_unix_utf8_support() { + $this->assertSame( 'žluÅ„oučký kůň.txt', wp_basename( '/test/žluÅ„oučký kůň.txt' ) ); @@ -22,8 +22,8 @@ function test_wp_basename_unix_utf8_support() { /** * @ticket 22138 */ - function test_wp_basename_windows() { - $this->assertEquals( + public function test_wp_basename_windows() { + $this->assertSame( 'file.txt', wp_basename( 'C:\Documents and Settings\User\file.txt' ) ); @@ -32,8 +32,8 @@ function test_wp_basename_windows() { /** * @ticket 22138 */ - function test_wp_basename_windows_utf8_support() { - $this->assertEquals( + public function test_wp_basename_windows_utf8_support() { + $this->assertSame( 'щипцы.txt', wp_basename( 'C:\test\щипцы.txt' ) ); diff --git a/tests/phpunit/tests/formatting/wpHtmlExcerpt.php b/tests/phpunit/tests/formatting/wpHtmlExcerpt.php new file mode 100644 index 0000000000000..3aff259343c0b --- /dev/null +++ b/tests/phpunit/tests/formatting/wpHtmlExcerpt.php @@ -0,0 +1,19 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_wpHtmlExcerpt extends WP_UnitTestCase { + public function test_simple() { + $this->assertSame( 'Baba', wp_html_excerpt( 'Baba told me not to come', 4 ) ); + } + public function test_html() { + $this->assertSame( 'Baba', wp_html_excerpt( "<a href='http://baba.net/'>Baba</a> told me not to come", 4 ) ); + } + public function test_entities() { + $this->assertSame( 'Baba', wp_html_excerpt( 'Baba & Dyado', 8 ) ); + $this->assertSame( 'Baba', wp_html_excerpt( 'Baba & Dyado', 8 ) ); + $this->assertSame( 'Baba & D', wp_html_excerpt( 'Baba & Dyado', 12 ) ); + $this->assertSame( 'Baba & Dyado', wp_html_excerpt( 'Baba & Dyado', 100 ) ); + } +} diff --git a/tests/phpunit/tests/formatting/WpHtmlSplit.php b/tests/phpunit/tests/formatting/wpHtmlSplit.php similarity index 73% rename from tests/phpunit/tests/formatting/WpHtmlSplit.php rename to tests/phpunit/tests/formatting/wpHtmlSplit.php index adf3203827ba6..befe43abb8e92 100644 --- a/tests/phpunit/tests/formatting/WpHtmlSplit.php +++ b/tests/phpunit/tests/formatting/wpHtmlSplit.php @@ -3,18 +3,18 @@ /** * @group formatting */ -class Tests_Formatting_WpHtmlSplit extends WP_UnitTestCase { +class Tests_Formatting_wpHtmlSplit extends WP_UnitTestCase { /** * Basic functionality goes here. * * @dataProvider data_basic_features */ - function test_basic_features( $input, $output ) { - return $this->assertEquals( $output, wp_html_split( $input ) ); + public function test_basic_features( $input, $output ) { + return $this->assertSame( $output, wp_html_split( $input ) ); } - function data_basic_features() { + public function data_basic_features() { return array( array( 'abcd efgh', @@ -40,13 +40,13 @@ function data_basic_features() { * * @dataProvider data_whole_posts */ - function test_pcre_performance( $input ) { + public function test_pcre_performance( $input ) { $regex = get_html_split_regex(); $result = benchmark_pcre_backtracking( $regex, $input, 'split' ); return $this->assertLessThan( 200, $result ); } - function data_whole_posts() { + public function data_whole_posts() { require_once DIR_TESTDATA . '/formatting/whole-posts.php'; return data_whole_posts(); } diff --git a/tests/phpunit/tests/formatting/wpHtmleditPre.php b/tests/phpunit/tests/formatting/wpHtmleditPre.php new file mode 100644 index 0000000000000..109ea4bdf20b5 --- /dev/null +++ b/tests/phpunit/tests/formatting/wpHtmleditPre.php @@ -0,0 +1,37 @@ +<?php + +/** + * @group formatting + * @expectedDeprecated wp_htmledit_pre + */ +class Tests_Formatting_wpHtmleditPre extends WP_UnitTestCase { + + public function charset_iso_8859_1() { + return 'iso-8859-1'; + } + + /* + * Only fails in PHP 5.4 onwards + * @ticket 23688 + */ + public function test_wp_htmledit_pre_charset_iso_8859_1() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; + $this->assertSame( $iso8859_1, wp_htmledit_pre( $iso8859_1 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + } + + public function charset_utf_8() { + return 'UTF-8'; + } + + /* + * @ticket 23688 + */ + public function test_wp_htmledit_pre_charset_utf_8() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; + $this->assertSame( $utf8, wp_htmledit_pre( $utf8 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/wpIsoDescrambler.php b/tests/phpunit/tests/formatting/wpIsoDescrambler.php new file mode 100644 index 0000000000000..a15cabc4d2ee2 --- /dev/null +++ b/tests/phpunit/tests/formatting/wpIsoDescrambler.php @@ -0,0 +1,14 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_wpIsoDescrambler extends WP_UnitTestCase { + /* + * Decodes text in RFC2047 "Q"-encoding, e.g. + * =?iso-8859-1?q?this=20is=20some=20text?= + */ + public function test_decodes_iso_8859_1_rfc2047_q_encoding() { + $this->assertSame( 'this is some text', wp_iso_descrambler( '=?iso-8859-1?q?this=20is=20some=20text?=' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/WPMakeLinkRelative.php b/tests/phpunit/tests/formatting/wpMakeLinkRelative.php similarity index 67% rename from tests/phpunit/tests/formatting/WPMakeLinkRelative.php rename to tests/phpunit/tests/formatting/wpMakeLinkRelative.php index 8aee571b9134c..ee3f78e9a29fa 100644 --- a/tests/phpunit/tests/formatting/WPMakeLinkRelative.php +++ b/tests/phpunit/tests/formatting/wpMakeLinkRelative.php @@ -3,18 +3,18 @@ /** * @group formatting */ -class Tests_Formatting_WPMakeLinkRelative extends WP_UnitTestCase { +class Tests_Formatting_wpMakeLinkRelative extends WP_UnitTestCase { public function test_wp_make_link_relative_with_http_scheme() { $link = 'http://example.com/this-is-a-test-http-url/'; $relative_link = wp_make_link_relative( $link ); - $this->assertEquals( '/this-is-a-test-http-url/', $relative_link ); + $this->assertSame( '/this-is-a-test-http-url/', $relative_link ); } public function test_wp_make_link_relative_with_https_scheme() { $link = 'https://example.com/this-is-a-test-https-url/'; $relative_link = wp_make_link_relative( $link ); - $this->assertEquals( '/this-is-a-test-https-url/', $relative_link ); + $this->assertSame( '/this-is-a-test-https-url/', $relative_link ); } /** @@ -23,7 +23,7 @@ public function test_wp_make_link_relative_with_https_scheme() { public function test_wp_make_link_relative_with_no_scheme() { $link = '//example.com/this-is-a-test-schemeless-url/'; $relative_link = wp_make_link_relative( $link ); - $this->assertEquals( '/this-is-a-test-schemeless-url/', $relative_link ); + $this->assertSame( '/this-is-a-test-schemeless-url/', $relative_link ); } /** @@ -32,16 +32,16 @@ public function test_wp_make_link_relative_with_no_scheme() { public function test_wp_make_link_relative_should_retain_URL_param_that_is_also_a_URL() { $link = 'https://example.com/this-is-a-test/?redirect=https://example.org/a-different-test-post/'; $relative_link = wp_make_link_relative( $link ); - $this->assertEquals( '/this-is-a-test/?redirect=https://example.org/a-different-test-post/', $relative_link ); + $this->assertSame( '/this-is-a-test/?redirect=https://example.org/a-different-test-post/', $relative_link ); } /** * @ticket 26819 */ - function test_wp_make_link_relative_with_no_path() { + public function test_wp_make_link_relative_with_no_path() { $link = 'http://example.com'; $relative_link = wp_make_link_relative( $link ); - $this->assertEquals( '', $relative_link ); + $this->assertSame( '', $relative_link ); } } diff --git a/tests/phpunit/tests/formatting/wpParseStr.php b/tests/phpunit/tests/formatting/wpParseStr.php new file mode 100644 index 0000000000000..b8c3d063d2423 --- /dev/null +++ b/tests/phpunit/tests/formatting/wpParseStr.php @@ -0,0 +1,144 @@ +<?php + +/** + * @group formatting + * @covers ::wp_parse_str + */ +class Tests_Formatting_wpParseStr extends WP_UnitTestCase { + + /** + * Tests parsing of a string into variables. + * + * Note: While the function under test does not contain any significant logic, + * these tests document the behavior and safeguard PHP cross-version compatibility. + * + * @dataProvider data_wp_parse_str + * + * @param mixed $input Value to parse. + * @param array $expected Expected function output. + */ + public function test_wp_parse_str( $input, $expected ) { + wp_parse_str( $input, $output ); + $this->assertSame( $expected, $output ); + } + + /** + * Data Provider. + * + * @return array + */ + public function data_wp_parse_str() { + return array( + 'null' => array( + 'input' => null, + 'expected' => array(), + ), + 'boolean false' => array( + 'input' => false, + 'expected' => array(), + ), + 'boolean true' => array( + 'input' => true, + 'expected' => array( + 1 => '', + ), + ), + 'integer 0' => array( + 'input' => 0, + 'expected' => array( + 0 => '', + ), + ), + 'integer 456' => array( + 'input' => 456, + 'expected' => array( + 456 => '', + ), + ), + 'float 12.53' => array( + 'input' => 12.53, + 'expected' => array( + '12_53' => '', + ), + ), + 'plain string' => array( + 'input' => 'foobar', + 'expected' => array( + 'foobar' => '', + ), + ), + 'query string' => array( + 'input' => 'x=5&_baba=dudu&', + 'expected' => array( + 'x' => '5', + '_baba' => 'dudu', + ), + ), + 'stringable object' => array( + 'input' => new Fixture_Formatting_wpParseStr(), + 'expected' => array( + 'foobar' => '', + ), + ), + ); + } + + /** + * Tests that the result array only contains the result of the string parsing + * when provided with different types of input for the `$output` parameter. + * + * @dataProvider data_wp_parse_str_result_array_is_always_overwritten + * + * @param array|null $output Value for the `$output` parameter. + * @param array $expected Expected function output. + */ + public function test_wp_parse_str_result_array_is_always_overwritten( $output, $expected ) { + wp_parse_str( 'key=25&thing=text', $output ); + $this->assertSame( $expected, $output ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_wp_parse_str_result_array_is_always_overwritten() { + // Standard value for expected output. + $expected = array( + 'key' => '25', + 'thing' => 'text', + ); + + return array( + 'output null' => array( + 'output' => null, + 'expected' => $expected, + ), + 'output empty array' => array( + 'output' => array(), + 'expected' => $expected, + ), + 'output non empty array, no conflicting keys' => array( + 'output' => array( + 'foo' => 'bar', + ), + 'expected' => $expected, + ), + 'output non empty array, conflicting keys' => array( + 'output' => array( + 'key' => 'value', + ), + 'expected' => $expected, + ), + ); + } +} + +/** + * Fixture for use in the tests. + */ +class Fixture_Formatting_wpParseStr { + public function __toString() { + return 'foobar'; + } +} diff --git a/tests/phpunit/tests/formatting/WPRelNoFollow.php b/tests/phpunit/tests/formatting/wpRelNofollow.php similarity index 52% rename from tests/phpunit/tests/formatting/WPRelNoFollow.php rename to tests/phpunit/tests/formatting/wpRelNofollow.php index 187bb5997b07f..d10898d7ea21f 100644 --- a/tests/phpunit/tests/formatting/WPRelNoFollow.php +++ b/tests/phpunit/tests/formatting/wpRelNofollow.php @@ -3,32 +3,62 @@ /** * @group formatting */ -class Tests_Rel_No_Follow extends WP_UnitTestCase { +class Tests_Formatting_wpRelNofollow extends WP_UnitTestCase { /** * @ticket 9959 */ public function test_add_no_follow() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="/">Code</a></p>'; $expected = '<p>This is some cool <a href=\"/\" rel=\"nofollow\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_nofollow( $content ) ); + $this->assertSame( $expected, wp_rel_nofollow( $content ) ); } /** * @ticket 9959 */ public function test_convert_no_follow() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="/" rel="weird">Code</a></p>'; $expected = '<p>This is some cool <a href=\"/\" rel=\"weird nofollow\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_nofollow( $content ) ); + $this->assertSame( $expected, wp_rel_nofollow( $content ) ); } /** * @ticket 11360 * @dataProvider data_wp_rel_nofollow */ - public function test_wp_rel_nofollow( $input, $output ) { - return $this->assertEquals( wp_slash( $output ), wp_rel_nofollow( $input ) ); + public function test_wp_rel_nofollow( $input, $output, $expect_deprecation = false ) { + if ( true === $expect_deprecation && PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $this->assertSame( wp_slash( $output ), wp_rel_nofollow( $input ) ); } public function data_wp_rel_nofollow() { @@ -39,6 +69,7 @@ public function data_wp_rel_nofollow() { array( '<a href="">Double Quotes</a>', '<a href="" rel="nofollow">Double Quotes</a>', + true, ), array( '<a href="https://wordpress.org">Double Quotes</a>', @@ -76,8 +107,18 @@ public function data_wp_rel_nofollow() { } public function test_append_no_follow_with_valueless_attribute() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>'; $expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_nofollow( $content ) ); + $this->assertSame( $expected, wp_rel_nofollow( $content ) ); } } diff --git a/tests/phpunit/tests/formatting/WPRelUgc.php b/tests/phpunit/tests/formatting/wpRelUgc.php similarity index 52% rename from tests/phpunit/tests/formatting/WPRelUgc.php rename to tests/phpunit/tests/formatting/wpRelUgc.php index 515eebb73600d..cbd052c71e059 100644 --- a/tests/phpunit/tests/formatting/WPRelUgc.php +++ b/tests/phpunit/tests/formatting/wpRelUgc.php @@ -3,32 +3,62 @@ /** * @group formatting */ -class Tests_Rel_Ugc extends WP_UnitTestCase { +class Tests_Formatting_wpRelUgc extends WP_UnitTestCase { /** * @ticket 48022 */ public function test_add_ugc() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="/">Code</a></p>'; $expected = '<p>This is some cool <a href=\"/\" rel=\"nofollow ugc\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_ugc( $content ) ); + $this->assertSame( $expected, wp_rel_ugc( $content ) ); } /** * @ticket 48022 */ public function test_convert_ugc() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="/" rel="weird">Code</a></p>'; $expected = '<p>This is some cool <a href=\"/\" rel=\"weird nofollow ugc\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_ugc( $content ) ); + $this->assertSame( $expected, wp_rel_ugc( $content ) ); } /** * @ticket 48022 * @dataProvider data_wp_rel_ugc */ - public function test_wp_rel_ugc( $input, $output ) { - return $this->assertEquals( wp_slash( $output ), wp_rel_ugc( $input ) ); + public function test_wp_rel_ugc( $input, $output, $expect_deprecation = false ) { + if ( true === $expect_deprecation && PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $this->assertSame( wp_slash( $output ), wp_rel_ugc( $input ) ); } public function data_wp_rel_ugc() { @@ -39,6 +69,7 @@ public function data_wp_rel_ugc() { array( '<a href="">Double Quotes</a>', '<a href="" rel="nofollow ugc">Double Quotes</a>', + true, ), array( '<a href="https://wordpress.org">Double Quotes</a>', @@ -76,8 +107,18 @@ public function data_wp_rel_ugc() { } public function test_append_ugc_with_valueless_attribute() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + $content = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>'; $expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow ugc\">Code</a></p>'; - $this->assertEquals( $expected, wp_rel_ugc( $content ) ); + $this->assertSame( $expected, wp_rel_ugc( $content ) ); } } diff --git a/tests/phpunit/tests/formatting/WpReplaceInHtmlTags.php b/tests/phpunit/tests/formatting/wpReplaceInHtmlTags.php similarity index 63% rename from tests/phpunit/tests/formatting/WpReplaceInHtmlTags.php rename to tests/phpunit/tests/formatting/wpReplaceInHtmlTags.php index 7a6291047fd49..9781dfbc1b5b5 100644 --- a/tests/phpunit/tests/formatting/WpReplaceInHtmlTags.php +++ b/tests/phpunit/tests/formatting/wpReplaceInHtmlTags.php @@ -3,17 +3,17 @@ /** * @group formatting */ -class Tests_Formatting_WpReplaceInTags extends WP_UnitTestCase { +class Tests_Formatting_wpReplaceInHtmlTags extends WP_UnitTestCase { /** * Check for expected behavior of new function wp_replace_in_html_tags(). * * @dataProvider data_wp_replace_in_html_tags */ - function test_wp_replace_in_html_tags( $input, $output ) { - return $this->assertEquals( $output, wp_replace_in_html_tags( $input, array( "\n" => ' ' ) ) ); + public function test_wp_replace_in_html_tags( $input, $output ) { + return $this->assertSame( $output, wp_replace_in_html_tags( $input, array( "\n" => ' ' ) ) ); } - function data_wp_replace_in_html_tags() { + public function data_wp_replace_in_html_tags() { return array( array( "Hello \n World", diff --git a/tests/phpunit/tests/formatting/wpRicheditPre.php b/tests/phpunit/tests/formatting/wpRicheditPre.php new file mode 100644 index 0000000000000..be12ddd55fba9 --- /dev/null +++ b/tests/phpunit/tests/formatting/wpRicheditPre.php @@ -0,0 +1,37 @@ +<?php + +/** + * @group formatting + * @expectedDeprecated wp_richedit_pre + */ +class Tests_Formatting_wpRicheditPre extends WP_UnitTestCase { + + public function charset_iso_8859_1() { + return 'iso-8859-1'; + } + + /* + * Only fails in PHP 5.4 onwards + * @ticket 23688 + */ + public function test_wp_richedit_pre_charset_iso_8859_1() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; + $this->assertSame( '<p>' . $iso8859_1 . "</p>\n", wp_richedit_pre( $iso8859_1 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); + } + + public function charset_utf_8() { + return 'UTF-8'; + } + + /* + * @ticket 23688 + */ + public function test_wp_richedit_pre_charset_utf_8() { + add_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; + $this->assertSame( '<p>' . $utf8 . "</p>\n", wp_richedit_pre( $utf8 ) ); + remove_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); + } +} diff --git a/tests/phpunit/tests/formatting/wpSlash.php b/tests/phpunit/tests/formatting/wpSlash.php new file mode 100644 index 0000000000000..0431b7602d738 --- /dev/null +++ b/tests/phpunit/tests/formatting/wpSlash.php @@ -0,0 +1,103 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_wpSlash extends WP_UnitTestCase { + + /** + * @ticket 42195 + * + * @dataProvider data_wp_slash + * + * @param string $value + * @param string $expected + */ + public function test_wp_slash( $value, $expected ) { + $this->assertSame( $expected, wp_slash( $value ) ); + } + + /** + * Data provider for test_wp_slash(). + * + * @return array { + * @type array { + * @type mixed $value The value passed to wp_slash(). + * @type string $expected The expected output of wp_slash(). + * } + * } + */ + public function data_wp_slash() { + return array( + array( 123, 123 ), + array( 123.4, 123.4 ), + array( true, true ), + array( false, false ), + array( + array( + 'hello', + null, + '"string"', + 125.41, + ), + array( + 'hello', + null, + '\"string\"', + 125.41, + ), + ), + array( "first level 'string'", "first level \'string\'" ), + ); + } + + /** + * @ticket 24106 + */ + public function test_adds_slashes() { + $old = "I can't see, isn't that it?"; + $new = "I can\'t see, isn\'t that it?"; + $this->assertSame( $new, wp_slash( $old ) ); + $this->assertSame( "I can\\\\\'t see, isn\\\\\'t that it?", wp_slash( $new ) ); + $this->assertSame( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array. + $this->assertSame( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed. + } + + /** + * @ticket 24106 + */ + public function test_preserves_original_datatype() { + + $this->assertTrue( wp_slash( true ) ); + $this->assertFalse( wp_slash( false ) ); + $this->assertSame( 4, wp_slash( 4 ) ); + $this->assertSame( 'foo', wp_slash( 'foo' ) ); + $arr = array( + 'a' => true, + 'b' => false, + 'c' => 4, + 'd' => 'foo', + ); + $arr['e'] = $arr; // Add a sub-array. + $this->assertSame( $arr, wp_slash( $arr ) ); // Keyed array. + $this->assertSame( array_values( $arr ), wp_slash( array_values( $arr ) ) ); // Non-keyed. + + $obj = new stdClass; + foreach ( $arr as $k => $v ) { + $obj->$k = $v; + } + $this->assertSame( $obj, wp_slash( $obj ) ); + } + + /** + * @ticket 24106 + */ + public function test_add_even_more_slashes() { + $old = 'single\\slash double\\\\slash triple\\\\\\slash'; + $new = 'single\\\\slash double\\\\\\\\slash triple\\\\\\\\\\\\slash'; + $this->assertSame( $new, wp_slash( $old ) ); + $this->assertSame( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array. + $this->assertSame( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed. + } + +} diff --git a/tests/phpunit/tests/formatting/WPSpecialchars.php b/tests/phpunit/tests/formatting/wpSpecialchars.php similarity index 62% rename from tests/phpunit/tests/formatting/WPSpecialchars.php rename to tests/phpunit/tests/formatting/wpSpecialchars.php index 2f3e9cea26e44..07fc2b1ad0af1 100644 --- a/tests/phpunit/tests/formatting/WPSpecialchars.php +++ b/tests/phpunit/tests/formatting/wpSpecialchars.php @@ -3,16 +3,16 @@ /** * @group formatting */ -class Tests_Formatting_WPSpecialchars extends WP_UnitTestCase { - function test_wp_specialchars_basics() { +class Tests_Formatting_wpSpecialchars extends WP_UnitTestCase { + public function test_wp_specialchars_basics() { $html = '&<hello world>'; - $this->assertEquals( $html, _wp_specialchars( $html ) ); + $this->assertSame( $html, _wp_specialchars( $html ) ); $double = '&amp;&lt;hello world&gt;'; - $this->assertEquals( $double, _wp_specialchars( $html, ENT_NOQUOTES, false, true ) ); + $this->assertSame( $double, _wp_specialchars( $html, ENT_NOQUOTES, false, true ) ); } - function test_allowed_entity_names() { + public function test_allowed_entity_names() { global $allowedentitynames; // Allowed entities should be unchanged. @@ -22,26 +22,26 @@ function test_allowed_entity_names() { continue; } $ent = '&' . $ent . ';'; - $this->assertEquals( $ent, _wp_specialchars( $ent ) ); + $this->assertSame( $ent, _wp_specialchars( $ent ) ); } } - function test_not_allowed_entity_names() { + public function test_not_allowed_entity_names() { $ents = array( 'iacut', 'aposs', 'pos', 'apo', 'apo?', 'apo.*', '.*apo.*', 'apos ', ' apos', ' apos ' ); foreach ( $ents as $ent ) { $escaped = '&' . $ent . ';'; $ent = '&' . $ent . ';'; - $this->assertEquals( $escaped, _wp_specialchars( $ent ) ); + $this->assertSame( $escaped, _wp_specialchars( $ent ) ); } } - function test_optionally_escapes_quotes() { + public function test_optionally_escapes_quotes() { $source = "\"'hello!'\""; - $this->assertEquals( '"'hello!'"', _wp_specialchars( $source, 'single' ) ); - $this->assertEquals( ""'hello!'"", _wp_specialchars( $source, 'double' ) ); - $this->assertEquals( '"'hello!'"', _wp_specialchars( $source, true ) ); - $this->assertEquals( $source, _wp_specialchars( $source ) ); + $this->assertSame( '"'hello!'"', _wp_specialchars( $source, 'single' ) ); + $this->assertSame( ""'hello!'"", _wp_specialchars( $source, 'double' ) ); + $this->assertSame( '"'hello!'"', _wp_specialchars( $source, true ) ); + $this->assertSame( $source, _wp_specialchars( $source ) ); } /** @@ -50,11 +50,11 @@ function test_optionally_escapes_quotes() { * @ticket 17780 * @dataProvider data_double_encoding */ - function test_double_encoding( $input, $output ) { - return $this->assertEquals( $output, _wp_specialchars( $input, ENT_NOQUOTES, false, true ) ); + public function test_double_encoding( $input, $output ) { + return $this->assertSame( $output, _wp_specialchars( $input, ENT_NOQUOTES, false, true ) ); } - function data_double_encoding() { + public function data_double_encoding() { return array( array( 'This & that, this & that, — " " Ú   " " " " " $ ×', @@ -77,11 +77,11 @@ function data_double_encoding() { * @ticket 17780 * @dataProvider data_no_double_encoding */ - function test_no_double_encoding( $input, $output ) { - return $this->assertEquals( $output, _wp_specialchars( $input, ENT_NOQUOTES, false, false ) ); + public function test_no_double_encoding( $input, $output ) { + return $this->assertSame( $output, _wp_specialchars( $input, ENT_NOQUOTES, false, false ) ); } - function data_no_double_encoding() { + public function data_no_double_encoding() { return array( array( 'This & that, this & that, — " " Ú   " " " " " $ ×', diff --git a/tests/phpunit/tests/formatting/WPStripAllTags.php b/tests/phpunit/tests/formatting/wpStripAllTags.php similarity index 51% rename from tests/phpunit/tests/formatting/WPStripAllTags.php rename to tests/phpunit/tests/formatting/wpStripAllTags.php index 3ef538a34fedf..1ecc12bda491f 100644 --- a/tests/phpunit/tests/formatting/WPStripAllTags.php +++ b/tests/phpunit/tests/formatting/wpStripAllTags.php @@ -4,30 +4,30 @@ * * @group formatting */ -class Tests_Formatting_WPStripAllTags extends WP_UnitTestCase { +class Tests_Formatting_wpStripAllTags extends WP_UnitTestCase { - function test_wp_strip_all_tags() { + public function test_wp_strip_all_tags() { $text = 'lorem<br />ipsum'; - $this->assertEquals( 'loremipsum', wp_strip_all_tags( $text ) ); + $this->assertSame( 'loremipsum', wp_strip_all_tags( $text ) ); $text = "lorem<br />\nipsum"; - $this->assertEquals( "lorem\nipsum", wp_strip_all_tags( $text ) ); + $this->assertSame( "lorem\nipsum", wp_strip_all_tags( $text ) ); // Test removing breaks is working. $text = 'lorem<br />ipsum'; - $this->assertEquals( 'loremipsum', wp_strip_all_tags( $text, true ) ); + $this->assertSame( 'loremipsum', wp_strip_all_tags( $text, true ) ); // Test script / style tag's contents is removed. $text = 'lorem<script>alert(document.cookie)</script>ipsum'; - $this->assertEquals( 'loremipsum', wp_strip_all_tags( $text ) ); + $this->assertSame( 'loremipsum', wp_strip_all_tags( $text ) ); $text = "lorem<style>* { display: 'none' }</style>ipsum"; - $this->assertEquals( 'loremipsum', wp_strip_all_tags( $text ) ); + $this->assertSame( 'loremipsum', wp_strip_all_tags( $text ) ); // Test "marlformed" markup of contents. $text = "lorem<style>* { display: 'none' }<script>alert( document.cookie )</script></style>ipsum"; - $this->assertEquals( 'loremipsum', wp_strip_all_tags( $text ) ); + $this->assertSame( 'loremipsum', wp_strip_all_tags( $text ) ); } } diff --git a/tests/phpunit/tests/formatting/WPTargetedLinkRel.php b/tests/phpunit/tests/formatting/wpTargetedLinkRel.php similarity index 67% rename from tests/phpunit/tests/formatting/WPTargetedLinkRel.php rename to tests/phpunit/tests/formatting/wpTargetedLinkRel.php index 7f461ec87a319..b58f4188b58cb 100644 --- a/tests/phpunit/tests/formatting/WPTargetedLinkRel.php +++ b/tests/phpunit/tests/formatting/wpTargetedLinkRel.php @@ -4,66 +4,66 @@ * @group formatting * @ticket 43187 */ -class Tests_Targeted_Link_Rel extends WP_UnitTestCase { +class Tests_Formatting_wpTargetedLinkRel extends WP_UnitTestCase { public function test_add_to_links_with_target_blank() { $content = '<p>Links: <a href="/" target="_blank">No rel</a></p>'; - $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">No rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_add_to_links_with_target_foo() { $content = '<p>Links: <a href="/" target="foo">No rel</a></p>'; - $expected = '<p>Links: <a href="/" target="foo" rel="noopener noreferrer">No rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" target="foo" rel="noopener">No rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_target_as_first_attribute() { $content = '<p>Links: <a target="_blank" href="#">No rel</a></p>'; - $expected = '<p>Links: <a target="_blank" href="#" rel="noopener noreferrer">No rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a target="_blank" href="#" rel="noopener">No rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_add_to_existing_rel() { $content = '<p>Links: <a href="/" rel="existing values" target="_blank">Existing rel</a></p>'; - $expected = '<p>Links: <a href="/" rel="existing values noopener noreferrer" target="_blank">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" rel="existing values noopener" target="_blank">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_no_duplicate_values_added() { $content = '<p>Links: <a href="/" rel="existing noopener values" target="_blank">Existing rel</a></p>'; - $expected = '<p>Links: <a href="/" rel="existing noopener values noreferrer" target="_blank">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" rel="existing noopener values" target="_blank">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_rel_with_single_quote_delimiter() { $content = '<p>Links: <a href="/" rel=\'existing values\' target="_blank">Existing rel</a></p>'; - $expected = '<p>Links: <a href="/" rel="existing values noopener noreferrer" target="_blank">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" rel="existing values noopener" target="_blank">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_rel_with_no_delimiter() { $content = '<p>Links: <a href="/" rel=existing target="_blank">Existing rel</a></p>'; - $expected = '<p>Links: <a href="/" rel="existing noopener noreferrer" target="_blank">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" rel="existing noopener" target="_blank">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_rel_value_spaced_and_no_delimiter() { $content = '<p>Links: <a href="/" rel = existing target="_blank">Existing rel</a></p>'; - $expected = '<p>Links: <a href="/" rel="existing noopener noreferrer" target="_blank">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" rel="existing noopener" target="_blank">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_escaped_quotes() { $content = '<p>Links: <a href=\"/\" rel=\"existing values\" target=\"_blank\">Existing rel</a></p>'; - $expected = '<p>Links: <a href=\"/\" rel=\"existing values noopener noreferrer\" target=\"_blank\">Existing rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href=\"/\" rel=\"existing values noopener\" target=\"_blank\">Existing rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_ignore_links_with_no_target() { $content = '<p>Links: <a href="/" target="_blank">Change me</a> <a href="/">Do not change me</a></p>'; - $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">Change me</a> <a href="/">Do not change me</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">Change me</a> <a href="/">Do not change me</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } /** @@ -75,7 +75,7 @@ public function test_ignore_if_wp_targeted_link_rel_nulled() { add_filter( 'wp_targeted_link_rel', '__return_empty_string' ); $content = '<p>Links: <a href="/" target="_blank">Do not change me</a></p>'; $expected = '<p>Links: <a href="/" target="_blank">Do not change me</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } /** @@ -85,7 +85,7 @@ public function test_ignore_if_wp_targeted_link_rel_nulled() { */ public function test_wp_targeted_link_rel_filters_run() { $content = '<p>Links: <a href="/" target="_blank">No rel</a></p>'; - $expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>'; + $expected = '<p>Links: <a href="/" target="_blank" rel="noopener">No rel</a></p>'; $post = $this->factory()->post->create_and_get( array( @@ -93,7 +93,7 @@ public function test_wp_targeted_link_rel_filters_run() { ) ); - $this->assertEquals( $expected, $post->post_content ); + $this->assertSame( $expected, $post->post_content ); } /** @@ -103,8 +103,8 @@ public function test_wp_targeted_link_rel_filters_run() { */ public function test_wp_targeted_link_rel_should_preserve_json() { $content = '<p>Links: <a href=\"\/\" target=\"_blank\">No rel<\/a><\/p>'; - $expected = '<p>Links: <a href=\"\/\" target=\"_blank\" rel=\"noopener noreferrer\">No rel<\/a><\/p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href=\"\/\" target=\"_blank\" rel=\"noopener\">No rel<\/a><\/p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } /** @@ -114,8 +114,8 @@ public function test_wp_targeted_link_rel_should_preserve_json() { */ public function test_wp_targeted_link_rel_skips_style_and_scripts() { $content = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target=_blank>aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>'; - $expected = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target="_blank" rel="noopener noreferrer">aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<style><a href="/" target=a></style><p>Links: <script>console.log("<a href=\'/\' target=a>hi</a>");</script><script>alert(1);</script>here <a href="/" target="_blank" rel="noopener">aq</a></p><script>console.log("<a href=\'last\' target=\'_blank\'")</script>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } /** @@ -126,13 +126,13 @@ public function test_wp_targeted_link_rel_skips_style_and_scripts() { public function test_ignore_entirely_serialized_content() { $content = 'a:1:{s:4:"html";s:52:"<p>Links: <a href="/" target="_blank">No Rel</a></p>";}'; $expected = 'a:1:{s:4:"html";s:52:"<p>Links: <a href="/" target="_blank">No Rel</a></p>";}'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } public function test_wp_targeted_link_rel_tab_separated_values_are_split() { $content = "<p>Links: <a href=\"/\" target=\"_blank\" rel=\"ugc\t\tnoopener\t\">No rel</a></p>"; - $expected = '<p>Links: <a href="/" target="_blank" rel="ugc noopener noreferrer">No rel</a></p>'; - $this->assertEquals( $expected, wp_targeted_link_rel( $content ) ); + $expected = '<p>Links: <a href="/" target="_blank" rel="ugc noopener">No rel</a></p>'; + $this->assertSame( $expected, wp_targeted_link_rel( $content ) ); } } diff --git a/tests/phpunit/tests/formatting/WPTexturize.php b/tests/phpunit/tests/formatting/wpTexturize.php similarity index 72% rename from tests/phpunit/tests/formatting/WPTexturize.php rename to tests/phpunit/tests/formatting/wpTexturize.php index 853e0db6fe3eb..8ac9bb378477b 100644 --- a/tests/phpunit/tests/formatting/WPTexturize.php +++ b/tests/phpunit/tests/formatting/wpTexturize.php @@ -3,79 +3,79 @@ /** * @group formatting */ -class Tests_Formatting_WPTexturize extends WP_UnitTestCase { - function test_dashes() { - $this->assertEquals( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) ); - $this->assertEquals( '<a href="http://xx--xx">Hey — boo?</a>', wptexturize( '<a href="http://xx--xx">Hey -- boo?</a>' ) ); +class Tests_Formatting_wpTexturize extends WP_UnitTestCase { + public function test_dashes() { + $this->assertSame( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) ); + $this->assertSame( '<a href="http://xx--xx">Hey — boo?</a>', wptexturize( '<a href="http://xx--xx">Hey -- boo?</a>' ) ); } - function test_disable() { - $this->assertEquals( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) ); - $this->assertEquals( '<pre><code></code>--&</pre>', wptexturize( '<pre><code></code>--&</pre>' ) ); + public function test_disable() { + $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) ); + $this->assertSame( '<pre><code></code>--&</pre>', wptexturize( '<pre><code></code>--&</pre>' ) ); - $this->assertEquals( '<code>---&</code>', wptexturize( '<code>---&</code>' ) ); - $this->assertEquals( '<kbd>---&</kbd>', wptexturize( '<kbd>---&</kbd>' ) ); - $this->assertEquals( '<style>---&</style>', wptexturize( '<style>---&</style>' ) ); - $this->assertEquals( '<script>---&</script>', wptexturize( '<script>---&</script>' ) ); - $this->assertEquals( '<tt>---&</tt>', wptexturize( '<tt>---&</tt>' ) ); + $this->assertSame( '<code>---&</code>', wptexturize( '<code>---&</code>' ) ); + $this->assertSame( '<kbd>---&</kbd>', wptexturize( '<kbd>---&</kbd>' ) ); + $this->assertSame( '<style>---&</style>', wptexturize( '<style>---&</style>' ) ); + $this->assertSame( '<script>---&</script>', wptexturize( '<script>---&</script>' ) ); + $this->assertSame( '<tt>---&</tt>', wptexturize( '<tt>---&</tt>' ) ); - $this->assertEquals( '<code>href="baba"</code> “baba”', wptexturize( '<code>href="baba"</code> "baba"' ) ); + $this->assertSame( '<code>href="baba"</code> “baba”', wptexturize( '<code>href="baba"</code> "baba"' ) ); $enabled_tags_inside_code = '<code>curl -s <a href="http://x/">baba</a> | grep sfive | cut -d "\"" -f 10 > topmp3.txt</code>'; - $this->assertEquals( $enabled_tags_inside_code, wptexturize( $enabled_tags_inside_code ) ); + $this->assertSame( $enabled_tags_inside_code, wptexturize( $enabled_tags_inside_code ) ); $double_nest = '<pre>"baba"<code>"baba"<pre></pre></code>"baba"</pre>'; - $this->assertEquals( $double_nest, wptexturize( $double_nest ) ); + $this->assertSame( $double_nest, wptexturize( $double_nest ) ); $invalid_nest = '<pre></code>"baba"</pre>'; - $this->assertEquals( $invalid_nest, wptexturize( $invalid_nest ) ); + $this->assertSame( $invalid_nest, wptexturize( $invalid_nest ) ); } /** * @ticket 1418 */ - function test_bracketed_quotes_1418() { - $this->assertEquals( '(“test”)', wptexturize( '("test")' ) ); - $this->assertEquals( '(‘test’)', wptexturize( "('test')" ) ); - $this->assertEquals( '(’twas)', wptexturize( "('twas)" ) ); + public function test_bracketed_quotes_1418() { + $this->assertSame( '(“test”)', wptexturize( '("test")' ) ); + $this->assertSame( '(‘test’)', wptexturize( "('test')" ) ); + $this->assertSame( '(’twas)', wptexturize( "('twas)" ) ); } /** * @ticket 3810 */ - function test_bracketed_quotes_3810() { - $this->assertEquals( 'A dog (“Hubertus”) was sent out.', wptexturize( 'A dog ("Hubertus") was sent out.' ) ); + public function test_bracketed_quotes_3810() { + $this->assertSame( 'A dog (“Hubertus”) was sent out.', wptexturize( 'A dog ("Hubertus") was sent out.' ) ); } /** * @ticket 4539 */ - function test_basic_quotes() { - $this->assertEquals( 'test’s', wptexturize( 'test\'s' ) ); + public function test_basic_quotes() { + $this->assertSame( 'test’s', wptexturize( 'test\'s' ) ); - $this->assertEquals( '‘quoted’', wptexturize( '\'quoted\'' ) ); - $this->assertEquals( '“quoted”', wptexturize( '"quoted"' ) ); + $this->assertSame( '‘quoted’', wptexturize( '\'quoted\'' ) ); + $this->assertSame( '“quoted”', wptexturize( '"quoted"' ) ); - $this->assertEquals( 'space before ‘quoted’ space after', wptexturize( 'space before \'quoted\' space after' ) ); - $this->assertEquals( 'space before “quoted” space after', wptexturize( 'space before "quoted" space after' ) ); + $this->assertSame( 'space before ‘quoted’ space after', wptexturize( 'space before \'quoted\' space after' ) ); + $this->assertSame( 'space before “quoted” space after', wptexturize( 'space before "quoted" space after' ) ); - $this->assertEquals( '(‘quoted’)', wptexturize( '(\'quoted\')' ) ); - $this->assertEquals( '{“quoted”}', wptexturize( '{"quoted"}' ) ); + $this->assertSame( '(‘quoted’)', wptexturize( '(\'quoted\')' ) ); + $this->assertSame( '{“quoted”}', wptexturize( '{"quoted"}' ) ); - $this->assertEquals( '‘qu(ot)ed’', wptexturize( '\'qu(ot)ed\'' ) ); - $this->assertEquals( '“qu{ot}ed”', wptexturize( '"qu{ot}ed"' ) ); + $this->assertSame( '‘qu(ot)ed’', wptexturize( '\'qu(ot)ed\'' ) ); + $this->assertSame( '“qu{ot}ed”', wptexturize( '"qu{ot}ed"' ) ); - $this->assertEquals( ' ‘test’s quoted’ ', wptexturize( ' \'test\'s quoted\' ' ) ); - $this->assertEquals( ' “test’s quoted” ', wptexturize( ' "test\'s quoted" ' ) ); + $this->assertSame( ' ‘test’s quoted’ ', wptexturize( ' \'test\'s quoted\' ' ) ); + $this->assertSame( ' “test’s quoted” ', wptexturize( ' "test\'s quoted" ' ) ); } /** * @ticket 4539 * @ticket 15241 */ - function test_full_sentences_with_unmatched_single_quotes() { - $this->assertEquals( + public function test_full_sentences_with_unmatched_single_quotes() { + $this->assertSame( 'That means every moment you’re working on something without it being in the public it’s actually dying.', wptexturize( "That means every moment you're working on something without it being in the public it's actually dying." ) ); @@ -84,161 +84,161 @@ function test_full_sentences_with_unmatched_single_quotes() { /** * @ticket 4539 */ - function test_quotes() { - $this->assertEquals( '“Quoted String”', wptexturize( '"Quoted String"' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link and a period</a>”.', wptexturize( 'Here is "<a href="http://example.com">a test with a link and a period</a>".' ) ); - $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>” and a space.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>" and a space.' ) ); - $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a> and some text quoted”', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a> and some text quoted"' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”, and a comma.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>", and a comma.' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”; and a semi-colon.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"; and a semi-colon.' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”- and a dash.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"- and a dash.' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”… and ellipses.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"... and ellipses.' ) ); - // $this->assertEquals( 'Here is “a test <a href="http://example.com">with a link</a>”.', wptexturize( 'Here is "a test <a href="http://example.com">with a link</a>".' ) ); - // $this->assertEquals( 'Here is “<a href="http://example.com">a test with a link</a>”and a work stuck to the end.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"and a work stuck to the end.' ) ); - $this->assertEquals( 'A test with a finishing number, “like 23”.', wptexturize( 'A test with a finishing number, "like 23".' ) ); - $this->assertEquals( 'A test with a number, “like 62”, is nice to have.', wptexturize( 'A test with a number, "like 62", is nice to have.' ) ); + public function test_quotes() { + $this->assertSame( '“Quoted String”', wptexturize( '"Quoted String"' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link and a period</a>”.', wptexturize( 'Here is "<a href="http://example.com">a test with a link and a period</a>".' ) ); + $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>” and a space.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>" and a space.' ) ); + $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a> and some text quoted”', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a> and some text quoted"' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”, and a comma.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>", and a comma.' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”; and a semi-colon.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"; and a semi-colon.' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”- and a dash.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"- and a dash.' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”… and ellipses.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"... and ellipses.' ) ); + // $this->assertSame( 'Here is “a test <a href="http://example.com">with a link</a>”.', wptexturize( 'Here is "a test <a href="http://example.com">with a link</a>".' ) ); + // $this->assertSame( 'Here is “<a href="http://example.com">a test with a link</a>”and a work stuck to the end.', wptexturize( 'Here is "<a href="http://example.com">a test with a link</a>"and a work stuck to the end.' ) ); + $this->assertSame( 'A test with a finishing number, “like 23”.', wptexturize( 'A test with a finishing number, "like 23".' ) ); + $this->assertSame( 'A test with a number, “like 62”, is nice to have.', wptexturize( 'A test with a number, "like 62", is nice to have.' ) ); } /** * @ticket 4539 */ - function test_quotes_before_s() { - $this->assertEquals( 'test’s', wptexturize( "test's" ) ); - $this->assertEquals( '‘test’s', wptexturize( "'test's" ) ); - $this->assertEquals( '‘test’s’', wptexturize( "'test's'" ) ); - $this->assertEquals( '‘string’', wptexturize( "'string'" ) ); - $this->assertEquals( '‘string’s’', wptexturize( "'string's'" ) ); + public function test_quotes_before_s() { + $this->assertSame( 'test’s', wptexturize( "test's" ) ); + $this->assertSame( '‘test’s', wptexturize( "'test's" ) ); + $this->assertSame( '‘test’s’', wptexturize( "'test's'" ) ); + $this->assertSame( '‘string’', wptexturize( "'string'" ) ); + $this->assertSame( '‘string’s’', wptexturize( "'string's'" ) ); } /** * @ticket 4539 */ - function test_quotes_before_numbers() { - $this->assertEquals( 'Class of ’99', wptexturize( "Class of '99" ) ); - $this->assertEquals( 'Class of ’99’s', wptexturize( "Class of '99's" ) ); - $this->assertEquals( '‘Class of ’99’', wptexturize( "'Class of '99'" ) ); - $this->assertEquals( '‘Class of ’99’ ', wptexturize( "'Class of '99' " ) ); - $this->assertEquals( '‘Class of ’99’.', wptexturize( "'Class of '99'." ) ); - $this->assertEquals( '‘Class of ’99’, she said', wptexturize( "'Class of '99', she said" ) ); - $this->assertEquals( '‘Class of ’99’:', wptexturize( "'Class of '99':" ) ); - $this->assertEquals( '‘Class of ’99’;', wptexturize( "'Class of '99';" ) ); - $this->assertEquals( '‘Class of ’99’!', wptexturize( "'Class of '99'!" ) ); - $this->assertEquals( '‘Class of ’99’?', wptexturize( "'Class of '99'?" ) ); - $this->assertEquals( '‘Class of ’99’s’', wptexturize( "'Class of '99's'" ) ); - $this->assertEquals( '‘Class of ’99’s’', wptexturize( "'Class of '99’s'" ) ); - $this->assertEquals( '“Class of 99”', wptexturize( '"Class of 99"' ) ); - $this->assertEquals( '“Class of ’99”', wptexturize( "\"Class of '99\"" ) ); - $this->assertEquals( '{“Class of ’99”}', wptexturize( "{\"Class of '99\"}" ) ); - $this->assertEquals( ' “Class of ’99” ', wptexturize( " \"Class of '99\" " ) ); - $this->assertEquals( ' “Class of ’99”.', wptexturize( " \"Class of '99\"." ) ); - $this->assertEquals( ' “Class of ’99”, she said', wptexturize( " \"Class of '99\", she said" ) ); - $this->assertEquals( ' “Class of ’99”:', wptexturize( " \"Class of '99\":" ) ); - $this->assertEquals( ' “Class of ’99”;', wptexturize( " \"Class of '99\";" ) ); - $this->assertEquals( ' “Class of ’99”!', wptexturize( " \"Class of '99\"!" ) ); - $this->assertEquals( ' “Class of ’99”?', wptexturize( " \"Class of '99\"?" ) ); + public function test_quotes_before_numbers() { + $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); + $this->assertSame( 'Class of ’99’s', wptexturize( "Class of '99's" ) ); + $this->assertSame( '‘Class of ’99’', wptexturize( "'Class of '99'" ) ); + $this->assertSame( '‘Class of ’99’ ', wptexturize( "'Class of '99' " ) ); + $this->assertSame( '‘Class of ’99’.', wptexturize( "'Class of '99'." ) ); + $this->assertSame( '‘Class of ’99’, she said', wptexturize( "'Class of '99', she said" ) ); + $this->assertSame( '‘Class of ’99’:', wptexturize( "'Class of '99':" ) ); + $this->assertSame( '‘Class of ’99’;', wptexturize( "'Class of '99';" ) ); + $this->assertSame( '‘Class of ’99’!', wptexturize( "'Class of '99'!" ) ); + $this->assertSame( '‘Class of ’99’?', wptexturize( "'Class of '99'?" ) ); + $this->assertSame( '‘Class of ’99’s’', wptexturize( "'Class of '99's'" ) ); + $this->assertSame( '‘Class of ’99’s’', wptexturize( "'Class of '99’s'" ) ); + $this->assertSame( '“Class of 99”', wptexturize( '"Class of 99"' ) ); + $this->assertSame( '“Class of ’99”', wptexturize( "\"Class of '99\"" ) ); + $this->assertSame( '{“Class of ’99”}', wptexturize( "{\"Class of '99\"}" ) ); + $this->assertSame( ' “Class of ’99” ', wptexturize( " \"Class of '99\" " ) ); + $this->assertSame( ' “Class of ’99”.', wptexturize( " \"Class of '99\"." ) ); + $this->assertSame( ' “Class of ’99”, she said', wptexturize( " \"Class of '99\", she said" ) ); + $this->assertSame( ' “Class of ’99”:', wptexturize( " \"Class of '99\":" ) ); + $this->assertSame( ' “Class of ’99”;', wptexturize( " \"Class of '99\";" ) ); + $this->assertSame( ' “Class of ’99”!', wptexturize( " \"Class of '99\"!" ) ); + $this->assertSame( ' “Class of ’99”?', wptexturize( " \"Class of '99\"?" ) ); // Not a quotation, may be between two other quotations. - $this->assertEquals( '}”Class of ’99″{', wptexturize( "}\"Class of '99\"{" ) ); + $this->assertSame( '}”Class of ’99″{', wptexturize( "}\"Class of '99\"{" ) ); } - function test_quotes_after_numbers() { - $this->assertEquals( 'Class of ’99', wptexturize( "Class of '99" ) ); + public function test_quotes_after_numbers() { + $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); } /** * @ticket 4539 * @ticket 15241 */ - function test_other_html() { - $this->assertEquals( '‘<strong>', wptexturize( "'<strong>" ) ); - // $this->assertEquals( '‘<strong>Quoted Text</strong>’,', wptexturize( "'<strong>Quoted Text</strong>'," ) ); - // $this->assertEquals( '“<strong>Quoted Text</strong>”,', wptexturize( '"<strong>Quoted Text</strong>",' ) ); + public function test_other_html() { + $this->assertSame( '‘<strong>', wptexturize( "'<strong>" ) ); + // $this->assertSame( '‘<strong>Quoted Text</strong>’,', wptexturize( "'<strong>Quoted Text</strong>'," ) ); + // $this->assertSame( '“<strong>Quoted Text</strong>”,', wptexturize( '"<strong>Quoted Text</strong>",' ) ); } - function test_x() { - $this->assertEquals( '14×24', wptexturize( '14x24' ) ); + public function test_x() { + $this->assertSame( '14×24', wptexturize( '14x24' ) ); } - function test_minutes_seconds() { - $this->assertEquals( '9′', wptexturize( '9\'' ) ); - $this->assertEquals( '9″', wptexturize( '9"' ) ); + public function test_minutes_seconds() { + $this->assertSame( '9′', wptexturize( '9\'' ) ); + $this->assertSame( '9″', wptexturize( '9"' ) ); - $this->assertEquals( 'a 9′ b', wptexturize( 'a 9\' b' ) ); - $this->assertEquals( 'a 9″ b', wptexturize( 'a 9" b' ) ); + $this->assertSame( 'a 9′ b', wptexturize( 'a 9\' b' ) ); + $this->assertSame( 'a 9″ b', wptexturize( 'a 9" b' ) ); - $this->assertEquals( '“a 9′ b”', wptexturize( '"a 9\' b"' ) ); - $this->assertEquals( '‘a 9″ b’', wptexturize( "'a 9\" b'" ) ); + $this->assertSame( '“a 9′ b”', wptexturize( '"a 9\' b"' ) ); + $this->assertSame( '‘a 9″ b’', wptexturize( "'a 9\" b'" ) ); } /** * @ticket 8775 */ - function test_wptexturize_quotes_around_numbers() { - $this->assertEquals( '“12345”', wptexturize( '"12345"' ) ); - $this->assertEquals( '‘12345’', wptexturize( '\'12345\'' ) ); - $this->assertEquals( '“a 9′ plus a ‘9’, maybe a 9′ ‘9’”', wptexturize( '"a 9\' plus a \'9\', maybe a 9\' \'9\'"' ) ); - $this->assertEquals( '<p>’99<br />‘123’<br />’tis<br />‘s’</p>', wptexturize( '<p>\'99<br />\'123\'<br />\'tis<br />\'s\'</p>' ) ); + public function test_wptexturize_quotes_around_numbers() { + $this->assertSame( '“12345”', wptexturize( '"12345"' ) ); + $this->assertSame( '‘12345’', wptexturize( '\'12345\'' ) ); + $this->assertSame( '“a 9′ plus a ‘9’, maybe a 9′ ‘9’”', wptexturize( '"a 9\' plus a \'9\', maybe a 9\' \'9\'"' ) ); + $this->assertSame( '<p>’99<br />‘123’<br />’tis<br />‘s’</p>', wptexturize( '<p>\'99<br />\'123\'<br />\'tis<br />\'s\'</p>' ) ); } /** * @ticket 8912 */ - function test_wptexturize_html_comments() { - $this->assertEquals( '<!--[if !IE]>--><!--<![endif]-->', wptexturize( '<!--[if !IE]>--><!--<![endif]-->' ) ); - $this->assertEquals( '<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->', wptexturize( '<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->' ) ); - $this->assertEquals( '<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>', wptexturize( '<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>' ) ); + public function test_wptexturize_html_comments() { + $this->assertSame( '<!--[if !IE]>--><!--<![endif]-->', wptexturize( '<!--[if !IE]>--><!--<![endif]-->' ) ); + $this->assertSame( '<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->', wptexturize( '<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->' ) ); + $this->assertSame( '<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>', wptexturize( '<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>' ) ); } /** * @ticket 4539 * @ticket 15241 */ - function test_entity_quote_cuddling() { - $this->assertEquals( ' “Testing”', wptexturize( ' "Testing"' ) ); - // $this->assertEquals( '&“Testing”', wptexturize( '&"Testing"' ) ); + public function test_entity_quote_cuddling() { + $this->assertSame( ' “Testing”', wptexturize( ' "Testing"' ) ); + // $this->assertSame( '&“Testing”', wptexturize( '&"Testing"' ) ); } /** * @ticket 22823 */ - function test_apostrophes_before_primes() { - $this->assertEquals( 'WordPress 3.5’s release date', wptexturize( "WordPress 3.5's release date" ) ); + public function test_apostrophes_before_primes() { + $this->assertSame( 'WordPress 3.5’s release date', wptexturize( "WordPress 3.5's release date" ) ); } /** * @ticket 23185 */ - function test_spaces_around_hyphens() { + public function test_spaces_around_hyphens() { $nbsp = "\xC2\xA0"; - $this->assertEquals( ' – ', wptexturize( ' - ' ) ); - $this->assertEquals( ' – ', wptexturize( ' - ' ) ); - $this->assertEquals( ' – ', wptexturize( ' - ' ) ); - $this->assertEquals( ' – ', wptexturize( ' - ' ) ); - $this->assertEquals( "$nbsp–$nbsp", wptexturize( "$nbsp-$nbsp" ) ); - $this->assertEquals( " –$nbsp", wptexturize( " -$nbsp" ) ); - $this->assertEquals( "$nbsp– ", wptexturize( "$nbsp- " ) ); + $this->assertSame( ' – ', wptexturize( ' - ' ) ); + $this->assertSame( ' – ', wptexturize( ' - ' ) ); + $this->assertSame( ' – ', wptexturize( ' - ' ) ); + $this->assertSame( ' – ', wptexturize( ' - ' ) ); + $this->assertSame( "$nbsp–$nbsp", wptexturize( "$nbsp-$nbsp" ) ); + $this->assertSame( " –$nbsp", wptexturize( " -$nbsp" ) ); + $this->assertSame( "$nbsp– ", wptexturize( "$nbsp- " ) ); - $this->assertEquals( ' — ', wptexturize( ' -- ' ) ); - $this->assertEquals( ' — ', wptexturize( ' -- ' ) ); - $this->assertEquals( ' — ', wptexturize( ' -- ' ) ); - $this->assertEquals( ' — ', wptexturize( ' -- ' ) ); - $this->assertEquals( "$nbsp—$nbsp", wptexturize( "$nbsp--$nbsp" ) ); - $this->assertEquals( " —$nbsp", wptexturize( " --$nbsp" ) ); - $this->assertEquals( "$nbsp— ", wptexturize( "$nbsp-- " ) ); + $this->assertSame( ' — ', wptexturize( ' -- ' ) ); + $this->assertSame( ' — ', wptexturize( ' -- ' ) ); + $this->assertSame( ' — ', wptexturize( ' -- ' ) ); + $this->assertSame( ' — ', wptexturize( ' -- ' ) ); + $this->assertSame( "$nbsp—$nbsp", wptexturize( "$nbsp--$nbsp" ) ); + $this->assertSame( " —$nbsp", wptexturize( " --$nbsp" ) ); + $this->assertSame( "$nbsp— ", wptexturize( "$nbsp-- " ) ); } /** * @ticket 31030 */ - function test_hyphens_at_start_and_end() { - $this->assertEquals( '– ', wptexturize( '- ' ) ); - $this->assertEquals( '– –', wptexturize( '- -' ) ); - $this->assertEquals( ' –', wptexturize( ' -' ) ); + public function test_hyphens_at_start_and_end() { + $this->assertSame( '– ', wptexturize( '- ' ) ); + $this->assertSame( '– –', wptexturize( '- -' ) ); + $this->assertSame( ' –', wptexturize( ' -' ) ); - $this->assertEquals( '— ', wptexturize( '-- ' ) ); - $this->assertEquals( '— —', wptexturize( '-- --' ) ); - $this->assertEquals( ' —', wptexturize( ' --' ) ); + $this->assertSame( '— ', wptexturize( '-- ' ) ); + $this->assertSame( '— —', wptexturize( '-- --' ) ); + $this->assertSame( ' —', wptexturize( ' --' ) ); } /** @@ -248,7 +248,7 @@ function test_hyphens_at_start_and_end() { * * @ticket 22692 */ - function test_spaces_around_quotes_never() { + public function test_spaces_around_quotes_never() { $nbsp = "\xC2\xA0"; $problem_input = "$nbsp\"A"; @@ -265,11 +265,11 @@ function test_spaces_around_quotes_never() { * @ticket 22692 * @dataProvider data_spaces_around_quotes */ - function test_spaces_around_quotes( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_spaces_around_quotes( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_spaces_around_quotes() { + public function data_spaces_around_quotes() { $nbsp = "\xC2\xA0"; $pi = "\xCE\xA0"; @@ -321,11 +321,11 @@ function data_spaces_around_quotes() { * @ticket 22692 * @dataProvider data_apos_before_digits */ - function test_apos_before_digits( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_apos_before_digits( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_apos_before_digits() { + public function data_apos_before_digits() { return array( array( "word '99 word", @@ -362,11 +362,11 @@ function data_apos_before_digits() { * @ticket 22692 * @dataProvider data_opening_single_quote */ - function test_opening_single_quote( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_opening_single_quote( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_opening_single_quote() { + public function data_opening_single_quote() { return array( array( "word 'word word", @@ -491,11 +491,11 @@ function data_opening_single_quote() { * @ticket 22692 * @dataProvider data_double_prime */ - function test_double_prime( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_double_prime( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_double_prime() { + public function data_double_prime() { return array( array( 'word 99" word', @@ -524,11 +524,11 @@ function data_double_prime() { * @ticket 22692 * @dataProvider data_single_prime */ - function test_single_prime( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_single_prime( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_single_prime() { + public function data_single_prime() { return array( array( "word 99' word", @@ -557,11 +557,11 @@ function data_single_prime() { * @ticket 22692 * @dataProvider data_contractions */ - function test_contractions( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_contractions( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_contractions() { + public function data_contractions() { return array( array( "word word's word", @@ -598,11 +598,11 @@ function data_contractions() { * @ticket 22692 * @dataProvider data_opening_quote */ - function test_opening_quote( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_opening_quote( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_opening_quote() { + public function data_opening_quote() { return array( array( 'word "word word', @@ -675,11 +675,11 @@ function data_opening_quote() { * @ticket 22692 * @dataProvider data_closing_quote */ - function test_closing_quote( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_closing_quote( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_closing_quote() { + public function data_closing_quote() { return array( array( 'word word" word', @@ -764,11 +764,11 @@ function data_closing_quote() { * @ticket 22692 * @dataProvider data_closing_single_quote */ - function test_closing_single_quote( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_closing_single_quote( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_closing_single_quote() { + public function data_closing_single_quote() { return array( array( "word word' word", @@ -854,11 +854,11 @@ function data_closing_single_quote() { * @ticket 30445 * @dataProvider data_multiplication */ - function test_multiplication( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_multiplication( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_multiplication() { + public function data_multiplication() { return array( array( '9x9', @@ -904,11 +904,11 @@ function data_multiplication() { * @ticket 22692 * @dataProvider data_ampersand */ - function test_ampersand( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_ampersand( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_ampersand() { + public function data_ampersand() { return array( array( 'word & word', @@ -969,11 +969,11 @@ function data_ampersand() { * @ticket 22692 * @dataProvider data_cockney */ - function test_cockney( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_cockney( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_cockney() { + public function data_cockney() { return array( array( "word 'tain't word", @@ -1030,11 +1030,11 @@ function data_cockney() { * @ticket 22692 * @dataProvider data_smart_dashes */ - function test_smart_dashes( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_smart_dashes( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_smart_dashes() { + public function data_smart_dashes() { return array( array( 'word --- word', @@ -1083,11 +1083,11 @@ function data_smart_dashes() { * @ticket 22692 * @dataProvider data_misc_static_replacements */ - function test_misc_static_replacements( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_misc_static_replacements( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_misc_static_replacements() { + public function data_misc_static_replacements() { return array( array( 'word ... word', @@ -1138,11 +1138,11 @@ function data_misc_static_replacements() { * @ticket 8775 * @dataProvider data_quoted_numbers */ - function test_quoted_numbers( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_quoted_numbers( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_quoted_numbers() { + public function data_quoted_numbers() { return array( array( 'word "42.00" word', @@ -1189,11 +1189,11 @@ function data_quoted_numbers() { * @ticket 20342 * @dataProvider data_quotes_and_dashes */ - function test_quotes_and_dashes( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_quotes_and_dashes( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_quotes_and_dashes() { + public function data_quotes_and_dashes() { return array( array( 'word---"quote"', @@ -1252,11 +1252,11 @@ function data_quotes_and_dashes() { * @ticket 12690 * @dataProvider data_tag_avoidance */ - function test_tag_avoidance( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_tag_avoidance( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_tag_avoidance() { + public function data_tag_avoidance() { return array( array( '[ ... ]', @@ -1475,11 +1475,11 @@ function data_tag_avoidance() { * @ticket 26850 * @dataProvider data_year_abbr */ - function test_year_abbr( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_year_abbr( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_year_abbr() { + public function data_year_abbr() { return array( array( "word '99 word", @@ -1564,7 +1564,7 @@ function data_year_abbr() { * @ticket 27426 * @dataProvider data_translate */ - function test_translate( $input, $output ) { + public function test_translate( $input, $output ) { add_filter( 'gettext_with_context', array( $this, 'filter_translate' ), 10, 4 ); $result = wptexturize( $input, true ); @@ -1572,10 +1572,10 @@ function test_translate( $input, $output ) { remove_filter( 'gettext_with_context', array( $this, 'filter_translate' ), 10, 4 ); wptexturize( 'reset', true ); - return $this->assertEquals( $output, $result ); + return $this->assertSame( $output, $result ); } - function filter_translate( $translations, $text, $context, $domain ) { + public function filter_translate( $translations, $text, $context, $domain ) { switch ( $text ) { case '–': return '!endash!'; @@ -1604,7 +1604,7 @@ function filter_translate( $translations, $text, $context, $domain ) { } } - function data_translate() { + public function data_translate() { return array( array( "word '99 word", @@ -1791,11 +1791,11 @@ function data_translate() { * @ticket 28483 * @dataProvider data_element_stack */ - function test_element_stack( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_element_stack( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_element_stack() { + public function data_element_stack() { return array( array( '<span>hello</code>---</span>', @@ -1842,21 +1842,21 @@ function data_element_stack() { * @ticket 29557 * @dataProvider data_unregistered_shortcodes */ - function test_unregistered_shortcodes( $input, $output ) { + public function test_unregistered_shortcodes( $input, $output ) { add_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 ); - $output = $this->assertEquals( $output, wptexturize( $input ) ); + $output = $this->assertSame( $output, wptexturize( $input ) ); remove_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 ); return $output; } - function filter_shortcodes( $disabled ) { + public function filter_shortcodes( $disabled ) { $disabled[] = 'audio'; return $disabled; } - function data_unregistered_shortcodes() { + public function data_unregistered_shortcodes() { return array( array( '[a]a--b[audio]---[/audio]a--b[/a]', @@ -1927,11 +1927,11 @@ function data_unregistered_shortcodes() { * @ticket 29256 * @dataProvider data_primes_vs_quotes */ - function test_primes_vs_quotes( $input, $output ) { - return $this->assertEquals( $output, wptexturize( $input ) ); + public function test_primes_vs_quotes( $input, $output ) { + return $this->assertSame( $output, wptexturize( $input ) ); } - function data_primes_vs_quotes() { + public function data_primes_vs_quotes() { return array( array( "George's porch is 99' long.", @@ -1989,7 +1989,7 @@ function data_primes_vs_quotes() { * @ticket 29256 * @dataProvider data_primes_quotes_translation */ - function test_primes_quotes_translation( $input, $output ) { + public function test_primes_quotes_translation( $input, $output ) { add_filter( 'gettext_with_context', array( $this, 'filter_translate2' ), 10, 4 ); $result = wptexturize( $input, true ); @@ -1997,10 +1997,10 @@ function test_primes_quotes_translation( $input, $output ) { remove_filter( 'gettext_with_context', array( $this, 'filter_translate2' ), 10, 4 ); wptexturize( 'reset', true ); - return $this->assertEquals( $output, $result ); + return $this->assertSame( $output, $result ); } - function filter_translate2( $translations, $text, $context, $domain ) { + public function filter_translate2( $translations, $text, $context, $domain ) { switch ( $text ) { case '–': return '!endash!'; @@ -2027,7 +2027,7 @@ function filter_translate2( $translations, $text, $context, $domain ) { } } - function data_primes_quotes_translation() { + public function data_primes_quotes_translation() { return array( array( "George's porch is 99' long.", @@ -2082,7 +2082,7 @@ function data_primes_quotes_translation() { * * @dataProvider data_whole_posts */ - function test_pcre_performance( $input ) { + public function test_pcre_performance( $input ) { global $shortcode_tags; // With shortcodes disabled. @@ -2102,11 +2102,11 @@ function test_pcre_performance( $input ) { * * @ticket 35864 */ - function test_trailing_less_than() { - $this->assertEquals( 'F–oo<', wptexturize( 'F--oo<', true ) ); + public function test_trailing_less_than() { + $this->assertSame( 'F–oo<', wptexturize( 'F--oo<', true ) ); } - function data_whole_posts() { + public function data_whole_posts() { require_once DIR_TESTDATA . '/formatting/whole-posts.php'; return data_whole_posts(); } diff --git a/tests/phpunit/tests/formatting/WpTrimExcerpt.php b/tests/phpunit/tests/formatting/wpTrimExcerpt.php similarity index 59% rename from tests/phpunit/tests/formatting/WpTrimExcerpt.php rename to tests/phpunit/tests/formatting/wpTrimExcerpt.php index b2c026a95772b..ed5117bb56073 100644 --- a/tests/phpunit/tests/formatting/WpTrimExcerpt.php +++ b/tests/phpunit/tests/formatting/wpTrimExcerpt.php @@ -4,7 +4,7 @@ * @group formatting * @covers ::wp_trim_excerpt */ -class Tests_Formatting_WpTrimExcerpt extends WP_UnitTestCase { +class Tests_Formatting_wpTrimExcerpt extends WP_UnitTestCase { /** * @ticket 25349 */ @@ -66,4 +66,29 @@ public function test_secondary_loop_respect_nextpage() { } } } + + /** + * @ticket 51042 + */ + public function test_should_generate_excerpt_for_empty_values() { + if ( PHP_VERSION_ID >= 80100 ) { + /* + * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in + * via hooked in filter functions until a more structural solution to the + * "missing input validation" conundrum has been architected and implemented. + */ + $this->expectDeprecation(); + $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); + } + + $post = self::factory()->post->create( + array( + 'post_content' => 'Post content', + ) + ); + + $this->assertSame( 'Post content', wp_trim_excerpt( '', $post ) ); + $this->assertSame( 'Post content', wp_trim_excerpt( null, $post ) ); + $this->assertSame( 'Post content', wp_trim_excerpt( false, $post ) ); + } } diff --git a/tests/phpunit/tests/formatting/WPTrimWords.php b/tests/phpunit/tests/formatting/wpTrimWords.php similarity index 58% rename from tests/phpunit/tests/formatting/WPTrimWords.php rename to tests/phpunit/tests/formatting/wpTrimWords.php index 125bbcb9d2f84..1becf2b5d2093 100644 --- a/tests/phpunit/tests/formatting/WPTrimWords.php +++ b/tests/phpunit/tests/formatting/wpTrimWords.php @@ -3,7 +3,7 @@ /** * @group formatting */ -class Tests_Formatting_WPTrimWords extends WP_UnitTestCase { +class Tests_Formatting_wpTrimWords extends WP_UnitTestCase { /** * Long Dummy Text. @@ -14,75 +14,75 @@ class Tests_Formatting_WPTrimWords extends WP_UnitTestCase { */ private $long_text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius lacinia vehicula. Etiam sapien risus, ultricies ac posuere eu, convallis sit amet augue. Pellentesque urna massa, lacinia vel iaculis eget, bibendum in mauris. Aenean eleifend pulvinar ligula, a convallis eros gravida non. Suspendisse potenti. Pellentesque et odio tortor. In vulputate pellentesque libero, sed dapibus velit mollis viverra. Pellentesque id urna euismod dolor cursus sagittis.'; - function test_trims_to_55_by_default() { + public function test_trims_to_55_by_default() { $trimmed = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius lacinia vehicula. Etiam sapien risus, ultricies ac posuere eu, convallis sit amet augue. Pellentesque urna massa, lacinia vel iaculis eget, bibendum in mauris. Aenean eleifend pulvinar ligula, a convallis eros gravida non. Suspendisse potenti. Pellentesque et odio tortor. In vulputate pellentesque libero, sed dapibus velit…'; - $this->assertEquals( $trimmed, wp_trim_words( $this->long_text ) ); + $this->assertSame( $trimmed, wp_trim_words( $this->long_text ) ); } - function test_trims_to_10() { + public function test_trims_to_10() { $trimmed = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius…'; - $this->assertEquals( $trimmed, wp_trim_words( $this->long_text, 10 ) ); + $this->assertSame( $trimmed, wp_trim_words( $this->long_text, 10 ) ); } - function test_trims_to_5_and_uses_custom_more() { + public function test_trims_to_5_and_uses_custom_more() { $trimmed = 'Lorem ipsum dolor sit amet,[...] Read on!'; - $this->assertEquals( $trimmed, wp_trim_words( $this->long_text, 5, '[...] Read on!' ) ); + $this->assertSame( $trimmed, wp_trim_words( $this->long_text, 5, '[...] Read on!' ) ); } - function test_strips_tags_before_trimming() { + public function test_strips_tags_before_trimming() { $text = 'This text contains a <a href="http://wordpress.org"> link </a> to WordPress.org!'; $trimmed = 'This text contains a link…'; - $this->assertEquals( $trimmed, wp_trim_words( $text, 5 ) ); + $this->assertSame( $trimmed, wp_trim_words( $text, 5 ) ); } /** * @ticket 18726 */ - function test_strips_script_and_style_content() { + public function test_strips_script_and_style_content() { $trimmed = 'This text contains. It should go.'; - $text = 'This text contains<script>alert(" Javascript");</script>. It should go.'; - $this->assertEquals( $trimmed, wp_trim_words( $text ) ); + $text = 'This text contains<script>alert(" JavaScript");</script>. It should go.'; + $this->assertSame( $trimmed, wp_trim_words( $text ) ); $text = 'This text contains<style>#css { width:expression(alert("css")) }</style>. It should go.'; - $this->assertEquals( $trimmed, wp_trim_words( $text ) ); + $this->assertSame( $trimmed, wp_trim_words( $text ) ); } - function test_doesnt_trim_short_text() { + public function test_doesnt_trim_short_text() { $text = 'This is some short text.'; - $this->assertEquals( $text, wp_trim_words( $text ) ); + $this->assertSame( $text, wp_trim_words( $text ) ); } /** * @ticket 44541 */ - function test_trims_to_20_counted_by_chars() { + public function test_trims_to_20_counted_by_chars() { switch_to_locale( 'ja_JP' ); $expected = substr( $this->long_text, 0, 20 ) . '…'; $actual = wp_trim_words( $this->long_text, 20 ); restore_previous_locale(); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } /** * @ticket 44541 */ - function test_trims_to_20_counted_by_chars_with_double_width_chars() { + public function test_trims_to_20_counted_by_chars_with_double_width_chars() { switch_to_locale( 'ja_JP' ); $text = str_repeat( '恂', 100 ); $expected = str_repeat( '恂', 19 ) . '…'; $actual = wp_trim_words( $text, 19 ); restore_previous_locale(); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } /** * @ticket 47867 */ - function test_works_with_non_numeric_num_words() { - $this->assertEquals( '', wp_trim_words( $this->long_text, '', '' ) ); - $this->assertEquals( '', wp_trim_words( $this->long_text, 'abc', '' ) ); - $this->assertEquals( '', wp_trim_words( $this->long_text, null, '' ) ); - $this->assertEquals( 'Lorem ipsum dolor', wp_trim_words( $this->long_text, '3', '' ) ); + public function test_works_with_non_numeric_num_words() { + $this->assertSame( '', wp_trim_words( $this->long_text, '', '' ) ); + $this->assertSame( '', wp_trim_words( $this->long_text, 'abc', '' ) ); + $this->assertSame( '', wp_trim_words( $this->long_text, null, '' ) ); + $this->assertSame( 'Lorem ipsum dolor', wp_trim_words( $this->long_text, '3', '' ) ); } } diff --git a/tests/phpunit/tests/formatting/zeroise.php b/tests/phpunit/tests/formatting/zeroise.php new file mode 100644 index 0000000000000..c702fc4eb9f1c --- /dev/null +++ b/tests/phpunit/tests/formatting/zeroise.php @@ -0,0 +1,14 @@ +<?php + +/** + * @group formatting + */ +class Tests_Formatting_Zeroise extends WP_UnitTestCase { + public function test_pads_with_leading_zeroes() { + $this->assertSame( '00005', zeroise( 5, 5 ) ); + } + + public function test_does_nothing_if_input_is_already_longer() { + $this->assertSame( '5000000', zeroise( 5000000, 2 ) ); + } +} diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index db691131edaa0..bcf852521657a 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -4,12 +4,12 @@ * @group functions.php */ class Tests_Functions extends WP_UnitTestCase { - function test_wp_parse_args_object() { + public function test_wp_parse_args_object() { $x = new MockClass; $x->_baba = 5; $x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $x->a = array( 5, 111, 'x' ); - $this->assertEquals( + $this->assertSame( array( '_baba' => 5, 'yZ' => 'baba', @@ -18,19 +18,19 @@ function test_wp_parse_args_object() { wp_parse_args( $x ) ); $y = new MockClass; - $this->assertEquals( array(), wp_parse_args( $y ) ); + $this->assertSame( array(), wp_parse_args( $y ) ); } - function test_wp_parse_args_array() { + public function test_wp_parse_args_array() { // Arrays. $a = array(); - $this->assertEquals( array(), wp_parse_args( $a ) ); + $this->assertSame( array(), wp_parse_args( $a ) ); $b = array( '_baba' => 5, 'yZ' => 'baba', 'a' => array( 5, 111, 'x' ), ); - $this->assertEquals( + $this->assertSame( array( '_baba' => 5, 'yZ' => 'baba', @@ -40,13 +40,13 @@ function test_wp_parse_args_array() { ); } - function test_wp_parse_args_defaults() { + public function test_wp_parse_args_defaults() { $x = new MockClass; $x->_baba = 5; $x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $x->a = array( 5, 111, 'x' ); $d = array( 'pu' => 'bu' ); - $this->assertEquals( + $this->assertSame( array( 'pu' => 'bu', '_baba' => 5, @@ -56,7 +56,7 @@ function test_wp_parse_args_defaults() { wp_parse_args( $x, $d ) ); $e = array( '_baba' => 6 ); - $this->assertEquals( + $this->assertSame( array( '_baba' => 5, 'yZ' => 'baba', @@ -66,34 +66,34 @@ function test_wp_parse_args_defaults() { ); } - function test_wp_parse_args_other() { + public function test_wp_parse_args_other() { $b = true; wp_parse_str( $b, $s ); - $this->assertEquals( $s, wp_parse_args( $b ) ); + $this->assertSame( $s, wp_parse_args( $b ) ); $q = 'x=5&_baba=dudu&'; wp_parse_str( $q, $ss ); - $this->assertEquals( $ss, wp_parse_args( $q ) ); + $this->assertSame( $ss, wp_parse_args( $q ) ); } /** * @ticket 30753 */ - function test_wp_parse_args_boolean_strings() { + public function test_wp_parse_args_boolean_strings() { $args = wp_parse_args( 'foo=false&bar=true' ); - $this->assertInternalType( 'string', $args['foo'] ); - $this->assertInternalType( 'string', $args['bar'] ); + $this->assertIsString( $args['foo'] ); + $this->assertIsString( $args['bar'] ); } /** * @ticket 35972 */ - function test_bool_from_yn() { + public function test_bool_from_yn() { $this->assertTrue( bool_from_yn( 'Y' ) ); $this->assertTrue( bool_from_yn( 'y' ) ); $this->assertFalse( bool_from_yn( 'n' ) ); } - function test_path_is_absolute() { + public function test_path_is_absolute() { $absolute_paths = array( '/', '/foo/', @@ -111,7 +111,7 @@ function test_path_is_absolute() { } } - function test_path_is_not_absolute() { + public function test_path_is_not_absolute() { $relative_paths = array( '', '.', @@ -135,11 +135,11 @@ function test_path_is_not_absolute() { * * @dataProvider data_wp_normalize_path */ - function test_wp_normalize_path( $path, $expected ) { - $this->assertEquals( $expected, wp_normalize_path( $path ) ); + public function test_wp_normalize_path( $path, $expected ) { + $this->assertSame( $expected, wp_normalize_path( $path ) ); } - function data_wp_normalize_path() { + public function data_wp_normalize_path() { return array( // Windows paths. array( 'C:\\www\\path\\', 'C:/www/path/' ), @@ -163,68 +163,158 @@ function data_wp_normalize_path() { ); } - function test_wp_unique_filename() { + public function test_wp_unique_filename() { $testdir = DIR_TESTDATA . '/images/'; // Sanity check. - $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Sanitiy check failed' ); + $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Test non-existing file, file name should be unchanged.' ); - // Check number is appended for file already exists. + // Ensure correct images exist. $this->assertFileExists( $testdir . 'test-image.png', 'Test image does not exist' ); - $this->assertEquals( 'test-image-1.png', wp_unique_filename( $testdir, 'test-image.png' ), 'Number not appended correctly' ); - $this->assertFileNotExists( $testdir . 'test-image-1.png' ); + $this->assertFileDoesNotExist( $testdir . 'test-image-1.png' ); + + // Check number is appended if file already exists. + $this->assertSame( 'test-image-1.png', wp_unique_filename( $testdir, 'test-image.png' ), 'File name not unique, number not appended.' ); + + // Check file with uppercase extension. + $this->assertSame( 'test-image-1.png', wp_unique_filename( $testdir, 'test-image.PNG' ), 'File name with uppercase extension not unique, number not appended.' ); + + // Check file name with already added number. + $this->assertSame( 'test-image-2-1.gif', wp_unique_filename( $testdir, 'test-image-2.gif' ), 'File name not unique, number not appended correctly.' ); // Check special chars. - $this->assertEquals( 'testtĆ©st-imagĆ©.png', wp_unique_filename( $testdir, 'testtĆ©st-imagĆ©.png' ), 'Filename with special chars failed' ); + $this->assertSame( 'testtest-image.png', wp_unique_filename( $testdir, 'testtĆ©st-imagĆ©.png' ), 'Filename with special chars failed' ); // Check special chars with potential conflicting name. - $this->assertEquals( 'tĆ©st-imagĆ©.png', wp_unique_filename( $testdir, 'tĆ©st-imagĆ©.png' ), 'Filename with special chars failed' ); + $this->assertSame( 'test-image-1.png', wp_unique_filename( $testdir, 'tĆ©st-imagĆ©.png' ), 'Filename with special chars failed' ); // Check with single quotes in name (somehow). - $this->assertEquals( 'abcdefgh.png', wp_unique_filename( $testdir, "abcdefg'h.png" ), 'File with quote failed' ); + $this->assertSame( 'abcdefgh.png', wp_unique_filename( $testdir, "abcdefg'h.png" ), 'File with quote failed' ); // Check with double quotes in name (somehow). - $this->assertEquals( 'abcdefgh.png', wp_unique_filename( $testdir, 'abcdefg"h.png' ), 'File with quote failed' ); + $this->assertSame( 'abcdefgh.png', wp_unique_filename( $testdir, 'abcdefg"h.png' ), 'File with quote failed' ); // Test crazy name (useful for regression tests). - $this->assertEquals( '12af34567890@..^_qwerty-fghjkl-zx.png', wp_unique_filename( $testdir, '12%af34567890#~!@#$..%^&*()|_+qwerty fgh`jkl zx<>?:"{}[]="\'/?.png' ), 'Failed crazy file name' ); + $this->assertSame( '12af34567890@..^_qwerty-fghjkl-zx.png', wp_unique_filename( $testdir, '12%af34567890#~!@#$..%^&*()|_+qwerty fgh`jkl zx<>?:"{}[]="\'/?.png' ), 'Failed crazy file name' ); // Test slashes in names. - $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\fg.png' ), 'Slash not removed' ); - $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\fg.png' ), 'Double slashed not removed' ); - $this->assertEquals( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\\fg.png' ), 'Tripple slashed not removed' ); + $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\fg.png' ), 'Slash not removed' ); + $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\fg.png' ), 'Double slashed not removed' ); + $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcde\\\fg.png' ), 'Tripple slashed not removed' ); } /** * @ticket 42437 */ - function test_unique_filename_with_dimension_like_filename() { + public function test_unique_filename_with_dimension_like_filename() { $testdir = DIR_TESTDATA . '/images/'; add_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) ); // Test collision with "dimension-like" original filename. - $this->assertEquals( 'one-blue-pixel-100x100-1.png', wp_unique_filename( $testdir, 'one-blue-pixel-100x100.png' ) ); + $this->assertSame( 'one-blue-pixel-100x100-1.png', wp_unique_filename( $testdir, 'one-blue-pixel-100x100.png' ) ); // Test collision with existing sub-size filename. // Existing files: one-blue-pixel-100x100.png, one-blue-pixel-1-100x100.png. - $this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.png' ) ); + $this->assertSame( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.png' ) ); // Same as above with upper case extension. - $this->assertEquals( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.PNG' ) ); + $this->assertSame( 'one-blue-pixel-2.png', wp_unique_filename( $testdir, 'one-blue-pixel.PNG' ) ); remove_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) ); } // Callback to patch "basedir" when used in `wp_unique_filename()`. - function upload_dir_patch_basedir( $upload_dir ) { + public function upload_dir_patch_basedir( $upload_dir ) { $upload_dir['basedir'] = DIR_TESTDATA . '/images/'; return $upload_dir; } + /** + * @ticket 53668 + */ + public function test_wp_unique_filename_with_additional_image_extension() { + $testdir = DIR_TESTDATA . '/images/'; + + add_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) ); + + // Set conversions for uploaded images. + add_filter( 'image_editor_output_format', array( $this, 'image_editor_output_format_handler' ) ); + + // Ensure the test images exist. + $this->assertFileExists( $testdir . 'test-image-1-100x100.jpg', 'test-image-1-100x100.jpg does not exist' ); + $this->assertFileExists( $testdir . 'test-image-2.gif', 'test-image-2.gif does not exist' ); + $this->assertFileExists( $testdir . 'test-image-3.jpg', 'test-image-3.jpg does not exist' ); + $this->assertFileExists( $testdir . 'test-image-4.png', 'test-image-4.png does not exist' ); + + // Standard test: file does not exist and there are no possible intersections with other files. + $this->assertSame( + 'abcdef.png', + wp_unique_filename( $testdir, 'abcdef.png' ), + 'The abcdef.png, abcdef.gif, and abcdef.jpg images do not exist. The file name should not be changed.' + ); + + // Actual clash recognized. + $this->assertSame( + 'canola-1.jpg', + wp_unique_filename( $testdir, 'canola.jpg' ), + 'The canola.jpg image exists. The file name should be unique.' + ); + + // Same name with different extension and the image will be converted. + $this->assertSame( + 'canola-1.png', + wp_unique_filename( $testdir, 'canola.png' ), + 'The canola.jpg image exists. Uploading canola.png that will be converted to canola.jpg should produce unique file name.' + ); + + // Same name with different uppercase extension and the image will be converted. + $this->assertSame( + 'canola-1.png', + wp_unique_filename( $testdir, 'canola.PNG' ), + 'The canola.jpg image exists. Uploading canola.PNG that will be converted to canola.jpg should produce unique file name.' + ); + + // Actual clash with several images with different extensions. + $this->assertSame( + 'test-image-5.png', + wp_unique_filename( $testdir, 'test-image.png' ), + 'The test-image.png, test-image-1-100x100.jpg, test-image-2.gif, test-image-3.jpg, and test-image-4.png images exist.' . + 'All of them may clash when creating sub-sizes or regenerating thumbnails in the future. The filename should be unique.' + ); + + // Possible clash with regenerated thumbnails in the future. + $this->assertSame( + 'codeispoetry-1.jpg', + wp_unique_filename( $testdir, 'codeispoetry.jpg' ), + 'The codeispoetry.png image exists. When regenerating thumbnails for it they will be converted to JPG.' . + 'The name of the newly uploaded codeispoetry.jpg should be made unique.' + ); + + remove_filter( 'image_editor_output_format', array( $this, 'image_editor_output_format_handler' ) ); + remove_filter( 'upload_dir', array( $this, 'upload_dir_patch_basedir' ) ); + } + + /** + * Changes the output format when editing images. When uploading a PNG file + * it will be converted to JPEG, GIF to JPEG, and PICT to BMP + * (if the image editor in PHP supports it). + * + * @param array $formats + * + * @return array + */ + public function image_editor_output_format_handler( $formats ) { + $formats['image/png'] = 'image/jpeg'; + $formats['image/gif'] = 'image/jpeg'; + $formats['image/pct'] = 'image/bmp'; + + return $formats; + } + /** * @dataProvider data_is_not_serialized */ - function test_maybe_serialize( $value ) { + public function test_maybe_serialize( $value ) { if ( is_array( $value ) || is_object( $value ) ) { $expected = serialize( $value ); } else { @@ -237,7 +327,7 @@ function test_maybe_serialize( $value ) { /** * @dataProvider data_is_serialized */ - function test_maybe_serialize_with_double_serialization( $value ) { + public function test_maybe_serialize_with_double_serialization( $value ) { $expected = serialize( $value ); $this->assertSame( $expected, maybe_serialize( $value ) ); @@ -247,7 +337,7 @@ function test_maybe_serialize_with_double_serialization( $value ) { * @dataProvider data_is_serialized * @dataProvider data_is_not_serialized */ - function test_maybe_unserialize( $value, $is_serialized ) { + public function test_maybe_unserialize( $value, $is_serialized ) { if ( $is_serialized ) { $expected = unserialize( trim( $value ) ); } else { @@ -265,11 +355,35 @@ function test_maybe_unserialize( $value, $is_serialized ) { * @dataProvider data_is_serialized * @dataProvider data_is_not_serialized */ - function test_is_serialized( $value, $expected ) { + public function test_is_serialized( $value, $expected ) { $this->assertSame( $expected, is_serialized( $value ) ); } - function data_is_serialized() { + /** + * @dataProvider data_serialize_deserialize_objects + */ + public function test_deserialize_request_utility_filtered_iterator_objects( $value ) { + $serialized = maybe_serialize( $value ); + if ( get_class( $value ) === 'Requests_Utility_FilteredIterator' ) { + $new_value = unserialize( $serialized ); + $property = ( new ReflectionClass( 'Requests_Utility_FilteredIterator' ) )->getProperty( 'callback' ); + $property->setAccessible( true ); + $callback_value = $property->getValue( $new_value ); + $this->assertSame( null, $callback_value ); + } else { + $this->assertSame( $value->count(), unserialize( $serialized )->count() ); + } + } + + public function data_serialize_deserialize_objects() { + return array( + array( new Requests_Utility_FilteredIterator( array( 1 ), 'md5' ) ), + array( new Requests_Utility_FilteredIterator( array( 1, 2 ), 'sha1' ) ), + array( new ArrayIterator( array( 1, 2, 3 ) ) ), + ); + } + + public function data_is_serialized() { return array( array( serialize( null ), true ), array( serialize( true ), true ), @@ -295,7 +409,7 @@ function data_is_serialized() { ); } - function data_is_not_serialized() { + public function data_is_not_serialized() { return array( array( null, false ), array( true, false ), @@ -325,11 +439,11 @@ function data_is_not_serialized() { * @ticket 46570 * @dataProvider data_is_serialized_should_return_true_for_large_floats */ - function test_is_serialized_should_return_true_for_large_floats( $value ) { + public function test_is_serialized_should_return_true_for_large_floats( $value ) { $this->assertTrue( is_serialized( $value ) ); } - function data_is_serialized_should_return_true_for_large_floats() { + public function data_is_serialized_should_return_true_for_large_floats() { return array( array( serialize( 1.7976931348623157E+308 ) ), array( serialize( array( 1.7976931348623157E+308, 1.23e50 ) ) ), @@ -339,14 +453,14 @@ function data_is_serialized_should_return_true_for_large_floats() { /** * @ticket 17375 */ - function test_no_new_serializable_types() { + public function test_no_new_serializable_types() { $this->assertFalse( is_serialized( 'C:16:"Serialized_Class":6:{a:0:{}}' ) ); } /** * @group add_query_arg */ - function test_add_query_arg() { + public function test_add_query_arg() { $old_req_uri = $_SERVER['REQUEST_URI']; $urls = array( @@ -368,9 +482,9 @@ function test_add_query_arg() { foreach ( $urls as $url ) { $_SERVER['REQUEST_URI'] = 'nothing'; - $this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1', $url ) ); - $this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1", add_query_arg( 'foo', '1', $url ) ); + $this->assertSame( "$url?foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); + $this->assertSame( "$url?foo=2", add_query_arg( array( @@ -380,7 +494,7 @@ function test_add_query_arg() { $url ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1&bar=2", add_query_arg( array( @@ -393,9 +507,9 @@ function test_add_query_arg() { $_SERVER['REQUEST_URI'] = $url; - $this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1' ) ); - $this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ) ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1", add_query_arg( 'foo', '1' ) ); + $this->assertSame( "$url?foo=1", add_query_arg( array( 'foo' => '1' ) ) ); + $this->assertSame( "$url?foo=2", add_query_arg( array( @@ -404,7 +518,7 @@ function test_add_query_arg() { ) ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1&bar=2", add_query_arg( array( @@ -419,9 +533,9 @@ function test_add_query_arg() { $_SERVER['REQUEST_URI'] = 'nothing'; $url = str_replace( '#frag', '', $frag_url ); - $this->assertEquals( "$url?foo=1#frag", add_query_arg( 'foo', '1', $frag_url ) ); - $this->assertEquals( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ), $frag_url ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1#frag", add_query_arg( 'foo', '1', $frag_url ) ); + $this->assertSame( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ), $frag_url ) ); + $this->assertSame( "$url?foo=2#frag", add_query_arg( array( @@ -431,7 +545,7 @@ function test_add_query_arg() { $frag_url ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1&bar=2#frag", add_query_arg( array( @@ -444,9 +558,9 @@ function test_add_query_arg() { $_SERVER['REQUEST_URI'] = $frag_url; - $this->assertEquals( "$url?foo=1#frag", add_query_arg( 'foo', '1' ) ); - $this->assertEquals( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ) ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1#frag", add_query_arg( 'foo', '1' ) ); + $this->assertSame( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ) ) ); + $this->assertSame( "$url?foo=2#frag", add_query_arg( array( @@ -455,7 +569,7 @@ function test_add_query_arg() { ) ) ); - $this->assertEquals( + $this->assertSame( "$url?foo=1&bar=2#frag", add_query_arg( array( @@ -481,9 +595,9 @@ function test_add_query_arg() { foreach ( $qs_urls as $url ) { $_SERVER['REQUEST_URI'] = 'nothing'; - $this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1', $url ) ); - $this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); - $this->assertEquals( + $this->assertSame( "$url&foo=1", add_query_arg( 'foo', '1', $url ) ); + $this->assertSame( "$url&foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); + $this->assertSame( "$url&foo=2", add_query_arg( array( @@ -493,7 +607,7 @@ function test_add_query_arg() { $url ) ); - $this->assertEquals( + $this->assertSame( "$url&foo=1&bar=2", add_query_arg( array( @@ -506,9 +620,9 @@ function test_add_query_arg() { $_SERVER['REQUEST_URI'] = $url; - $this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1' ) ); - $this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ) ) ); - $this->assertEquals( + $this->assertSame( "$url&foo=1", add_query_arg( 'foo', '1' ) ); + $this->assertSame( "$url&foo=1", add_query_arg( array( 'foo' => '1' ) ) ); + $this->assertSame( "$url&foo=2", add_query_arg( array( @@ -517,7 +631,7 @@ function test_add_query_arg() { ) ) ); - $this->assertEquals( + $this->assertSame( "$url&foo=1&bar=2", add_query_arg( array( @@ -534,9 +648,9 @@ function test_add_query_arg() { /** * @ticket 31306 */ - function test_add_query_arg_numeric_keys() { + public function test_add_query_arg_numeric_keys() { $url = add_query_arg( array( 'foo' => 'bar' ), '1=1' ); - $this->assertEquals( '1=1&foo=bar', $url ); + $this->assertSame( '1=1&foo=bar', $url ); $url = add_query_arg( array( @@ -545,97 +659,97 @@ function test_add_query_arg_numeric_keys() { ), '1=1' ); - $this->assertEquals( '1=2&foo=bar', $url ); + $this->assertSame( '1=2&foo=bar', $url ); $url = add_query_arg( array( '1' => '2' ), 'foo=bar' ); - $this->assertEquals( 'foo=bar&1=2', $url ); + $this->assertSame( 'foo=bar&1=2', $url ); } /** * @ticket 21594 */ - function test_get_allowed_mime_types() { + public function test_get_allowed_mime_types() { $mimes = get_allowed_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertNotEmpty( $mimes ); add_filter( 'upload_mimes', '__return_empty_array' ); $mimes = get_allowed_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertEmpty( $mimes ); remove_filter( 'upload_mimes', '__return_empty_array' ); $mimes = get_allowed_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertNotEmpty( $mimes ); } /** * @ticket 21594 */ - function test_wp_get_mime_types() { + public function test_wp_get_mime_types() { $mimes = wp_get_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertNotEmpty( $mimes ); add_filter( 'mime_types', '__return_empty_array' ); $mimes = wp_get_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertEmpty( $mimes ); remove_filter( 'mime_types', '__return_empty_array' ); $mimes = wp_get_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertNotEmpty( $mimes ); // 'upload_mimes' should not affect wp_get_mime_types(). add_filter( 'upload_mimes', '__return_empty_array' ); $mimes = wp_get_mime_types(); - $this->assertInternalType( 'array', $mimes ); + $this->assertIsArray( $mimes ); $this->assertNotEmpty( $mimes ); remove_filter( 'upload_mimes', '__return_empty_array' ); $mimes2 = wp_get_mime_types(); - $this->assertInternalType( 'array', $mimes2 ); + $this->assertIsArray( $mimes2 ); $this->assertNotEmpty( $mimes2 ); - $this->assertEquals( $mimes2, $mimes ); + $this->assertSame( $mimes2, $mimes ); } /** * @ticket 23688 */ - function test_canonical_charset() { + public function test_canonical_charset() { $orig_blog_charset = get_option( 'blog_charset' ); update_option( 'blog_charset', 'utf8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'utf-8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'UTF8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'UTF-8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'ISO-8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'ISO8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'iso8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); update_option( 'blog_charset', 'iso-8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); // Arbitrary strings are passed through. update_option( 'blog_charset', 'foobarbaz' ); - $this->assertEquals( 'foobarbaz', get_option( 'blog_charset' ) ); + $this->assertSame( 'foobarbaz', get_option( 'blog_charset' ) ); update_option( 'blog_charset', $orig_blog_charset ); } @@ -644,11 +758,11 @@ function test_canonical_charset() { * @ticket 43977 * @dataProvider data_wp_parse_list */ - function test_wp_parse_list( $expected, $actual ) { + public function test_wp_parse_list( $expected, $actual ) { $this->assertSame( $expected, array_values( wp_parse_list( $actual ) ) ); } - function data_wp_parse_list() { + public function data_wp_parse_list() { return array( array( array( '1', '2', '3', '4' ), '1,2,3,4' ), array( array( 'apple', 'banana', 'carrot', 'dog' ), 'apple,banana,carrot,dog' ), @@ -667,11 +781,11 @@ function data_wp_parse_list() { /** * @dataProvider data_wp_parse_id_list */ - function test_wp_parse_id_list( $expected, $actual ) { + public function test_wp_parse_id_list( $expected, $actual ) { $this->assertSame( $expected, array_values( wp_parse_id_list( $actual ) ) ); } - function data_wp_parse_id_list() { + public function data_wp_parse_id_list() { return array( array( array( 1, 2, 3, 4 ), '1,2,3,4' ), array( array( 1, 2, 3, 4 ), '1, 2,,3,4' ), @@ -686,11 +800,11 @@ function data_wp_parse_id_list() { /** * @dataProvider data_wp_parse_slug_list */ - function test_wp_parse_slug_list( $expected, $actual ) { + public function test_wp_parse_slug_list( $expected, $actual ) { $this->assertSame( $expected, array_values( wp_parse_slug_list( $actual ) ) ); } - function data_wp_parse_slug_list() { + public function data_wp_parse_slug_list() { return array( array( array( 'apple', 'banana', 'carrot', 'dog' ), 'apple,banana,carrot,dog' ), array( array( 'apple', 'banana', 'carrot', 'dog' ), 'apple, banana,,carrot,dog' ), @@ -702,14 +816,14 @@ function data_wp_parse_slug_list() { /** * @dataProvider data_device_can_upload */ - function test_device_can_upload( $user_agent, $expected ) { + public function test_device_can_upload( $user_agent, $expected ) { $_SERVER['HTTP_USER_AGENT'] = $user_agent; $actual = _device_can_upload(); unset( $_SERVER['HTTP_USER_AGENT'] ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function data_device_can_upload() { + public function data_device_can_upload() { return array( // iPhone iOS 5.0.1, Safari 5.1. array( @@ -762,7 +876,7 @@ function data_device_can_upload() { /** * @ticket 9064 */ - function test_wp_extract_urls() { + public function test_wp_extract_urls() { $original_urls = array( 'http://woo.com/1,2,3,4,5,6/-1-2-3-4-/woo.html', 'http://this.com', @@ -886,16 +1000,16 @@ function test_wp_extract_urls() { $urls = wp_extract_urls( $blob ); $this->assertNotEmpty( $urls ); - $this->assertInternalType( 'array', $urls ); + $this->assertIsArray( $urls ); $this->assertCount( count( $original_urls ), $urls ); - $this->assertEquals( $original_urls, $urls ); + $this->assertSame( $original_urls, $urls ); $exploded = array_values( array_filter( array_map( 'trim', explode( "\n", $blob ) ) ) ); // wp_extract_urls() calls html_entity_decode(). $decoded = array_map( 'html_entity_decode', $exploded ); - $this->assertEquals( $decoded, $urls ); - $this->assertEquals( $original_urls, $decoded ); + $this->assertSame( $decoded, $urls ); + $this->assertSame( $original_urls, $decoded ); $blob = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore http://woo.com/1,2,3,4,5,6/-1-2-3-4-/woo.html et dolore magna aliqua. @@ -907,9 +1021,9 @@ function test_wp_extract_urls() { $urls = wp_extract_urls( $blob ); $this->assertNotEmpty( $urls ); - $this->assertInternalType( 'array', $urls ); + $this->assertIsArray( $urls ); $this->assertCount( 8, $urls ); - $this->assertEquals( array_slice( $original_urls, 0, 8 ), $urls ); + $this->assertSame( array_slice( $original_urls, 0, 8 ), $urls ); $blob = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore <a href="http://woo.com/1,2,3,4,5,6/-1-2-3-4-/woo.html">343462^</a> et dolore magna aliqua. @@ -921,33 +1035,30 @@ function test_wp_extract_urls() { $urls = wp_extract_urls( $blob ); $this->assertNotEmpty( $urls ); - $this->assertInternalType( 'array', $urls ); + $this->assertIsArray( $urls ); $this->assertCount( 8, $urls ); - $this->assertEquals( array_slice( $original_urls, 0, 8 ), $urls ); + $this->assertSame( array_slice( $original_urls, 0, 8 ), $urls ); } /** * @ticket 28786 */ - function test_wp_json_encode() { - $this->assertEquals( wp_json_encode( 'a' ), '"a"' ); + public function test_wp_json_encode() { + $this->assertSame( wp_json_encode( 'a' ), '"a"' ); } /** * @ticket 28786 */ - function test_wp_json_encode_utf8() { - $this->assertEquals( wp_json_encode( 'čæ™' ), '"\u8fd9"' ); + public function test_wp_json_encode_utf8() { + $this->assertSame( wp_json_encode( 'čæ™' ), '"\u8fd9"' ); } /** * @ticket 28786 + * @requires function mb_detect_order */ - function test_wp_json_encode_non_utf8() { - if ( ! function_exists( 'mb_detect_order' ) ) { - $this->markTestSkipped( 'mbstring extension not available.' ); - } - + public function test_wp_json_encode_non_utf8() { $charsets = mb_detect_order(); $old_charsets = $charsets; if ( ! in_array( 'EUC-JP', $charsets, true ) ) { @@ -958,21 +1069,18 @@ function test_wp_json_encode_non_utf8() { $eucjp = mb_convert_encoding( 'a恂b', 'EUC-JP', 'UTF-8' ); $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' ); - $this->assertEquals( 'a恂b', $utf8 ); + $this->assertSame( 'a恂b', $utf8 ); - $this->assertEquals( '"a\u3042b"', wp_json_encode( $eucjp ) ); + $this->assertSame( '"a\u3042b"', wp_json_encode( $eucjp ) ); mb_detect_order( $old_charsets ); } /** * @ticket 28786 + * @requires function mb_detect_order */ - function test_wp_json_encode_non_utf8_in_array() { - if ( ! function_exists( 'mb_detect_order' ) ) { - $this->markTestSkipped( 'mbstring extension not available.' ); - } - + public function test_wp_json_encode_non_utf8_in_array() { $charsets = mb_detect_order(); $old_charsets = $charsets; if ( ! in_array( 'EUC-JP', $charsets, true ) ) { @@ -983,9 +1091,9 @@ function test_wp_json_encode_non_utf8_in_array() { $eucjp = mb_convert_encoding( 'a恂b', 'EUC-JP', 'UTF-8' ); $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' ); - $this->assertEquals( 'a恂b', $utf8 ); + $this->assertSame( 'a恂b', $utf8 ); - $this->assertEquals( '["c","a\u3042b"]', wp_json_encode( array( 'c', $eucjp ) ) ); + $this->assertSame( '["c","a\u3042b"]', wp_json_encode( array( 'c', $eucjp ) ) ); mb_detect_order( $old_charsets ); } @@ -993,23 +1101,23 @@ function test_wp_json_encode_non_utf8_in_array() { /** * @ticket 28786 */ - function test_wp_json_encode_array() { - $this->assertEquals( wp_json_encode( array( 'a' ) ), '["a"]' ); + public function test_wp_json_encode_array() { + $this->assertSame( wp_json_encode( array( 'a' ) ), '["a"]' ); } /** * @ticket 28786 */ - function test_wp_json_encode_object() { + public function test_wp_json_encode_object() { $object = new stdClass; $object->a = 'b'; - $this->assertEquals( wp_json_encode( $object ), '{"a":"b"}' ); + $this->assertSame( wp_json_encode( $object ), '{"a":"b"}' ); } /** * @ticket 28786 */ - function test_wp_json_encode_depth() { + public function test_wp_json_encode_depth() { $data = array( array( array( 1, 2, 3 ) ) ); $json = wp_json_encode( $data, 0, 1 ); $this->assertFalse( $json ); @@ -1019,20 +1127,45 @@ function test_wp_json_encode_depth() { $this->assertFalse( $json ); } + /** + * @ticket 53238 + */ + public function test_wp_json_file_decode() { + $result = wp_json_file_decode( + DIR_TESTDATA . '/blocks/notice/block.json' + ); + + $this->assertIsObject( $result ); + $this->assertSame( 'tests/notice', $result->name ); + } + + /** + * @ticket 53238 + */ + public function test_wp_json_file_decode_associative_array() { + $result = wp_json_file_decode( + DIR_TESTDATA . '/blocks/notice/block.json', + array( 'associative' => true ) + ); + + $this->assertIsArray( $result ); + $this->assertSame( 'tests/notice', $result['name'] ); + } + /** * @ticket 36054 * @dataProvider datetime_provider */ - function test_mysql_to_rfc3339( $expected, $actual ) { + public function test_mysql_to_rfc3339( $expected, $actual ) { $date_return = mysql_to_rfc3339( $actual ); - $this->assertTrue( is_string( $date_return ), 'The date return must be a string' ); + $this->assertIsString( $date_return, 'The date return must be a string' ); $this->assertNotEmpty( $date_return, 'The date return could not be an empty string' ); - $this->assertEquals( $expected, $date_return, 'The date does not match' ); + $this->assertSame( $expected, $date_return, 'The date does not match' ); $this->assertEquals( new DateTime( $expected ), new DateTime( $date_return ), 'The date is not the same after the call method' ); } - function datetime_provider() { + public function datetime_provider() { return array( array( '2016-03-15T18:54:46', '15-03-2016 18:54:46' ), array( '2016-03-02T19:13:25', '2016-03-02 19:13:25' ), @@ -1048,7 +1181,7 @@ function datetime_provider() { public function test_wp_get_ext_types() { $extensions = wp_get_ext_types(); - $this->assertInternalType( 'array', $extensions ); + $this->assertIsArray( $extensions ); $this->assertNotEmpty( $extensions ); add_filter( 'ext2type', '__return_empty_array' ); @@ -1057,7 +1190,7 @@ public function test_wp_get_ext_types() { remove_filter( 'ext2type', '__return_empty_array' ); $extensions = wp_get_ext_types(); - $this->assertInternalType( 'array', $extensions ); + $this->assertIsArray( $extensions ); $this->assertNotEmpty( $extensions ); } @@ -1069,8 +1202,8 @@ public function test_wp_ext2type() { foreach ( $extensions as $type => $extension_list ) { foreach ( $extension_list as $extension ) { - $this->assertEquals( $type, wp_ext2type( $extension ) ); - $this->assertEquals( $type, wp_ext2type( strtoupper( $extension ) ) ); + $this->assertSame( $type, wp_ext2type( $extension ) ); + $this->assertSame( $type, wp_ext2type( strtoupper( $extension ) ) ); } } @@ -1085,9 +1218,9 @@ public function test_wp_ext2type() { * * @ticket 32075 */ - function test_wp_raise_memory_limit() { + public function test_wp_raise_memory_limit() { if ( -1 !== WP_MAX_MEMORY_LIMIT ) { - $this->markTestSkipped( 'WP_MAX_MEMORY_LIMIT should be set to -1' ); + $this->markTestSkipped( 'WP_MAX_MEMORY_LIMIT should be set to -1.' ); } $ini_limit_before = ini_get( 'memory_limit' ); @@ -1095,7 +1228,7 @@ function test_wp_raise_memory_limit() { $ini_limit_after = ini_get( 'memory_limit' ); $this->assertSame( $ini_limit_before, $ini_limit_after ); - $this->assertSame( false, $raised_limit ); + $this->assertFalse( $raised_limit ); $this->assertEquals( WP_MAX_MEMORY_LIMIT, $ini_limit_after ); } @@ -1105,7 +1238,7 @@ function test_wp_raise_memory_limit() { * @covers ::wp_generate_uuid4 * @ticket 38164 */ - function test_wp_generate_uuid4() { + public function test_wp_generate_uuid4() { $uuids = array(); for ( $i = 0; $i < 20; $i += 1 ) { $uuid = wp_generate_uuid4(); @@ -1114,7 +1247,7 @@ function test_wp_generate_uuid4() { } $unique_uuids = array_unique( $uuids ); - $this->assertEquals( $uuids, $unique_uuids ); + $this->assertSame( $uuids, $unique_uuids ); } /** @@ -1123,7 +1256,7 @@ function test_wp_generate_uuid4() { * @covers ::wp_is_uuid * @ticket 39778 */ - function test_wp_is_valid_uuid() { + public function test_wp_is_valid_uuid() { $uuids_v4 = array( '27fe2421-780c-44c5-b39b-fff753092b55', 'b7c7713a-4ee9-45a1-87ed-944a90390fc7', @@ -1173,61 +1306,78 @@ function test_wp_is_valid_uuid() { * @covers ::wp_unique_id * @ticket 44883 */ - function test_wp_unique_id() { + public function test_wp_unique_id() { // Test without prefix. $ids = array(); for ( $i = 0; $i < 20; $i += 1 ) { $id = wp_unique_id(); - $this->assertInternalType( 'string', $id ); - $this->assertTrue( is_numeric( $id ) ); + $this->assertIsString( $id ); + $this->assertIsNumeric( $id ); $ids[] = $id; } - $this->assertEquals( $ids, array_unique( $ids ) ); + $this->assertSame( $ids, array_unique( $ids ) ); // Test with prefix. $ids = array(); for ( $i = 0; $i < 20; $i += 1 ) { $id = wp_unique_id( 'foo-' ); - $this->assertRegExp( '/^foo-\d+$/', $id ); + $this->assertMatchesRegularExpression( '/^foo-\d+$/', $id ); $ids[] = $id; } - $this->assertEquals( $ids, array_unique( $ids ) ); + $this->assertSame( $ids, array_unique( $ids ) ); } /** * @ticket 40017 - * @dataProvider _wp_get_image_mime + * @dataProvider wp_get_image_mime */ public function test_wp_get_image_mime( $file, $expected ) { if ( ! is_callable( 'exif_imagetype' ) && ! function_exists( 'getimagesize' ) ) { $this->markTestSkipped( 'The exif PHP extension is not loaded.' ); } - $this->assertEquals( $expected, wp_get_image_mime( $file ) ); + $this->assertSame( $expected, wp_get_image_mime( $file ) ); } /** - * @ticket 39550 - * @dataProvider _wp_check_filetype_and_ext_data + * @ticket 35725 + * @dataProvider data_wp_getimagesize */ - function test_wp_check_filetype_and_ext( $file, $filename, $expected ) { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); + public function test_wp_getimagesize( $file, $expected ) { + if ( ! is_callable( 'exif_imagetype' ) && ! function_exists( 'getimagesize' ) ) { + $this->markTestSkipped( 'The exif PHP extension is not loaded.' ); + } + + $result = wp_getimagesize( $file ); + + // The getimagesize() function varies in its response, so + // let's restrict comparison to expected keys only. + if ( is_array( $expected ) ) { + foreach ( $expected as $k => $v ) { + $this->assertArrayHasKey( $k, $result ); + $this->assertSame( $expected[ $k ], $result[ $k ] ); + } + } else { + $this->assertSame( $expected, $result ); } + } - $this->assertEquals( $expected, wp_check_filetype_and_ext( $file, $filename ) ); + /** + * @ticket 39550 + * @dataProvider wp_check_filetype_and_ext_data + * @requires extension fileinfo + */ + public function test_wp_check_filetype_and_ext( $file, $filename, $expected ) { + $this->assertSame( $expected, wp_check_filetype_and_ext( $file, $filename ) ); } /** * @ticket 39550 * @group ms-excluded + * @requires extension fileinfo */ - function test_wp_check_filetype_and_ext_with_filtered_svg() { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); - } - + public function test_wp_check_filetype_and_ext_with_filtered_svg() { $file = DIR_TESTDATA . '/uploads/video-play.svg'; $filename = 'video-play.svg'; @@ -1237,22 +1387,19 @@ function test_wp_check_filetype_and_ext_with_filtered_svg() { 'proper_filename' => false, ); - add_filter( 'upload_mimes', array( $this, '_filter_mime_types_svg' ) ); - $this->assertEquals( $expected, wp_check_filetype_and_ext( $file, $filename ) ); + add_filter( 'upload_mimes', array( $this, 'filter_mime_types_svg' ) ); + $this->assertSame( $expected, wp_check_filetype_and_ext( $file, $filename ) ); // Cleanup. - remove_filter( 'upload_mimes', array( $this, '_test_add_mime_types_svg' ) ); + remove_filter( 'upload_mimes', array( $this, 'filter_mime_types_svg' ) ); } /** * @ticket 39550 * @group ms-excluded + * @requires extension fileinfo */ - function test_wp_check_filetype_and_ext_with_filtered_woff() { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); - } - + public function test_wp_check_filetype_and_ext_with_filtered_woff() { $file = DIR_TESTDATA . '/uploads/dashicons.woff'; $filename = 'dashicons.woff'; @@ -1262,27 +1409,27 @@ function test_wp_check_filetype_and_ext_with_filtered_woff() { 'proper_filename' => false, ); - add_filter( 'upload_mimes', array( $this, '_filter_mime_types_woff' ) ); - $this->assertEquals( $expected, wp_check_filetype_and_ext( $file, $filename ) ); + add_filter( 'upload_mimes', array( $this, 'filter_mime_types_woff' ) ); + $this->assertSame( $expected, wp_check_filetype_and_ext( $file, $filename ) ); // Cleanup. - remove_filter( 'upload_mimes', array( $this, '_test_add_mime_types_woff' ) ); + remove_filter( 'upload_mimes', array( $this, 'filter_mime_types_woff' ) ); } - public function _filter_mime_types_svg( $mimes ) { + public function filter_mime_types_svg( $mimes ) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } - public function _filter_mime_types_woff( $mimes ) { + public function filter_mime_types_woff( $mimes ) { $mimes['woff'] = 'application/font-woff'; return $mimes; } /** - * Data provider for test_wp_get_image_mime(); + * Data provider for test_wp_get_image_mime(). */ - public function _wp_get_image_mime() { + public function wp_get_image_mime() { $data = array( // Standard JPEG. array( @@ -1304,6 +1451,129 @@ public function _wp_get_image_mime() { DIR_TESTDATA . '/images/test-image-mime-jpg.png', 'image/jpeg', ), + // Animated WebP. + array( + DIR_TESTDATA . '/images/webp-animated.webp', + 'image/webp', + ), + // Lossless WebP. + array( + DIR_TESTDATA . '/images/webp-lossless.webp', + 'image/webp', + ), + // Lossy WebP. + array( + DIR_TESTDATA . '/images/webp-lossy.webp', + 'image/webp', + ), + // Transparent WebP. + array( + DIR_TESTDATA . '/images/webp-transparent.webp', + 'image/webp', + ), + // Not an image. + array( + DIR_TESTDATA . '/uploads/dashicons.woff', + false, + ), + ); + + return $data; + } + + /** + * Data profider for test_wp_getimagesize(). + */ + public function data_wp_getimagesize() { + $data = array( + // Standard JPEG. + array( + DIR_TESTDATA . '/images/test-image.jpg', + array( + 50, + 50, + IMAGETYPE_JPEG, + 'width="50" height="50"', + 'mime' => 'image/jpeg', + ), + ), + // Standard GIF. + array( + DIR_TESTDATA . '/images/test-image.gif', + array( + 50, + 50, + IMAGETYPE_GIF, + 'width="50" height="50"', + 'mime' => 'image/gif', + ), + ), + // Standard PNG. + array( + DIR_TESTDATA . '/images/test-image.png', + array( + 50, + 50, + IMAGETYPE_PNG, + 'width="50" height="50"', + 'mime' => 'image/png', + ), + ), + // Image with wrong extension. + array( + DIR_TESTDATA . '/images/test-image-mime-jpg.png', + array( + 50, + 50, + IMAGETYPE_JPEG, + 'width="50" height="50"', + 'mime' => 'image/jpeg', + ), + ), + // Animated WebP. + array( + DIR_TESTDATA . '/images/webp-animated.webp', + array( + 100, + 100, + IMAGETYPE_WEBP, + 'width="100" height="100"', + 'mime' => 'image/webp', + ), + ), + // Lossless WebP. + array( + DIR_TESTDATA . '/images/webp-lossless.webp', + array( + 1200, + 675, + IMAGETYPE_WEBP, + 'width="1200" height="675"', + 'mime' => 'image/webp', + ), + ), + // Lossy WebP. + array( + DIR_TESTDATA . '/images/webp-lossy.webp', + array( + 1200, + 675, + IMAGETYPE_WEBP, + 'width="1200" height="675"', + 'mime' => 'image/webp', + ), + ), + // Transparent WebP. + array( + DIR_TESTDATA . '/images/webp-transparent.webp', + array( + 1200, + 675, + IMAGETYPE_WEBP, + 'width="1200" height="675"', + 'mime' => 'image/webp', + ), + ), // Not an image. array( DIR_TESTDATA . '/uploads/dashicons.woff', @@ -1314,7 +1584,7 @@ public function _wp_get_image_mime() { return $data; } - public function _wp_check_filetype_and_ext_data() { + public function wp_check_filetype_and_ext_data() { $data = array( // Standard image. array( @@ -1743,4 +2013,41 @@ public function data_test_human_readable_duration() { array( '03:61:59', false ), // Out of bound. ); } + + /** + * @ticket 49404 + * @dataProvider data_test_wp_is_json_media_type + */ + public function test_wp_is_json_media_type( $input, $expected ) { + $this->assertSame( $expected, wp_is_json_media_type( $input ) ); + } + + + public function data_test_wp_is_json_media_type() { + return array( + array( 'application/ld+json', true ), + array( 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', true ), + array( 'application/activity+json', true ), + array( 'application/json+oembed', true ), + array( 'application/json', true ), + array( 'application/nojson', false ), + array( 'application/no.json', false ), + array( 'text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8', false ), + array( 'application/activity+json, application/nojson', true ), + ); + } + + /** + * @ticket 53668 + */ + public function test_wp_get_default_extension_for_mime_type() { + $this->assertEquals( 'jpg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpg not returned as default extension for "image/jpeg"' ); + $this->assertNotEquals( 'jpeg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpeg should not be returned as default extension for "image/jpeg"' ); + $this->assertEquals( 'png', wp_get_default_extension_for_mime_type( 'image/png' ), 'png not returned as default extension for "image/png"' ); + $this->assertFalse( wp_get_default_extension_for_mime_type( 'wibble/wobble' ), 'false not returned for unrecognized mime type' ); + $this->assertFalse( wp_get_default_extension_for_mime_type( '' ), 'false not returned when empty string as mime type supplied' ); + $this->assertFalse( wp_get_default_extension_for_mime_type( ' ' ), 'false not returned when empty string as mime type supplied' ); + $this->assertFalse( wp_get_default_extension_for_mime_type( 123 ), 'false not returned when int as mime type supplied' ); + $this->assertFalse( wp_get_default_extension_for_mime_type( null ), 'false not returned when null as mime type supplied' ); + } } diff --git a/tests/phpunit/tests/functions/addMagicQuotes.php b/tests/phpunit/tests/functions/addMagicQuotes.php new file mode 100644 index 0000000000000..f42b601e09816 --- /dev/null +++ b/tests/phpunit/tests/functions/addMagicQuotes.php @@ -0,0 +1,65 @@ +<?php + +/** + * @group formatting + * @group functions.php + * @covers ::add_magic_quotes + */ +class Tests_Functions_AddMagicQuotes extends WP_UnitTestCase { + + /** + * @ticket 48605 + * + * @dataProvider data_add_magic_quotes + * + * @param array $test_array Test value. + * @param array $expected Expected return value. + */ + public function test_add_magic_quotes( $test_array, $expected ) { + $this->assertSame( $expected, add_magic_quotes( $test_array ) ); + } + + /** + * Data provider for test_add_magic_quotes. + * + * @return array[] Test parameters { + * @type array $test_array Test value. + * @type array $expected Expected return value. + * } + */ + public function data_add_magic_quotes() { + return array( + array( + array( + 'sample string', + 52, + true, + false, + null, + "This is a 'string'", + array( + 1, + false, + true, + 'This is "another" string', + ), + ), + array( + 'sample string', + 52, + true, + false, + null, + "This is a \'string\'", + array( + 1, + false, + true, + 'This is \"another\" string', + ), + ), + ), + ); + } + +} diff --git a/tests/phpunit/tests/functions/allowedProtocols.php b/tests/phpunit/tests/functions/allowedProtocols.php index 6ac0ec0f2fcdc..8484024c86988 100644 --- a/tests/phpunit/tests/functions/allowedProtocols.php +++ b/tests/phpunit/tests/functions/allowedProtocols.php @@ -3,22 +3,23 @@ /** * @group formatting * @group functions.php + * @covers ::wp_allowed_protocols */ class Tests_Functions_AllowedProtocols extends WP_UnitTestCase { /** * @ticket 19354 */ - function test_data_is_not_an_allowed_protocol() { + public function test_data_is_not_an_allowed_protocol() { $this->assertNotContains( 'data', wp_allowed_protocols() ); } - function test_allowed_protocol_has_an_example() { + public function test_allowed_protocol_has_an_example() { $example_protocols = array(); foreach ( $this->data_example_urls() as $example ) { $example_protocols[] = $example[0]; } - $this->assertEqualSets( $example_protocols, wp_allowed_protocols() ); + $this->assertSameSets( $example_protocols, wp_allowed_protocols() ); } /** @@ -28,15 +29,15 @@ function test_allowed_protocol_has_an_example() { * @param string The scheme. * @param string Example URL. */ - function test_allowed_protocols( $protocol, $url ) { - $this->assertEquals( $url, esc_url( $url, $protocol ) ); - $this->assertEquals( $url, esc_url( $url, wp_allowed_protocols() ) ); + public function test_allowed_protocols( $protocol, $url ) { + $this->assertSame( $url, esc_url( $url, $protocol ) ); + $this->assertSame( $url, esc_url( $url, wp_allowed_protocols() ) ); } /** * @link http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml */ - function data_example_urls() { + public function data_example_urls() { return array( array( 'http', 'http://example.com' ), // RFC7230 array( 'https', 'https://example.com' ), // RFC7230 @@ -45,6 +46,8 @@ function data_example_urls() { array( 'mailto', 'mailto://someone@example.com' ), // RFC6068 array( 'news', 'news://news.server.example/example.group.this' ), // RFC5538 array( 'irc', 'irc://example.com/wordpress' ), + array( 'irc6', 'irc6://example.com/wordpress' ), + array( 'ircs', 'ircs://example.com/wordpress' ), array( 'gopher', 'gopher://example.com/7a_gopher_selector%09foobar' ), // RFC4266 array( 'nntp', 'nntp://news.server.example/example.group.this' ), // RFC5538 array( 'feed', 'feed://example.com/rss.xml' ), diff --git a/tests/phpunit/tests/functions/anonymization.php b/tests/phpunit/tests/functions/anonymization.php index e52ff43628eb6..b0dfafa528a28 100644 --- a/tests/phpunit/tests/functions/anonymization.php +++ b/tests/phpunit/tests/functions/anonymization.php @@ -10,12 +10,14 @@ /** * Class Tests_Functions_Anonymization. * + * @since 4.9.6 + * * @group functions.php * @group privacy - * - * @since 4.9.6 + * @covers ::wp_privacy_anonymize_data */ class Tests_Functions_Anonymization extends WP_UnitTestCase { + /** * Test that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. * @@ -24,19 +26,17 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { * @ticket 41083 * @ticket 43545 * + * @covers ::wp_privacy_anonymize_ip + * * @param string $raw_ip Raw IP address. * @param string $expected_result Expected result. */ public function test_wp_privacy_anonymize_ip( $raw_ip, $expected_result ) { - if ( ! function_exists( 'inet_ntop' ) || ! function_exists( 'inet_pton' ) ) { - $this->markTestSkipped( 'This test requires both the inet_ntop() and inet_pton() functions.' ); - } - $actual_result = wp_privacy_anonymize_data( 'ip', $raw_ip ); /* Todo test ipv6_fallback mode if keeping it.*/ - $this->assertEquals( $expected_result, $actual_result ); + $this->assertSame( $expected_result, $actual_result ); } /** @@ -58,6 +58,22 @@ public function data_wp_privacy_anonymize_ip() { null, '0.0.0.0', ), + array( + false, + '0.0.0.0', + ), + array( + true, + '0.0.0.0', + ), + array( + 0, + '0.0.0.0', + ), + array( + 1, + '0.0.0.0', + ), array( '', '0.0.0.0', @@ -90,26 +106,6 @@ public function data_wp_privacy_anonymize_ip() { '1000:0000:0000:0000:0000:0000:0000:0001or=\"', '::', ), - // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. - array( - 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]:400', - '1000::', - ), - // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. - array( - 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]', - '1000::', - ), - // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. - array( - 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]400', - '1000::', - ), - // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. - array( - '[1000:0000:0000:0000:0000:0000:0000:0001]:235\"or=', - '1000::', - ), // IPv4, no port. array( '10.20.30.45', @@ -125,36 +121,16 @@ public function data_wp_privacy_anonymize_ip() { '10.20.30.45/24', '10.20.30.0', ), - // IPv6, no port. - array( - '2a03:2880:2110:df07:face:b00c::1', - '2a03:2880:2110:df07::', - ), - // IPv6, port. - array( - '[2a03:2880:2110:df07:face:b00c::1]:20000', - '2a03:2880:2110:df07::', - ), // IPv6, no port, reducible representation. array( '0000:0000:0000:0000:0000:0000:0000:0001', '::', ), - // IPv6, no port, partially reducible representation. - array( - '1000:0000:0000:0000:0000:0000:0000:0001', - '1000::', - ), // IPv6, port, reducible representation. array( '[0000:0000:0000:0000:0000:0000:0000:0001]:1234', '::', ), - // IPv6, port, partially reducible representation. - array( - '[1000:0000:0000:0000:0000:0000:0000:0001]:5678', - '1000::', - ), // IPv6, no port, reduced representation. array( '::', @@ -195,6 +171,82 @@ public function data_wp_privacy_anonymize_ip() { '[::127.0.0.1]:30000', '::ffff:127.0.0.0', ), + ); + } + + /** + * Test that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. + * + * @dataProvider data_wp_privacy_anonymize_ip_with_inet_dependency + * + * @ticket 41083 + * @ticket 43545 + * @requires function inet_ntop + * @requires function inet_pton + * + * @covers ::wp_privacy_anonymize_ip + * + * @param string $raw_ip Raw IP address. + * @param string $expected_result Expected result. + */ + public function test_wp_privacy_anonymize_ip_with_inet_dependency( $raw_ip, $expected_result ) { + $this->test_wp_privacy_anonymize_ip( $raw_ip, $expected_result ); + } + + /** + * Provide test cases for `test_wp_privacy_anonymize_ip()`. + * + * @since 4.9.6 Moved from `Test_WP_Community_Events::data_get_unsafe_client_ip_anonymization()`. + * + * @return array { + * @type array { + * @string string $raw_ip Raw IP address. + * @string string $expected_result Expected result. + * } + * } + */ + public function data_wp_privacy_anonymize_ip_with_inet_dependency() { + return array( + // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. + array( + 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]:400', + '1000::', + ), + // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. + array( + 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]', + '1000::', + ), + // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. + array( + 'or=\"[1000:0000:0000:0000:0000:0000:0000:0001]400', + '1000::', + ), + // Malformed string with valid IP substring. Sometimes proxies add things like this, or other arbitrary strings. + array( + '[1000:0000:0000:0000:0000:0000:0000:0001]:235\"or=', + '1000::', + ), + // IPv6, no port. + array( + '2a03:2880:2110:df07:face:b00c::1', + '2a03:2880:2110:df07::', + ), + // IPv6, port. + array( + '[2a03:2880:2110:df07:face:b00c::1]:20000', + '2a03:2880:2110:df07::', + ), + // IPv6, no port, partially reducible representation. + array( + '1000:0000:0000:0000:0000:0000:0000:0001', + '1000::', + ), + // IPv6, port, partially reducible representation. + array( + '[1000:0000:0000:0000:0000:0000:0000:0001]:5678', + '1000::', + ), // IPv6 with reachability scope. array( 'fe80::b059:65f4:e877:c40%16', @@ -226,7 +278,7 @@ public function test_anonymize_url() { * Test date anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_date() { - $this->assertEquals( '0000-00-00 00:00:00', wp_privacy_anonymize_data( 'date', '2003-12-25 12:34:56' ) ); + $this->assertSame( '0000-00-00 00:00:00', wp_privacy_anonymize_data( 'date', '2003-12-25 12:34:56' ) ); } /** @@ -234,7 +286,7 @@ public function test_anonymize_date() { */ public function test_anonymize_text() { $text = __( 'Four score and seven years ago' ); - $this->assertEquals( '[deleted]', wp_privacy_anonymize_data( 'text', $text ) ); + $this->assertSame( '[deleted]', wp_privacy_anonymize_data( 'text', $text ) ); } /** @@ -242,7 +294,7 @@ public function test_anonymize_text() { */ public function test_anonymize_long_text() { $text = __( 'Four score and seven years ago' ); - $this->assertEquals( 'This content was deleted by the author.', wp_privacy_anonymize_data( 'longtext', $text ) ); + $this->assertSame( 'This content was deleted by the author.', wp_privacy_anonymize_data( 'longtext', $text ) ); } /** @@ -266,7 +318,7 @@ public function test_anonymize_with_filter() { * @param string $anonymous Anonymized data. * @param string $type Type of the data. * @param string $data Original data. - * @return string $anonymous Anonymized data. + * @return string Anonymized data. */ public function filter_wp_privacy_anonymize_data( $anonymous, $type, $data ) { if ( 'url' === $type && 'example.com' === parse_url( $data, PHP_URL_HOST ) ) { diff --git a/tests/phpunit/tests/functions/canonical-charset.php b/tests/phpunit/tests/functions/canonical-charset.php deleted file mode 100644 index 107b6d94b9ea4..0000000000000 --- a/tests/phpunit/tests/functions/canonical-charset.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/* - * Validate that's badly named charsets always return the correct format for UTF-8 and ISO-8859-1 - * - * @since 4.8.0 - */ - -class Tests_Functions_canonical_charset extends WP_UnitTestCase { - - public function test_utf_8_lower() { - $this->assertEquals( 'UTF-8', _canonical_charset( 'utf-8' ) ); - } - - public function test_utf_8_upper() { - $this->assertEquals( 'UTF-8', _canonical_charset( 'UTF-8' ) ); - } - - public function test_utf_8_mixxed() { - $this->assertEquals( 'UTF-8', _canonical_charset( 'Utf-8' ) ); - } - - public function test_utf_8() { - $this->assertEquals( 'UTF-8', _canonical_charset( 'UTF8' ) ); - } - - public function test_iso_lower() { - $this->assertEquals( 'ISO-8859-1', _canonical_charset( 'iso-8859-1' ) ); - } - - public function test_iso_upper() { - $this->assertEquals( 'ISO-8859-1', _canonical_charset( 'ISO-8859-1' ) ); - } - - public function test_iso_mixxed() { - $this->assertEquals( 'ISO-8859-1', _canonical_charset( 'Iso8859-1' ) ); - } - - public function test_iso() { - $this->assertEquals( 'ISO-8859-1', _canonical_charset( 'ISO8859-1' ) ); - } - - public function test_random() { - $this->assertEquals( 'random', _canonical_charset( 'random' ) ); - } - - public function test_empty() { - $this->assertEquals( '', _canonical_charset( '' ) ); - } - - /** - * @ticket 23688 - */ - function test_update_option_blog_charset() { - $orig_blog_charset = get_option( 'blog_charset' ); - - update_option( 'blog_charset', 'utf8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'utf-8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'UTF8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'UTF-8' ); - $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'ISO-8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'ISO8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'iso8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', 'iso-8859-1' ); - $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); - - // Arbitrary strings are passed through. - update_option( 'blog_charset', 'foobarbaz' ); - $this->assertEquals( 'foobarbaz', get_option( 'blog_charset' ) ); - - update_option( 'blog_charset', $orig_blog_charset ); - } - -} diff --git a/tests/phpunit/tests/functions/canonicalCharset.php b/tests/phpunit/tests/functions/canonicalCharset.php new file mode 100644 index 0000000000000..973562c6a993c --- /dev/null +++ b/tests/phpunit/tests/functions/canonicalCharset.php @@ -0,0 +1,92 @@ +<?php + +/** + * Validate that badly named charsets always return the correct format for UTF-8 and ISO-8859-1. + * + * @since 4.8.0 + * + * @group functions.php + * @covers ::_canonical_charset + */ +class Tests_Functions_CanonicalCharset extends WP_UnitTestCase { + + public function test_utf_8_lower() { + $this->assertSame( 'UTF-8', _canonical_charset( 'utf-8' ) ); + } + + public function test_utf_8_upper() { + $this->assertSame( 'UTF-8', _canonical_charset( 'UTF-8' ) ); + } + + public function test_utf_8_mixxed() { + $this->assertSame( 'UTF-8', _canonical_charset( 'Utf-8' ) ); + } + + public function test_utf_8() { + $this->assertSame( 'UTF-8', _canonical_charset( 'UTF8' ) ); + } + + public function test_iso_lower() { + $this->assertSame( 'ISO-8859-1', _canonical_charset( 'iso-8859-1' ) ); + } + + public function test_iso_upper() { + $this->assertSame( 'ISO-8859-1', _canonical_charset( 'ISO-8859-1' ) ); + } + + public function test_iso_mixxed() { + $this->assertSame( 'ISO-8859-1', _canonical_charset( 'Iso8859-1' ) ); + } + + public function test_iso() { + $this->assertSame( 'ISO-8859-1', _canonical_charset( 'ISO8859-1' ) ); + } + + public function test_random() { + $this->assertSame( 'random', _canonical_charset( 'random' ) ); + } + + public function test_empty() { + $this->assertSame( '', _canonical_charset( '' ) ); + } + + /** + * @ticket 23688 + * + * @covers ::get_option + */ + public function test_update_option_blog_charset() { + $orig_blog_charset = get_option( 'blog_charset' ); + + update_option( 'blog_charset', 'utf8' ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'utf-8' ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'UTF8' ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'UTF-8' ); + $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'ISO-8859-1' ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'ISO8859-1' ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'iso8859-1' ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', 'iso-8859-1' ); + $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); + + // Arbitrary strings are passed through. + update_option( 'blog_charset', 'foobarbaz' ); + $this->assertSame( 'foobarbaz', get_option( 'blog_charset' ) ); + + update_option( 'blog_charset', $orig_blog_charset ); + } + +} diff --git a/tests/phpunit/tests/functions/cleanDirsizeCache.php b/tests/phpunit/tests/functions/cleanDirsizeCache.php new file mode 100644 index 0000000000000..27aacda62b9b9 --- /dev/null +++ b/tests/phpunit/tests/functions/cleanDirsizeCache.php @@ -0,0 +1,140 @@ +<?php + +/** + * Tests specific to the directory size caching. + * + * @group functions.php + */ +class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase { + + /** + * Test the handling of invalid data passed as the $path parameter. + * + * @ticket 52241 + * + * @covers ::clean_dirsize_cache + * + * @dataProvider data_clean_dirsize_cache_with_invalid_inputs + * + * @param mixed $path Path input to use in the test. + * @param string $expected_message Expected notice message. + */ + public function test_clean_dirsize_cache_with_invalid_inputs( $path, $expected_message ) { + $this->expectNotice(); + $this->expectNoticeMessage( $expected_message ); + + clean_dirsize_cache( $path ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_clean_dirsize_cache_with_invalid_inputs() { + return array( + 'null' => array( + 'path' => null, + 'expected_message' => '<code>clean_dirsize_cache()</code> only accepts a non-empty path string, received <code>NULL</code>.', + ), + 'bool false' => array( + 'path' => false, + 'expected_message' => '<code>clean_dirsize_cache()</code> only accepts a non-empty path string, received <code>boolean</code>.', + ), + 'empty string' => array( + 'path' => '', + 'expected_message' => '<code>clean_dirsize_cache()</code> only accepts a non-empty path string, received <code>string</code>.', + ), + 'array' => array( + 'path' => array( '.', './second/path/' ), + 'expected_message' => '<code>clean_dirsize_cache()</code> only accepts a non-empty path string, received <code>array</code>.', + ), + ); + } + + /** + * Test the handling of a non-path text string passed as the $path parameter. + * + * @ticket 52241 + * + * @covers ::clean_dirsize_cache + * + * @dataProvider data_clean_dirsize_cache_with_non_path_string + * + * @param string $path Path input to use in the test. + * @param int $expected_count Expected number of paths in the cache after cleaning. + */ + public function test_clean_dirsize_cache_with_non_path_string( $path, $expected_count ) { + // Set the dirsize cache to our mock. + set_transient( 'dirsize_cache', $this->mock_dirsize_cache_with_non_path_string() ); + + clean_dirsize_cache( $path ); + + $cache = get_transient( 'dirsize_cache' ); + $this->assertIsArray( $cache ); + $this->assertCount( $expected_count, $cache ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_clean_dirsize_cache_with_non_path_string() { + return array( + 'single dot' => array( + 'path' => '.', + 'expected_count' => 1, + ), + 'non-path' => array( + 'path' => 'string', + 'expected_count' => 1, + ), + 'non-existant string, but non-path' => array( + 'path' => 'doesnotexist', + 'expected_count' => 2, + ), + ); + } + + private function mock_dirsize_cache_with_non_path_string() { + return array( + '.' => array( 'size' => 50 ), + 'string' => array( 'size' => 42 ), + ); + } + + /** + * Test the behaviour of the function when the transient doesn't exist. + * + * @ticket 52241 + * @ticket 53635 + * + * @covers ::recurse_dirsize + */ + public function test_recurse_dirsize_without_transient() { + delete_transient( 'dirsize_cache' ); + + $size = recurse_dirsize( DIR_TESTDATA . '/functions' ); + + $this->assertGreaterThan( 10, $size ); + } + + /** + * Test the behaviour of the function when the transient does exist, but is not an array. + * + * In particular, this tests that no PHP TypeErrors are being thrown. + * + * @ticket 52241 + * @ticket 53635 + * + * @covers ::recurse_dirsize + */ + public function test_recurse_dirsize_with_invalid_transient() { + set_transient( 'dirsize_cache', 'this is not a valid transient for dirsize cache' ); + + $size = recurse_dirsize( DIR_TESTDATA . '/functions' ); + + $this->assertGreaterThan( 10, $size ); + } +} diff --git a/tests/phpunit/tests/functions/cleanupHeaderComment.php b/tests/phpunit/tests/functions/cleanupHeaderComment.php new file mode 100644 index 0000000000000..73fcc1ee78c04 --- /dev/null +++ b/tests/phpunit/tests/functions/cleanupHeaderComment.php @@ -0,0 +1,123 @@ +<?php +/** + * Test _cleanup_header_comment(). + * + * @ticket 8497 + * @ticket 38101 + * + * @group functions.php + * @covers ::_cleanup_header_comment + */ +class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase { + + /** + * Test cleanup header of header comment. + * + * @dataProvider data_cleanup_header_comment + * + * @param string $test_string + * @param string $expected + */ + public function test_cleanup_header_comment( $test_string, $expected ) { + $this->assertSameIgnoreEOL( $expected, _cleanup_header_comment( $test_string ) ); + } + + /** + * Data provider for test_cleanup_header_comment. + * + * @return array[] Test parameters { + * @type string $test_string Test string. + * @type string $expected Expected return value. + * } + */ + public function data_cleanup_header_comment() { + return array( + // Set 0: A string. + array( + 'ffffffffffffff', + 'ffffffffffffff', + ), + // Set 1: Trim a string. + array( + ' ffffffffffffff ', + 'ffffffffffffff', + ), + // Set 2: Trim a full comment string. + array( + '<?php +/* +Plugin Name: Health Check +Plugin URI: https://wordpress.org/plugins/health-check/ +Description: Checks the health of your WordPress install +Version: 0.1.0 +Author: The Health Check Team +Author URI: http://health-check-team.example.com +Text Domain: health-check +Domain Path: /languages +*/ +', + '<?php +/* +Plugin Name: Health Check +Plugin URI: https://wordpress.org/plugins/health-check/ +Description: Checks the health of your WordPress install +Version: 0.1.0 +Author: The Health Check Team +Author URI: http://health-check-team.example.com +Text Domain: health-check +Domain Path: /languages', + ), + // Set 3: Trim HTML following comment. + array( + '<?php +/* +Plugin Name: Health Check +Plugin URI: https://wordpress.org/plugins/health-check/ +Description: Checks the health of your WordPress install +Version: 0.1.0 +Author: The Health Check Team +Author URI: http://health-check-team.example.com +Text Domain: health-check +Domain Path: /languages +*/ ?> +dddlddfs +', + '<?php +/* +Plugin Name: Health Check +Plugin URI: https://wordpress.org/plugins/health-check/ +Description: Checks the health of your WordPress install +Version: 0.1.0 +Author: The Health Check Team +Author URI: http://health-check-team.example.com +Text Domain: health-check +Domain Path: /languages +dddlddfs', + ), + // Set 4: Trim a docblock style comment. + array( + '<?php +/** + * Plugin Name: Health Check + * Plugin URI: https://wordpress.org/plugins/health-check/ + * Description: Checks the health of your WordPress install + * Version: 0.1.0 + * Author: The Health Check Team + * Author URI: http://health-check-team.example.com + * Text Domain: health-check + * Domain Path: /languages + */', + '<?php +/** + * Plugin Name: Health Check + * Plugin URI: https://wordpress.org/plugins/health-check/ + * Description: Checks the health of your WordPress install + * Version: 0.1.0 + * Author: The Health Check Team + * Author URI: http://health-check-team.example.com + * Text Domain: health-check + * Domain Path: /languages', + ), + ); + } +} diff --git a/tests/phpunit/tests/functions/deprecated.php b/tests/phpunit/tests/functions/deprecated.php index 2473972bb4d5a..b1d4a9f6e7bc9 100644 --- a/tests/phpunit/tests/functions/deprecated.php +++ b/tests/phpunit/tests/functions/deprecated.php @@ -3,41 +3,42 @@ /** * Test cases for deprecated functions, arguments, and files * - * @package WordPress + * @package WordPress * @subpackage Unit Tests - * @since 3.5 - * @group deprecated + * + * @since 3.5.0 + * + * @group functions.php + * @group deprecated */ -class Test_Functions_Deprecated extends WP_UnitTestCase { +class Tests_Functions_Deprecated extends WP_UnitTestCase { /** - * List of functions that have been passed through _deprecated_function() + * List of functions that have been passed through _deprecated_function(). * * @var string[] */ protected $_deprecated_functions = array(); /** - * List of arguments that have been passed through _deprecated_argument() + * List of arguments that have been passed through _deprecated_argument(). * * @var string[] */ protected $_deprecated_arguments = array(); /** - * List of files that have been passed through _deprecated_file() + * List of files that have been passed through _deprecated_file(). * * @var string[] */ protected $_deprecated_files = array(); /** - * Set up the test fixture - * - * @return void + * Sets up the test fixture. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->_deprecated_functions = array(); $this->_deprecated_arguments = array(); $this->_deprecated_files = array(); @@ -50,27 +51,24 @@ public function setUp() { } /** - * Tear down the test fixture - * - * @return void + * Tears down the test fixture. */ - public function teardown() { + public function tear_down() { remove_action( 'deprecated_function_run', array( $this, 'deprecated_function' ), 10, 3 ); remove_action( 'deprecated_function_trigger_error', '__return_false' ); remove_action( 'deprecated_argument_run', array( $this, 'deprecated_argument' ), 10, 3 ); remove_action( 'deprecated_argument_trigger_error', '__return_false' ); remove_action( 'deprecated_file_included', array( $this, 'deprecated_argument' ), 10, 4 ); remove_action( 'deprecated_file_trigger_error', '__return_false' ); - parent::tearDown(); + parent::tear_down(); } /** - * Catch functions that have passed through _deprecated_function + * Catches functions that have passed through _deprecated_function(). * * @param string $function * @param string $replacement * @param float $version - * @return void */ public function deprecated_function( $function, $replacement, $version ) { $this->_deprecated_functions[] = array( @@ -81,12 +79,11 @@ public function deprecated_function( $function, $replacement, $version ) { } /** - * Catch arguments that have passed through _deprecated_argument + * Catches arguments that have passed through _deprecated_argument(). * * @param string $argument * @param string $message * @param float $version - * @return void */ public function deprecated_argument( $argument, $message, $version ) { $this->_deprecated_arguments[] = array( @@ -97,12 +94,11 @@ public function deprecated_argument( $argument, $message, $version ) { } /** - * Catch arguments that have passed through _deprecated_argument + * Catches arguments that have passed through _deprecated_argument(). * * @param string $argument * @param string $message * @param float $version - * @return void */ public function deprecated_file( $file, $version, $replacement, $message ) { $this->_deprecated_files[] = array( @@ -114,7 +110,7 @@ public function deprecated_file( $file, $version, $replacement, $message ) { } /** - * Check if something was deprecated + * Checks if something was deprecated. * * @param string $type argument|function|file * @param string $name @@ -143,16 +139,15 @@ protected function was_deprecated( $type, $name ) { } /** - * Test that wp_save_image_file has a deprecated argument when passed a GD resource + * Tests that wp_save_image_file() has a deprecated argument when passed a GD resource. * * @ticket 6821 * @expectedDeprecated wp_save_image_file + * @requires function imagejpeg + * + * @covers ::wp_save_image_file */ public function test_wp_save_image_file_deprecated_with_gd_resource() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - // Call wp_save_image_file(). require_once ABSPATH . 'wp-admin/includes/image-edit.php'; $file = wp_tempnam(); @@ -167,15 +162,14 @@ public function test_wp_save_image_file_deprecated_with_gd_resource() { } /** - * Test that wp_save_image_file doesn't have a deprecated argument when passed a WP_Image_Editor + * Tests that wp_save_image_file() doesn't have a deprecated argument when passed a WP_Image_Editor. * * @ticket 6821 + * @requires function imagejpeg + * + * @covers ::wp_save_image_file */ public function test_wp_save_image_file_not_deprecated_with_wp_image_editor() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - // Call wp_save_image_file(). require_once ABSPATH . 'wp-admin/includes/image-edit.php'; $file = wp_tempnam(); diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index 8b38e9f57444e..5c8a42089fba7 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -10,11 +10,11 @@ /** * Tests_Functions_DoEnclose class. * + * @since 5.3.0 + * * @group functions.php * @group post - * @covers do_enclose - * - * @since 5.3.0 + * @covers ::do_enclose */ class Tests_Functions_DoEnclose extends WP_UnitTestCase { @@ -23,21 +23,11 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase { * * @since 5.3.0 */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'pre_http_request', array( $this, 'fake_http_request' ), 10, 3 ); } - /** - * Cleanup after each test method. - * - * @since 5.3.0 - */ - public function tearDown() { - parent::tearDown(); - remove_filter( 'pre_http_request', array( $this, 'fake_http_request' ) ); - } - /** * Test the function with an explicit content input. * @@ -135,6 +125,10 @@ public function data_test_do_enclose() { 'expected' => "https://example.com/wp-content/uploads/2018/06/audio.ogg\n321\naudio/ogg\n" . "https://example.com/wp-content/uploads/2018/06/movie.mp4\n123\nvideo/mp4\n", ), + 'no-path' => array( + 'content' => 'https://example.com?test=1', + 'expected' => '', + ), ); } @@ -249,7 +243,7 @@ public function filter_enclosure_links( $enclosure_links, $post_id ) { * @since 5.3.0 * * @param int $post_id Post ID. - * @return string All enclosure data for the given post. + * @return string All enclosure data for the given post. */ protected function get_enclosed_by_post_id( $post_id ) { return implode( '', (array) get_post_meta( $post_id, 'enclosure', false ) ); @@ -286,7 +280,7 @@ public function fake_http_request( $false, $arguments, $url ) { $path = parse_url( $url, PHP_URL_PATH ); - if ( false !== $path ) { + if ( is_string( $path ) ) { $extension = pathinfo( $path, PATHINFO_EXTENSION ); if ( isset( $fake_headers[ $extension ] ) ) { return $fake_headers[ $extension ]; diff --git a/tests/phpunit/tests/functions/getStatusHeaderDesc.php b/tests/phpunit/tests/functions/getStatusHeaderDesc.php index 0b4ec3766150d..c8a73ea99dbb5 100644 --- a/tests/phpunit/tests/functions/getStatusHeaderDesc.php +++ b/tests/phpunit/tests/functions/getStatusHeaderDesc.php @@ -6,8 +6,9 @@ * @since 5.3.0 * * @group functions.php + * @covers ::get_status_header_desc */ -class Tests_Functions_get_status_header_desc extends WP_UnitTestCase { +class Tests_Functions_GetStatusHeaderDesc extends WP_UnitTestCase { /** * @dataProvider _status_strings diff --git a/tests/phpunit/tests/functions/getWeekstartend.php b/tests/phpunit/tests/functions/getWeekstartend.php index 978f49eee77f0..3b162b8401ba1 100644 --- a/tests/phpunit/tests/functions/getWeekstartend.php +++ b/tests/phpunit/tests/functions/getWeekstartend.php @@ -2,6 +2,7 @@ /** * @group functions.php + * @covers ::get_weekstartend */ class Tests_Functions_GetWeekstartend extends WP_UnitTestCase { @@ -11,7 +12,7 @@ public function test_default_start_of_week_option_is_monday() { 'end' => 1455494399, ); - $this->assertEquals( $expected, get_weekstartend( '2016-02-12' ) ); + $this->assertSame( $expected, get_weekstartend( '2016-02-12' ) ); } public function test_start_of_week_sunday() { @@ -20,7 +21,7 @@ public function test_start_of_week_sunday() { 'end' => 1455407999, ); - $this->assertEquals( $expected, get_weekstartend( '2016-02-12', 0 ) ); + $this->assertSame( $expected, get_weekstartend( '2016-02-12', 0 ) ); } public function test_start_of_week_should_fall_back_on_start_of_week_option() { @@ -31,7 +32,7 @@ public function test_start_of_week_should_fall_back_on_start_of_week_option() { 'end' => 1455580799, ); - $this->assertEquals( $expected, get_weekstartend( '2016-02-12' ) ); + $this->assertSame( $expected, get_weekstartend( '2016-02-12' ) ); } public function test_start_of_week_should_fall_back_on_sunday_when_option_is_missing() { @@ -42,6 +43,6 @@ public function test_start_of_week_should_fall_back_on_sunday_when_option_is_mis 'end' => 1455407999, ); - $this->assertEquals( $expected, get_weekstartend( '2016-02-12' ) ); + $this->assertSame( $expected, get_weekstartend( '2016-02-12' ) ); } } diff --git a/tests/phpunit/tests/functions/isNewDay.php b/tests/phpunit/tests/functions/isNewDay.php index 629a6d3de56f3..3201717fe0dde 100644 --- a/tests/phpunit/tests/functions/isNewDay.php +++ b/tests/phpunit/tests/functions/isNewDay.php @@ -5,8 +5,9 @@ * @since 5.2.0 * * @group functions.php + * @covers ::is_new_day */ -class Tests_Functions_is_new_date extends WP_UnitTestCase { +class Tests_Functions_IsNewDate extends WP_UnitTestCase { /** * @ticket 46627 diff --git a/tests/phpunit/tests/functions/isSerializedString.php b/tests/phpunit/tests/functions/isSerializedString.php index 292765aab4f31..677bf6d591f17 100644 --- a/tests/phpunit/tests/functions/isSerializedString.php +++ b/tests/phpunit/tests/functions/isSerializedString.php @@ -3,10 +3,12 @@ /** * Tests for `is_serialized_string()`. * - * @group functions.php * @ticket 42870 + * + * @group functions.php + * @covers ::is_serialized_string */ -class Tests_Functions_Is_Serialized_String extends WP_UnitTestCase { +class Tests_Functions_IsSerializedString extends WP_UnitTestCase { /** * Data provider method for testing `is_serialized_string()`. diff --git a/tests/phpunit/tests/functions/listFiles.php b/tests/phpunit/tests/functions/listFiles.php index d461e0c195811..a70a05894010d 100644 --- a/tests/phpunit/tests/functions/listFiles.php +++ b/tests/phpunit/tests/functions/listFiles.php @@ -4,11 +4,13 @@ * Test list_files(). * * @group functions.php + * @covers ::list_files */ class Tests_Functions_ListFiles extends WP_UnitTestCase { + public function test_list_files_returns_a_list_of_files() { $admin_files = list_files( ABSPATH . 'wp-admin/' ); - $this->assertInternalType( 'array', $admin_files ); + $this->assertIsArray( $admin_files ); $this->assertNotEmpty( $admin_files ); $this->assertContains( ABSPATH . 'wp-admin/index.php', $admin_files ); } diff --git a/tests/phpunit/tests/functions/listFilter.php b/tests/phpunit/tests/functions/listFilter.php deleted file mode 100644 index 1e5c5533572ee..0000000000000 --- a/tests/phpunit/tests/functions/listFilter.php +++ /dev/null @@ -1,355 +0,0 @@ -<?php - -/** - * Test wp_filter_object_list(), wp_list_filter(), wp_list_pluck(). - * - * @group functions.php - */ -class Tests_Functions_ListFilter extends WP_UnitTestCase { - var $object_list = array(); - var $array_list = array(); - - function setUp() { - parent::setUp(); - $this->array_list['foo'] = array( - 'name' => 'foo', - 'id' => 'f', - 'field1' => true, - 'field2' => true, - 'field3' => true, - 'field4' => array( 'red' ), - ); - $this->array_list['bar'] = array( - 'name' => 'bar', - 'id' => 'b', - 'field1' => true, - 'field2' => true, - 'field3' => false, - 'field4' => array( 'green' ), - ); - $this->array_list['baz'] = array( - 'name' => 'baz', - 'id' => 'z', - 'field1' => true, - 'field2' => false, - 'field3' => false, - 'field4' => array( 'blue' ), - ); - foreach ( $this->array_list as $key => $value ) { - $this->object_list[ $key ] = (object) $value; - } - } - - function test_filter_object_list_and() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field1' => true, - 'field2' => true, - ), - 'AND' - ); - $this->assertEquals( 2, count( $list ) ); - $this->assertArrayHasKey( 'foo', $list ); - $this->assertArrayHasKey( 'bar', $list ); - } - - function test_filter_object_list_or() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field1' => true, - 'field2' => true, - ), - 'OR' - ); - $this->assertEquals( 3, count( $list ) ); - $this->assertArrayHasKey( 'foo', $list ); - $this->assertArrayHasKey( 'bar', $list ); - $this->assertArrayHasKey( 'baz', $list ); - } - - function test_filter_object_list_not() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field2' => true, - 'field3' => true, - ), - 'NOT' - ); - $this->assertEquals( 1, count( $list ) ); - $this->assertArrayHasKey( 'baz', $list ); - } - - function test_filter_object_list_and_field() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field1' => true, - 'field2' => true, - ), - 'AND', - 'name' - ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'bar' => 'bar', - ), - $list - ); - } - - function test_filter_object_list_or_field() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field2' => true, - 'field3' => true, - ), - 'OR', - 'name' - ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'bar' => 'bar', - ), - $list - ); - } - - function test_filter_object_list_not_field() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field2' => true, - 'field3' => true, - ), - 'NOT', - 'name' - ); - $this->assertEquals( array( 'baz' => 'baz' ), $list ); - } - - function test_wp_list_pluck() { - $list = wp_list_pluck( $this->object_list, 'name' ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'bar' => 'bar', - 'baz' => 'baz', - ), - $list - ); - - $list = wp_list_pluck( $this->array_list, 'name' ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'bar' => 'bar', - 'baz' => 'baz', - ), - $list - ); - } - - /** - * @ticket 28666 - */ - function test_wp_list_pluck_index_key() { - $list = wp_list_pluck( $this->array_list, 'name', 'id' ); - $this->assertEquals( - array( - 'f' => 'foo', - 'b' => 'bar', - 'z' => 'baz', - ), - $list - ); - } - - /** - * @ticket 28666 - */ - function test_wp_list_pluck_object_index_key() { - $list = wp_list_pluck( $this->object_list, 'name', 'id' ); - $this->assertEquals( - array( - 'f' => 'foo', - 'b' => 'bar', - 'z' => 'baz', - ), - $list - ); - } - - /** - * @ticket 28666 - */ - function test_wp_list_pluck_missing_index_key() { - $list = wp_list_pluck( $this->array_list, 'name', 'nonexistent' ); - $this->assertEquals( - array( - 0 => 'foo', - 1 => 'bar', - 2 => 'baz', - ), - $list - ); - } - - /** - * @ticket 28666 - */ - function test_wp_list_pluck_partial_missing_index_key() { - $array_list = $this->array_list; - unset( $array_list['bar']['id'] ); - $list = wp_list_pluck( $array_list, 'name', 'id' ); - $this->assertEquals( - array( - 'f' => 'foo', - 0 => 'bar', - 'z' => 'baz', - ), - $list - ); - } - - /** - * @ticket 28666 - */ - function test_wp_list_pluck_mixed_index_key() { - $mixed_list = $this->array_list; - $mixed_list['bar'] = (object) $mixed_list['bar']; - $list = wp_list_pluck( $mixed_list, 'name', 'id' ); - $this->assertEquals( - array( - 'f' => 'foo', - 'b' => 'bar', - 'z' => 'baz', - ), - $list - ); - } - - /** - * @ticket 16895 - */ - function test_wp_list_pluck_containing_references() { - $ref_list = array( - & $this->object_list['foo'], - & $this->object_list['bar'], - ); - - $this->assertInstanceOf( 'stdClass', $ref_list[0] ); - $this->assertInstanceOf( 'stdClass', $ref_list[1] ); - - $list = wp_list_pluck( $ref_list, 'name' ); - $this->assertEquals( - array( - 'foo', - 'bar', - ), - $list - ); - - $this->assertInstanceOf( 'stdClass', $ref_list[0] ); - $this->assertInstanceOf( 'stdClass', $ref_list[1] ); - } - - /** - * @ticket 16895 - */ - function test_wp_list_pluck_containing_references_keys() { - $ref_list = array( - & $this->object_list['foo'], - & $this->object_list['bar'], - ); - - $this->assertInstanceOf( 'stdClass', $ref_list[0] ); - $this->assertInstanceOf( 'stdClass', $ref_list[1] ); - - $list = wp_list_pluck( $ref_list, 'name', 'id' ); - $this->assertEquals( - array( - 'f' => 'foo', - 'b' => 'bar', - ), - $list - ); - - $this->assertInstanceOf( 'stdClass', $ref_list[0] ); - $this->assertInstanceOf( 'stdClass', $ref_list[1] ); - } - - function test_filter_object_list_nested_array_and() { - $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND' ); - $this->assertEquals( 1, count( $list ) ); - $this->assertArrayHasKey( 'baz', $list ); - } - - function test_filter_object_list_nested_array_not() { - $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'red' ) ), 'NOT' ); - $this->assertEquals( 2, count( $list ) ); - $this->assertArrayHasKey( 'bar', $list ); - $this->assertArrayHasKey( 'baz', $list ); - } - - function test_filter_object_list_nested_array_or() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field3' => true, - 'field4' => array( 'blue' ), - ), - 'OR' - ); - $this->assertEquals( 2, count( $list ) ); - $this->assertArrayHasKey( 'foo', $list ); - $this->assertArrayHasKey( 'baz', $list ); - } - - function test_filter_object_list_nested_array_or_singular() { - $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'OR' ); - $this->assertEquals( 1, count( $list ) ); - $this->assertArrayHasKey( 'baz', $list ); - } - - - function test_filter_object_list_nested_array_and_field() { - $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND', 'name' ); - $this->assertEquals( array( 'baz' => 'baz' ), $list ); - } - - function test_filter_object_list_nested_array_not_field() { - $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'green' ) ), 'NOT', 'name' ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'baz' => 'baz', - ), - $list - ); - } - - function test_filter_object_list_nested_array_or_field() { - $list = wp_filter_object_list( - $this->object_list, - array( - 'field3' => true, - 'field4' => array( 'blue' ), - ), - 'OR', - 'name' - ); - $this->assertEquals( - array( - 'foo' => 'foo', - 'baz' => 'baz', - ), - $list - ); - } -} diff --git a/tests/phpunit/tests/functions/numberFormatI18n.php b/tests/phpunit/tests/functions/numberFormatI18n.php index 8c514b319c494..c57405887ddf2 100644 --- a/tests/phpunit/tests/functions/numberFormatI18n.php +++ b/tests/phpunit/tests/functions/numberFormatI18n.php @@ -5,8 +5,10 @@ * * @group functions.php * @group i18n + * @covers ::number_format_i18n */ -class Tests_Functions_Number_Format_I18n extends WP_UnitTestCase { +class Tests_Functions_NumberFormatI18n extends WP_UnitTestCase { + public function test_should_fall_back_to_number_format_when_wp_locale_is_not_set() { $locale = clone $GLOBALS['wp_locale']; $GLOBALS['wp_locale'] = null; @@ -16,8 +18,8 @@ public function test_should_fall_back_to_number_format_when_wp_locale_is_not_set $GLOBALS['wp_locale'] = $locale; - $this->assertEquals( '123,457', $actual_1 ); - $this->assertEquals( '123,456.7890', $actual_2 ); + $this->assertSame( '123,457', $actual_1 ); + $this->assertSame( '123,456.7890', $actual_2 ); } public function test_should_respect_number_format_of_locale() { @@ -33,17 +35,17 @@ public function test_should_respect_number_format_of_locale() { $GLOBALS['wp_locale']->number_format['decimal_point'] = $decimal_point; $GLOBALS['wp_locale']->number_format['thousands_sep'] = $thousands_sep; - $this->assertEquals( '123^457', $actual_1 ); - $this->assertEquals( '123^456@7890', $actual_2 ); + $this->assertSame( '123^457', $actual_1 ); + $this->assertSame( '123^456@7890', $actual_2 ); } public function test_should_default_to_en_us_format() { - $this->assertEquals( '123,457', number_format_i18n( 123456.789, 0 ) ); - $this->assertEquals( '123,456.7890', number_format_i18n( 123456.789, 4 ) ); + $this->assertSame( '123,457', number_format_i18n( 123456.789, 0 ) ); + $this->assertSame( '123,456.7890', number_format_i18n( 123456.789, 4 ) ); } public function test_should_handle_negative_precision() { - $this->assertEquals( '123,457', number_format_i18n( 123456.789, 0 ) ); - $this->assertEquals( '123,456.7890', number_format_i18n( 123456.789, -4 ) ); + $this->assertSame( '123,457', number_format_i18n( 123456.789, 0 ) ); + $this->assertSame( '123,456.7890', number_format_i18n( 123456.789, -4 ) ); } } diff --git a/tests/phpunit/tests/functions/pluginBasename.php b/tests/phpunit/tests/functions/pluginBasename.php index 42755f5f252e5..d28cf914cff7f 100644 --- a/tests/phpunit/tests/functions/pluginBasename.php +++ b/tests/phpunit/tests/functions/pluginBasename.php @@ -5,8 +5,9 @@ * * @group functions.php * @group plugins + * @covers ::plugin_basename */ -class Tests_Plugin_Basename extends WP_UnitTestCase { +class Tests_Functions_PluginBasename extends WP_UnitTestCase { /** * @var array @@ -20,23 +21,23 @@ class Tests_Plugin_Basename extends WP_UnitTestCase { */ protected $wp_plugin_path; - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->wp_plugin_paths_backup = $GLOBALS['wp_plugin_paths']; $this->wp_plugin_path = wp_normalize_path( WP_PLUGIN_DIR ); } - public function tearDown() { + public function tear_down() { $GLOBALS['wp_plugin_paths'] = $this->wp_plugin_paths_backup; - parent::tearDown(); + parent::tear_down(); } /** * @ticket 29154 */ - function test_return_correct_basename_for_symlinked_plugins() { + public function test_return_correct_basename_for_symlinked_plugins() { global $wp_plugin_paths; $wp_plugin_paths = array( @@ -50,7 +51,7 @@ function test_return_correct_basename_for_symlinked_plugins() { /** * @ticket 28441 */ - function test_return_correct_basename_for_symlinked_plugins_with_path_conflicts() { + public function test_return_correct_basename_for_symlinked_plugins_with_path_conflicts() { global $wp_plugin_paths; $wp_plugin_paths = array( diff --git a/tests/phpunit/tests/functions/referer.php b/tests/phpunit/tests/functions/referer.php index 148fe89888697..b1d113afcf5c9 100644 --- a/tests/phpunit/tests/functions/referer.php +++ b/tests/phpunit/tests/functions/referer.php @@ -4,22 +4,25 @@ * Test wp_get_referer(). * * @group functions.php + * @covers ::wp_get_referer + * @covers ::wp_get_raw_referer */ class Tests_Functions_Referer extends WP_UnitTestCase { - public function setUp() { - parent::setUp(); + + public function set_up() { + parent::set_up(); $_SERVER['HTTP_REFERER'] = ''; $_SERVER['REQUEST_URI'] = ''; $_REQUEST['_wp_http_referer'] = ''; } - public function tearDown() { - parent::tearDown(); - + public function tear_down() { $_SERVER['HTTP_REFERER'] = ''; $_SERVER['REQUEST_URI'] = ''; $_REQUEST['_wp_http_referer'] = ''; + + parent::tear_down(); } public function _fake_subfolder_install() { diff --git a/tests/phpunit/tests/functions/removeQueryArg.php b/tests/phpunit/tests/functions/removeQueryArg.php index b55f903d98dad..b8130abe8dedd 100644 --- a/tests/phpunit/tests/functions/removeQueryArg.php +++ b/tests/phpunit/tests/functions/removeQueryArg.php @@ -2,8 +2,10 @@ /** * @group functions.php + * @covers ::remove_query_arg */ class Tests_Functions_RemoveQueryArg extends WP_UnitTestCase { + /** * @dataProvider remove_query_arg_provider */ @@ -11,7 +13,7 @@ public function test_remove_query_arg( $keys_to_remove, $url, $expected ) { $actual = remove_query_arg( $keys_to_remove, $url ); $this->assertNotEmpty( $actual ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } public function remove_query_arg_provider() { diff --git a/tests/phpunit/tests/functions/sizeFormat.php b/tests/phpunit/tests/functions/sizeFormat.php index 0cf26511f1d2c..281db07f5d7f0 100644 --- a/tests/phpunit/tests/functions/sizeFormat.php +++ b/tests/phpunit/tests/functions/sizeFormat.php @@ -3,10 +3,13 @@ /** * Tests for size_format() * - * @group functions.php * @ticket 36635 + * + * @group functions.php + * @covers ::size_format */ -class Tests_Functions_Size_Format extends WP_UnitTestCase { +class Tests_Functions_SizeFormat extends WP_UnitTestCase { + public function _data_size_format() { return array( array( array(), 0, false ), diff --git a/tests/phpunit/tests/functions/underscoreReturn.php b/tests/phpunit/tests/functions/underscoreReturn.php index 8c1d2e09622f5..4973c2d328238 100644 --- a/tests/phpunit/tests/functions/underscoreReturn.php +++ b/tests/phpunit/tests/functions/underscoreReturn.php @@ -6,28 +6,46 @@ * * @group functions.php */ -class Tests_Functions_Underscore_Return extends WP_UnitTestCase { +class Tests_Functions_UnderscoreReturn extends WP_UnitTestCase { + /** + * @covers ::__return_true + */ public function test__return_true() { $this->assertTrue( __return_true() ); } + /** + * @covers ::__return_false + */ public function test__return_false() { $this->assertFalse( __return_false() ); } + /** + * @covers ::__return_zero + */ public function test__return_zero() { $this->assertSame( 0, __return_zero() ); } + /** + * @covers ::__return_empty_array + */ public function test__return_empty_array() { $this->assertSame( array(), __return_empty_array() ); } + /** + * @covers ::__return_null + */ public function test__return_null() { $this->assertNull( __return_null() ); } + /** + * @covers ::__return_empty_string + */ public function test__return_empty_string() { $this->assertSame( '', __return_empty_string() ); } diff --git a/tests/phpunit/tests/functions/wp.php b/tests/phpunit/tests/functions/wp.php index 80654a85267a4..04df43b3489d5 100644 --- a/tests/phpunit/tests/functions/wp.php +++ b/tests/phpunit/tests/functions/wp.php @@ -3,6 +3,7 @@ /** * @group functions.php * @group query + * @covers ::wp */ class Tests_Functions_WP extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/functions/wpArrayGet.php b/tests/phpunit/tests/functions/wpArrayGet.php new file mode 100644 index 0000000000000..8fdf23bcf96f7 --- /dev/null +++ b/tests/phpunit/tests/functions/wpArrayGet.php @@ -0,0 +1,285 @@ +<?php + +/** + * Tests for the _wp_array_get() function + * + * @since 5.6.0 + * + * @group functions.php + * @covers ::_wp_array_get + */ +class Tests_Functions_wpArrayGet extends WP_UnitTestCase { + + /** + * Test _wp_array_get() with invalid parameters. + * + * @ticket 51720 + */ + public function test_wp_array_get_invalid_parameters() { + $this->assertSame( + _wp_array_get( + null, + array( 'a' ) + ), + null + ); + + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + null + ), + null + ); + + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + array() + ), + null + ); + + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + array(), + true + ), + true + ); + } + + /** + * Test _wp_array_get() with non-subtree paths. + * + * @ticket 51720 + */ + public function test_wp_array_get_simple_non_subtree() { + // Simple non-subtree test. + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + array( 'key' ) + ), + 4 + ); + + // Simple non-subtree not found. + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + array( 'invalid' ) + ), + null + ); + + // Simple non-subtree not found with a default. + $this->assertSame( + _wp_array_get( + array( + 'key' => 4, + ), + array( 'invalid' ), + 1 + ), + 1 + ); + + // Simple non-subtree integer path. + $this->assertSame( + _wp_array_get( + array( + 'a', + 'b', + 'c', + ), + array( 1 ) + ), + 'b' + ); + } + + /** + * Test _wp_array_get() with subtrees. + * + * @ticket 51720 + */ + public function test_wp_array_get_subtree() { + $this->assertSame( + _wp_array_get( + array( + 'a' => array( + 'b' => array( + 'c' => 1, + ), + ), + ), + array( 'a', 'b' ) + ), + array( 'c' => 1 ) + ); + + $this->assertSame( + _wp_array_get( + array( + 'a' => array( + 'b' => array( + 'c' => 1, + ), + ), + ), + array( 'a', 'b', 'c' ) + ), + 1 + ); + + $this->assertSame( + _wp_array_get( + array( + 'a' => array( + 'b' => array( + 'c' => 1, + ), + ), + ), + array( 'a', 'b', 'c', 'd' ) + ), + null + ); + } + + /** + * Test _wp_array_get() with zero strings. + * + * @ticket 51720 + */ + public function test_wp_array_get_handle_zeros() { + $this->assertSame( + _wp_array_get( + array( + '-0' => 'a', + '0' => 'b', + ), + array( 0 ) + ), + 'b' + ); + + $this->assertSame( + _wp_array_get( + array( + '-0' => 'a', + '0' => 'b', + ), + array( -0 ) + ), + 'b' + ); + + $this->assertSame( + _wp_array_get( + array( + '-0' => 'a', + '0' => 'b', + ), + array( '-0' ) + ), + 'a' + ); + + $this->assertSame( + _wp_array_get( + array( + '-0' => 'a', + '0' => 'b', + ), + array( '0' ) + ), + 'b' + ); + } + + /** + * Test _wp_array_get() with null values. + * + * @ticket 51720 + */ + public function test_wp_array_get_null() { + $this->assertSame( + _wp_array_get( + array( + 'key' => null, + ), + array( 'key' ), + true + ), + null + ); + + $this->assertSame( + _wp_array_get( + array( + 'key' => null, + ), + array( 'key', 'subkey' ), + true + ), + true + ); + + $this->assertSame( + _wp_array_get( + array( + 'key' => array( + null => 4, + ), + ), + array( 'key', null ), + true + ), + 4 + ); + } + + /** + * Test _wp_array_get() with empty paths. + * + * @ticket 51720 + */ + public function test_wp_array_get_empty_paths() { + $this->assertSame( + _wp_array_get( + array( + 'a' => 4, + ), + array() + ), + null + ); + + $this->assertSame( + _wp_array_get( + array( + 'a' => array( + 'b' => array( + 'c' => 1, + ), + ), + ), + array( 'a', 'b', array() ) + ), + null + ); + } +} diff --git a/tests/phpunit/tests/functions/wpArraySet.php b/tests/phpunit/tests/functions/wpArraySet.php new file mode 100644 index 0000000000000..8a468fabea69c --- /dev/null +++ b/tests/phpunit/tests/functions/wpArraySet.php @@ -0,0 +1,135 @@ +<?php + +/** + * Tests for the _wp_array_set() function + * + * @since 5.8.0 + * + * @group functions.php + * @covers ::_wp_array_set + */ +class Tests_Functions_wpArraySet extends WP_UnitTestCase { + + /** + * Test _wp_array_set() with invalid parameters. + * + * @ticket 53175 + */ + public function test_wp_array_set_invalid_parameters() { + $test = 3; + _wp_array_set( $test, array( 'a' ), 1 ); + $this->assertSame( + $test, + 3 + ); + + $test_array = array( 'a' => 2 ); + _wp_array_set( $test_array, 'a', 3 ); + $this->assertSame( + $test_array, + array( 'a' => 2 ) + ); + + $test_array = array( 'a' => 2 ); + _wp_array_set( $test_array, null, 3 ); + $this->assertSame( + $test_array, + array( 'a' => 2 ) + ); + + $test_array = array( 'a' => 2 ); + _wp_array_set( $test_array, array(), 3 ); + $this->assertSame( + $test_array, + array( 'a' => 2 ) + ); + + $test_array = array( 'a' => 2 ); + _wp_array_set( $test_array, array( 'a', array() ), 3 ); + $this->assertSame( + $test_array, + array( 'a' => 2 ) + ); + } + + /** + * Test _wp_array_set() with simple non-subtree path. + * + * @ticket 53175 + */ + public function test_wp_array_set_simple_non_subtree() { + $test_array = array(); + _wp_array_set( $test_array, array( 'a' ), 1 ); + $this->assertSame( + $test_array, + array( 'a' => 1 ) + ); + + $test_array = array( 'a' => 2 ); + _wp_array_set( $test_array, array( 'a' ), 3 ); + $this->assertSame( + $test_array, + array( 'a' => 3 ) + ); + + $test_array = array( 'b' => 1 ); + _wp_array_set( $test_array, array( 'a' ), 3 ); + $this->assertSame( + $test_array, + array( + 'b' => 1, + 'a' => 3, + ) + ); + } + + /** + * Test _wp_array_set() with subtree paths. + * + * @ticket 53175 + */ + public function test_wp_array_set_subtree() { + $test_array = array(); + _wp_array_set( $test_array, array( 'a', 'b', 'c' ), 1 ); + $this->assertSame( + $test_array, + array( 'a' => array( 'b' => array( 'c' => 1 ) ) ) + ); + + $test_array = array( 'b' => 3 ); + _wp_array_set( $test_array, array( 'a', 'b', 'c' ), 1 ); + $this->assertSame( + $test_array, + array( + 'b' => 3, + 'a' => array( 'b' => array( 'c' => 1 ) ), + ) + ); + + $test_array = array( + 'b' => 3, + 'a' => 1, + ); + _wp_array_set( $test_array, array( 'a', 'b', 'c' ), 1 ); + $this->assertSame( + $test_array, + array( + 'b' => 3, + 'a' => array( 'b' => array( 'c' => 1 ) ), + ) + ); + + $test_array = array( + 'b' => 3, + 'a' => array(), + ); + _wp_array_set( $test_array, array( 'a', 'b', 'c' ), 1 ); + $this->assertSame( + $test_array, + array( + 'b' => 3, + 'a' => array( 'b' => array( 'c' => 1 ) ), + ) + ); + } +} diff --git a/tests/phpunit/tests/functions/wpArraySliceAssoc.php b/tests/phpunit/tests/functions/wpArraySliceAssoc.php index 73df5cb87ca0c..f7ce7293a258f 100644 --- a/tests/phpunit/tests/functions/wpArraySliceAssoc.php +++ b/tests/phpunit/tests/functions/wpArraySliceAssoc.php @@ -5,10 +5,10 @@ * * @since 5.3.0 * - * @covers wp_array_slice_assoc * @group functions.php + * @covers ::wp_array_slice_assoc */ -class Tests_Functions_WpArraySliceAssoc extends WP_UnitTestCase { +class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase { /** * Test wp_array_slice_assoc(). diff --git a/tests/phpunit/tests/functions/wpAuthCheck.php b/tests/phpunit/tests/functions/wpAuthCheck.php index 32aafdddb1caf..70c1780faa537 100644 --- a/tests/phpunit/tests/functions/wpAuthCheck.php +++ b/tests/phpunit/tests/functions/wpAuthCheck.php @@ -4,15 +4,17 @@ * Tests for the behavior of `wp_auth_check()` * * @group functions.php + * @covers ::is_user_logged_in + * @covers ::wp_auth_check */ -class Tests_Functions_WP_Auth_Check extends WP_UnitTestCase { +class Tests_Functions_wpAuthCheck extends WP_UnitTestCase { /** * Run with user not logged in. * * @ticket 41860 */ - function test_wp_auth_check_user_not_logged_in() { + public function test_wp_auth_check_user_not_logged_in() { $expected = array( 'wp-auth-check' => false, ); @@ -26,7 +28,7 @@ function test_wp_auth_check_user_not_logged_in() { * * @ticket 41860 */ - function test_wp_auth_check_user_logged_in() { + public function test_wp_auth_check_user_logged_in() { // Log user in. wp_set_current_user( 1 ); @@ -43,7 +45,7 @@ function test_wp_auth_check_user_logged_in() { * * @ticket 41860 */ - function test_wp_auth_check_user_logged_in_login_grace_period_set() { + public function test_wp_auth_check_user_logged_in_login_grace_period_set() { // Log user in. wp_set_current_user( 1 ); diff --git a/tests/phpunit/tests/functions/wpFilterObjectList.php b/tests/phpunit/tests/functions/wpFilterObjectList.php new file mode 100644 index 0000000000000..b0c9edc4eda47 --- /dev/null +++ b/tests/phpunit/tests/functions/wpFilterObjectList.php @@ -0,0 +1,204 @@ +<?php + +/** + * Test wp_filter_object_list(). + * + * @group functions.php + * @covers ::wp_filter_object_list + */ +class Tests_Functions_wpFilterObjectList extends WP_UnitTestCase { + public $object_list = array(); + public $array_list = array(); + + public function set_up() { + parent::set_up(); + $this->array_list['foo'] = array( + 'name' => 'foo', + 'id' => 'f', + 'field1' => true, + 'field2' => true, + 'field3' => true, + 'field4' => array( 'red' ), + ); + $this->array_list['bar'] = array( + 'name' => 'bar', + 'id' => 'b', + 'field1' => true, + 'field2' => true, + 'field3' => false, + 'field4' => array( 'green' ), + ); + $this->array_list['baz'] = array( + 'name' => 'baz', + 'id' => 'z', + 'field1' => true, + 'field2' => false, + 'field3' => false, + 'field4' => array( 'blue' ), + ); + foreach ( $this->array_list as $key => $value ) { + $this->object_list[ $key ] = (object) $value; + } + } + + public function test_filter_object_list_and() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field1' => true, + 'field2' => true, + ), + 'AND' + ); + $this->assertCount( 2, $list ); + $this->assertArrayHasKey( 'foo', $list ); + $this->assertArrayHasKey( 'bar', $list ); + } + + public function test_filter_object_list_or() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field1' => true, + 'field2' => true, + ), + 'OR' + ); + $this->assertCount( 3, $list ); + $this->assertArrayHasKey( 'foo', $list ); + $this->assertArrayHasKey( 'bar', $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_not() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field2' => true, + 'field3' => true, + ), + 'NOT' + ); + $this->assertCount( 1, $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_and_field() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field1' => true, + 'field2' => true, + ), + 'AND', + 'name' + ); + $this->assertSame( + array( + 'foo' => 'foo', + 'bar' => 'bar', + ), + $list + ); + } + + public function test_filter_object_list_or_field() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field2' => true, + 'field3' => true, + ), + 'OR', + 'name' + ); + $this->assertSame( + array( + 'foo' => 'foo', + 'bar' => 'bar', + ), + $list + ); + } + + public function test_filter_object_list_not_field() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field2' => true, + 'field3' => true, + ), + 'NOT', + 'name' + ); + $this->assertSame( array( 'baz' => 'baz' ), $list ); + } + + public function test_filter_object_list_nested_array_and() { + $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND' ); + $this->assertCount( 1, $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_nested_array_not() { + $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'red' ) ), 'NOT' ); + $this->assertCount( 2, $list ); + $this->assertArrayHasKey( 'bar', $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_nested_array_or() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field3' => true, + 'field4' => array( 'blue' ), + ), + 'OR' + ); + $this->assertCount( 2, $list ); + $this->assertArrayHasKey( 'foo', $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_nested_array_or_singular() { + $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'OR' ); + $this->assertCount( 1, $list ); + $this->assertArrayHasKey( 'baz', $list ); + } + + public function test_filter_object_list_nested_array_and_field() { + $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND', 'name' ); + $this->assertSame( array( 'baz' => 'baz' ), $list ); + } + + public function test_filter_object_list_nested_array_not_field() { + $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'green' ) ), 'NOT', 'name' ); + $this->assertSame( + array( + 'foo' => 'foo', + 'baz' => 'baz', + ), + $list + ); + } + + public function test_filter_object_list_nested_array_or_field() { + $list = wp_filter_object_list( + $this->object_list, + array( + 'field3' => true, + 'field4' => array( 'blue' ), + ), + 'OR', + 'name' + ); + $this->assertSame( + array( + 'foo' => 'foo', + 'baz' => 'baz', + ), + $list + ); + } +} diff --git a/tests/phpunit/tests/functions/getArchives.php b/tests/phpunit/tests/functions/wpGetArchives.php similarity index 78% rename from tests/phpunit/tests/functions/getArchives.php rename to tests/phpunit/tests/functions/wpGetArchives.php index c771eece092a0..6d0eaded289fb 100644 --- a/tests/phpunit/tests/functions/getArchives.php +++ b/tests/phpunit/tests/functions/wpGetArchives.php @@ -1,25 +1,22 @@ <?php -/* -$defaults = array( - 'type' => 'monthly', 'limit' => '', - 'format' => 'html', 'before' => '', - 'after' => '', 'show_post_count' => false, - 'echo' => 1, 'order' => 'DESC', -); -*/ -class Tests_Get_Archives extends WP_UnitTestCase { + +/** + * @group functions.php + * @covers ::wp_get_archives + */ +class Tests_Functions_wpGetArchives extends WP_UnitTestCase { protected static $post_ids; protected $month_url; protected $year_url; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->month_url = get_month_link( gmdate( 'Y' ), gmdate( 'm' ) ); $this->year_url = get_year_link( gmdate( 'Y' ) ); } - public static function wpSetUpBeforeClass( $factory ) { + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$post_ids = $factory->post->create_many( 8, array( @@ -29,14 +26,14 @@ public static function wpSetUpBeforeClass( $factory ) { ); } - function test_wp_get_archives_default() { + public function test_wp_get_archives_default() { $expected['default'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>'; - $this->assertEquals( $expected['default'], trim( wp_get_archives( array( 'echo' => false ) ) ) ); + $this->assertSame( $expected['default'], trim( wp_get_archives( array( 'echo' => false ) ) ) ); } - function test_wp_get_archives_type() { + public function test_wp_get_archives_type() { $expected['type'] = "<li><a href='" . $this->year_url . "'>" . gmdate( 'Y' ) . '</a></li>'; - $this->assertEquals( + $this->assertSame( $expected['type'], trim( wp_get_archives( @@ -49,7 +46,7 @@ function test_wp_get_archives_type() { ); } - function test_wp_get_archives_limit() { + public function test_wp_get_archives_limit() { $ids = array_slice( array_reverse( self::$post_ids ), 0, 5 ); $link1 = get_permalink( $ids[0] ); @@ -71,7 +68,7 @@ function test_wp_get_archives_limit() { <li><a href='$link4'>$title4</a></li> <li><a href='$link5'>$title5</a></li> EOF; - $this->assertEqualsIgnoreEOL( + $this->assertSameIgnoreEOL( $expected['limit'], trim( wp_get_archives( @@ -85,9 +82,9 @@ function test_wp_get_archives_limit() { ); } - function test_wp_get_archives_format() { + public function test_wp_get_archives_format() { $expected['format'] = "<option value='" . $this->month_url . "'> " . gmdate( 'F Y' ) . ' </option>'; - $this->assertEquals( + $this->assertSame( $expected['format'], trim( wp_get_archives( @@ -100,9 +97,9 @@ function test_wp_get_archives_format() { ); } - function test_wp_get_archives_before_and_after() { + public function test_wp_get_archives_before_and_after() { $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></div>'; - $this->assertEquals( + $this->assertSame( $expected['before_and_after'], trim( wp_get_archives( @@ -117,9 +114,9 @@ function test_wp_get_archives_before_and_after() { ); } - function test_wp_get_archives_show_post_count() { + public function test_wp_get_archives_show_post_count() { $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a> (8)</li>'; - $this->assertEquals( + $this->assertSame( $expected['show_post_count'], trim( wp_get_archives( @@ -132,13 +129,13 @@ function test_wp_get_archives_show_post_count() { ); } - function test_wp_get_archives_echo() { + public function test_wp_get_archives_echo() { $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>' . "\n"; $this->expectOutputString( $expected['echo'] ); wp_get_archives( array( 'echo' => true ) ); } - function test_wp_get_archives_order() { + public function test_wp_get_archives_order() { self::factory()->post->create( array( 'post_type' => 'post', @@ -153,7 +150,7 @@ function test_wp_get_archives_order() { <li><a href='{$oct_url}'>October 2012</a></li> <li><a href='{$this->month_url}'>$date_full</a></li> EOF; - $this->assertEqualsIgnoreEOL( + $this->assertSameIgnoreEOL( $expected['order_asc'], trim( wp_get_archives( @@ -169,7 +166,7 @@ function test_wp_get_archives_order() { <li><a href='{$this->month_url}'>$date_full</a></li> <li><a href='{$oct_url}'>October 2012</a></li> EOF; - $this->assertEqualsIgnoreEOL( + $this->assertSameIgnoreEOL( $expected['order_desc'], trim( wp_get_archives( @@ -185,7 +182,7 @@ function test_wp_get_archives_order() { /** * @ticket 21596 */ - function test_wp_get_archives_post_type() { + public function test_wp_get_archives_post_type() { register_post_type( 'taco', array( 'public' => true ) ); self::factory()->post->create( @@ -204,6 +201,6 @@ function test_wp_get_archives_post_type() { 'post_type' => 'taco', ) ); - $this->assertEquals( $expected, trim( $archives ) ); + $this->assertSame( $expected, trim( $archives ) ); } } diff --git a/tests/phpunit/tests/functions/wpGetMimeTypes.php b/tests/phpunit/tests/functions/wpGetMimeTypes.php index dec3ea73d656a..2bef07644f4cb 100644 --- a/tests/phpunit/tests/functions/wpGetMimeTypes.php +++ b/tests/phpunit/tests/functions/wpGetMimeTypes.php @@ -4,8 +4,9 @@ * Test wp_get_mime_types(). * * @group functions.php + * @covers ::wp_get_mime_types */ -class Tests_wp_get_mime_types extends WP_UnitTestCase { +class Tests_Functions_wpGetMimeTypes extends WP_UnitTestCase { /** * @ticket 47701 @@ -13,7 +14,7 @@ class Tests_wp_get_mime_types extends WP_UnitTestCase { public function test_all_mime_match() { $mime_types_start = wp_get_mime_types(); - $this->assertInternalType( 'array', $mime_types_start ); + $this->assertIsArray( $mime_types_start ); $this->assertNotEmpty( $mime_types_start ); add_filter( 'mime_types', '__return_empty_array' ); @@ -22,7 +23,7 @@ public function test_all_mime_match() { remove_filter( 'mime_types', '__return_empty_array' ); $mime_types = wp_get_mime_types(); - $this->assertInternalType( 'array', $mime_types ); + $this->assertIsArray( $mime_types ); $this->assertNotEmpty( $mime_types ); // Did it revert to the original after filter remove? $this->assertSame( $mime_types_start, $mime_types ); diff --git a/tests/phpunit/tests/functions/wpListFilter.php b/tests/phpunit/tests/functions/wpListFilter.php new file mode 100644 index 0000000000000..45ea4f9601f6e --- /dev/null +++ b/tests/phpunit/tests/functions/wpListFilter.php @@ -0,0 +1,215 @@ +<?php + +/** + * Test wp_list_filter(). + * + * @group functions.php + * @covers ::wp_list_filter + */ +class Tests_Functions_wpListFilter extends WP_UnitTestCase { + + /** + * @dataProvider data_test_wp_list_filter + * + * @param array $list An array of objects to filter. + * @param array $args An array of key => value arguments to match + * against each object. + * @param string $operator The logical operation to perform. + * @param array $expected Expected result. + */ + public function test_wp_list_filter( $list, $args, $operator, $expected ) { + $this->assertEqualSetsWithIndex( $expected, wp_list_filter( $list, $args, $operator ) ); + } + + public function data_test_wp_list_filter() { + return array( + 'string instead of array' => array( + 'foo', + array(), + 'AND', + array(), + ), + 'object instead of array' => array( + (object) array( 'foo' ), + array(), + 'AND', + array(), + ), + 'empty args' => array( + array( 'foo', 'bar' ), + array(), + 'AND', + array( 'foo', 'bar' ), + ), + 'invalid operator' => array( + array( + (object) array( 'foo' => 'bar' ), + (object) array( 'foo' => 'baz' ), + ), + array( 'foo' => 'bar' ), + 'XOR', + array(), + ), + 'single argument to match' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + ), + (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( 'foo' => 'bar' ), + 'AND', + array( + 0 => (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + 3 => (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + ), + 'all must match' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + 'bar' => 'baz', + ), + (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + ), + 'AND', + array( + 0 => (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + ), + ), + 'any must match' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + 'bar' => 'baz', + ), + (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'value', + 'bar' => 'baz', + ), + 'OR', + array( + 0 => (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + 2 => (object) array( + 'foo' => 'baz', + 'key' => 'value', + 'bar' => 'baz', + ), + 3 => (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + ), + 'none must match' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + ), + (object) array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'value', + 'bar' => 'baz', + ), + 'NOT', + array( + 1 => (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + ); + } +} diff --git a/tests/phpunit/tests/functions/wpListPluck.php b/tests/phpunit/tests/functions/wpListPluck.php new file mode 100644 index 0000000000000..10c78ed9bd3ff --- /dev/null +++ b/tests/phpunit/tests/functions/wpListPluck.php @@ -0,0 +1,353 @@ +<?php + +/** + * Test wp_list_pluck(). + * + * @group functions.php + * @covers ::wp_list_pluck + */ +class Tests_Functions_wpListPluck extends WP_UnitTestCase { + public $object_list = array(); + public $array_list = array(); + + public function set_up() { + parent::set_up(); + $this->array_list['foo'] = array( + 'name' => 'foo', + 'id' => 'f', + 'field1' => true, + 'field2' => true, + 'field3' => true, + 'field4' => array( 'red' ), + ); + $this->array_list['bar'] = array( + 'name' => 'bar', + 'id' => 'b', + 'field1' => true, + 'field2' => true, + 'field3' => false, + 'field4' => array( 'green' ), + ); + $this->array_list['baz'] = array( + 'name' => 'baz', + 'id' => 'z', + 'field1' => true, + 'field2' => false, + 'field3' => false, + 'field4' => array( 'blue' ), + ); + foreach ( $this->array_list as $key => $value ) { + $this->object_list[ $key ] = (object) $value; + } + } + + public function test_wp_list_pluck_array_and_object() { + $list = wp_list_pluck( $this->object_list, 'name' ); + $this->assertSame( + array( + 'foo' => 'foo', + 'bar' => 'bar', + 'baz' => 'baz', + ), + $list + ); + + $list = wp_list_pluck( $this->array_list, 'name' ); + $this->assertSame( + array( + 'foo' => 'foo', + 'bar' => 'bar', + 'baz' => 'baz', + ), + $list + ); + } + + /** + * @ticket 28666 + */ + public function test_wp_list_pluck_index_key() { + $list = wp_list_pluck( $this->array_list, 'name', 'id' ); + $this->assertSame( + array( + 'f' => 'foo', + 'b' => 'bar', + 'z' => 'baz', + ), + $list + ); + } + + /** + * @ticket 28666 + */ + public function test_wp_list_pluck_object_index_key() { + $list = wp_list_pluck( $this->object_list, 'name', 'id' ); + $this->assertSame( + array( + 'f' => 'foo', + 'b' => 'bar', + 'z' => 'baz', + ), + $list + ); + } + + /** + * @ticket 28666 + */ + public function test_wp_list_pluck_missing_index_key() { + $list = wp_list_pluck( $this->array_list, 'name', 'nonexistent' ); + $this->assertSame( + array( + 0 => 'foo', + 1 => 'bar', + 2 => 'baz', + ), + $list + ); + } + + /** + * @ticket 28666 + */ + public function test_wp_list_pluck_partial_missing_index_key() { + $array_list = $this->array_list; + unset( $array_list['bar']['id'] ); + $list = wp_list_pluck( $array_list, 'name', 'id' ); + $this->assertSame( + array( + 'f' => 'foo', + 0 => 'bar', + 'z' => 'baz', + ), + $list + ); + } + + /** + * @ticket 28666 + */ + public function test_wp_list_pluck_mixed_index_key() { + $mixed_list = $this->array_list; + $mixed_list['bar'] = (object) $mixed_list['bar']; + $list = wp_list_pluck( $mixed_list, 'name', 'id' ); + $this->assertSame( + array( + 'f' => 'foo', + 'b' => 'bar', + 'z' => 'baz', + ), + $list + ); + } + + /** + * @ticket 16895 + */ + public function test_wp_list_pluck_containing_references() { + $ref_list = array( + & $this->object_list['foo'], + & $this->object_list['bar'], + ); + + $this->assertInstanceOf( 'stdClass', $ref_list[0] ); + $this->assertInstanceOf( 'stdClass', $ref_list[1] ); + + $list = wp_list_pluck( $ref_list, 'name' ); + $this->assertSame( + array( + 'foo', + 'bar', + ), + $list + ); + + $this->assertInstanceOf( 'stdClass', $ref_list[0] ); + $this->assertInstanceOf( 'stdClass', $ref_list[1] ); + } + + /** + * @ticket 16895 + */ + public function test_wp_list_pluck_containing_references_keys() { + $ref_list = array( + & $this->object_list['foo'], + & $this->object_list['bar'], + ); + + $this->assertInstanceOf( 'stdClass', $ref_list[0] ); + $this->assertInstanceOf( 'stdClass', $ref_list[1] ); + + $list = wp_list_pluck( $ref_list, 'name', 'id' ); + $this->assertSame( + array( + 'f' => 'foo', + 'b' => 'bar', + ), + $list + ); + + $this->assertInstanceOf( 'stdClass', $ref_list[0] ); + $this->assertInstanceOf( 'stdClass', $ref_list[1] ); + } + + /** + * @dataProvider data_test_wp_list_pluck + * + * @param array $list List of objects or arrays. + * @param int|string $field Field from the object to place instead of the entire object + * @param int|string $index_key Field from the object to use as keys for the new array. + * @param array $expected Expected result. + */ + public function test_wp_list_pluck( $list, $field, $index_key, $expected ) { + $this->assertSameSetsWithIndex( $expected, wp_list_pluck( $list, $field, $index_key ) ); + } + + public function data_test_wp_list_pluck() { + return array( + 'arrays' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + ), + array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + ), + array( 'foo' => 'baz' ), + ), + 'foo', + null, + array( 'bar', 'foo', 'baz' ), + ), + 'arrays with index key' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'key', + array( + 'foo' => 'bar', + 'bar' => 'foo', + 'value' => 'baz', + ), + ), + 'arrays with index key missing' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + ), + array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'key', + array( + 'bar', + 'bar' => 'foo', + 'value' => 'baz', + ), + ), + 'objects' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + ), + (object) array( 'foo' => 'baz' ), + ), + 'foo', + null, + array( 'bar', 'foo', 'baz' ), + ), + 'objects with index key' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + 'key' => 'foo', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'key', + array( + 'foo' => 'bar', + 'bar' => 'foo', + 'value' => 'baz', + ), + ), + 'objects with index key missing' => array( + array( + (object) array( + 'foo' => 'bar', + 'bar' => 'baz', + 'abc' => 'xyz', + ), + (object) array( + 'foo' => 'foo', + '123' => '456', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + (object) array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'key', + array( + 'bar', + 'bar' => 'foo', + 'value' => 'baz', + ), + ), + ); + } +} diff --git a/tests/phpunit/tests/functions/wpListSort.php b/tests/phpunit/tests/functions/wpListSort.php new file mode 100644 index 0000000000000..7159af4937687 --- /dev/null +++ b/tests/phpunit/tests/functions/wpListSort.php @@ -0,0 +1,660 @@ +<?php + +/** + * Test wp_list_sort(). + * + * @group functions.php + * @covers ::wp_list_sort + */ +class Tests_Functions_wpListSort extends WP_UnitTestCase { + + /** + * @dataProvider data_test_wp_list_sort + * + * @param string|array $orderby Either the field name to order by or an array + * of multiple orderby fields as $orderby => $order. + * @param string $order Either 'ASC' or 'DESC'. + */ + public function test_wp_list_sort( $list, $orderby, $order, $expected ) { + $this->assertSame( $expected, wp_list_sort( $list, $orderby, $order ) ); + } + + public function data_test_wp_list_sort() { + return array( + 'single orderby ascending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'ASC', + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'single orderby descending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'DESC', + array( + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + ), + ), + 'single orderby array ascending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + array( 'foo' => 'ASC' ), + 'IGNORED', + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'single orderby array descending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + array( 'foo' => 'DESC' ), + 'IGNORED', + array( + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'baz', + 'key' => 'value', + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + ), + ), + 'multiple orderby ascending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'ASC', + 'foo' => 'ASC', + ), + 'IGNORED', + array( + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + ), + 'multiple orderby descending' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'DESC', + 'foo' => 'DESC', + ), + 'IGNORED', + array( + array( + 'foo' => 'bar', + 'key' => 'value', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'multiple orderby mixed' => array( + array( + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'DESC', + 'foo' => 'ASC', + ), + 'IGNORED', + array( + array( + 'foo' => 'bar', + 'key' => 'value', + ), + array( + 'foo' => 'baz', + 'key' => 'key', + ), + array( + 'foo' => 'foo', + 'key' => 'key', + ), + array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + ); + } + + /** + * @dataProvider data_test_wp_list_sort_preserve_keys + * + * @param string|array $orderby Either the field name to order by or an array + * of multiple orderby fields as $orderby => $order. + * @param string $order Either 'ASC' or 'DESC'. + */ + public function test_wp_list_sort_preserve_keys( $list, $orderby, $order, $expected ) { + $this->assertSame( $expected, wp_list_sort( $list, $orderby, $order, true ) ); + } + + public function data_test_wp_list_sort_preserve_keys() { + return array( + 'single orderby ascending' => array( + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'ASC', + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'single orderby descending' => array( + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + 'foo', + 'DESC', + array( + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + ), + ), + 'single orderby array ascending' => array( + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + array( 'foo' => 'ASC' ), + 'IGNORED', + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'single orderby array descending' => array( + array( + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + ), + array( 'foo' => 'DESC' ), + 'IGNORED', + array( + 'foofoo' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobaz' => array( + 'foo' => 'baz', + 'key' => 'value', + ), + 'foobar' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + ), + ), + 'multiple orderby ascending' => array( + array( + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'ASC', + 'foo' => 'ASC', + ), + 'IGNORED', + array( + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + ), + 'multiple orderby descending' => array( + array( + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'DESC', + 'foo' => 'DESC', + ), + 'IGNORED', + array( + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + 'multiple orderby mixed' => array( + array( + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + ), + array( + 'key' => 'DESC', + 'foo' => 'ASC', + ), + 'IGNORED', + array( + 'foobarvalue' => array( + 'foo' => 'bar', + 'key' => 'value', + ), + 'foobazkey' => array( + 'foo' => 'baz', + 'key' => 'key', + ), + 'foofookey' => array( + 'foo' => 'foo', + 'key' => 'key', + ), + 'foobarfoo' => array( + 'foo' => 'bar', + 'bar' => 'baz', + 'key' => 'foo', + ), + 'foofoobar' => array( + 'foo' => 'foo', + 'lorem' => 'ipsum', + 'key' => 'bar', + ), + ), + ), + ); + } +} diff --git a/tests/phpunit/tests/functions/wpListUtil.php b/tests/phpunit/tests/functions/wpListUtil.php index ef7ac45620bdc..45cad6627aa38 100644 --- a/tests/phpunit/tests/functions/wpListUtil.php +++ b/tests/phpunit/tests/functions/wpListUtil.php @@ -1,1037 +1,35 @@ <?php /** + * Test WP_List_Util class. + * * @group functions.php */ -class Tests_WP_List_Util extends WP_UnitTestCase { - public function data_test_wp_list_pluck() { - return array( - 'arrays' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - ), - array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - ), - array( 'foo' => 'baz' ), - ), - 'foo', - null, - array( 'bar', 'foo', 'baz' ), - ), - 'arrays with index key' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'key', - array( - 'foo' => 'bar', - 'bar' => 'foo', - 'value' => 'baz', - ), - ), - 'arrays with index key missing' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - ), - array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'key', - array( - 'bar' => 'foo', - 'value' => 'baz', - 'bar', - ), - ), - 'objects' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - ), - (object) array( 'foo' => 'baz' ), - ), - 'foo', - null, - array( 'bar', 'foo', 'baz' ), - ), - 'objects with index key' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'key', - array( - 'foo' => 'bar', - 'bar' => 'foo', - 'value' => 'baz', - ), - ), - 'objects with index key missing' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'key', - array( - 'bar' => 'foo', - 'value' => 'baz', - 'bar', - ), - ), - ); - } +class Tests_Functions_wpListUtil extends WP_UnitTestCase { /** - * @dataProvider data_test_wp_list_pluck - * - * @param array $list List of objects or arrays. - * @param int|string $field Field from the object to place instead of the entire object - * @param int|string $index_key Field from the object to use as keys for the new array. - * @param array $expected Expected result. + * @covers WP_List_Util::get_input */ - public function test_wp_list_pluck( $list, $field, $index_key, $expected ) { - $this->assertEqualSetsWithIndex( $expected, wp_list_pluck( $list, $field, $index_key ) ); - } - - public function data_test_wp_list_filter() { - return array( - 'string instead of array' => array( - 'foo', - array(), - 'AND', - array(), - ), - 'object instead of array' => array( - (object) array( 'foo' ), - array(), - 'AND', - array(), - ), - 'empty args' => array( - array( 'foo', 'bar' ), - array(), - 'AND', - array( 'foo', 'bar' ), - ), - 'invalid operator' => array( - array( - (object) array( 'foo' => 'bar' ), - (object) array( 'foo' => 'baz' ), - ), - array( 'foo' => 'bar' ), - 'XOR', - array(), - ), - 'single argument to match' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - ), - (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( 'foo' => 'bar' ), - 'AND', - array( - 0 => (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - 3 => (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - ), - 'all must match' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - 'bar' => 'baz', - ), - (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - ), - 'AND', - array( - 0 => (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - ), - ), - 'any must match' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - 'bar' => 'baz', - ), - (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'value', - 'bar' => 'baz', - ), - 'OR', - array( - 0 => (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - 2 => (object) array( - 'foo' => 'baz', - 'key' => 'value', - 'bar' => 'baz', - ), - 3 => (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - ), - 'none must match' => array( - array( - (object) array( - 'foo' => 'bar', - 'bar' => 'baz', - 'abc' => 'xyz', - 'key' => 'foo', - ), - (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - (object) array( - 'foo' => 'baz', - 'key' => 'value', - ), - (object) array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'value', - 'bar' => 'baz', - ), - 'NOT', - array( - 1 => (object) array( - 'foo' => 'foo', - '123' => '456', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - ); - } - - /** - * @dataProvider data_test_wp_list_filter - * - * @param array $list An array of objects to filter. - * @param array $args An array of key => value arguments to match - * against each object. - * @param string $operator The logical operation to perform. - * @param array $expected Expected result. - */ - public function test_wp_list_filter( $list, $args, $operator, $expected ) { - $this->assertEqualSetsWithIndex( $expected, wp_list_filter( $list, $args, $operator ) ); - } - - public function data_test_wp_list_sort() { - return array( - 'single orderby ascending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'ASC', - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'single orderby descending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'DESC', - array( - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - ), - ), - 'single orderby array ascending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - array( 'foo' => 'ASC' ), - 'IGNORED', - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'single orderby array descending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - array( 'foo' => 'DESC' ), - 'IGNORED', - array( - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'baz', - 'key' => 'value', - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - ), - ), - 'multiple orderby ascending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'ASC', - 'foo' => 'ASC', - ), - 'IGNORED', - array( - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - ), - 'multiple orderby descending' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'DESC', - 'foo' => 'DESC', - ), - 'IGNORED', - array( - array( - 'foo' => 'bar', - 'key' => 'value', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'multiple orderby mixed' => array( - array( - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'DESC', - 'foo' => 'ASC', - ), - 'IGNORED', - array( - array( - 'foo' => 'bar', - 'key' => 'value', - ), - array( - 'foo' => 'baz', - 'key' => 'key', - ), - array( - 'foo' => 'foo', - 'key' => 'key', - ), - array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - ); - } - - /** - * @dataProvider data_test_wp_list_sort - * - * @param string|array $orderby Either the field name to order by or an array - * of multiple orderby fields as $orderby => $order. - * @param string $order Either 'ASC' or 'DESC'. - */ - public function test_wp_list_sort( $list, $orderby, $order, $expected ) { - $this->assertEquals( $expected, wp_list_sort( $list, $orderby, $order ) ); - } - - public function data_test_wp_list_sort_preserve_keys() { - return array( - 'single orderby ascending' => array( - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'ASC', - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'single orderby descending' => array( - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - 'foo', - 'DESC', - array( - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - ), - ), - 'single orderby array ascending' => array( - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - array( 'foo' => 'ASC' ), - 'IGNORED', - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'single orderby array descending' => array( - array( - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - ), - array( 'foo' => 'DESC' ), - 'IGNORED', - array( - 'foofoo' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobaz' => array( - 'foo' => 'baz', - 'key' => 'value', - ), - 'foobar' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - ), - ), - 'multiple orderby ascending' => array( - array( - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'ASC', - 'foo' => 'ASC', - ), - 'IGNORED', - array( - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - ), - 'multiple orderby descending' => array( - array( - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'DESC', - 'foo' => 'DESC', - ), - 'IGNORED', - array( - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - 'multiple orderby mixed' => array( - array( - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - ), - array( - 'key' => 'DESC', - 'foo' => 'ASC', - ), - 'IGNORED', - array( - 'foobarvalue' => array( - 'foo' => 'bar', - 'key' => 'value', - ), - 'foobazkey' => array( - 'foo' => 'baz', - 'key' => 'key', - ), - 'foofookey' => array( - 'foo' => 'foo', - 'key' => 'key', - ), - 'foobarfoo' => array( - 'foo' => 'bar', - 'bar' => 'baz', - 'key' => 'foo', - ), - 'foofoobar' => array( - 'foo' => 'foo', - 'lorem' => 'ipsum', - 'key' => 'bar', - ), - ), - ), - ); - } - - /** - * @dataProvider data_test_wp_list_sort_preserve_keys - * - * @param string|array $orderby Either the field name to order by or an array - * of multiple orderby fields as $orderby => $order. - * @param string $order Either 'ASC' or 'DESC'. - */ - public function test_wp_list_sort_preserve_keys( $list, $orderby, $order, $expected ) { - $this->assertEquals( $expected, wp_list_sort( $list, $orderby, $order, true ) ); - } - public function test_wp_list_util_get_input() { $input = array( 'foo', 'bar' ); $util = new WP_List_Util( $input ); - $this->assertEqualSets( $input, $util->get_input() ); + $this->assertSameSets( $input, $util->get_input() ); } + /** + * @covers WP_List_Util::get_output + */ public function test_wp_list_util_get_output_immediately() { $input = array( 'foo', 'bar' ); $util = new WP_List_Util( $input ); - $this->assertEqualSets( $input, $util->get_output() ); + $this->assertSameSets( $input, $util->get_output() ); } + /** + * @covers WP_List_Util::get_output + */ public function test_wp_list_util_get_output() { $expected = array( (object) array( diff --git a/tests/phpunit/tests/functions/wpNonceAys.php b/tests/phpunit/tests/functions/wpNonceAys.php new file mode 100644 index 0000000000000..06b807da42685 --- /dev/null +++ b/tests/phpunit/tests/functions/wpNonceAys.php @@ -0,0 +1,34 @@ +<?php + +/** + * Tests for the wp_nonce_ays() function. + * + * @since 5.9.0 + * + * @group functions.php + * @covers ::wp_nonce_ays + */ +class Tests_Functions_wpNonceAys extends WP_UnitTestCase { + + /** + * @ticket 53882 + */ + public function test_wp_nonce_ays() { + $this->expectException( 'WPDieException' ); + $this->expectExceptionMessage( 'The link you followed has expired.' ); + $this->expectExceptionCode( 403 ); + + wp_nonce_ays( 'random_string' ); + } + + /** + * @ticket 53882 + */ + public function test_wp_nonce_ays_log_out() { + $this->expectException( 'WPDieException' ); + $this->expectExceptionMessageMatches( '#You are attempting to log out of Test Blog</p><p>Do you really want to <a href="http://example\.org/wp-login\.php\?action=logout&_wpnonce=.{10}">log out</a>\?#m' ); + $this->expectExceptionCode( 403 ); + + wp_nonce_ays( 'log-out' ); + } +} diff --git a/tests/phpunit/tests/functions/wpRemoteFopen.php b/tests/phpunit/tests/functions/wpRemoteFopen.php index b5627da800ee8..e29c9d31813ff 100644 --- a/tests/phpunit/tests/functions/wpRemoteFopen.php +++ b/tests/phpunit/tests/functions/wpRemoteFopen.php @@ -3,8 +3,9 @@ * @group http * @group external-http * @group functions.php + * @covers ::wp_remote_fopen */ -class Tests_Functions_wp_remote_fopen extends WP_UnitTestCase { +class Tests_Functions_wpRemoteFopen extends WP_UnitTestCase { /** * @ticket 48845 @@ -28,7 +29,7 @@ public function test_wp_remote_fopen() { $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; $response = wp_remote_fopen( $url ); - $this->assertInternalType( 'string', $response ); - $this->assertEquals( 40148, strlen( $response ) ); + $this->assertIsString( $response ); + $this->assertSame( 40148, strlen( $response ) ); } } diff --git a/tests/phpunit/tests/functions/wpToKebabCase.php b/tests/phpunit/tests/functions/wpToKebabCase.php new file mode 100644 index 0000000000000..24b2e2d187951 --- /dev/null +++ b/tests/phpunit/tests/functions/wpToKebabCase.php @@ -0,0 +1,40 @@ +<?php + +/** + * Tests for the _wp_to_kebab_case() function + * + * @since 5.8.0 + * + * @group functions.php + * @covers ::_wp_to_kebab_case + */ +class Tests_Functions_wpToKebabCase extends WP_UnitTestCase { + + public function test_wp_to_kebab_case() { + $this->assertSame( 'white', _wp_to_kebab_case( 'white' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white+black' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white:black' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white*black' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white.black' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white black' ) ); + $this->assertSame( 'white-black', _wp_to_kebab_case( 'white black' ) ); + $this->assertSame( 'white-to-black', _wp_to_kebab_case( 'white-to-black' ) ); + $this->assertSame( 'white-2-white', _wp_to_kebab_case( 'white2white' ) ); + $this->assertSame( 'white-2nd', _wp_to_kebab_case( 'white2nd' ) ); + $this->assertSame( 'white-2-ndcolor', _wp_to_kebab_case( 'white2ndcolor' ) ); + $this->assertSame( 'white-2nd-color', _wp_to_kebab_case( 'white2ndColor' ) ); + $this->assertSame( 'white-2nd-color', _wp_to_kebab_case( 'white2nd_color' ) ); + $this->assertSame( 'white-23-color', _wp_to_kebab_case( 'white23color' ) ); + $this->assertSame( 'white-23', _wp_to_kebab_case( 'white23' ) ); + $this->assertSame( '23-color', _wp_to_kebab_case( '23color' ) ); + $this->assertSame( 'white-4th', _wp_to_kebab_case( 'white4th' ) ); + $this->assertSame( 'font-2-xl', _wp_to_kebab_case( 'font2xl' ) ); + $this->assertSame( 'white-to-white', _wp_to_kebab_case( 'whiteToWhite' ) ); + $this->assertSame( 'white-t-owhite', _wp_to_kebab_case( 'whiteTOwhite' ) ); + $this->assertSame( 'whit-eto-white', _wp_to_kebab_case( 'WHITEtoWHITE' ) ); + $this->assertSame( '42', _wp_to_kebab_case( 42 ) ); + $this->assertSame( 'ive-done', _wp_to_kebab_case( "i've done" ) ); + $this->assertSame( 'ffffff', _wp_to_kebab_case( '#ffffff' ) ); + $this->assertSame( 'ffffff', _wp_to_kebab_case( '$ffffff' ) ); + } +} diff --git a/tests/phpunit/tests/functions/wpValidateBoolean.php b/tests/phpunit/tests/functions/wpValidateBoolean.php index 833b73142575e..785d1bc98641e 100644 --- a/tests/phpunit/tests/functions/wpValidateBoolean.php +++ b/tests/phpunit/tests/functions/wpValidateBoolean.php @@ -3,16 +3,16 @@ /** * Tests the wp_validate_boolean function. * - * @covers ::wp_validate_boolean * @group functions.php + * @covers ::wp_validate_boolean */ -class Tests_Functions_WpValidateBoolean extends WP_UnitTestCase { +class Tests_Functions_wpValidateBoolean extends WP_UnitTestCase { /** * Provides test scenarios for all possible scenarios in wp_validate_boolean(). * * @return array */ - function data_provider() { + public function data_provider() { $std = new \stdClass(); return array( @@ -47,8 +47,8 @@ function data_provider() { * * @dataProvider data_provider * - * @param mixed $test_value. - * @param bool $expected. + * @param mixed $test_value + * @param bool $expected * * @ticket 30238 * @ticket 39868 diff --git a/tests/phpunit/tests/general/paginateLinks.php b/tests/phpunit/tests/general/paginateLinks.php index 95692a0524607..516afa25b9fd9 100644 --- a/tests/phpunit/tests/general/paginateLinks.php +++ b/tests/phpunit/tests/general/paginateLinks.php @@ -1,16 +1,21 @@ <?php -class Tests_Paginate_Links extends WP_UnitTestCase { +/** + * @group general + * @group template + * @covers ::paginate_links + */ +class Tests_General_PaginateLinks extends WP_UnitTestCase { private $i18n_count = 0; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->go_to( home_url( '/' ) ); } - function test_defaults() { + public function test_defaults() { $page2 = get_pagenum_link( 2 ); $page3 = get_pagenum_link( 3 ); $page50 = get_pagenum_link( 50 ); @@ -25,10 +30,10 @@ function test_defaults() { EXPECTED; $links = paginate_links( array( 'total' => 50 ) ); - $this->assertEqualsIgnoreEOL( $expected, $links ); + $this->assertSameIgnoreEOL( $expected, $links ); } - function test_format() { + public function test_format() { $page2 = home_url( '/page/2/' ); $page3 = home_url( '/page/3/' ); $page50 = home_url( '/page/50/' ); @@ -48,10 +53,10 @@ function test_format() { 'format' => 'page/%#%/', ) ); - $this->assertEqualsIgnoreEOL( $expected, $links ); + $this->assertSameIgnoreEOL( $expected, $links ); } - function test_prev_next_false() { + public function test_prev_next_false() { $home = home_url( '/' ); $page3 = get_pagenum_link( 3 ); $page4 = get_pagenum_link( 4 ); @@ -73,10 +78,10 @@ function test_prev_next_false() { 'current' => 2, ) ); - $this->assertEqualsIgnoreEOL( $expected, $links ); + $this->assertSameIgnoreEOL( $expected, $links ); } - function test_prev_next_true() { + public function test_prev_next_true() { $home = home_url( '/' ); $page3 = get_pagenum_link( 3 ); $page4 = get_pagenum_link( 4 ); @@ -100,17 +105,17 @@ function test_prev_next_true() { 'current' => 2, ) ); - $this->assertEqualsIgnoreEOL( $expected, $links ); + $this->assertSameIgnoreEOL( $expected, $links ); } - function increment_i18n_count() { + public function increment_i18n_count() { $this->i18n_count += 1; } /** * @ticket 25735 */ - function test_paginate_links_number_format() { + public function test_paginate_links_number_format() { $this->i18n_count = 0; add_filter( 'number_format_i18n', array( $this, 'increment_i18n_count' ) ); paginate_links( @@ -125,14 +130,14 @@ function test_paginate_links_number_format() { ); // The links should be: // < Previous 1 ... 49 50 51 ... 100 Next > - $this->assertEquals( 5, $this->i18n_count ); + $this->assertSame( 5, $this->i18n_count ); remove_filter( 'number_format_i18n', array( $this, 'increment_i18n_count' ) ); } /** * @ticket 24606 */ - function test_paginate_links_base_value() { + public function test_paginate_links_base_value() { // Current page: 2. $links = paginate_links( @@ -170,8 +175,8 @@ function test_paginate_links_base_value() { $href = $tag->attributes->getNamedItem( 'href' )->value; $class = $tag->attributes->getNamedItem( 'class' )->value; - $this->assertEquals( $attributes['href'], $href ); - $this->assertEquals( $attributes['class'], $class ); + $this->assertSame( $attributes['href'], $href ); + $this->assertSame( $attributes['class'], $class ); } // Current page: 1. @@ -190,17 +195,17 @@ function test_paginate_links_base_value() { $this->assertNotNull( $tag ); $class = $tag->attributes->getNamedItem( 'class' )->value; - $this->assertEquals( 'page-numbers current', $class ); + $this->assertSame( 'page-numbers current', $class ); $document->loadHTML( $links[1] ); $tag = $document->getElementsByTagName( 'a' )->item( 0 ); $this->assertNotNull( $tag ); $href = $tag->attributes->getNamedItem( 'href' )->value; - $this->assertEquals( get_pagenum_link( 2 ), $href ); + $this->assertSame( get_pagenum_link( 2 ), $href ); } - function add_query_arg( $url ) { + public function add_query_arg( $url ) { return add_query_arg( array( 'foo' => 'bar', @@ -213,7 +218,7 @@ function add_query_arg( $url ) { /** * @ticket 29636 */ - function test_paginate_links_query_args() { + public function test_paginate_links_query_args() { add_filter( 'get_pagenum_link', array( $this, 'add_query_arg' ) ); $links = paginate_links( array( @@ -244,14 +249,14 @@ function test_paginate_links_query_args() { $this->assertNotNull( $tag ); $href = $tag->attributes->getNamedItem( 'href' )->value; - $this->assertEquals( $expected_href, $href ); + $this->assertSame( $expected_href, $href ); } } /** * @ticket 30831 */ - function test_paginate_links_with_custom_query_args() { + public function test_paginate_links_with_custom_query_args() { add_filter( 'get_pagenum_link', array( $this, 'add_query_arg' ) ); $links = paginate_links( array( @@ -284,7 +289,7 @@ function test_paginate_links_with_custom_query_args() { $this->assertNotNull( $tag ); $href = $tag->attributes->getNamedItem( 'href' )->value; - $this->assertEquals( $expected_href, $href ); + $this->assertSame( $expected_href, $href ); } } @@ -306,10 +311,10 @@ public function test_paginate_links_should_allow_non_default_format_without_add_ ) ); - $this->assertContains( '?foo=1', $links[1] ); - $this->assertContains( '?foo=2', $links[2] ); - $this->assertContains( '?foo=4', $links[4] ); - $this->assertContains( '?foo=5', $links[5] ); + $this->assertStringContainsString( '?foo=1', $links[1] ); + $this->assertStringContainsString( '?foo=2', $links[2] ); + $this->assertStringContainsString( '?foo=4', $links[4] ); + $this->assertStringContainsString( '?foo=5', $links[5] ); $_SERVER['REQUEST_URI'] = $request_uri; } diff --git a/tests/phpunit/tests/general/template.php b/tests/phpunit/tests/general/template.php index 170a86d9f9335..ca2e6063a1397 100644 --- a/tests/phpunit/tests/general/template.php +++ b/tests/phpunit/tests/general/template.php @@ -2,6 +2,7 @@ /** * A set of unit tests for functions in wp-includes/general-template.php * + * @group general * @group template * @group site_icon */ @@ -16,56 +17,62 @@ class Tests_General_Template extends WP_UnitTestCase { public $custom_logo_id; public $custom_logo_url; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->wp_site_icon = new WP_Site_Icon(); } - function tearDown() { + public function tear_down() { global $wp_customize; - $this->_remove_custom_logo(); - $this->_remove_site_icon(); + $this->remove_custom_logo(); + $this->remove_site_icon(); $wp_customize = null; - parent::tearDown(); + parent::tear_down(); } /** * @group site_icon + * @covers ::get_site_icon_url + * @requires function imagejpeg */ - function test_get_site_icon_url() { + public function test_get_site_icon_url() { $this->assertEmpty( get_site_icon_url() ); - $this->_set_site_icon(); - $this->assertEquals( $this->site_icon_url, get_site_icon_url() ); + $this->set_site_icon(); + $this->assertSame( $this->site_icon_url, get_site_icon_url() ); - $this->_remove_site_icon(); + $this->remove_site_icon(); $this->assertEmpty( get_site_icon_url() ); } /** * @group site_icon + * @covers ::site_icon_url + * @requires function imagejpeg */ - function test_site_icon_url() { + public function test_site_icon_url() { $this->expectOutputString( '' ); site_icon_url(); - $this->_set_site_icon(); + $this->set_site_icon(); $this->expectOutputString( $this->site_icon_url ); site_icon_url(); } /** * @group site_icon + * @covers ::has_site_icon + * @requires function imagejpeg */ - function test_has_site_icon() { + public function test_has_site_icon() { $this->assertFalse( has_site_icon() ); - $this->_set_site_icon(); + $this->set_site_icon(); $this->assertTrue( has_site_icon() ); - $this->_remove_site_icon(); + $this->remove_site_icon(); $this->assertFalse( has_site_icon() ); } @@ -73,11 +80,12 @@ function test_has_site_icon() { * @group site_icon * @group multisite * @group ms-required + * @covers ::has_site_icon */ - function test_has_site_icon_returns_true_when_called_for_other_site_with_site_icon_set() { + public function test_has_site_icon_returns_true_when_called_for_other_site_with_site_icon_set() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); - $this->_set_site_icon(); + $this->set_site_icon(); restore_current_blog(); $this->assertTrue( has_site_icon( $blog_id ) ); @@ -87,8 +95,9 @@ function test_has_site_icon_returns_true_when_called_for_other_site_with_site_ic * @group site_icon * @group multisite * @group ms-required + * @covers ::has_site_icon */ - function test_has_site_icon_returns_false_when_called_for_other_site_without_site_icon_set() { + public function test_has_site_icon_returns_false_when_called_for_other_site_without_site_icon_set() { $blog_id = $this->factory->blog->create(); $this->assertFalse( has_site_icon( $blog_id ) ); @@ -96,12 +105,14 @@ function test_has_site_icon_returns_false_when_called_for_other_site_without_sit /** * @group site_icon + * @covers ::wp_site_icon + * @requires function imagejpeg */ - function test_wp_site_icon() { + public function test_wp_site_icon() { $this->expectOutputString( '' ); wp_site_icon(); - $this->_set_site_icon(); + $this->set_site_icon(); $output = array( sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( get_site_icon_url( 32 ) ) ), sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( get_site_icon_url( 192 ) ) ), @@ -117,12 +128,14 @@ function test_wp_site_icon() { /** * @group site_icon + * @covers ::wp_site_icon + * @requires function imagejpeg */ - function test_wp_site_icon_with_filter() { + public function test_wp_site_icon_with_filter() { $this->expectOutputString( '' ); wp_site_icon(); - $this->_set_site_icon(); + $this->set_site_icon(); $output = array( sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( get_site_icon_url( 32 ) ) ), sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( get_site_icon_url( 192 ) ) ), @@ -134,16 +147,17 @@ function test_wp_site_icon_with_filter() { $output = implode( "\n", $output ); $this->expectOutputString( $output ); - add_filter( 'site_icon_meta_tags', array( $this, '_custom_site_icon_meta_tag' ) ); + add_filter( 'site_icon_meta_tags', array( $this, 'custom_site_icon_meta_tag' ) ); wp_site_icon(); - remove_filter( 'site_icon_meta_tags', array( $this, '_custom_site_icon_meta_tag' ) ); + remove_filter( 'site_icon_meta_tags', array( $this, 'custom_site_icon_meta_tag' ) ); } /** - * @group site_icon * @ticket 38377 + * @group site_icon + * @covers ::wp_site_icon */ - function test_customize_preview_wp_site_icon_empty() { + public function test_customize_preview_wp_site_icon_empty() { global $wp_customize; wp_set_current_user( $this->factory()->user->create( array( 'role' => 'administrator' ) ) ); @@ -157,10 +171,11 @@ function test_customize_preview_wp_site_icon_empty() { } /** - * @group site_icon * @ticket 38377 + * @group site_icon + * @covers ::wp_site_icon */ - function test_customize_preview_wp_site_icon_dirty() { + public function test_customize_preview_wp_site_icon_dirty() { global $wp_customize; wp_set_current_user( $this->factory()->user->create( array( 'role' => 'administrator' ) ) ); @@ -169,7 +184,7 @@ function test_customize_preview_wp_site_icon_dirty() { $wp_customize->register_controls(); $wp_customize->start_previewing_theme(); - $attachment_id = $this->_insert_attachment(); + $attachment_id = $this->insert_attachment(); $wp_customize->set_post_value( 'site_icon', $attachment_id ); $wp_customize->get_setting( 'site_icon' )->preview(); $output = array( @@ -192,7 +207,7 @@ function test_customize_preview_wp_site_icon_dirty() { * @param $meta_tags * @return array */ - function _custom_site_icon_meta_tag( $meta_tags ) { + public function custom_site_icon_meta_tag( $meta_tags ) { $meta_tags[] = sprintf( '<link rel="apple-touch-icon" sizes="150x150" href="%s" />', esc_url( get_site_icon_url( 150 ) ) ); return $meta_tags; @@ -203,10 +218,10 @@ function _custom_site_icon_meta_tag( $meta_tags ) { * * @since 4.3.0 */ - function _set_site_icon() { + private function set_site_icon() { if ( ! $this->site_icon_id ) { add_filter( 'intermediate_image_sizes_advanced', array( $this->wp_site_icon, 'additional_sizes' ) ); - $this->_insert_attachment(); + $this->insert_attachment(); remove_filter( 'intermediate_image_sizes_advanced', array( $this->wp_site_icon, 'additional_sizes' ) ); } @@ -218,7 +233,7 @@ function _set_site_icon() { * * @since 4.3.0 */ - function _remove_site_icon() { + private function remove_site_icon() { delete_option( 'site_icon' ); } @@ -227,7 +242,7 @@ function _remove_site_icon() { * * @since 4.3.0 */ - function _insert_attachment() { + private function insert_attachment() { $filename = DIR_TESTDATA . '/images/test-image.jpg'; $contents = file_get_contents( $filename ); @@ -241,16 +256,17 @@ function _insert_attachment() { /** * @group custom_logo + * @covers ::has_custom_logo * * @since 4.5.0 */ - function test_has_custom_logo() { + public function test_has_custom_logo() { $this->assertFalse( has_custom_logo() ); - $this->_set_custom_logo(); + $this->set_custom_logo(); $this->assertTrue( has_custom_logo() ); - $this->_remove_custom_logo(); + $this->remove_custom_logo(); $this->assertFalse( has_custom_logo() ); } @@ -258,11 +274,12 @@ function test_has_custom_logo() { * @group custom_logo * @group multisite * @group ms-required + * @covers ::has_custom_logo */ - function test_has_custom_logo_returns_true_when_called_for_other_site_with_custom_logo_set() { + public function test_has_custom_logo_returns_true_when_called_for_other_site_with_custom_logo_set() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); - $this->_set_custom_logo(); + $this->set_custom_logo(); restore_current_blog(); $this->assertTrue( has_custom_logo( $blog_id ) ); @@ -272,8 +289,9 @@ function test_has_custom_logo_returns_true_when_called_for_other_site_with_custo * @group custom_logo * @group multisite * @group ms-required + * @covers ::has_custom_logo */ - function test_has_custom_logo_returns_false_when_called_for_other_site_without_custom_logo_set() { + public function test_has_custom_logo_returns_false_when_called_for_other_site_without_custom_logo_set() { $blog_id = $this->factory->blog->create(); $this->assertFalse( has_custom_logo( $blog_id ) ); @@ -281,18 +299,19 @@ function test_has_custom_logo_returns_false_when_called_for_other_site_without_c /** * @group custom_logo + * @covers ::get_custom_logo * * @since 4.5.0 */ - function test_get_custom_logo() { + public function test_get_custom_logo() { $this->assertEmpty( get_custom_logo() ); - $this->_set_custom_logo(); + $this->set_custom_logo(); $custom_logo = get_custom_logo(); $this->assertNotEmpty( $custom_logo ); - $this->assertInternalType( 'string', $custom_logo ); + $this->assertIsString( $custom_logo ); - $this->_remove_custom_logo(); + $this->remove_custom_logo(); $this->assertEmpty( get_custom_logo() ); } @@ -300,15 +319,17 @@ function test_get_custom_logo() { * @group custom_logo * @group multisite * @group ms-required + * @covers ::get_custom_logo */ - function test_get_custom_logo_returns_logo_when_called_for_other_site_with_custom_logo_set() { + public function test_get_custom_logo_returns_logo_when_called_for_other_site_with_custom_logo_set() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); - $this->_set_custom_logo(); + $this->set_custom_logo(); $custom_logo_attr = array( - 'class' => 'custom-logo', + 'class' => 'custom-logo', + 'loading' => false, ); // If the logo alt attribute is empty, use the site title. @@ -322,22 +343,24 @@ function test_get_custom_logo_returns_logo_when_called_for_other_site_with_custo restore_current_blog(); $expected_custom_logo = '<a href="' . $home_url . '" class="custom-logo-link" rel="home">' . $image . '</a>'; - $this->assertEquals( $expected_custom_logo, get_custom_logo( $blog_id ) ); + $this->assertSame( $expected_custom_logo, get_custom_logo( $blog_id ) ); } /** * @group custom_logo + * @covers ::the_custom_logo * * @since 4.5.0 */ - function test_the_custom_logo() { + public function test_the_custom_logo() { $this->expectOutputString( '' ); the_custom_logo(); - $this->_set_custom_logo(); + $this->set_custom_logo(); $custom_logo_attr = array( - 'class' => 'custom-logo', + 'class' => 'custom-logo', + 'loading' => false, ); // If the logo alt attribute is empty, use the site title. @@ -353,11 +376,12 @@ function test_the_custom_logo() { } /** - * @group custom_logo * @ticket 38768 + * @group custom_logo + * @covers ::the_custom_logo */ - function test_the_custom_logo_with_alt() { - $this->_set_custom_logo(); + public function test_the_custom_logo_with_alt() { + $this->set_custom_logo(); $image_alt = 'My alt attribute'; @@ -368,7 +392,8 @@ function test_the_custom_logo_with_alt() { 'full', false, array( - 'class' => 'custom-logo', + 'class' => 'custom-logo', + 'loading' => false, ) ); @@ -381,9 +406,9 @@ function test_the_custom_logo_with_alt() { * * @since 4.5.0 */ - function _set_custom_logo() { + private function set_custom_logo() { if ( ! $this->custom_logo_id ) { - $this->_insert_custom_logo(); + $this->insert_custom_logo(); } set_theme_mod( 'custom_logo', $this->custom_logo_id ); @@ -394,7 +419,7 @@ function _set_custom_logo() { * * @since 4.5.0 */ - function _remove_custom_logo() { + private function remove_custom_logo() { remove_theme_mod( 'custom_logo' ); } @@ -403,7 +428,7 @@ function _remove_custom_logo() { * * @since 4.5.0 */ - function _insert_custom_logo() { + private function insert_custom_logo() { $filename = DIR_TESTDATA . '/images/test-image.jpg'; $contents = file_get_contents( $filename ); $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); @@ -414,153 +439,12 @@ function _insert_custom_logo() { return $this->custom_logo_id; } - /** - * Test get_the_modified_time - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_time_default() { - $details = array( - 'post_date' => '2016-01-21 15:34:36', - 'post_date_gmt' => '2016-01-21 15:34:36', - ); - $post_id = $this->factory->post->create( $details ); - $post = get_post( $post_id ); - - $GLOBALS['post'] = $post; - - $expected = '1453390476'; - $format = 'G'; - $actual = get_the_modified_time( $format ); - $this->assertEquals( $expected, $actual ); - } - - /** - * Test get_the_modified_time failures are filtered - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_time_failures_are_filtered() { - // Remove global post object. - $GLOBALS['post'] = null; - - $expected = 'filtered modified time failure result'; - add_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) ); - $actual = get_the_modified_time(); - $this->assertEquals( $expected, $actual ); - remove_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) ); - } - - function _filter_get_the_modified_time_failure( $the_time ) { - $expected = false; - $actual = $the_time; - $this->assertEquals( $expected, $actual ); - - if ( false === $the_time ) { - return 'filtered modified time failure result'; - } - return $the_time; - } - - /** - * Test get_the_modified_time with post_id parameter. - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_date_with_post_id() { - $details = array( - 'post_date' => '2016-01-21 15:34:36', - 'post_date_gmt' => '2016-01-21 15:34:36', - ); - $post_id = $this->factory->post->create( $details ); - $format = 'Y-m-d'; - $expected = '2016-01-21'; - $actual = get_the_modified_date( $format, $post_id ); - $this->assertEquals( $expected, $actual ); - } - - /** - * Test get_the_modified_date - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_date_default() { - $details = array( - 'post_date' => '2016-01-21 15:34:36', - 'post_date_gmt' => '2016-01-21 15:34:36', - ); - $post_id = $this->factory->post->create( $details ); - $post = get_post( $post_id ); - - $GLOBALS['post'] = $post; - - $expected = '2016-01-21'; - $format = 'Y-m-d'; - $actual = get_the_modified_date( $format ); - $this->assertEquals( $expected, $actual ); - } - - /** - * Test get_the_modified_date failures are filtered - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_date_failures_are_filtered() { - // Remove global post object. - $GLOBALS['post'] = null; - - $expected = 'filtered modified date failure result'; - add_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) ); - $actual = get_the_modified_date(); - $this->assertEquals( $expected, $actual ); - remove_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) ); - } - - function _filter_get_the_modified_date_failure( $the_date ) { - $expected = false; - $actual = $the_date; - $this->assertEquals( $expected, $actual ); - - if ( false === $the_date ) { - return 'filtered modified date failure result'; - } - return $the_date; - } - - /** - * Test get_the_modified_time with post_id parameter. - * - * @ticket 37059 - * - * @since 4.6.0 - */ - function test_get_the_modified_time_with_post_id() { - $details = array( - 'post_date' => '2016-01-21 15:34:36', - 'post_date_gmt' => '2016-01-21 15:34:36', - ); - $post_id = $this->factory->post->create( $details ); - $format = 'G'; - $expected = '1453390476'; - $actual = get_the_modified_time( $format, $post_id ); - $this->assertEquals( $expected, $actual ); - } - /** * @ticket 38253 * @group ms-required + * @covers ::get_site_icon_url */ - function test_get_site_icon_url_preserves_switched_state() { + public function test_get_site_icon_url_preserves_switched_state() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); @@ -578,8 +462,9 @@ function test_get_site_icon_url_preserves_switched_state() { /** * @ticket 38253 * @group ms-required + * @covers ::has_custom_logo */ - function test_has_custom_logo_preserves_switched_state() { + public function test_has_custom_logo_preserves_switched_state() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); @@ -597,8 +482,9 @@ function test_has_custom_logo_preserves_switched_state() { /** * @ticket 38253 * @group ms-required + * @covers ::get_custom_logo */ - function test_get_custom_logo_preserves_switched_state() { + public function test_get_custom_logo_preserves_switched_state() { $blog_id = $this->factory->blog->create(); switch_to_blog( $blog_id ); @@ -614,32 +500,111 @@ function test_get_custom_logo_preserves_switched_state() { } /** - * @ticket 43590 + * @ticket 40969 + * + * @covers ::get_header */ - function test_wp_no_robots() { - // Simulate private site (search engines discouraged). - update_option( 'blog_public', '0' ); - $actual_private = get_echo( 'wp_no_robots' ); - $this->assertSame( "<meta name='robots' content='noindex,nofollow' />\n", $actual_private ); + public function test_get_header_returns_nothing_on_success() { + $this->expectOutputRegex( '/Header/' ); - // Simulate public site. - update_option( 'blog_public', '1' ); - $actual_public = get_echo( 'wp_no_robots' ); - $this->assertSame( "<meta name='robots' content='noindex,follow' />\n", $actual_public ); + // The `get_header()` function must not return anything + // due to themes in the wild that may echo its return value. + $this->assertNull( get_header() ); } /** * @ticket 40969 + * + * @covers ::get_footer */ - function test_get_template_part_returns_nothing() { - ob_start(); + public function test_get_footer_returns_nothing_on_success() { + $this->expectOutputRegex( '/Footer/' ); + + // The `get_footer()` function must not return anything + // due to themes in the wild that may echo its return value. + $this->assertNull( get_footer() ); + } + + /** + * @ticket 40969 + * + * @covers ::get_sidebar + */ + public function test_get_sidebar_returns_nothing_on_success() { + $this->expectOutputRegex( '/Sidebar/' ); + + // The `get_sidebar()` function must not return anything + // due to themes in the wild that may echo its return value. + $this->assertNull( get_sidebar() ); + } + + /** + * @ticket 40969 + * + * @covers ::get_template_part + */ + public function test_get_template_part_returns_nothing_on_success() { + $this->expectOutputRegex( '/Template Part/' ); // The `get_template_part()` function must not return anything // due to themes in the wild that echo its return value. - $part = get_template_part( 'template', 'part' ); - $output = ob_get_clean(); + $this->assertNull( get_template_part( 'template', 'part' ) ); + } + + /** + * @ticket 40969 + * + * @covers ::get_template_part + */ + public function test_get_template_part_returns_false_on_failure() { + $this->assertFalse( get_template_part( 'non-existing-template' ) ); + } + + /** + * @ticket 21676 + * + * @covers ::get_template_part + */ + public function test_get_template_part_passes_arguments_to_template() { + $this->expectOutputRegex( '/{"foo":"baz"}/' ); + + get_template_part( 'template', 'part', array( 'foo' => 'baz' ) ); + } + + /** + * @ticket 44183 + * + * @covers ::get_the_archive_title + */ + public function test_get_the_archive_title_is_correct_for_author_queries() { + $user_with_posts = $this->factory()->user->create_and_get( + array( + 'role' => 'author', + ) + ); + $user_with_no_posts = $this->factory()->user->create_and_get( + array( + 'role' => 'author', + ) + ); + + $this->factory()->post->create( + array( + 'post_author' => $user_with_posts->ID, + ) + ); + + // Simplify the assertion by removing the default archive title prefix: + add_filter( 'get_the_archive_title_prefix', '__return_empty_string' ); + + $this->go_to( get_author_posts_url( $user_with_posts->ID ) ); + $title_when_posts = get_the_archive_title(); + + $this->go_to( get_author_posts_url( $user_with_no_posts->ID ) ); + $title_when_no_posts = get_the_archive_title(); - self::assertSame( 'Template Part', trim( $output ) ); - self::assertSame( null, $part ); + // Ensure the title is correct both when the user has posts and when they dont: + $this->assertSame( $user_with_posts->display_name, $title_when_posts ); + $this->assertSame( $user_with_no_posts->display_name, $title_when_no_posts ); } } diff --git a/tests/phpunit/tests/general/template_CheckedSelectedHelper.php b/tests/phpunit/tests/general/template_CheckedSelectedHelper.php new file mode 100644 index 0000000000000..2c3afa9a80726 --- /dev/null +++ b/tests/phpunit/tests/general/template_CheckedSelectedHelper.php @@ -0,0 +1,246 @@ +<?php +/** + * A set of unit tests for the __checked_selected_helper() and associated functions in wp-includes/general-template.php. + * + * @group general + */ + +class Tests_General_Template_CheckedSelectedHelper extends WP_UnitTestCase { + + /** + * List of functions using the __checked_selected_helper() function. + * + * Doesn't list the conditionally available `readonly` function on purpose. + * + * @var array + */ + private $child_functions = array( + 'selected' => true, + 'checked' => true, + 'disabled' => true, + 'wp_readonly' => true, + ); + + /** + * Tests that the return value for selected() is as expected with equal values. + * + * @ticket 53858 + * @covers ::selected + */ + public function test_selected_with_equal_values() { + $this->assertSame( " selected='selected'", selected( 'foo', 'foo', false ) ); + } + + /** + * Tests that the return value for checked() is as expected with equal values. + * + * @ticket 53858 + * @covers ::checked + */ + public function test_checked_with_equal_values() { + $this->assertSame( " checked='checked'", checked( 'foo', 'foo', false ) ); + } + + /** + * Tests that the return value for disabled() is as expected with equal values. + * + * @ticket 53858 + * @covers ::disabled + */ + public function test_disabled_with_equal_values() { + $this->assertSame( " disabled='disabled'", disabled( 'foo', 'foo', false ) ); + } + + /** + * Tests that the return value for readonly() is as expected with equal values. + * + * @ticket 53858 + * @covers ::readonly + */ + public function test_readonly_with_equal_values() { + if ( ! function_exists( 'readonly' ) ) { + $this->markTestSkipped( 'readonly() function is not available on PHP 8.1' ); + } + + $this->setExpectedDeprecated( 'readonly' ); + + // Call the function via a variable to prevent a parse error for this file on PHP 8.1. + $fn = 'readonly'; + $this->assertSame( " readonly='readonly'", $fn( 'foo', 'foo', false ) ); + } + + /** + * Tests that the return value for wp_readonly() is as expected with equal values. + * + * @ticket 53858 + * @covers ::wp_readonly + */ + public function test_wp_readonly_with_equal_values() { + $this->assertSame( " readonly='readonly'", wp_readonly( 'foo', 'foo', false ) ); + } + + /** + * @dataProvider data_equal_values + * + * @ticket 9862 + * @ticket 51166 + * @ticket 53858 + * @covers ::__checked_selected_helper + * + * @param mixed $helper One of the values to compare. + * @param mixed $current The other value to compare. + */ + public function test_checked_selected_helper_with_equal_values( $helper, $current ) { + $this->assertSame( " test='test'", __checked_selected_helper( $helper, $current, false, 'test' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_equal_values() { + return array( + 'same value, "foo"; 1: string; 2: string' => array( 'foo', 'foo' ), + 'same value, 1; 1: string; 2: int' => array( '1', 1 ), + 'same value, 1; 1: string; 2: float' => array( '1', 1.0 ), + 'same value, 1; 1: string; 2: bool true' => array( '1', true ), + 'same value, 1; 1: int; 2: int' => array( 1, 1 ), + 'same value, 1; 1: int; 2: float' => array( 1, 1.0 ), + 'same value, 1; 1: int; 2: bool true' => array( 1, true ), + 'same value, 1; 1: float; 2: bool true' => array( 1.0, true ), + 'same value, 1; 1: bool true; 2: bool true' => array( true, true ), + 'same value, 1; 1: float 1.0; 2: float calculation 1.0' => array( 1.0, 3 / 3 ), + 'same value, 0; 1: string; 2: int' => array( '0', 0 ), + 'same value, 0; 1: string; 2: float' => array( '0', 0.0 ), + 'same value, 0; 1: int; 2: int' => array( 0, 0 ), + 'same value, 0; 1: int; 2: float' => array( 0, 0.0 ), + 'same value, empty string; 1: string; 2: string' => array( '', '' ), + 'same value, empty string; 1: empty string; 2: bool false' => array( '', false ), + 'same value, empty string; 1: bool false; 2: bool false' => array( false, false ), + 'same value, empty string; 1: empty string; 2: null' => array( '', null ), + 'same value, empty string; 1: bool false; 2: null' => array( false, null ), + 'same value, null; 1: null; 2: null' => array( null, null ), + ); + } + + /** + * @dataProvider data_non_equal_values + * + * @ticket 9862 + * @ticket 51166 + * @ticket 53858 + * @covers ::__checked_selected_helper + * + * @param mixed $helper One of the values to compare. + * @param mixed $current The other value to compare. + */ + public function test_checked_selected_helper_with_non_equal_values( $helper, $current ) { + $this->assertSame( '', __checked_selected_helper( $helper, $current, false, 'test' ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_non_equal_values() { + return array( + '1: string foo; 2: string bar' => array( 'foo', 'bar' ), + '1: string 0; 2: empty string' => array( '0', '' ), + '1: string 0; 2: null' => array( '0', null ), + '1: int 0; 2: empty string' => array( 0, '' ), + '1: int 0; 2: bool true' => array( 0, true ), + '1: int 0; 2: bool false' => array( 0, false ), + '1: int 0; 2: null' => array( 0, null ), + '1: float 0; 2: empty string' => array( 0.0, '' ), + '1: float 0; 2: bool true' => array( 0.0, true ), + '1: float 0; 2: bool false' => array( 0.0, false ), + '1: float 0; 2: null' => array( 0.0, null ), + '1: null; 2: bool true' => array( null, true ), + '1: null 0; 2: string "foo"' => array( null, 'foo' ), + '1: int 1; 2: float 1.5' => array( 1, 1.5 ), + ); + } + + /** + * Tests that the `$echo` parameter is handled correctly and that even when the output is echoed out, + * the text is also returned. + * + * @ticket 53858 + * @covers ::__checked_selected_helper + */ + public function test_checked_selected_helper_echoes_result_by_default() { + $expected = " disabled='disabled'"; + $this->expectOutputString( $expected ); + $this->assertSame( $expected, disabled( 'foo', 'foo' ) ); + } + + /** + * Tests that the function compares against `true` when the second parameter is not passed. + * + * @dataProvider data_checked_selected_helper_default_value_for_second_parameter + * + * @ticket 53858 + * @covers ::__checked_selected_helper + * @covers ::selected + * @covers ::checked + * @covers ::disabled + * @covers ::wp_readonly + * + * @param mixed $input Input value + * @param mixed $expect_output Optional. Whether output is expected. Defaults to false. + */ + public function test_checked_selected_helper_default_value_for_second_parameter( $input, $expect_output = false ) { + $fn = array_rand( $this->child_functions ); + $expected = ''; + + if ( false !== $expect_output ) { + $expected = " {$fn}='{$fn}'"; + if ( 'wp_readonly' === $fn ) { + // Account for the function name not matching the expected output string. + $expected = " readonly='readonly'"; + } + + // Only set output expectation when output is expected, so the test will fail on unexpected output. + $this->expectOutputString( $expected ); + } + + // Function will always return the value, even when echoing it out. + $this->assertSame( $expected, $fn( $input ) ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_checked_selected_helper_default_value_for_second_parameter() { + return array( + 'truthy; boolean true' => array( + 'input' => true, + 'expect_output' => true, + ), + 'truthy; int 1' => array( + 'input' => 1, + 'expect_output' => true, + ), + 'truthy; string 1' => array( + 'input' => '1', + 'expect_output' => true, + ), + 'truthy, but not equal to true' => array( + 'input' => 'foo', + ), + 'falsy; null' => array( + 'input' => null, + ), + 'falsy; bool false' => array( + 'input' => false, + ), + 'falsy; int 0' => array( + 'input' => 0, + ), + ); + } +} diff --git a/tests/phpunit/tests/general/wpError.php b/tests/phpunit/tests/general/wpError.php index 3fccc470c8b4d..fee4233d6ab2d 100644 --- a/tests/phpunit/tests/general/wpError.php +++ b/tests/phpunit/tests/general/wpError.php @@ -5,9 +5,10 @@ * @group general * @group errors * + * @covers WP_Error * @coversDefaultClass WP_Error */ -class Tests_WP_Error extends WP_UnitTestCase { +class Tests_General_wpError extends WP_UnitTestCase { /** * WP_Error fixture. @@ -19,80 +20,133 @@ class Tests_WP_Error extends WP_UnitTestCase { /** * Set up. */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->wp_error = new WP_Error(); } + /** + * @covers ::__construct + */ public function test_WP_Error_should_be_of_type_WP_Error() { $this->assertWPError( $this->wp_error ); } + /** + * @covers ::__construct + */ public function test_WP_Error_with_default_empty_parameters_should_add_no_errors() { $this->assertEmpty( $this->wp_error->errors ); } + /** + * @covers ::__construct + * @covers ::get_error_code + */ public function test_WP_Error_with_empty_code_should_add_no_code() { $this->assertSame( '', $this->wp_error->get_error_code() ); } + /** + * @covers ::__construct + * @covers ::get_error_message + */ public function test_WP_Error_with_empty_code_should_add_no_message() { $this->assertSame( '', $this->wp_error->get_error_message() ); } + /** + * @covers ::__construct + */ public function test_WP_Error_with_empty_code_should_add_no_error_data() { $this->assertEmpty( $this->wp_error->error_data ); } + /** + * @covers ::__construct + * @covers ::get_error_code + */ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code' ); $this->assertSame( 'code', $wp_error->get_error_code() ); } + /** + * @covers ::__construct + * @covers ::get_error_message + */ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_that_code_and_empty_message() { $wp_error = new WP_Error( 'code' ); $this->assertSame( '', $wp_error->get_error_message( 'code' ) ); } + /** + * @covers ::__construct + * @covers ::get_error_data + */ public function test_WP_Error_with_code_and_empty_message_and_empty_data_should_add_error_but_not_associated_data() { $wp_error = new WP_Error( 'code' ); - $this->assertSame( null, $wp_error->get_error_data( 'code' ) ); + $this->assertNull( $wp_error->get_error_data( 'code' ) ); } + /** + * @covers ::__construct + * @covers ::get_error_data + */ public function test_WP_Error_with_code_and_empty_message_and_non_empty_data_should_add_error_with_empty_message_and_that_stored_data() { $wp_error = new WP_Error( 'code', '', 'data' ); $this->assertSame( 'data', $wp_error->get_error_data( 'code' ) ); } + /** + * @covers ::__construct + * @covers ::get_error_code + */ public function test_WP_Error_with_code_and_message_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code', 'message' ); $this->assertSame( 'code', $wp_error->get_error_code() ); } + /** + * @covers ::__construct + * @covers ::get_error_message + */ public function test_WP_Error_with_code_and_message_should_add_error_with_that_message() { $wp_error = new WP_Error( 'code', 'message' ); $this->assertSame( 'message', $wp_error->get_error_message( 'code' ) ); } + /** + * @covers ::__construct + * @covers ::get_error_code + */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code', 'message', 'data' ); $this->assertSame( 'code', $wp_error->get_error_code() ); } + /** + * @covers ::__construct + * @covers ::get_error_message + */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_message() { $wp_error = new WP_Error( 'code', 'message', 'data' ); $this->assertSame( 'message', $wp_error->get_error_message( 'code' ) ); } + /** + * @covers ::__construct + * @covers ::get_error_data + */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_data() { $wp_error = new WP_Error( 'code', 'message', 'data' ); @@ -100,23 +154,26 @@ public function test_WP_Error_with_code_and_message_and_data_should_add_error_wi } /** - * @covers ::get_error_codes() + * @covers ::__construct + * @covers ::get_error_codes */ public function test_get_error_codes_with_no_errors_should_return_empty_array() { $this->assertEmpty( $this->wp_error->get_error_codes() ); } /** - * @covers ::get_error_codes() + * @covers ::add + * @covers ::get_error_codes */ public function test_get_error_codes_with_one_error_should_return_an_array_with_only_that_code() { $this->wp_error->add( 'code', 'message' ); - $this->assertEqualSets( array( 'code' ), $this->wp_error->get_error_codes() ); + $this->assertSameSets( array( 'code' ), $this->wp_error->get_error_codes() ); } /** - * @covers ::get_error_codes() + * @covers ::add + * @covers ::get_error_codes */ public function test_get_error_codes_with_multiple_errors_should_return_an_array_of_those_codes() { $this->wp_error->add( 'code', 'message' ); @@ -124,18 +181,20 @@ public function test_get_error_codes_with_multiple_errors_should_return_an_array $expected = array( 'code', 'code2' ); - $this->assertEqualSets( $expected, $this->wp_error->get_error_codes() ); + $this->assertSameSets( $expected, $this->wp_error->get_error_codes() ); } /** - * @covers ::get_error_code() + * @covers ::__construct + * @covers ::get_error_code */ public function test_get_error_code_with_no_errors_should_return_an_empty_string() { $this->assertSame( '', $this->wp_error->get_error_code() ); } /** - * @covers ::get_error_code() + * @covers ::add + * @covers ::get_error_code */ public function test_get_error_code_with_one_error_should_return_that_error_code() { $this->wp_error->add( 'code', 'message' ); @@ -144,7 +203,8 @@ public function test_get_error_code_with_one_error_should_return_that_error_code } /** - * @covers ::get_error_code() + * @covers ::add + * @covers ::get_error_code */ public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() { $this->wp_error->add( 'code', 'message' ); @@ -154,66 +214,74 @@ public function test_get_error_code_with_multiple_errors_should_return_only_the_ } /** - * @covers ::get_error_messages() + * @covers ::__construct + * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_and_no_errors_should_return_an_empty_array() { $this->assertEmpty( $this->wp_error->get_error_messages() ); } /** - * @covers ::get_error_messages() + * @covers ::add + * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_one_error_should_return_an_array_with_that_message() { $this->wp_error->add( 'code', 'message' ); - $this->assertEqualSets( array( 'message' ), $this->wp_error->get_error_messages() ); + $this->assertSameSets( array( 'message' ), $this->wp_error->get_error_messages() ); } /** - * @covers ::get_error_messages() + * @covers ::add + * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_multiple_errors_should_return_an_array_of_messages() { $this->wp_error->add( 'code', 'message' ); $this->wp_error->add( 'code2', 'message2' ); - $this->assertEqualSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages() ); + $this->assertSameSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages() ); } /** - * @covers ::get_error_messages() + * @covers ::__construct + * @covers ::get_error_messages */ public function test_get_error_messages_with_an_invalid_code_should_return_an_empty_array() { $this->assertEmpty( $this->wp_error->get_error_messages( 'code' ) ); } /** - * @covers ::get_error_messages() + * @covers ::add + * @covers ::get_error_messages */ public function test_get_error_messages_with_one_error_should_return_an_array_with_that_message() { $this->wp_error->add( 'code', 'message' ); - $this->assertEqualSets( array( 'message' ), $this->wp_error->get_error_messages( 'code' ) ); + $this->assertSameSets( array( 'message' ), $this->wp_error->get_error_messages( 'code' ) ); } /** - * @covers ::get_error_messages() + * @covers ::add + * @covers ::get_error_messages */ public function test_get_error_messages_with_multiple_errors_same_code_should_return_an_array_with_all_messages() { $this->wp_error->add( 'code', 'message' ); $this->wp_error->add( 'code', 'message2' ); - $this->assertequalSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) ); + $this->assertSameSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) ); } /** - * @covers ::get_error_message() + * @covers ::__construct + * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_no_errors_should_return_an_empty_string() { $this->assertSame( '', $this->wp_error->get_error_message() ); } /** - * @covers ::get_error_message() + * @covers ::add + * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_one_error_should_return_that_message() { $this->wp_error->add( 'code', 'message' ); @@ -222,7 +290,8 @@ public function test_get_error_message_with_empty_code_and_one_error_should_retu } /** - * @covers ::get_error_message() + * @covers ::add + * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_multiple_errors_should_return_the_first_message() { $this->wp_error->add( 'code', 'message' ); @@ -232,7 +301,8 @@ public function test_get_error_message_with_empty_code_and_multiple_errors_shoul } /** - * @covers ::get_error_message() + * @covers ::add + * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_multiple_errors_multiple_codes_should_return_the_first_message() { $this->wp_error->add( 'code', 'message' ); @@ -243,14 +313,16 @@ public function test_get_error_message_with_empty_code_and_multiple_errors_multi } /** - * @covers ::get_error_message() + * @covers ::__construct + * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_no_errors_should_return_empty_string() { $this->assertSame( '', $this->wp_error->get_error_message( 'invalid' ) ); } /** - * @covers ::get_error_message() + * @covers ::add + * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_one_error_should_return_an_empty_string() { $this->wp_error->add( 'code', 'message' ); @@ -259,7 +331,8 @@ public function test_get_error_message_with_invalid_code_and_one_error_should_re } /** - * @covers ::get_error_message() + * @covers ::add + * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_multiple_errors_should_return_an_empty_string() { $this->wp_error->add( 'code', 'message' ); @@ -269,54 +342,60 @@ public function test_get_error_message_with_invalid_code_and_multiple_errors_sho } /** - * @covers ::get_error_data() + * @covers ::__construct + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_no_errors_should_evaluate_as_null() { - $this->assertSame( null, $this->wp_error->get_error_data() ); + $this->assertNull( $this->wp_error->get_error_data() ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_one_error_no_data_should_evaluate_as_null() { $this->wp_error->add( 'code', 'message' ); - $this->assertSame( null, $this->wp_error->get_error_data() ); + $this->assertNull( $this->wp_error->get_error_data() ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_multiple_errors_no_data_should_evaluate_as_null() { $this->wp_error->add( 'code', 'message' ); $this->wp_error->add( 'code2', 'message2' ); - $this->assertSame( null, $this->wp_error->get_error_data() ); + $this->assertNull( $this->wp_error->get_error_data() ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_one_error_with_data_should_return_that_data() { $expected = array( 'data-key' => 'data-value' ); $this->wp_error->add( 'code', 'message', $expected ); - $this->assertEqualSetsWithIndex( $expected, $this->wp_error->get_error_data() ); + $this->assertSameSetsWithIndex( $expected, $this->wp_error->get_error_data() ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_multiple_errors_different_codes_should_return_the_last_data_of_the_first_code() { $expected = array( 'data-key' => 'data-value' ); $this->wp_error->add( 'code', 'message', $expected ); $this->wp_error->add( 'code2', 'message2', 'data2' ); - $this->assertEqualSetsWithIndex( $expected, $this->wp_error->get_error_data() ); + $this->assertSameSetsWithIndex( $expected, $this->wp_error->get_error_data() ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_multiple_errors_same_code_should_return_the_last_data_of_the_first_code() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -327,33 +406,37 @@ public function test_get_error_data_with_empty_code_and_multiple_errors_same_cod } /** - * @covers ::get_error_data() + * @covers ::__construct + * @covers ::get_error_data */ public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_null() { - $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) ); + $this->assertNull( $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_null() { $this->wp_error->add( 'code', 'message' ); - $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) ); + $this->assertNull( $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_code_and_one_error_with_data_should_return_that_data() { $expected = array( 'data-key' => 'data-value' ); $this->wp_error->add( 'code', 'message', $expected ); - $this->assertEqualSetsWithIndex( $expected, $this->wp_error->get_error_data( 'code' ) ); + $this->assertSameSetsWithIndex( $expected, $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_code_and_multiple_errors_different_codes_should_return_the_last_stored_data_of_the_code() { $expected = array( 'data3' ); @@ -361,11 +444,12 @@ public function test_get_error_data_with_code_and_multiple_errors_different_code $this->wp_error->add( 'code2', 'message2', 'data2' ); $this->wp_error->add( 'code', 'message3', $expected ); - $this->assertEqualSetsWithIndex( $expected, $this->wp_error->get_error_data( 'code' ) ); + $this->assertSameSetsWithIndex( $expected, $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::get_error_data() + * @covers ::add + * @covers ::get_error_data */ public function test_get_error_data_with_code_and_multiple_errors_same_code_should_return_the_last_stored_data() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -376,14 +460,73 @@ public function test_get_error_data_with_code_and_multiple_errors_same_code_shou } /** - * @covers ::has_errors() + * @covers ::__construct + * @covers ::get_all_error_data + */ + public function test_get_all_error_data_with_code_and_no_errors_should_evaluate_as_empty_array() { + $this->assertSame( array(), $this->wp_error->get_all_error_data( 'code' ) ); + } + + /** + * @covers ::add + * @covers ::get_all_error_data + */ + public function test_get_all_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_empty_array() { + $this->wp_error->add( 'code', 'message' ); + + $this->assertSame( array(), $this->wp_error->get_all_error_data( 'code' ) ); + } + + /** + * @covers ::add + * @covers ::get_all_error_data + */ + public function test_get_all_error_data_with_code_and_one_error_with_data_should_return_that_data() { + $expected = array( 'data-key' => 'data-value' ); + $this->wp_error->add( 'code', 'message', $expected ); + + $actual = $this->wp_error->get_all_error_data( 'code' ); + $this->assertCount( 1, $actual ); + $this->assertSameSetsWithIndex( $expected, $actual[0] ); + } + + /** + * @covers ::add + * @covers ::get_all_error_data + */ + public function test_get_all_error_data_with_code_and_multiple_errors_same_code_should_return_all_data() { + $this->wp_error->add( 'code', 'message', 'data' ); + $this->wp_error->add( 'code', 'message2', 'data2' ); + $this->wp_error->add( 'code2', 'message3', 'data3' ); + + $this->assertSame( array( 'data', 'data2' ), $this->wp_error->get_all_error_data( 'code' ) ); + } + + /** + * @covers ::add + * @covers ::get_all_error_data + */ + public function test_get_all_error_data_should_handle_manipulation_of_error_data_property() { + $this->wp_error->add_data( 'data1', 'code' ); + $this->wp_error->add_data( 'data2', 'code' ); + + $this->wp_error->error_data['code'] = 'dataX'; + + $this->assertSame( 'dataX', $this->wp_error->get_error_data( 'code' ) ); + $this->assertSame( array( 'data1', 'dataX' ), $this->wp_error->get_all_error_data( 'code' ) ); + } + + /** + * @covers ::__construct + * @covers ::has_errors */ public function test_has_errors_with_no_errors_returns_false() { $this->assertFalse( $this->wp_error->has_errors() ); } /** - * @covers ::has_errors() + * @covers ::add + * @covers ::has_errors */ public function test_has_errors_with_errors_returns_true() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -391,7 +534,7 @@ public function test_has_errors_with_errors_returns_true() { } /** - * @covers ::add() + * @covers ::add */ public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_key_to_errors_array() { $this->wp_error->add( '', '', 'data' ); @@ -400,16 +543,16 @@ public function test_add_with_empty_code_empty_message_empty_data_should_add_emp } /** - * @covers ::add() + * @covers ::add */ public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_message_to_errors_array_under_empty_key() { $this->wp_error->add( '', '', 'data' ); - $this->assertEqualSetsWithIndex( array( '' => array( '' ) ), $this->wp_error->errors ); + $this->assertSameSetsWithIndex( array( '' => array( '' ) ), $this->wp_error->errors ); } /** - * @covers ::add() + * @covers ::add */ public function test_add_with_empty_code_empty_message_empty_data_should_not_alter_data() { $this->wp_error->add( '', '', '' ); @@ -418,16 +561,17 @@ public function test_add_with_empty_code_empty_message_empty_data_should_not_alt } /** - * @covers ::add() + * @covers ::add */ public function test_add_with_empty_code_empty_message_non_empty_data_should_store_data_under_an_empty_code_key() { $this->wp_error->add( '', '', 'data' ); - $this->assertEqualSetsWithIndex( array( '' => 'data' ), $this->wp_error->error_data ); + $this->assertSameSetsWithIndex( array( '' => 'data' ), $this->wp_error->error_data ); } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_code */ public function test_add_with_code_empty_message_empty_data_should_add_error_with_code() { $this->wp_error->add( 'code', '' ); @@ -436,7 +580,8 @@ public function test_add_with_code_empty_message_empty_data_should_add_error_wit } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_message */ public function test_add_with_code_empty_message_empty_data_should_add_error_with_empty_message() { $this->wp_error->add( 'code', '' ); @@ -445,16 +590,18 @@ public function test_add_with_code_empty_message_empty_data_should_add_error_wit } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_data */ public function test_add_with_code_empty_message_empty_data_should_not_add_error_data() { $this->wp_error->add( 'code', '' ); - $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) ); + $this->assertNull( $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_message */ public function test_add_with_code_and_message_and_empty_data_should_should_add_error_with_that_message() { $this->wp_error->add( 'code', 'message' ); @@ -463,16 +610,18 @@ public function test_add_with_code_and_message_and_empty_data_should_should_add_ } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_data */ public function test_add_with_code_and_message_and_empty_data_should_not_alter_stored_data() { $this->wp_error->add( 'code', 'message' ); - $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) ); + $this->assertNull( $this->wp_error->get_error_data( 'code' ) ); } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_code */ public function test_add_with_code_and_empty_message_and_data_should_add_error_with_that_code() { $this->wp_error->add( 'code', '', 'data' ); @@ -481,7 +630,8 @@ public function test_add_with_code_and_empty_message_and_data_should_add_error_w } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_data */ public function test_add_with_code_and_empty_message_and_data_should_store_that_data() { $this->wp_error->add( 'code', '', 'data' ); @@ -490,7 +640,8 @@ public function test_add_with_code_and_empty_message_and_data_should_store_that_ } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_code */ public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_code() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -499,7 +650,8 @@ public function test_add_with_code_and_message_and_data_should_add_an_error_with } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_message */ public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_message() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -508,7 +660,8 @@ public function test_add_with_code_and_message_and_data_should_add_an_error_with } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_data */ public function test_add_with_code_and_message_and_data_should_store_that_data() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -517,7 +670,8 @@ public function test_add_with_code_and_message_and_data_should_store_that_data() } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_messages */ public function test_add_multiple_times_with_the_same_code_should_add_additional_messages_for_that_code() { $this->wp_error->add( 'code', 'message' ); @@ -525,11 +679,12 @@ public function test_add_multiple_times_with_the_same_code_should_add_additional $expected = array( 'message', 'message2' ); - $this->assertEqualSets( $expected, $this->wp_error->get_error_messages( 'code' ) ); + $this->assertSameSets( $expected, $this->wp_error->get_error_messages( 'code' ) ); } /** - * @covers ::add() + * @covers ::add + * @covers ::get_error_data */ public function test_add_multiple_times_with_the_same_code_and_different_data_should_store_only_the_last_added_data() { $this->wp_error->add( 'code', 'message', 'data-bar' ); @@ -539,7 +694,7 @@ public function test_add_multiple_times_with_the_same_code_and_different_data_sh } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_empty_data_empty_code_should_create_orphaned_data_with_no_error() { $this->wp_error->add_data( '' ); @@ -548,16 +703,17 @@ public function test_add_data_with_empty_data_empty_code_should_create_orphaned_ } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_empty_data_empty_code_no_errors_should_create_data_under_an_empty_code_key() { $this->wp_error->add_data( '' ); - $this->assertEqualSets( array( '' => '' ), $this->wp_error->error_data ); + $this->assertSameSets( array( '' => '' ), $this->wp_error->error_data ); } /** - * @covers ::add_data() + * @covers ::add_data + * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_one_error_should_store_the_data_under_that_code() { $this->wp_error->add( 'code', 'message' ); @@ -567,7 +723,8 @@ public function test_add_data_with_data_empty_code_and_one_error_should_store_th } /** - * @covers ::add_data() + * @covers ::add_data + * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_multiple_errors_with_different_codes_should_store_it_under_the_first_code() { $this->wp_error->add( 'code', 'message' ); @@ -579,7 +736,8 @@ public function test_add_data_with_data_empty_code_and_multiple_errors_with_diff } /** - * @covers ::add_data() + * @covers ::add_data + * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_multiple_errors_with_same_code_should_store_it_under_the_first_code() { $this->wp_error->add( 'code', 'message' ); @@ -592,7 +750,7 @@ public function test_add_data_with_data_empty_code_and_multiple_errors_with_same } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_data_and_code_and_no_errors_should_create_orphaned_data_with_no_error() { $this->wp_error->add_data( 'data', 'code' ); @@ -601,38 +759,39 @@ public function test_add_data_with_data_and_code_and_no_errors_should_create_orp } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_data_and_code_no_errors_should_create_data_under_that_code_key() { $this->wp_error->add_data( 'data', 'code' ); - $this->assertEqualSets( array( 'code' => 'data' ), $this->wp_error->error_data ); + $this->assertSameSets( array( 'code' => 'data' ), $this->wp_error->error_data ); } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_data_and_code_one_error_different_code_should_create_orphaned_data_with_no_error() { $this->wp_error->add( 'code', 'message' ); $this->wp_error->add_data( 'data', 'code2' ); - $this->assertEqualSetsWithIndex( array( 'code' => array( 'message' ) ), $this->wp_error->errors ); + $this->assertSameSetsWithIndex( array( 'code' => array( 'message' ) ), $this->wp_error->errors ); } /** - * @covers ::add_data() + * @covers ::add_data */ public function test_add_data_with_data_and_code_one_error_different_code_should_create_data_under_that_code_key() { $this->wp_error->add( 'code', 'message' ); $this->wp_error->add_data( 'data', 'code2' ); - $this->assertEqualSetsWithIndex( array( 'code2' => 'data' ), $this->wp_error->error_data ); + $this->assertSameSetsWithIndex( array( 'code2' => 'data' ), $this->wp_error->error_data ); } /** - * @covers ::add_data() + * @covers ::add_data + * @covers ::get_error_data */ public function test_add_data_with_data_and_code_should_add_data() { $this->wp_error->add( 'code', 'message' ); @@ -643,7 +802,7 @@ public function test_add_data_with_data_and_code_should_add_data() { } /** - * @covers ::remove() + * @covers ::remove */ public function test_remove_with_no_errors_should_affect_nothing() { $before = $this->wp_error->errors; @@ -652,11 +811,11 @@ public function test_remove_with_no_errors_should_affect_nothing() { $after = $this->wp_error->errors; - $this->assertEqualSetsWithIndex( $before, $after ); + $this->assertSameSetsWithIndex( $before, $after ); } /** - * @covers ::remove() + * @covers ::remove */ public function test_remove_empty_code_no_errors_should_affect_nothing() { $before = $this->wp_error->errors; @@ -665,11 +824,11 @@ public function test_remove_empty_code_no_errors_should_affect_nothing() { $after = $this->wp_error->errors; - $this->assertEqualSetsWithIndex( $before, $after ); + $this->assertSameSetsWithIndex( $before, $after ); } /** - * @covers ::remove() + * @covers ::remove */ public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error() { $before = $this->wp_error->errors; @@ -680,11 +839,11 @@ public function test_remove_empty_code_and_one_error_with_empty_string_code_shou $after = $this->wp_error->errors; - $this->assertEqualSetsWithIndex( $before, $after ); + $this->assertSameSetsWithIndex( $before, $after ); } /** - * @covers ::remove() + * @covers ::remove */ public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error_data() { $this->wp_error->add( '', 'message', 'data' ); @@ -697,7 +856,7 @@ public function test_remove_empty_code_and_one_error_with_empty_string_code_shou } /** - * @covers ::remove() + * @covers ::remove */ public function test_remove_should_remove_the_error_with_the_given_code() { $this->wp_error->add( 'code', 'message' ); @@ -708,14 +867,84 @@ public function test_remove_should_remove_the_error_with_the_given_code() { } /** - * @covers ::remove() + * @covers ::remove + * @covers ::get_error_data + * @covers ::get_all_error_data */ public function test_remove_should_remove_the_error_data_associated_with_the_given_code() { $this->wp_error->add( 'code', 'message', 'data' ); + $this->wp_error->add( 'code', 'message', 'data2' ); $this->wp_error->remove( 'code' ); $this->assertEmpty( $this->wp_error->error_data ); + $this->assertEmpty( $this->wp_error->get_error_data( 'code' ) ); + $this->assertEmpty( $this->wp_error->get_all_error_data( 'code' ) ); + } + + /** + * @covers ::merge_from + * @covers ::get_error_messages + * @covers ::get_error_data + * @covers ::get_all_error_data + * @covers ::get_error_message + */ + public function test_merge_from_should_copy_other_error_into_instance() { + $this->wp_error->add( 'code1', 'message1', 'data1' ); + + $other = new WP_Error( 'code1', 'message2', 'data2' ); + $other->add( 'code2', 'message3' ); + $this->wp_error->merge_from( $other ); + + $this->assertSame( array( 'message1', 'message2' ), $this->wp_error->get_error_messages( 'code1' ) ); + $this->assertSame( 'data2', $this->wp_error->get_error_data( 'code1' ) ); + $this->assertSame( array( 'data1', 'data2' ), $this->wp_error->get_all_error_data( 'code1' ) ); + $this->assertSame( 'message3', $this->wp_error->get_error_message( 'code2' ) ); } + /** + * @covers ::merge_from + * @covers ::has_errors + */ + public function test_merge_from_with_no_errors_should_not_add_to_instance() { + $other = new WP_Error(); + + $this->wp_error->merge_from( $other ); + + $this->assertFalse( $this->wp_error->has_errors() ); + } + + /** + * @covers ::export_to + * @covers ::get_error_messages + * @covers ::get_error_data + * @covers ::get_all_error_data + * @covers ::get_error_message + */ + public function test_export_to_should_copy_instance_into_other_error() { + $other = new WP_Error(); + $other->add( 'code1', 'message1', 'data1' ); + + $this->wp_error->add( 'code1', 'message2', 'data2' ); + $this->wp_error->add( 'code2', 'message3' ); + + $this->wp_error->export_to( $other ); + + $this->assertSame( array( 'message1', 'message2' ), $other->get_error_messages( 'code1' ) ); + $this->assertSame( 'data2', $other->get_error_data( 'code1' ) ); + $this->assertSame( array( 'data1', 'data2' ), $other->get_all_error_data( 'code1' ) ); + $this->assertSame( 'message3', $other->get_error_message( 'code2' ) ); + } + + /** + * @covers ::export_to + * @covers ::has_errors + */ + public function test_export_to_with_no_errors_should_not_add_to_other_error() { + $other = new WP_Error(); + + $this->wp_error->export_to( $other ); + + $this->assertFalse( $other->has_errors() ); + } } diff --git a/tests/phpunit/tests/general/archives.php b/tests/phpunit/tests/general/wpGetArchives.php similarity index 52% rename from tests/phpunit/tests/general/archives.php rename to tests/phpunit/tests/general/wpGetArchives.php index f32bb6bcbc247..5409795fd71e1 100644 --- a/tests/phpunit/tests/general/archives.php +++ b/tests/phpunit/tests/general/wpGetArchives.php @@ -2,10 +2,12 @@ /** * @group general + * @group template + * @covers ::wp_get_archives */ -class Tests_General_Archives extends WP_UnitTestCase { - function setUp() { - parent::setUp(); +class Tests_General_wpGetArchives extends WP_UnitTestCase { + public function set_up() { + parent::set_up(); wp_cache_delete( 'last_changed', 'posts' ); } @@ -13,7 +15,7 @@ function setUp() { /** * @ticket 23206 */ - function test_get_archives_cache() { + public function test_get_archives_cache() { global $wpdb; self::factory()->post->create_many( 3, array( 'post_type' => 'post' ) ); @@ -29,10 +31,10 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); + $this->assertIsString( $result ); $time1 = wp_cache_get( 'last_changed', 'posts' ); $this->assertNotEmpty( $time1 ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -43,9 +45,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); // Change args, resulting in a different query string. Cache is not primed, expect 1 query. $result = wp_get_archives( @@ -55,9 +57,9 @@ function test_get_archives_cache() { 'order' => 'ASC', ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -69,9 +71,9 @@ function test_get_archives_cache() { 'order' => 'ASC', ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -82,9 +84,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -95,9 +97,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); // Change type. Cache is not primed, expect 1 query. $result = wp_get_archives( @@ -106,9 +108,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -119,9 +121,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); // Change type. Cache is not primed, expect 1 query. $result = wp_get_archives( @@ -130,9 +132,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -143,9 +145,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); // Change type. Cache is not primed, expect 1 query. $result = wp_get_archives( @@ -154,9 +156,9 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries + 1, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries + 1, $wpdb->num_queries ); $num_queries = $wpdb->num_queries; @@ -167,8 +169,8 @@ function test_get_archives_cache() { 'echo' => false, ) ); - $this->assertInternalType( 'string', $result ); - $this->assertEquals( $time1, wp_cache_get( 'last_changed', 'posts' ) ); - $this->assertEquals( $num_queries, $wpdb->num_queries ); + $this->assertIsString( $result ); + $this->assertSame( $time1, wp_cache_get( 'last_changed', 'posts' ) ); + $this->assertSame( $num_queries, $wpdb->num_queries ); } } diff --git a/tests/phpunit/tests/general/document-title.php b/tests/phpunit/tests/general/wpGetDocumentTitle.php similarity index 51% rename from tests/phpunit/tests/general/document-title.php rename to tests/phpunit/tests/general/wpGetDocumentTitle.php index 826a14a7cdf05..08d9e033f3f02 100644 --- a/tests/phpunit/tests/general/document-title.php +++ b/tests/phpunit/tests/general/wpGetDocumentTitle.php @@ -3,10 +3,13 @@ /** * A set of unit tests for functions in wp-includes/general-template.php * + * @group general * @group template * @group document-title + * @covers ::wp_get_document_title + * @covers ::_wp_render_title_tag */ -class Tests_General_DocumentTitle extends WP_UnitTestCase { +class Tests_General_wpGetDocumentTitle extends WP_UnitTestCase { public $blog_name; public static $category_id; @@ -40,33 +43,28 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { ); } - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); - add_action( 'after_setup_theme', array( $this, '_add_title_tag_support' ) ); + add_action( 'after_setup_theme', array( $this, 'add_title_tag_support' ) ); $this->blog_name = get_option( 'blogname' ); setup_postdata( get_post( self::$post_id ) ); } - function tearDown() { - wp_reset_postdata(); - parent::tearDown(); - } - - function _add_title_tag_support() { + public function add_title_tag_support() { add_theme_support( 'title-tag' ); } - function test__wp_render_title_tag() { + public function test__wp_render_title_tag() { $this->go_to( '/' ); $this->expectOutputString( sprintf( "<title>%s – %s\n", $this->blog_name, get_option( 'blogdescription' ) ) ); _wp_render_title_tag(); } - function test__wp_render_title_no_theme_support() { + public function test__wp_render_title_no_theme_support() { $this->go_to( '/' ); remove_theme_support( 'title-tag' ); @@ -75,19 +73,19 @@ function test__wp_render_title_no_theme_support() { _wp_render_title_tag(); } - function test_short_circuiting_title() { + public function test_short_circuiting_title() { $this->go_to( '/' ); - add_filter( 'pre_get_document_title', array( $this, '_short_circuit_title' ) ); + add_filter( 'pre_get_document_title', array( $this, 'short_circuit_title' ) ); - $this->assertEquals( 'A Wild Title', wp_get_document_title() ); + $this->assertSame( 'A Wild Title', wp_get_document_title() ); } - function _short_circuit_title( $title ) { + public function short_circuit_title( $title ) { return 'A Wild Title'; } - function test_front_page_title() { + public function test_front_page_title() { update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', @@ -98,18 +96,18 @@ function test_front_page_title() { ) ) ); - add_filter( 'document_title_parts', array( $this, '_front_page_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, 'front_page_title_parts' ) ); $this->go_to( '/' ); - $this->assertEquals( sprintf( '%s – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( '%s – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); update_option( 'show_on_front', 'posts' ); $this->go_to( '/' ); - $this->assertEquals( sprintf( '%s – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( '%s – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); } - function _front_page_title_parts( $parts ) { + public function front_page_title_parts( $parts ) { $this->assertArrayHasKey( 'title', $parts ); $this->assertArrayHasKey( 'tagline', $parts ); $this->assertArrayNotHasKey( 'site', $parts ); @@ -117,7 +115,7 @@ function _front_page_title_parts( $parts ) { return $parts; } - function test_home_title() { + public function test_home_title() { $blog_page_id = $this->factory->post->create( array( 'post_title' => 'blog-page', @@ -129,18 +127,18 @@ function test_home_title() { // Show page name on home page if it's not the front page. $this->go_to( get_permalink( $blog_page_id ) ); - $this->assertEquals( sprintf( 'blog-page – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'blog-page – %s', $this->blog_name ), wp_get_document_title() ); } - function test_paged_title() { + public function test_paged_title() { $this->go_to( '?page=4' ); - add_filter( 'document_title_parts', array( $this, '_paged_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, 'paged_title_parts' ) ); - $this->assertEquals( sprintf( '%s – Page 4 – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( '%s – Page 4 – Just another WordPress site', $this->blog_name ), wp_get_document_title() ); } - function _paged_title_parts( $parts ) { + public function paged_title_parts( $parts ) { $this->assertArrayHasKey( 'page', $parts ); $this->assertArrayHasKey( 'title', $parts ); $this->assertArrayHasKey( 'tagline', $parts ); @@ -149,15 +147,15 @@ function _paged_title_parts( $parts ) { return $parts; } - function test_singular_title() { + public function test_singular_title() { $this->go_to( '?p=' . self::$post_id ); - add_filter( 'document_title_parts', array( $this, '_singular_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, 'singular_title_parts' ) ); - $this->assertEquals( sprintf( 'test_title – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_title – %s', $this->blog_name ), wp_get_document_title() ); } - function _singular_title_parts( $parts ) { + public function singular_title_parts( $parts ) { $this->assertArrayHasKey( 'site', $parts ); $this->assertArrayHasKey( 'title', $parts ); $this->assertArrayNotHasKey( 'tagline', $parts ); @@ -165,25 +163,25 @@ function _singular_title_parts( $parts ) { return $parts; } - function test_category_title() { + public function test_category_title() { $this->go_to( '?cat=' . self::$category_id ); - $this->assertEquals( sprintf( 'test_category – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_category – %s', $this->blog_name ), wp_get_document_title() ); } - function test_search_title() { + public function test_search_title() { $this->go_to( '?s=test_title' ); - $this->assertEquals( sprintf( 'Search Results for “test_title” – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'Search Results for “test_title” – %s', $this->blog_name ), wp_get_document_title() ); } - function test_author_title() { + public function test_author_title() { $this->go_to( '?author=' . self::$author_id ); - $this->assertEquals( sprintf( 'test_author – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_author – %s', $this->blog_name ), wp_get_document_title() ); } - function test_post_type_archive_title() { + public function test_post_type_archive_title() { register_post_type( 'cpt', array( @@ -203,42 +201,42 @@ function test_post_type_archive_title() { $this->go_to( '?post_type=cpt' ); - $this->assertEquals( sprintf( 'test_cpt – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_cpt – %s', $this->blog_name ), wp_get_document_title() ); } - function test_year_title() { + public function test_year_title() { $this->go_to( '?year=2015' ); - $this->assertEquals( sprintf( '2015 – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( '2015 – %s', $this->blog_name ), wp_get_document_title() ); } - function test_month_title() { + public function test_month_title() { $this->go_to( '?monthnum=09' ); - $this->assertEquals( sprintf( 'September 2015 – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'September 2015 – %s', $this->blog_name ), wp_get_document_title() ); } - function test_day_title() { + public function test_day_title() { $this->go_to( '?day=22' ); - $this->assertEquals( sprintf( 'September 22, 2015 – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'September 22, 2015 – %s', $this->blog_name ), wp_get_document_title() ); } - function test_404_title() { + public function test_404_title() { $this->go_to( '?m=404' ); - $this->assertEquals( sprintf( 'Page not found – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'Page not found – %s', $this->blog_name ), wp_get_document_title() ); } - function test_paged_post_title() { + public function test_paged_post_title() { $this->go_to( '?paged=4&p=' . self::$post_id ); - add_filter( 'title_tag_parts', array( $this, '_paged_post_title_parts' ) ); + add_filter( 'title_tag_parts', array( $this, 'paged_post_title_parts' ) ); - $this->assertEquals( sprintf( 'test_title – Page 4 – %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_title – Page 4 – %s', $this->blog_name ), wp_get_document_title() ); } - function _paged_post_title_parts( $parts ) { + public function paged_post_title_parts( $parts ) { $this->assertArrayHasKey( 'page', $parts ); $this->assertArrayHasKey( 'site', $parts ); $this->assertArrayHasKey( 'title', $parts ); @@ -247,15 +245,15 @@ function _paged_post_title_parts( $parts ) { return $parts; } - function test_rearrange_title_parts() { + public function test_rearrange_title_parts() { $this->go_to( '?p=' . self::$post_id ); - add_filter( 'document_title_parts', array( $this, '_rearrange_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, 'rearrange_title_parts' ) ); - $this->assertEquals( sprintf( '%s – test_title', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( '%s – test_title', $this->blog_name ), wp_get_document_title() ); } - function _rearrange_title_parts( $parts ) { + public function rearrange_title_parts( $parts ) { $parts = array( $parts['site'], $parts['title'], @@ -264,15 +262,15 @@ function _rearrange_title_parts( $parts ) { return $parts; } - function test_change_title_separator() { + public function test_change_title_separator() { $this->go_to( '?p=' . self::$post_id ); - add_filter( 'document_title_separator', array( $this, '_change_title_separator' ) ); + add_filter( 'document_title_separator', array( $this, 'change_title_separator' ) ); - $this->assertEquals( sprintf( 'test_title %%%% %s', $this->blog_name ), wp_get_document_title() ); + $this->assertSame( sprintf( 'test_title %%%% %s', $this->blog_name ), wp_get_document_title() ); } - function _change_title_separator( $sep ) { + public function change_title_separator( $sep ) { return '%%'; } } diff --git a/tests/phpunit/tests/general/resourceHints.php b/tests/phpunit/tests/general/wpResourceHints.php similarity index 67% rename from tests/phpunit/tests/general/resourceHints.php rename to tests/phpunit/tests/general/wpResourceHints.php index 624256f54cf36..1761196b2c738 100644 --- a/tests/phpunit/tests/general/resourceHints.php +++ b/tests/phpunit/tests/general/wpResourceHints.php @@ -1,15 +1,17 @@ old_wp_scripts = isset( $GLOBALS['wp_scripts'] ) ? $GLOBALS['wp_scripts'] : null; $this->old_wp_styles = isset( $GLOBALS['wp_styles'] ) ? $GLOBALS['wp_styles'] : null; @@ -22,15 +24,13 @@ function setUp() { $GLOBALS['wp_styles']->default_version = get_bloginfo( 'version' ); } - function tearDown() { + public function tear_down() { $GLOBALS['wp_scripts'] = $this->old_wp_scripts; $GLOBALS['wp_styles'] = $this->old_wp_styles; - add_action( 'wp_default_scripts', 'wp_default_scripts' ); - add_action( 'wp_default_styles', 'wp_default_styles' ); - parent::tearDown(); + parent::tear_down(); } - function test_should_have_defaults_on_frontend() { + public function test_should_have_defaults_on_frontend() { $expected = "\n"; $this->expectOutputString( $expected ); @@ -38,22 +38,22 @@ function test_should_have_defaults_on_frontend() { wp_resource_hints(); } - function test_dns_prefetching() { + public function test_dns_prefetching() { $expected = "\n" . "\n" . "\n" . "\n"; - add_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_domains' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_dns_prefetch_domains' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_domains' ) ); + remove_filter( 'wp_resource_hints', array( $this, 'add_dns_prefetch_domains' ) ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function _add_dns_prefetch_domains( $hints, $method ) { + public function add_dns_prefetch_domains( $hints, $method ) { if ( 'dns-prefetch' === $method ) { $hints[] = 'http://wordpress.org'; $hints[] = 'https://wordpress.org'; @@ -69,23 +69,23 @@ function _add_dns_prefetch_domains( $hints, $method ) { /** * @ticket 37652 */ - function test_preconnect() { + public function test_preconnect() { $expected = "\n" . "\n" . "\n" . "\n" . "\n"; - add_filter( 'wp_resource_hints', array( $this, '_add_preconnect_domains' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_preconnect_domains' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_preconnect_domains' ) ); + remove_filter( 'wp_resource_hints', array( $this, 'add_preconnect_domains' ) ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function _add_preconnect_domains( $hints, $method ) { + public function add_preconnect_domains( $hints, $method ) { if ( 'preconnect' === $method ) { $hints[] = '//wordpress.org'; $hints[] = 'https://make.wordpress.org'; @@ -97,22 +97,22 @@ function _add_preconnect_domains( $hints, $method ) { return $hints; } - function test_prerender() { + public function test_prerender() { $expected = "\n" . "\n" . "\n" . "\n"; - add_filter( 'wp_resource_hints', array( $this, '_add_prerender_urls' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_prerender_urls' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_prerender_urls' ) ); + remove_filter( 'wp_resource_hints', array( $this, 'add_prerender_urls' ) ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function _add_prerender_urls( $hints, $method ) { + public function add_prerender_urls( $hints, $method ) { if ( 'prerender' === $method ) { $hints[] = 'https://make.wordpress.org/great-again'; $hints[] = 'http://jobs.wordpress.net'; @@ -123,20 +123,20 @@ function _add_prerender_urls( $hints, $method ) { return $hints; } - function test_parse_url_dns_prefetch() { + public function test_parse_url_dns_prefetch() { $expected = "\n" . "\n"; - add_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_long_urls' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_dns_prefetch_long_urls' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_dns_prefetch_long_urls' ) ); + remove_filter( 'wp_resource_hints', array( $this, 'add_dns_prefetch_long_urls' ) ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function _add_dns_prefetch_long_urls( $hints, $method ) { + public function add_dns_prefetch_long_urls( $hints, $method ) { if ( 'dns-prefetch' === $method ) { $hints[] = 'http://make.wordpress.org/wp-includes/css/editor.css'; } @@ -144,7 +144,7 @@ function _add_dns_prefetch_long_urls( $hints, $method ) { return $hints; } - function test_dns_prefetch_styles() { + public function test_dns_prefetch_styles() { $expected = "\n" . "\n"; @@ -159,11 +159,11 @@ function test_dns_prefetch_styles() { wp_dequeue_style( 'googlefonts' ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function test_dns_prefetch_scripts() { + public function test_dns_prefetch_scripts() { $expected = "\n" . "\n"; @@ -178,10 +178,13 @@ function test_dns_prefetch_scripts() { wp_dequeue_style( 'googlefonts' ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function test_dns_prefetch_scripts_does_not_included_registered_only() { + /** + * @ticket 37385 + */ + public function test_dns_prefetch_scripts_does_not_include_registered_only() { $expected = "\n"; $unexpected = "\n"; @@ -191,43 +194,43 @@ function test_dns_prefetch_scripts_does_not_included_registered_only() { wp_deregister_script( 'jquery-elsewhere' ); - $this->assertEquals( $expected, $actual ); - $this->assertNotContains( $unexpected, $actual ); + $this->assertSame( $expected, $actual ); + $this->assertStringNotContainsString( $unexpected, $actual ); } /** * @ticket 37502 */ - function test_deregistered_scripts_are_ignored() { + public function test_deregistered_scripts_are_ignored() { $expected = "\n"; wp_enqueue_script( 'test-script', 'http://example.org/script.js' ); wp_deregister_script( 'test-script' ); $actual = get_echo( 'wp_resource_hints' ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } /** * @ticket 37652 */ - function test_malformed_urls() { + public function test_malformed_urls() { $expected = "\n"; // Errant colon. - add_filter( 'wp_resource_hints', array( $this, '_add_malformed_url_errant_colon' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_malformed_url_errant_colon' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_malformed_url_errant_colon' ) ); - $this->assertEquals( $expected, $actual ); + remove_filter( 'wp_resource_hints', array( $this, 'add_malformed_url_errant_colon' ) ); + $this->assertSame( $expected, $actual ); // Unsupported Scheme. - add_filter( 'wp_resource_hints', array( $this, '_add_malformed_url_unsupported_scheme' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_malformed_url_unsupported_scheme' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_malformed_url_unsupported_scheme' ) ); - $this->assertEquals( $expected, $actual ); + remove_filter( 'wp_resource_hints', array( $this, 'add_malformed_url_unsupported_scheme' ) ); + $this->assertSame( $expected, $actual ); } - function _add_malformed_url_errant_colon( $hints, $method ) { + public function add_malformed_url_errant_colon( $hints, $method ) { if ( 'preconnect' === $method ) { $hints[] = '://core.trac.wordpress.org/ticket/37652'; } @@ -235,7 +238,7 @@ function _add_malformed_url_errant_colon( $hints, $method ) { return $hints; } - function _add_malformed_url_unsupported_scheme( $hints, $method ) { + public function add_malformed_url_unsupported_scheme( $hints, $method ) { if ( 'preconnect' === $method ) { $hints[] = 'git://develop.git.wordpress.org/'; } @@ -244,25 +247,25 @@ function _add_malformed_url_unsupported_scheme( $hints, $method ) { } /** - * @group 38121 + * @ticket 38121 */ - function test_custom_attributes() { + public function test_custom_attributes() { $expected = "\n" . "\n" . "\n" . "\n" . "\n"; - add_filter( 'wp_resource_hints', array( $this, '_add_url_with_attributes' ), 10, 2 ); + add_filter( 'wp_resource_hints', array( $this, 'add_url_with_attributes' ), 10, 2 ); $actual = get_echo( 'wp_resource_hints' ); - remove_filter( 'wp_resource_hints', array( $this, '_add_url_with_attributes' ) ); + remove_filter( 'wp_resource_hints', array( $this, 'add_url_with_attributes' ) ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function _add_url_with_attributes( $hints, $method ) { + public function add_url_with_attributes( $hints, $method ) { // Ignore hints with missing href attributes. $hints[] = array( 'rel' => 'foo', diff --git a/tests/phpunit/tests/hooks/addFilter.php b/tests/phpunit/tests/hooks/addFilter.php index 5e9c0e75e3ced..5890f22044fd1 100644 --- a/tests/phpunit/tests/hooks/addFilter.php +++ b/tests/phpunit/tests/hooks/addFilter.php @@ -5,8 +5,9 @@ * Test the add_filter method of WP_Hook * * @group hooks + * @covers WP_Hook::add_filter */ -class Tests_WP_Hook_Add_Filter extends WP_UnitTestCase { +class Tests_Hooks_AddFilter extends WP_UnitTestCase { public $hook; @@ -20,8 +21,8 @@ public function test_add_filter_with_function() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $function_index = _wp_filter_build_unique_id( $tag, $callback, $priority ); - $this->assertEquals( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); - $this->assertEquals( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); + $this->assertSame( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); + $this->assertSame( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); } public function test_add_filter_with_object() { @@ -35,8 +36,8 @@ public function test_add_filter_with_object() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $function_index = _wp_filter_build_unique_id( $tag, $callback, $priority ); - $this->assertEquals( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); - $this->assertEquals( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); + $this->assertSame( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); + $this->assertSame( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); } public function test_add_filter_with_static_method() { @@ -49,8 +50,8 @@ public function test_add_filter_with_static_method() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $function_index = _wp_filter_build_unique_id( $tag, $callback, $priority ); - $this->assertEquals( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); - $this->assertEquals( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); + $this->assertSame( $callback, $hook->callbacks[ $priority ][ $function_index ]['function'] ); + $this->assertSame( $accepted_args, $hook->callbacks[ $priority ][ $function_index ]['accepted_args'] ); } public function test_add_two_filters_with_same_priority() { @@ -124,7 +125,7 @@ public function test_sort_after_add_filter() { $hook->add_filter( $tag, array( $b, 'action' ), 5, 1 ); $hook->add_filter( $tag, array( $c, 'action' ), 8, 1 ); - $this->assertEquals( array( 5, 8, 10 ), array_keys( $hook->callbacks ) ); + $this->assertSame( array( 5, 8, 10 ), array_keys( $hook->callbacks ) ); } public function test_remove_and_add() { diff --git a/tests/phpunit/tests/hooks/applyFilters.php b/tests/phpunit/tests/hooks/applyFilters.php index 1879cbf70bdb7..fcb8e3b126edb 100644 --- a/tests/phpunit/tests/hooks/applyFilters.php +++ b/tests/phpunit/tests/hooks/applyFilters.php @@ -4,8 +4,9 @@ * Test the apply_filters method of WP_Hook * * @group hooks + * @covers WP_Hook::apply_filters */ -class Tests_WP_Hook_Apply_Filters extends WP_UnitTestCase { +class Tests_Hooks_ApplyFilters extends WP_UnitTestCase { public function test_apply_filters_with_callback() { $a = new MockAction(); @@ -20,8 +21,8 @@ public function test_apply_filters_with_callback() { $returned = $hook->apply_filters( $arg, array( $arg ) ); - $this->assertEquals( $returned, $arg ); - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( $returned, $arg ); + $this->assertSame( 1, $a->get_call_count() ); } public function test_apply_filters_with_multiple_calls() { @@ -38,8 +39,8 @@ public function test_apply_filters_with_multiple_calls() { $returned_one = $hook->apply_filters( $arg, array( $arg ) ); $returned_two = $hook->apply_filters( $returned_one, array( $returned_one ) ); - $this->assertEquals( $returned_two, $arg ); - $this->assertEquals( 2, $a->get_call_count() ); + $this->assertSame( $returned_two, $arg ); + $this->assertSame( 2, $a->get_call_count() ); } } diff --git a/tests/phpunit/tests/hooks/doAction.php b/tests/phpunit/tests/hooks/doAction.php index 34f90eae3a76a..0fb5652f3ba65 100644 --- a/tests/phpunit/tests/hooks/doAction.php +++ b/tests/phpunit/tests/hooks/doAction.php @@ -4,14 +4,15 @@ * Test the do_action method of WP_Hook * * @group hooks + * @covers WP_Hook::do_action */ -class Tests_WP_Hook_Do_Action extends WP_UnitTestCase { +class Tests_Hooks_DoAction extends WP_UnitTestCase { private $events = array(); private $action_output = ''; private $hook; - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->events = array(); } @@ -27,7 +28,7 @@ public function test_do_action_with_callback() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $hook->do_action( array( $arg ) ); - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); } public function test_do_action_with_multiple_calls() { @@ -43,7 +44,7 @@ public function test_do_action_with_multiple_calls() { $hook->do_action( array( $arg ) ); $hook->do_action( array( $arg ) ); - $this->assertEquals( 2, $a->get_call_count() ); + $this->assertSame( 2, $a->get_call_count() ); } public function test_do_action_with_multiple_callbacks_on_same_priority() { @@ -61,8 +62,8 @@ public function test_do_action_with_multiple_callbacks_on_same_priority() { $hook->add_filter( $tag, $callback_two, $priority, $accepted_args ); $hook->do_action( array( $arg ) ); - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); } public function test_do_action_with_multiple_callbacks_on_different_priorities() { @@ -80,8 +81,8 @@ public function test_do_action_with_multiple_callbacks_on_different_priorities() $hook->add_filter( $tag, $callback_two, $priority + 1, $accepted_args ); $hook->do_action( array( $arg ) ); - $this->assertEquals( 1, $a->get_call_count() ); - $this->assertEquals( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); + $this->assertSame( 1, $a->get_call_count() ); } public function test_do_action_with_no_accepted_args() { diff --git a/tests/phpunit/tests/hooks/doAllHook.php b/tests/phpunit/tests/hooks/doAllHook.php index abaf92525bf7e..29eec96428f25 100644 --- a/tests/phpunit/tests/hooks/doAllHook.php +++ b/tests/phpunit/tests/hooks/doAllHook.php @@ -4,8 +4,9 @@ * Test the do_all_hook method of WP_Hook * * @group hooks + * @covers WP_Hook::do_all_hook */ -class Tests_WP_Hook_Do_All_Hook extends WP_UnitTestCase { +class Tests_Hooks_DoAllHook extends WP_UnitTestCase { public function test_do_all_hook_with_multiple_calls() { $a = new MockAction(); @@ -21,6 +22,6 @@ public function test_do_all_hook_with_multiple_calls() { $hook->do_all_hook( $args ); $hook->do_all_hook( $args ); - $this->assertEquals( 2, $a->get_call_count() ); + $this->assertSame( 2, $a->get_call_count() ); } } diff --git a/tests/phpunit/tests/hooks/hasFilter.php b/tests/phpunit/tests/hooks/hasFilter.php index 61b79861c3dd7..f9d48b3d4eb55 100644 --- a/tests/phpunit/tests/hooks/hasFilter.php +++ b/tests/phpunit/tests/hooks/hasFilter.php @@ -4,8 +4,9 @@ * Test the has_filter method of WP_Hook * * @group hooks + * @covers WP_Hook::has_filter */ -class Tests_WP_Hook_Has_Filter extends WP_UnitTestCase { +class Tests_Hooks_HasFilter extends WP_UnitTestCase { public function test_has_filter_with_function() { $callback = '__return_null'; @@ -16,7 +17,7 @@ public function test_has_filter_with_function() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); - $this->assertEquals( $priority, $hook->has_filter( $tag, $callback ) ); + $this->assertSame( $priority, $hook->has_filter( $tag, $callback ) ); } public function test_has_filter_with_object() { @@ -29,7 +30,7 @@ public function test_has_filter_with_object() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); - $this->assertEquals( $priority, $hook->has_filter( $tag, $callback ) ); + $this->assertSame( $priority, $hook->has_filter( $tag, $callback ) ); } public function test_has_filter_with_static_method() { @@ -41,7 +42,7 @@ public function test_has_filter_with_static_method() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); - $this->assertEquals( $priority, $hook->has_filter( $tag, $callback ) ); + $this->assertSame( $priority, $hook->has_filter( $tag, $callback ) ); } public function test_has_filter_without_callback() { diff --git a/tests/phpunit/tests/hooks/hasFilters.php b/tests/phpunit/tests/hooks/hasFilters.php index b8c73f0020c60..f5c1e657fc4a4 100644 --- a/tests/phpunit/tests/hooks/hasFilters.php +++ b/tests/phpunit/tests/hooks/hasFilters.php @@ -4,8 +4,9 @@ * Test the has_filters method of WP_Hook * * @group hooks + * @covers WP_Hook::has_filters */ -class Tests_WP_Hook_Has_Filters extends WP_UnitTestCase { +class Tests_Hooks_HasFilters extends WP_UnitTestCase { public function test_has_filters_with_callback() { $callback = '__return_null'; diff --git a/tests/phpunit/tests/hooks/iterator.php b/tests/phpunit/tests/hooks/iterator.php index 5592880b0c59a..4840aa3d4df2b 100644 --- a/tests/phpunit/tests/hooks/iterator.php +++ b/tests/phpunit/tests/hooks/iterator.php @@ -4,8 +4,9 @@ * Test the Iterator implementation of WP_Hook * * @group hooks + * @covers WP_Hook::add_filter */ -class Tests_WP_Hook_Iterator extends WP_UnitTestCase { +class Tests_Hooks_Iterator extends WP_UnitTestCase { public function test_foreach() { $callback_one = '__return_null'; @@ -26,7 +27,7 @@ public function test_foreach() { $functions[] = $the_['function']; } } - $this->assertEqualSets( array( $priority, $priority + 1 ), $priorities ); - $this->assertEqualSets( array( $callback_one, $callback_two ), $functions ); + $this->assertSameSets( array( $priority, $priority + 1 ), $priorities ); + $this->assertSameSets( array( $callback_one, $callback_two ), $functions ); } } diff --git a/tests/phpunit/tests/hooks/preinitHooks.php b/tests/phpunit/tests/hooks/preinitHooks.php index 8211a16b3bec1..551d64400f417 100644 --- a/tests/phpunit/tests/hooks/preinitHooks.php +++ b/tests/phpunit/tests/hooks/preinitHooks.php @@ -4,8 +4,9 @@ * Test the IteratorAggregate implementation of WP_Hook * * @group hooks + * @covers WP_Hook::build_preinitialized_hooks */ -class Tests_WP_Hook_Preinit_Hooks extends WP_UnitTestCase { +class Tests_Hooks_PreinitHooks extends WP_UnitTestCase { public function test_array_to_hooks() { $tag1 = __FUNCTION__ . '_1'; @@ -33,7 +34,7 @@ public function test_array_to_hooks() { $hooks = WP_Hook::build_preinitialized_hooks( $filters ); - $this->assertEquals( $priority1, $hooks[ $tag1 ]->has_filter( $tag1, '__return_false' ) ); - $this->assertEquals( $priority2, $hooks[ $tag2 ]->has_filter( $tag2, '__return_null' ) ); + $this->assertSame( $priority1, $hooks[ $tag1 ]->has_filter( $tag1, '__return_false' ) ); + $this->assertSame( $priority2, $hooks[ $tag2 ]->has_filter( $tag2, '__return_null' ) ); } } diff --git a/tests/phpunit/tests/hooks/removeAllFilters.php b/tests/phpunit/tests/hooks/removeAllFilters.php index 9a0f013d0f20d..cfaf81f4c8ad8 100644 --- a/tests/phpunit/tests/hooks/removeAllFilters.php +++ b/tests/phpunit/tests/hooks/removeAllFilters.php @@ -4,8 +4,9 @@ * Test the remove_all_filters method of WP_Hook * * @group hooks + * @covers WP_Hook::remove_all_filters */ -class Tests_WP_Hook_Remove_All_Filters extends WP_UnitTestCase { +class Tests_Hooks_RemoveAllFilters extends WP_UnitTestCase { public function test_remove_all_filters() { $callback = '__return_null'; @@ -36,6 +37,6 @@ public function test_remove_all_filters_with_priority() { $this->assertFalse( $hook->has_filter( $tag, $callback_one ) ); $this->assertTrue( $hook->has_filters() ); - $this->assertEquals( $priority + 1, $hook->has_filter( $tag, $callback_two ) ); + $this->assertSame( $priority + 1, $hook->has_filter( $tag, $callback_two ) ); } } diff --git a/tests/phpunit/tests/hooks/removeFilter.php b/tests/phpunit/tests/hooks/removeFilter.php index c3511300a1de7..793cd02b3cf5d 100644 --- a/tests/phpunit/tests/hooks/removeFilter.php +++ b/tests/phpunit/tests/hooks/removeFilter.php @@ -4,8 +4,9 @@ * Test the remove_filter method of WP_Hook * * @group hooks + * @covers WP_Hook::remove_filter */ -class Tests_WP_Hook_Remove_Filter extends WP_UnitTestCase { +class Tests_Hooks_RemoveFilter extends WP_UnitTestCase { public function test_remove_filter_with_function() { $callback = '__return_null'; @@ -17,7 +18,7 @@ public function test_remove_filter_with_function() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $hook->remove_filter( $tag, $callback, $priority ); - $this->assertFalse( isset( $hook->callbacks[ $priority ] ) ); + $this->assertArrayNotHasKey( $priority, $hook->callbacks ); } public function test_remove_filter_with_object() { @@ -31,7 +32,7 @@ public function test_remove_filter_with_object() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $hook->remove_filter( $tag, $callback, $priority ); - $this->assertFalse( isset( $hook->callbacks[ $priority ] ) ); + $this->assertArrayNotHasKey( $priority, $hook->callbacks ); } public function test_remove_filter_with_static_method() { @@ -44,7 +45,7 @@ public function test_remove_filter_with_static_method() { $hook->add_filter( $tag, $callback, $priority, $accepted_args ); $hook->remove_filter( $tag, $callback, $priority ); - $this->assertFalse( isset( $hook->callbacks[ $priority ] ) ); + $this->assertArrayNotHasKey( $priority, $hook->callbacks ); } public function test_remove_filters_with_another_at_same_priority() { @@ -75,7 +76,7 @@ public function test_remove_filter_with_another_at_different_priority() { $hook->add_filter( $tag, $callback_two, $priority + 1, $accepted_args ); $hook->remove_filter( $tag, $callback_one, $priority ); - $this->assertFalse( isset( $hook->callbacks[ $priority ] ) ); + $this->assertArrayNotHasKey( $priority, $hook->callbacks ); $this->assertCount( 1, $hook->callbacks[ $priority + 1 ] ); } } diff --git a/tests/phpunit/tests/http/base.php b/tests/phpunit/tests/http/base.php index d43805612616b..ee42056bb3d36 100644 --- a/tests/phpunit/tests/http/base.php +++ b/tests/phpunit/tests/http/base.php @@ -12,22 +12,17 @@ */ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { // You can use your own version of data/WPHTTP-testcase-redirection-script.php here. - var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php'; - var $file_stream_url = 'http://s.w.org/screenshots/3.9/dashboard.png'; + public $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php'; + public $file_stream_url = 'http://s.w.org/screenshots/3.9/dashboard.png'; protected $http_request_args; - function setUp() { - parent::setUp(); - - if ( is_callable( array( 'WP_Http', '_getTransport' ) ) ) { - $this->markTestSkipped( 'The WP_Http tests require a class-http.php file of r17550 or later.' ); - return; - } + public function set_up() { + parent::set_up(); $class = 'WP_Http_' . ucfirst( $this->transport ); if ( ! call_user_func( array( $class, 'test' ) ) ) { - $this->markTestSkipped( sprintf( 'The transport %s is not supported on this system', $this->transport ) ); + $this->markTestSkipped( sprintf( 'The transport %s is not supported on this system.', $this->transport ) ); } // Disable all transports aside from this one. @@ -39,82 +34,93 @@ function setUp() { } } - function tearDown() { - foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) { - remove_filter( "use_{$t}_transport", '__return_false' ); - } - parent::tearDown(); - } - - function filter_http_request_args( array $args ) { + public function filter_http_request_args( array $args ) { $this->http_request_args = $args; return $args; } - function test_redirect_on_301() { + /** + * @covers ::wp_remote_request + */ + public function test_redirect_on_301() { // 5 : 5 & 301. $res = wp_remote_request( $this->redirection_script . '?code=301&rt=' . 5, array( 'redirection' => 5 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 200, (int) $res['response']['code'] ); + $this->assertSame( 200, (int) $res['response']['code'] ); } - function test_redirect_on_302() { + /** + * @covers ::wp_remote_request + */ + public function test_redirect_on_302() { // 5 : 5 & 302. $res = wp_remote_request( $this->redirection_script . '?code=302&rt=' . 5, array( 'redirection' => 5 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 200, (int) $res['response']['code'] ); + $this->assertSame( 200, (int) $res['response']['code'] ); } /** * @ticket 16855 + * + * @covers ::wp_remote_request */ - function test_redirect_on_301_no_redirect() { + public function test_redirect_on_301_no_redirect() { // 5 > 0 & 301. $res = wp_remote_request( $this->redirection_script . '?code=301&rt=' . 5, array( 'redirection' => 0 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 301, (int) $res['response']['code'] ); + $this->assertSame( 301, (int) $res['response']['code'] ); } /** * @ticket 16855 + * + * @covers ::wp_remote_request */ - function test_redirect_on_302_no_redirect() { + public function test_redirect_on_302_no_redirect() { // 5 > 0 & 302. $res = wp_remote_request( $this->redirection_script . '?code=302&rt=' . 5, array( 'redirection' => 0 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 302, (int) $res['response']['code'] ); + $this->assertSame( 302, (int) $res['response']['code'] ); } - function test_redirections_equal() { + /** + * @covers ::wp_remote_request + */ + public function test_redirections_equal() { // 5 - 5. $res = wp_remote_request( $this->redirection_script . '?rt=' . 5, array( 'redirection' => 5 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 200, (int) $res['response']['code'] ); + $this->assertSame( 200, (int) $res['response']['code'] ); } - function test_no_head_redirections() { + /** + * @covers ::wp_remote_request + */ + public function test_no_head_redirections() { // No redirections on HEAD request. $res = wp_remote_request( $this->redirection_script . '?code=302&rt=' . 1, array( 'method' => 'HEAD' ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 302, (int) $res['response']['code'] ); + $this->assertSame( 302, (int) $res['response']['code'] ); } /** * @ticket 16855 + * + * @covers ::wp_remote_request */ - function test_redirect_on_head() { + public function test_redirect_on_head() { // Redirections on HEAD request when Requested. $res = wp_remote_request( $this->redirection_script . '?rt=' . 5, @@ -126,10 +132,13 @@ function test_redirect_on_head() { $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 200, (int) $res['response']['code'] ); + $this->assertSame( 200, (int) $res['response']['code'] ); } - function test_redirections_greater() { + /** + * @covers ::wp_remote_request + */ + public function test_redirections_greater() { // 10 > 5. $res = wp_remote_request( $this->redirection_script . '?rt=' . 10, array( 'redirection' => 5 ) ); @@ -137,7 +146,10 @@ function test_redirections_greater() { $this->assertWPError( $res ); } - function test_redirections_greater_edgecase() { + /** + * @covers ::wp_remote_request + */ + public function test_redirections_greater_edgecase() { // 6 > 5 (close edge case). $res = wp_remote_request( $this->redirection_script . '?rt=' . 6, array( 'redirection' => 5 ) ); @@ -145,7 +157,10 @@ function test_redirections_greater_edgecase() { $this->assertWPError( $res ); } - function test_redirections_less_edgecase() { + /** + * @covers ::wp_remote_request + */ + public function test_redirections_less_edgecase() { // 4 < 5 (close edge case). $res = wp_remote_request( $this->redirection_script . '?rt=' . 4, array( 'redirection' => 5 ) ); @@ -155,36 +170,43 @@ function test_redirections_less_edgecase() { /** * @ticket 16855 + * + * @covers ::wp_remote_request */ - function test_redirections_zero_redirections_specified() { + public function test_redirections_zero_redirections_specified() { // 0 redirections asked for, should return the document? $res = wp_remote_request( $this->redirection_script . '?code=302&rt=' . 5, array( 'redirection' => 0 ) ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 302, (int) $res['response']['code'] ); + $this->assertSame( 302, (int) $res['response']['code'] ); } /** * Do not redirect on non 3xx status codes. * * @ticket 16889 + * + * @covers ::wp_remote_request */ - function test_location_header_on_201() { + public function test_location_header_on_201() { // Prints PASS on initial load, FAIL if the client follows the specified redirection. $res = wp_remote_request( $this->redirection_script . '?201-location=true' ); $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( 'PASS', $res['body'] ); + $this->assertSame( 'PASS', $res['body'] ); } /** * Test handling of PUT requests on redirects. * * @ticket 16889 + * + * @covers ::wp_remote_request + * @covers ::wp_remote_retrieve_body */ - function test_no_redirection_on_PUT() { + public function test_no_redirection_on_PUT() { $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?201-location=1'; // Test 301 - POST to POST. @@ -197,14 +219,16 @@ function test_no_redirection_on_PUT() { ); $this->skipTestOnTimeout( $res ); - $this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) ); - $this->assertTrue( ! empty( $res['headers']['location'] ) ); + $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); + $this->assertNotEmpty( $res['headers']['location'] ); } /** * @ticket 11888 + * + * @covers ::wp_remote_request */ - function test_send_headers() { + public function test_send_headers() { // Test that the headers sent are received by the server. $headers = array( 'test1' => 'test', @@ -226,14 +250,20 @@ function test_send_headers() { $headers[ $parts[0] ] = $parts[1]; } - $this->assertTrue( isset( $headers['test1'] ) && 'test' === $headers['test1'] ); - $this->assertTrue( isset( $headers['test2'] ) && '0' === $headers['test2'] ); + $this->assertArrayHasKey( 'test1', $headers ); + $this->assertSame( 'test', $headers['test1'] ); + $this->assertArrayHasKey( 'test2', $headers ); + $this->assertSame( '0', $headers['test2'] ); // cURL/HTTP Extension Note: Will never pass, cURL does not pass headers with an empty value. // Should it be that empty headers with empty values are NOT sent? - // $this->assertTrue( isset( $headers['test3'] ) && '' === $headers['test3'] ); + // $this->assertArrayHasKey( 'test3', $headers ); + // $this->assertSame( '', $headers['test3'] ); } - function test_file_stream() { + /** + * @covers ::wp_remote_request + */ + public function test_file_stream() { $url = $this->file_stream_url; $size = 153204; $res = wp_remote_request( @@ -252,16 +282,18 @@ function test_file_stream() { $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( '', $res['body'] ); // The body should be empty. + $this->assertSame( '', $res['body'] ); // The body should be empty. $this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same). - $this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. + $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. $this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp directory. } /** * @ticket 26726 + * + * @covers ::wp_remote_request */ - function test_file_stream_limited_size() { + public function test_file_stream_limited_size() { $url = $this->file_stream_url; $size = 10000; $res = wp_remote_request( @@ -281,7 +313,7 @@ function test_file_stream_limited_size() { $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. + $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. } @@ -289,8 +321,10 @@ function test_file_stream_limited_size() { * Tests limiting the response size when returning strings. * * @ticket 31172 + * + * @covers ::wp_remote_request */ - function test_request_limited_size() { + public function test_request_limited_size() { $url = $this->file_stream_url; $size = 10000; @@ -304,7 +338,7 @@ function test_request_limited_size() { $this->skipTestOnTimeout( $res ); $this->assertNotWPError( $res ); - $this->assertEquals( $size, strlen( $res['body'] ) ); + $this->assertSame( $size, strlen( $res['body'] ) ); } /** @@ -313,14 +347,17 @@ function test_request_limited_size() { * @dataProvider data_post_redirect_to_method_300 * * @ticket 17588 + * + * @covers ::wp_remote_post + * @covers ::wp_remote_retrieve_body */ - function test_post_redirect_to_method_300( $response_code, $method ) { + public function test_post_redirect_to_method_300( $response_code, $method ) { $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?post-redirect-to-method=1'; $res = wp_remote_post( add_query_arg( 'response_code', $response_code, $url ), array( 'timeout' => 30 ) ); $this->skipTestOnTimeout( $res ); - $this->assertEquals( $method, wp_remote_retrieve_body( $res ) ); + $this->assertSame( $method, wp_remote_retrieve_body( $res ) ); } public function data_post_redirect_to_method_300() { @@ -352,8 +389,11 @@ public function data_post_redirect_to_method_300() { * Test HTTP Requests using an IP URL, with a HOST header specified. * * @ticket 24182 + * + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_body */ - function test_ip_url_with_host_header() { + public function test_ip_url_with_host_header() { $ip = gethostbyname( 'api.wordpress.org' ); $url = 'http://' . $ip . '/core/tests/1.0/redirection.php?print-pass=1'; $args = array( @@ -367,7 +407,7 @@ function test_ip_url_with_host_header() { $res = wp_remote_get( $url, $args ); $this->skipTestOnTimeout( $res ); - $this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) ); + $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); } @@ -375,8 +415,10 @@ function test_ip_url_with_host_header() { * Test HTTP requests where SSL verification is disabled but the CA bundle is still populated. * * @ticket 33978 + * + * @covers ::wp_remote_head */ - function test_https_url_without_ssl_verification() { + public function test_https_url_without_ssl_verification() { $url = 'https://wordpress.org/'; $args = array( 'sslverify' => false, @@ -397,19 +439,24 @@ function test_https_url_without_ssl_verification() { * Test HTTP Redirects with multiple Location headers specified. * * @ticket 16890 + * + * @covers ::wp_remote_head + * @covers ::wp_remote_retrieve_header + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_body */ - function test_multiple_location_headers() { + public function test_multiple_location_headers() { $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1'; $res = wp_remote_head( $url, array( 'timeout' => 30 ) ); $this->skipTestOnTimeout( $res ); - $this->assertInternalType( 'array', wp_remote_retrieve_header( $res, 'location' ) ); + $this->assertIsArray( wp_remote_retrieve_header( $res, 'location' ) ); $this->assertCount( 2, wp_remote_retrieve_header( $res, 'location' ) ); $res = wp_remote_get( $url, array( 'timeout' => 30 ) ); $this->skipTestOnTimeout( $res ); - $this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) ); + $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); } @@ -417,14 +464,17 @@ function test_multiple_location_headers() { * Test HTTP Cookie handling. * * @ticket 21182 + * + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_body */ - function test_cookie_handling() { + public function test_cookie_handling() { $url = 'http://api.wordpress.org/core/tests/1.0/redirection.php?cookie-test=1'; $res = wp_remote_get( $url ); $this->skipTestOnTimeout( $res ); - $this->assertEquals( 'PASS', wp_remote_retrieve_body( $res ) ); + $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); } /** @@ -432,10 +482,12 @@ function test_cookie_handling() { * * @group ssl * @ticket 25007 + * + * @covers ::wp_remote_get */ - function test_ssl() { + public function test_ssl() { if ( ! wp_http_supports( array( 'ssl' ) ) ) { - $this->fail( 'This installation of PHP does not support SSL' ); + $this->fail( 'This installation of PHP does not support SSL.' ); } $res = wp_remote_get( 'https://wordpress.org/' ); @@ -446,8 +498,10 @@ function test_ssl() { /** * @ticket 37733 + * + * @covers ::wp_remote_request */ - function test_url_with_double_slashes_path() { + public function test_url_with_double_slashes_path() { $url = $this->redirection_script . '?rt=' . 0; $path = parse_url( $url, PHP_URL_PATH ); diff --git a/tests/phpunit/tests/http/curl.php b/tests/phpunit/tests/http/curl.php index 271e6dd698c11..a7ea135010deb 100644 --- a/tests/phpunit/tests/http/curl.php +++ b/tests/phpunit/tests/http/curl.php @@ -7,10 +7,12 @@ * @group external-http */ class Tests_HTTP_curl extends WP_HTTP_UnitTestCase { - var $transport = 'curl'; + public $transport = 'curl'; /** * @ticket 39783 + * + * @covers ::wp_remote_request */ public function test_http_api_curl_stream_parameter_is_a_reference() { add_action( 'http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10, 3 ); diff --git a/tests/phpunit/tests/http/functions.php b/tests/phpunit/tests/http/functions.php index de272d9a0e0c5..43ec8fd12ca2c 100644 --- a/tests/phpunit/tests/http/functions.php +++ b/tests/phpunit/tests/http/functions.php @@ -6,15 +6,10 @@ */ class Tests_HTTP_Functions extends WP_UnitTestCase { - public function setUp() { - if ( ! extension_loaded( 'openssl' ) ) { - $this->markTestSkipped( 'Tests_HTTP_Functions requires openssl.' ); - } - - parent::setUp(); - } - - function test_head_request() { + /** + * @covers ::wp_remote_head + */ + public function test_head_request() { // This URL gives a direct 200 response. $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; $response = wp_remote_head( $url ); @@ -23,31 +18,42 @@ function test_head_request() { $headers = wp_remote_retrieve_headers( $response ); - $this->assertInternalType( 'array', $response ); + $this->assertIsArray( $response ); - $this->assertEquals( 'image/jpeg', $headers['content-type'] ); - $this->assertEquals( '40148', $headers['content-length'] ); - $this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) ); + $this->assertSame( 'image/jpeg', $headers['content-type'] ); + $this->assertSame( '40148', $headers['content-length'] ); + $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } - function test_head_redirect() { + /** + * @covers ::wp_remote_head + */ + public function test_head_redirect() { // This URL will 301 redirect. $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; $response = wp_remote_head( $url ); $this->skipTestOnTimeout( $response ); - $this->assertEquals( '301', wp_remote_retrieve_response_code( $response ) ); + $this->assertSame( 301, wp_remote_retrieve_response_code( $response ) ); } - function test_head_404() { + /** + * @covers ::wp_remote_head + */ + public function test_head_404() { $url = 'https://asdftestblog1.files.wordpress.com/2007/09/awefasdfawef.jpg'; $response = wp_remote_head( $url ); $this->skipTestOnTimeout( $response ); - $this->assertEquals( '404', wp_remote_retrieve_response_code( $response ) ); + $this->assertSame( 404, wp_remote_retrieve_response_code( $response ) ); } - function test_get_request() { + /** + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_headers + * @covers ::wp_remote_retrieve_response_code + */ + public function test_get_request() { $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; $response = wp_remote_get( $url ); @@ -56,15 +62,20 @@ function test_get_request() { $headers = wp_remote_retrieve_headers( $response ); - $this->assertInternalType( 'array', $response ); + $this->assertIsArray( $response ); // Should return the same headers as a HEAD request. - $this->assertEquals( 'image/jpeg', $headers['content-type'] ); - $this->assertEquals( '40148', $headers['content-length'] ); - $this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) ); + $this->assertSame( 'image/jpeg', $headers['content-type'] ); + $this->assertSame( '40148', $headers['content-length'] ); + $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } - function test_get_redirect() { + /** + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_headers + * @covers ::wp_remote_retrieve_response_code + */ + public function test_get_redirect() { // This will redirect to asdftestblog1.files.wordpress.com. $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; @@ -75,12 +86,15 @@ function test_get_redirect() { $headers = wp_remote_retrieve_headers( $response ); // Should return the same headers as a HEAD request. - $this->assertEquals( 'image/jpeg', $headers['content-type'] ); - $this->assertEquals( '40148', $headers['content-length'] ); - $this->assertEquals( '200', wp_remote_retrieve_response_code( $response ) ); + $this->assertSame( 'image/jpeg', $headers['content-type'] ); + $this->assertSame( '40148', $headers['content-length'] ); + $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } - function test_get_redirect_limit_exceeded() { + /** + * @covers ::wp_remote_get + */ + public function test_get_redirect_limit_exceeded() { // This will redirect to asdftestblog1.files.wordpress.com. $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; @@ -93,8 +107,13 @@ function test_get_redirect_limit_exceeded() { /** * @ticket 33711 + * + * @covers ::wp_remote_head + * @covers ::wp_remote_retrieve_cookies + * @covers ::wp_remote_retrieve_cookie + * @covers ::wp_remote_retrieve_cookie_value */ - function test_get_response_cookies() { + public function test_get_response_cookies() { $url = 'https://login.wordpress.org/wp-login.php'; $response = wp_remote_head( $url ); @@ -122,8 +141,12 @@ function test_get_response_cookies() { /** * @ticket 37437 + * + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_cookies + * @covers ::wp_remote_retrieve_cookie */ - function test_get_response_cookies_with_wp_http_cookie_object() { + public function test_get_response_cookies_with_wp_http_cookie_object() { $url = 'http://example.org'; $response = wp_remote_get( @@ -154,8 +177,12 @@ function test_get_response_cookies_with_wp_http_cookie_object() { /** * @ticket 37437 + * + * @covers ::wp_remote_get + * @covers ::wp_remote_retrieve_cookies + * @covers ::wp_remote_retrieve_cookie */ - function test_get_response_cookies_with_name_value_array() { + public function test_get_response_cookies_with_name_value_array() { $url = 'http://example.org'; $response = wp_remote_get( @@ -181,14 +208,19 @@ function test_get_response_cookies_with_name_value_array() { /** * @ticket 43231 + * + * @covers WP_HTTP_Requests_Response::__construct + * @covers ::wp_remote_retrieve_cookies + * @covers ::wp_remote_retrieve_cookie + * @covers WP_Http */ - function test_get_cookie_host_only() { + public function test_get_cookie_host_only() { // Emulate WP_Http::request() internals. $requests_response = new Requests_Response(); $requests_response->cookies['test'] = Requests_Cookie::parse( 'test=foo; domain=.wordpress.org' ); - $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/rmccue/Requests/issues/306 + $requests_response->cookies['test']->flags['host-only'] = false; // https://github.com/WordPress/Requests/issues/306 $http_response = new WP_HTTP_Requests_Response( $requests_response ); @@ -196,7 +228,7 @@ function test_get_cookie_host_only() { // Check the host_only flag in the resulting WP_Http_Cookie. $cookie = wp_remote_retrieve_cookie( $response, 'test' ); - $this->assertEquals( $cookie->domain, 'wordpress.org' ); + $this->assertSame( $cookie->domain, 'wordpress.org' ); $this->assertFalse( $cookie->host_only, 'host-only flag not set' ); // Regurgitate (Requests_Cookie -> WP_Http_Cookie -> Requests_Cookie). diff --git a/tests/phpunit/tests/http/http.php b/tests/phpunit/tests/http/http.php index f18e6b719f3a2..c22c87d55cb82 100644 --- a/tests/phpunit/tests/http/http.php +++ b/tests/phpunit/tests/http/http.php @@ -10,13 +10,15 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase { /** * @dataProvider make_absolute_url_testcases + * + * @covers WP_Http::make_absolute_url */ - function test_make_absolute_url( $relative_url, $absolute_url, $expected ) { + public function test_make_absolute_url( $relative_url, $absolute_url, $expected ) { $actual = WP_Http::make_absolute_url( $relative_url, $absolute_url ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function make_absolute_url_testcases() { + public function make_absolute_url_testcases() { // 0: The Location header, 1: The current URL, 3: The expected URL. return array( // Absolute URL provided. @@ -69,13 +71,15 @@ function make_absolute_url_testcases() { /** * @dataProvider parse_url_testcases + * + * @covers ::wp_parse_url */ - function test_wp_parse_url( $url, $expected ) { + public function test_wp_parse_url( $url, $expected ) { $actual = wp_parse_url( $url ); - $this->assertEquals( $expected, $actual ); + $this->assertSame( $expected, $actual ); } - function parse_url_testcases() { + public function parse_url_testcases() { // 0: The URL, 1: The expected resulting structure. return array( array( @@ -180,10 +184,12 @@ function parse_url_testcases() { /** * @ticket 36356 + * + * @covers ::wp_parse_url */ - function test_wp_parse_url_with_default_component() { + public function test_wp_parse_url_with_default_component() { $actual = wp_parse_url( self::FULL_TEST_URL, -1 ); - $this->assertEquals( + $this->assertSame( array( 'scheme' => 'http', 'host' => 'host.name', @@ -202,13 +208,15 @@ function test_wp_parse_url_with_default_component() { * @ticket 36356 * * @dataProvider parse_url_component_testcases + * + * @covers ::wp_parse_url */ - function test_wp_parse_url_with_component( $url, $component, $expected ) { + public function test_wp_parse_url_with_component( $url, $component, $expected ) { $actual = wp_parse_url( $url, $component ); $this->assertSame( $expected, $actual ); } - function parse_url_component_testcases() { + public function parse_url_component_testcases() { // 0: The URL, 1: The requested component, 2: The expected resulting structure. return array( array( self::FULL_TEST_URL, PHP_URL_SCHEME, 'http' ), @@ -261,6 +269,8 @@ function parse_url_component_testcases() { /** * @ticket 35426 + * + * @covers ::get_status_header_desc */ public function test_http_response_code_constants() { global $wp_header_to_desc; @@ -271,12 +281,14 @@ public function test_http_response_code_constants() { // This primes the `$wp_header_to_desc` global: get_status_header_desc( 200 ); - $this->assertEquals( array_keys( $wp_header_to_desc ), array_values( $constants ) ); + $this->assertSame( array_keys( $wp_header_to_desc ), array_values( $constants ) ); } /** * @ticket 37768 + * + * @covers WP_Http::normalize_cookies */ public function test_normalize_cookies_scalar_values() { $http = _wp_http_get_object(); @@ -301,7 +313,7 @@ public function test_normalize_cookies_scalar_values() { foreach ( array_keys( $cookies ) as $cookie ) { if ( 'foo' === $cookie ) { - $this->assertFalse( isset( $cookie_jar[ $cookie ] ) ); + $this->assertArrayNotHasKey( $cookie, $cookie_jar ); } else { $this->assertInstanceOf( 'Requests_Cookie', $cookie_jar[ $cookie ] ); } @@ -312,14 +324,17 @@ public function test_normalize_cookies_scalar_values() { * @ticket 36356 * * @dataProvider get_component_from_parsed_url_array_testcases + * + * @covers ::wp_parse_url + * @covers ::_get_component_from_parsed_url_array */ - function test_get_component_from_parsed_url_array( $url, $component, $expected ) { + public function test_get_component_from_parsed_url_array( $url, $component, $expected ) { $parts = wp_parse_url( $url ); $actual = _get_component_from_parsed_url_array( $parts, $component ); $this->assertSame( $expected, $actual ); } - function get_component_from_parsed_url_array_testcases() { + public function get_component_from_parsed_url_array_testcases() { // 0: A URL, 1: PHP URL constant, 2: The expected result. return array( array( @@ -351,13 +366,15 @@ function get_component_from_parsed_url_array_testcases() { * @ticket 36356 * * @dataProvider wp_translate_php_url_constant_to_key_testcases + * + * @covers ::_wp_translate_php_url_constant_to_key */ - function test_wp_translate_php_url_constant_to_key( $input, $expected ) { + public function test_wp_translate_php_url_constant_to_key( $input, $expected ) { $actual = _wp_translate_php_url_constant_to_key( $input ); $this->assertSame( $expected, $actual ); } - function wp_translate_php_url_constant_to_key_testcases() { + public function wp_translate_php_url_constant_to_key_testcases() { // 0: PHP URL constant, 1: The expected result. return array( array( PHP_URL_SCHEME, 'scheme' ), diff --git a/tests/phpunit/tests/http/streams.php b/tests/phpunit/tests/http/streams.php index 61fcc11925667..9ae1b305122f3 100644 --- a/tests/phpunit/tests/http/streams.php +++ b/tests/phpunit/tests/http/streams.php @@ -7,5 +7,5 @@ * @group external-http */ class Tests_HTTP_streams extends WP_HTTP_UnitTestCase { - var $transport = 'streams'; + public $transport = 'streams'; } diff --git a/tests/phpunit/tests/http/getHttpHeaders.php b/tests/phpunit/tests/http/wpGetHttpHeaders.php similarity index 78% rename from tests/phpunit/tests/http/getHttpHeaders.php rename to tests/phpunit/tests/http/wpGetHttpHeaders.php index ccb6b4f545038..4b7b867a49581 100644 --- a/tests/phpunit/tests/http/getHttpHeaders.php +++ b/tests/phpunit/tests/http/wpGetHttpHeaders.php @@ -2,29 +2,20 @@ /** * @group http + * @covers ::wp_get_http_headers */ -class Tests_HTTP_GetHttpHeaders extends WP_UnitTestCase { +class Tests_HTTP_wpGetHttpHeaders extends WP_UnitTestCase { /** * Set up the environment */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); // Hook a fake HTTP request response. add_filter( 'pre_http_request', array( $this, 'fake_http_request' ), 10, 3 ); } - /** - * Clean up environment - */ - public function tearDown() { - parent::tearDown(); - - // Clear the hook for the fake HTTP request response. - remove_filter( 'pre_http_request', array( $this, 'fake_http_request' ) ); - } - /** * Test with a valid URL */ diff --git a/tests/phpunit/tests/http/remoteRetrieveHeaders.php b/tests/phpunit/tests/http/wpRemoteRetrieveHeaders.php similarity index 53% rename from tests/phpunit/tests/http/remoteRetrieveHeaders.php rename to tests/phpunit/tests/http/wpRemoteRetrieveHeaders.php index 4551df7c549c9..9d4390ae54b41 100644 --- a/tests/phpunit/tests/http/remoteRetrieveHeaders.php +++ b/tests/phpunit/tests/http/wpRemoteRetrieveHeaders.php @@ -2,37 +2,38 @@ /** * @group http + * @covers ::wp_remote_retrieve_headers */ -class Tests_HTTP_RemoteRetrieveHeaders extends WP_UnitTestCase { +class Tests_HTTP_wpRemoteRetrieveHeaders extends WP_UnitTestCase { /** * Valid response */ - function test_remote_retrieve_headers_valid_response() { + public function test_remote_retrieve_headers_valid_response() { $headers = 'headers_data'; $response = array( 'headers' => $headers ); $result = wp_remote_retrieve_headers( $response ); - $this->assertEquals( $headers, $result ); + $this->assertSame( $headers, $result ); } /** * Response is a WP_Error */ - function test_remote_retrieve_headers_is_error() { + public function test_remote_retrieve_headers_is_error() { $response = new WP_Error( 'Some error' ); $result = wp_remote_retrieve_headers( $response ); - $this->assertEquals( array(), $result ); + $this->assertSame( array(), $result ); } /** * Response does not contain 'headers' */ - function test_remote_retrieve_headers_invalid_response() { + public function test_remote_retrieve_headers_invalid_response() { $response = array( 'no_headers' => 'set' ); $result = wp_remote_retrieve_headers( $response ); - $this->assertEquals( array(), $result ); + $this->assertSame( array(), $result ); } } diff --git a/tests/phpunit/tests/https-detection.php b/tests/phpunit/tests/https-detection.php new file mode 100644 index 0000000000000..1ae5af13091e1 --- /dev/null +++ b/tests/phpunit/tests/https-detection.php @@ -0,0 +1,352 @@ +assertFalse( wp_is_using_https() ); + + // Expect false if only one of the two relevant URLs is HTTPS. + update_option( 'siteurl', 'https://example.com/' ); + $this->assertFalse( wp_is_using_https() ); + + update_option( 'home', 'https://example.com/' ); + $this->assertTrue( wp_is_using_https() ); + + // Test that the manually included 'site_url' filter works as expected + // by using it to set the URL to use HTTP. + add_filter( 'site_url', $this->filter_set_url_scheme( 'http' ) ); + $this->assertFalse( wp_is_using_https() ); + } + + /** + * @ticket 47577 + */ + public function test_wp_is_https_supported() { + // The function works with cached errors, so only test that here. + $wp_error = new WP_Error(); + + // No errors, so HTTPS is supported. + update_option( 'https_detection_errors', $wp_error->errors ); + $this->assertTrue( wp_is_https_supported() ); + + // Errors, so HTTPS is not supported. + $wp_error->add( 'ssl_verification_failed', 'SSL verification failed.' ); + update_option( 'https_detection_errors', $wp_error->errors ); + $this->assertFalse( wp_is_https_supported() ); + } + + /** + * @ticket 47577 + * @ticket 52484 + */ + public function test_wp_update_https_detection_errors() { + // Set HTTP URL, the request below should use its HTTPS version. + update_option( 'home', 'http://example.com/' ); + add_filter( 'pre_http_request', array( $this, 'record_request_url' ), 10, 3 ); + + // If initial request succeeds, all good. + add_filter( 'pre_http_request', array( $this, 'mock_success_with_sslverify' ), 10, 2 ); + wp_update_https_detection_errors(); + $this->assertSame( array(), get_option( 'https_detection_errors' ) ); + + // If initial request fails and request without SSL verification succeeds, + // return 'ssl_verification_failed' error. + add_filter( 'pre_http_request', array( $this, 'mock_error_with_sslverify' ), 10, 2 ); + add_filter( 'pre_http_request', array( $this, 'mock_success_without_sslverify' ), 10, 2 ); + wp_update_https_detection_errors(); + $this->assertSame( + array( 'ssl_verification_failed' => array( __( 'SSL verification failed.' ) ) ), + get_option( 'https_detection_errors' ) + ); + + // If both initial request and request without SSL verification fail, + // return 'https_request_failed' error. + add_filter( 'pre_http_request', array( $this, 'mock_error_with_sslverify' ), 10, 2 ); + add_filter( 'pre_http_request', array( $this, 'mock_error_without_sslverify' ), 10, 2 ); + wp_update_https_detection_errors(); + $this->assertSame( + array( 'https_request_failed' => array( __( 'HTTPS request failed.' ) ) ), + get_option( 'https_detection_errors' ) + ); + + // If request succeeds, but response is not 200, return error with + // 'bad_response_code' error code. + add_filter( 'pre_http_request', array( $this, 'mock_not_found' ), 10, 2 ); + wp_update_https_detection_errors(); + $this->assertSame( + array( 'bad_response_code' => array( 'Not Found' ) ), + get_option( 'https_detection_errors' ) + ); + + // If request succeeds, but response was not generated by this + // WordPress site, return error with 'bad_response_source' error code. + add_filter( 'pre_http_request', array( $this, 'mock_bad_source' ), 10, 2 ); + wp_update_https_detection_errors(); + $this->assertSame( + array( 'bad_response_source' => array( 'It looks like the response did not come from this site.' ) ), + get_option( 'https_detection_errors' ) + ); + + // Check that the requests are made to the correct URL. + $this->assertSame( 'https://example.com/', $this->last_request_url ); + } + + /** + * @ticket 47577 + */ + public function test_pre_wp_update_https_detection_errors() { + // Override to enforce no errors being detected. + add_filter( + 'pre_wp_update_https_detection_errors', + static function() { + return new WP_Error(); + } + ); + wp_update_https_detection_errors(); + $this->assertSame( array(), get_option( 'https_detection_errors' ) ); + + // Override to enforce an error being detected. + add_filter( + 'pre_wp_update_https_detection_errors', + static function() { + return new WP_Error( + 'ssl_verification_failed', + 'Bad SSL certificate.' + ); + } + ); + wp_update_https_detection_errors(); + $this->assertSame( + array( 'ssl_verification_failed' => array( 'Bad SSL certificate.' ) ), + get_option( 'https_detection_errors' ) + ); + } + + /** + * @ticket 47577 + */ + public function test_wp_schedule_https_detection() { + wp_schedule_https_detection(); + $this->assertSame( 'twicedaily', wp_get_schedule( 'wp_https_detection' ) ); + } + + /** + * @ticket 47577 + */ + public function test_wp_cron_conditionally_prevent_sslverify() { + // If URL is not using HTTPS, don't set 'sslverify' to false. + $request = array( + 'url' => 'http://example.com/', + 'args' => array( 'sslverify' => true ), + ); + $this->assertSame( $request, wp_cron_conditionally_prevent_sslverify( $request ) ); + + // If URL is using HTTPS, set 'sslverify' to false. + $request = array( + 'url' => 'https://example.com/', + 'args' => array( 'sslverify' => true ), + ); + $expected = $request; + $expected['args']['sslverify'] = false; + $this->assertSame( $expected, wp_cron_conditionally_prevent_sslverify( $request ) ); + } + + /** + * @ticket 47577 + * @ticket 52542 + */ + public function test_wp_is_local_html_output_via_rsd_link() { + // HTML includes RSD link. + $head_tag = get_echo( 'rsd_link' ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes modified RSD link but same URL. + $head_tag = str_replace( ' />', '>', get_echo( 'rsd_link' ) ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes RSD link with alternative URL scheme. + $head_tag = get_echo( 'rsd_link' ); + $head_tag = false !== strpos( $head_tag, 'https://' ) ? str_replace( 'https://', 'http://', $head_tag ) : str_replace( 'http://', 'https://', $head_tag ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML does not include RSD link. + $html = $this->get_sample_html_string(); + $this->assertFalse( wp_is_local_html_output( $html ) ); + } + + /** + * @ticket 47577 + */ + public function test_wp_is_local_html_output_via_wlwmanifest_link() { + remove_action( 'wp_head', 'rsd_link' ); + + // HTML includes WLW manifest link. + $head_tag = get_echo( 'wlwmanifest_link' ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes modified WLW manifest link but same URL. + $head_tag = str_replace( ' />', '>', get_echo( 'wlwmanifest_link' ) ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes WLW manifest link with alternative URL scheme. + $head_tag = get_echo( 'wlwmanifest_link' ); + $head_tag = false !== strpos( $head_tag, 'https://' ) ? str_replace( 'https://', 'http://', $head_tag ) : str_replace( 'http://', 'https://', $head_tag ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML does not include WLW manifest link. + $html = $this->get_sample_html_string(); + $this->assertFalse( wp_is_local_html_output( $html ) ); + } + + /** + * @ticket 47577 + */ + public function test_wp_is_local_html_output_via_rest_link() { + remove_action( 'wp_head', 'rsd_link' ); + remove_action( 'wp_head', 'wlwmanifest_link' ); + + // HTML includes REST API link. + $head_tag = get_echo( 'rest_output_link_wp_head' ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes modified REST API link but same URL. + $head_tag = str_replace( ' />', '>', get_echo( 'rest_output_link_wp_head' ) ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML includes REST API link with alternative URL scheme. + $head_tag = get_echo( 'rest_output_link_wp_head' ); + $head_tag = false !== strpos( $head_tag, 'https://' ) ? str_replace( 'https://', 'http://', $head_tag ) : str_replace( 'http://', 'https://', $head_tag ); + $html = $this->get_sample_html_string( $head_tag ); + $this->assertTrue( wp_is_local_html_output( $html ) ); + + // HTML does not include REST API link. + $html = $this->get_sample_html_string(); + $this->assertFalse( wp_is_local_html_output( $html ) ); + } + + /** + * @ticket 47577 + */ + public function test_wp_is_local_html_output_cannot_determine() { + remove_action( 'wp_head', 'rsd_link' ); + remove_action( 'wp_head', 'wlwmanifest_link' ); + remove_action( 'wp_head', 'rest_output_link_wp_head' ); + + // The HTML here doesn't matter because all hooks are removed. + $html = $this->get_sample_html_string(); + $this->assertNull( wp_is_local_html_output( $html ) ); + } + + public function record_request_url( $preempt, $parsed_args, $url ) { + $this->last_request_url = $url; + return $preempt; + } + + public function mock_success_with_sslverify( $preempt, $parsed_args ) { + if ( ! empty( $parsed_args['sslverify'] ) ) { + return $this->mock_success(); + } + return $preempt; + } + + public function mock_error_with_sslverify( $preempt, $parsed_args ) { + if ( ! empty( $parsed_args['sslverify'] ) ) { + return $this->mock_error(); + } + return $preempt; + } + + public function mock_success_without_sslverify( $preempt, $parsed_args ) { + if ( empty( $parsed_args['sslverify'] ) ) { + return $this->mock_success(); + } + return $preempt; + } + + public function mock_error_without_sslverify( $preempt, $parsed_args ) { + if ( empty( $parsed_args['sslverify'] ) ) { + return $this->mock_error(); + } + return $preempt; + } + + public function mock_not_found() { + return array( + 'body' => '404Not Found', + 'response' => array( + 'code' => 404, + 'message' => 'Not Found', + ), + ); + } + + public function mock_bad_source() { + // Looks like a success response, but is not generated by WordPress (e.g. missing RSD link). + return array( + 'body' => $this->get_sample_html_string(), + 'response' => array( + 'code' => 200, + 'message' => 'OK', + ), + ); + } + + private function mock_success() { + // Success response containing RSD link. + return array( + 'body' => $this->get_sample_html_string( get_echo( 'rsd_link' ) ), + 'response' => array( + 'code' => 200, + 'message' => 'OK', + ), + ); + } + + private function mock_error() { + return new WP_Error( 'bad_ssl_certificate', 'Bad SSL certificate.' ); + } + + private function get_sample_html_string( $head_tag = '' ) { + return 'Page Title' . $head_tag . 'Page Content.'; + } + + /** + * Returns a filter callback that expects a URL and will set the URL scheme + * to the provided $scheme. + * + * @param string $scheme URL scheme to set. + * @return callable Filter callback. + */ + private function filter_set_url_scheme( $scheme ) { + return static function( $url ) use ( $scheme ) { + return set_url_scheme( $url, $scheme ); + }; + } +} diff --git a/tests/phpunit/tests/https-migration.php b/tests/phpunit/tests/https-migration.php new file mode 100644 index 0000000000000..d06e1f0fba053 --- /dev/null +++ b/tests/phpunit/tests/https-migration.php @@ -0,0 +1,180 @@ +force_wp_is_using_https( false ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + + // Should still return false because HTTPS migration flag is not set. + $this->force_wp_is_using_https( true ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + + // Should return false because HTTPS migration flag is marked as not required. + update_option( 'https_migration_required', '0' ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + + // Should return true because HTTPS migration flag is marked as required. + update_option( 'https_migration_required', '1' ); + $this->assertTrue( wp_should_replace_insecure_home_url() ); + + // Should be overridable via filter. + add_filter( 'wp_should_replace_insecure_home_url', '__return_false' ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + } + + /** + * @ticket 51437 + */ + public function test_wp_replace_insecure_home_url() { + $http_url = home_url( '', 'http' ); + $https_url = home_url( '', 'https' ); + + $http_block_data = array( + 'id' => 3, + 'url' => $http_url . '/wp-content/uploads/2021/01/image.jpg', + ); + $https_block_data = array( + 'id' => 3, + 'url' => $https_url . '/wp-content/uploads/2021/01/image.jpg', + ); + + $content = ' + +

          This is a link.

          + + + + + + '; + + $http_content = sprintf( $content, $http_url, wp_json_encode( $http_block_data ), $http_block_data['url'] ); + $https_content = sprintf( $content, $https_url, wp_json_encode( $https_block_data ), $https_block_data['url'] ); + + // Replaces URLs, including its encoded variant. + add_filter( 'wp_should_replace_insecure_home_url', '__return_true' ); + $this->assertSame( $https_content, wp_replace_insecure_home_url( $http_content ) ); + + // Does not replace anything if determined as unnecessary. + add_filter( 'wp_should_replace_insecure_home_url', '__return_false' ); + $this->assertSame( $http_content, wp_replace_insecure_home_url( $http_content ) ); + } + + /** + * @ticket 51437 + */ + public function test_wp_update_urls_to_https() { + remove_all_filters( 'option_home' ); + remove_all_filters( 'option_siteurl' ); + remove_all_filters( 'home_url' ); + remove_all_filters( 'site_url' ); + + $http_url = 'http://example.org'; + $https_url = 'https://example.org'; + + // Set up options to use HTTP URLs. + update_option( 'home', $http_url ); + update_option( 'siteurl', $http_url ); + + // Update URLs to HTTPS (successfully). + $this->assertTrue( wp_update_urls_to_https() ); + $this->assertSame( $https_url, get_option( 'home' ) ); + $this->assertSame( $https_url, get_option( 'siteurl' ) ); + + // Switch options back to use HTTP URLs, but now add filter to + // force option value which will make the update irrelevant. + update_option( 'home', $http_url ); + update_option( 'siteurl', $http_url ); + $this->force_option( 'home', $http_url ); + + // Update URLs to HTTPS. While the update technically succeeds, it does not take effect due to the enforced + // option. Therefore the change is expected to be reverted. + $this->assertFalse( wp_update_urls_to_https() ); + $this->assertSame( $http_url, get_option( 'home' ) ); + $this->assertSame( $http_url, get_option( 'siteurl' ) ); + } + + /** + * @ticket 51437 + */ + public function test_wp_update_https_migration_required() { + // Changing HTTP to HTTPS on a site with content should result in flag being set, requiring migration. + update_option( 'fresh_site', '0' ); + wp_update_https_migration_required( 'http://example.org', 'https://example.org' ); + $this->assertTrue( get_option( 'https_migration_required' ) ); + + // Changing another part than the scheme should delete/reset the flag because changing those parts (e.g. the + // domain) can have further implications. + wp_update_https_migration_required( 'http://example.org', 'https://another-example.org' ); + $this->assertFalse( get_option( 'https_migration_required' ) ); + + // Changing HTTP to HTTPS on a site without content should result in flag being set, but not requiring migration. + update_option( 'fresh_site', '1' ); + wp_update_https_migration_required( 'http://example.org', 'https://example.org' ); + $this->assertFalse( get_option( 'https_migration_required' ) ); + + // Changing (back) from HTTPS to HTTP should delete/reset the flag. + wp_update_https_migration_required( 'https://example.org', 'http://example.org' ); + $this->assertFalse( get_option( 'https_migration_required' ) ); + } + + /** + * @ticket 51437 + */ + public function test_wp_should_replace_insecure_home_url_integration() { + // Setup (a site on HTTP, with existing content). + remove_all_filters( 'option_home' ); + remove_all_filters( 'option_siteurl' ); + remove_all_filters( 'home_url' ); + remove_all_filters( 'site_url' ); + $http_url = 'http://example.org'; + $https_url = 'https://example.org'; + update_option( 'home', $http_url ); + update_option( 'siteurl', $http_url ); + update_option( 'fresh_site', '0' ); + + // Should return false when URLs are HTTP. + $this->assertFalse( wp_should_replace_insecure_home_url() ); + + // Should still return false because only one of the two URLs was updated to its HTTPS counterpart. + update_option( 'home', $https_url ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + + // Should return true because now both URLs are updated to their HTTPS counterpart. + update_option( 'siteurl', $https_url ); + $this->assertTrue( wp_should_replace_insecure_home_url() ); + + // Should return false because the domains of 'home' and 'siteurl' do not match, and we shouldn't make any + // assumptions about such special cases. + update_option( 'siteurl', 'https://wp.example.org' ); + $this->assertFalse( wp_should_replace_insecure_home_url() ); + } + + private function force_wp_is_using_https( $enabled ) { + $scheme = $enabled ? 'https' : 'http'; + + $replace_scheme = static function( $url ) use ( $scheme ) { + return str_replace( array( 'http://', 'https://' ), $scheme . '://', $url ); + }; + + add_filter( 'home_url', $replace_scheme, 99 ); + add_filter( 'site_url', $replace_scheme, 99 ); + } + + private function force_option( $option, $value ) { + add_filter( + "option_$option", + static function() use ( $value ) { + return $value; + } + ); + } +} diff --git a/tests/phpunit/tests/image/base.php b/tests/phpunit/tests/image/base.php index 3c32052b63694..52c012d0732d6 100644 --- a/tests/phpunit/tests/image/base.php +++ b/tests/phpunit/tests/image/base.php @@ -8,24 +8,16 @@ abstract class WP_Image_UnitTestCase extends WP_UnitTestCase { /** * Set the image editor engine according to the unit test's specification */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); if ( ! call_user_func( array( $this->editor_engine, 'test' ) ) ) { - $this->markTestSkipped( sprintf( 'The image editor engine %s is not supported on this system', $this->editor_engine ) ); + $this->markTestSkipped( sprintf( 'The image editor engine %s is not supported on this system.', $this->editor_engine ) ); } add_filter( 'wp_image_editors', array( $this, 'setEngine' ), 10, 2 ); } - /** - * Undo the image editor override - */ - public function tearDown() { - remove_filter( 'wp_image_editors', array( $this, 'setEngine' ), 10, 2 ); - parent::tearDown(); - } - /** * Override the image editor engine * @@ -48,7 +40,7 @@ protected function assertImageAlphaAtPointGD( $image_path, $point, $alpha ) { $colors = imagecolorsforindex( $im, $rgb ); - $this->assertEquals( $alpha, $colors['alpha'] ); + $this->assertSame( $alpha, $colors['alpha'] ); } /** @@ -62,7 +54,7 @@ protected function assertImageAlphaAtPointImagick( $image_path, $point, $expecte $im = new Imagick( $image_path ); $pixel = $im->getImagePixelColor( $point[0], $point[1] ); $color = $pixel->getColorValue( imagick::COLOR_ALPHA ); - $this->assertEquals( $expected, $color ); + $this->assertSame( $expected, $color ); } /** @@ -85,7 +77,7 @@ protected function assertImageDimensions( $filename, $width, $height ) { $detected_height = $image_size[1]; } - $this->assertEquals( $width, $detected_width ); - $this->assertEquals( $height, $detected_height ); + $this->assertSame( $width, $detected_width ); + $this->assertSame( $height, $detected_height ); } } diff --git a/tests/phpunit/tests/image/dimensions.php b/tests/phpunit/tests/image/dimensions.php index 2dd75808f883e..5820f64ae7206 100644 --- a/tests/phpunit/tests/image/dimensions.php +++ b/tests/phpunit/tests/image/dimensions.php @@ -6,129 +6,129 @@ * @group upload */ class Tests_Image_Dimensions extends WP_UnitTestCase { - function test_400x400_no_crop() { + public function test_400x400_no_crop() { // Landscape: resize 640x480 to fit 400x400: 400x300. $out = image_resize_dimensions( 640, 480, 400, 400, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); // Portrait: resize 480x640 to fit 400x400: 300x400. $out = image_resize_dimensions( 480, 640, 400, 400, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); } - function test_400x0_no_crop() { + public function test_400x0_no_crop() { // Landscape: resize 640x480 to fit 400w: 400x300. $out = image_resize_dimensions( 640, 480, 400, 0, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); // Portrait: resize 480x640 to fit 400w: 400x533. $out = image_resize_dimensions( 480, 640, 400, 0, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 533, 480, 640 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 533, 480, 640 ), $out ); } - function test_0x400_no_crop() { + public function test_0x400_no_crop() { // Landscape: resize 640x480 to fit 400h: 533x400. $out = image_resize_dimensions( 640, 480, 0, 400, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 533, 400, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 533, 400, 640, 480 ), $out ); // Portrait: resize 480x640 to fit 400h: 300x400. $out = image_resize_dimensions( 480, 640, 0, 400, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); } - function test_800x800_no_crop() { + public function test_800x800_no_crop() { // Landscape: resize 640x480 to fit 800x800. $out = image_resize_dimensions( 640, 480, 800, 800, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); // Portrait: resize 480x640 to fit 800x800. $out = image_resize_dimensions( 480, 640, 800, 800, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); } - function test_800x0_no_crop() { + public function test_800x0_no_crop() { // Landscape: resize 640x480 to fit 800w. $out = image_resize_dimensions( 640, 480, 800, 0, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); // Portrait: resize 480x640 to fit 800w. $out = image_resize_dimensions( 480, 640, 800, 0, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); } - function test_0x800_no_crop() { + public function test_0x800_no_crop() { // Landscape: resize 640x480 to fit 800h. $out = image_resize_dimensions( 640, 480, 0, 800, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); // Portrait: resize 480x640 to fit 800h. $out = image_resize_dimensions( 480, 640, 0, 800, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( false, $out ); + $this->assertFalse( $out ); } // Cropped versions. - function test_400x400_crop() { + public function test_400x400_crop() { // Landscape: crop 640x480 to fit 400x400: 400x400 taken from a 480x480 crop at (80. 0). $out = image_resize_dimensions( 640, 480, 400, 400, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 80, 0, 400, 400, 480, 480 ), $out ); + $this->assertSame( array( 0, 0, 80, 0, 400, 400, 480, 480 ), $out ); // Portrait: resize 480x640 to fit 400x400: 400x400 taken from a 480x480 crop at (0. 80). $out = image_resize_dimensions( 480, 640, 400, 400, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 80, 400, 400, 480, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 80, 400, 400, 480, 480 ), $out ); } - function test_400x0_crop() { + public function test_400x0_crop() { // Landscape: resize 640x480 to fit 400w: 400x300. $out = image_resize_dimensions( 640, 480, 400, 0, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out ); // Portrait: resize 480x640 to fit 400w: 400x533. $out = image_resize_dimensions( 480, 640, 400, 0, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 533, 480, 640 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 533, 480, 640 ), $out ); } - function test_0x400_crop() { + public function test_0x400_crop() { // Landscape: resize 640x480 to fit 400h: 533x400. $out = image_resize_dimensions( 640, 480, 0, 400, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 533, 400, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 533, 400, 640, 480 ), $out ); // Portrait: resize 480x640 to fit 400h: 300x400. $out = image_resize_dimensions( 480, 640, 0, 400, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out ); } - function test_400x500_crop() { + public function test_400x500_crop() { // Landscape: crop 640x480 to fit 400x500: 400x400 taken from a 480x480 crop at (80. 0). $out = image_resize_dimensions( 640, 480, 400, 500, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 120, 0, 400, 480, 400, 480 ), $out ); + $this->assertSame( array( 0, 0, 120, 0, 400, 480, 400, 480 ), $out ); // Portrait: resize 480x640 to fit 400x400: 400x400 taken from a 480x480 crop at (0. 80). $out = image_resize_dimensions( 480, 640, 400, 500, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 20, 400, 500, 480, 600 ), $out ); + $this->assertSame( array( 0, 0, 0, 20, 400, 500, 480, 600 ), $out ); } - function test_640x480() { + public function test_640x480() { // Crop 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, true ); $this->assertFalse( $out ); @@ -143,12 +143,12 @@ function test_640x480() { // Crop 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); // Resize 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); remove_filter( 'wp_image_resize_identical_dimensions', '__return_true' ); } @@ -156,30 +156,30 @@ function test_640x480() { /** * @ticket 19393 */ - function test_crop_anchors() { + public function test_crop_anchors() { // Landscape: crop 640x480 to fit 400x500: 400x400 taken from a 480x480 crop. // src_x = 0 (left), src_y = 0 (top). $out = image_resize_dimensions( 640, 480, 400, 500, array( 'left', 'top' ) ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 480, 400, 480 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 480, 400, 480 ), $out ); // Portrait: resize 480x640 to fit 400x400: 400x400 taken from a 480x480 crop. // src_x = 0 (left), src_y = 0 (top). $out = image_resize_dimensions( 480, 640, 400, 500, array( 'left', 'top' ) ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 0, 400, 500, 480, 600 ), $out ); + $this->assertSame( array( 0, 0, 0, 0, 400, 500, 480, 600 ), $out ); // Landscape: crop 640x480 to fit 400x500: 400x400 taken from a 480x480 crop. // src_x = 240 (left), src_y = 0 (due to landscape crop). $out = image_resize_dimensions( 640, 480, 400, 500, array( 'right', 'bottom' ) ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 240, 0, 400, 480, 400, 480 ), $out ); + $this->assertSame( array( 0, 0, 240, 0, 400, 480, 400, 480 ), $out ); // Portrait: resize 480x640 to fit 400x400: 400x400 taken from a 480x480 crop. // src_x = 0 (due to portrait crop), src_y = 40 (bottom). $out = image_resize_dimensions( 480, 640, 400, 500, array( 'right', 'bottom' ) ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. - $this->assertEquals( array( 0, 0, 0, 40, 400, 500, 480, 600 ), $out ); + $this->assertSame( array( 0, 0, 0, 40, 400, 500, 480, 600 ), $out ); } } diff --git a/tests/phpunit/tests/image/editor.php b/tests/phpunit/tests/image/editor.php index f602915331220..a35f8af9f2856 100644 --- a/tests/phpunit/tests/image/editor.php +++ b/tests/phpunit/tests/image/editor.php @@ -14,12 +14,13 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase { /** * Setup test fixture */ - public function setUp() { + public function set_up() { require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once DIR_TESTDATA . '/../includes/mock-image-editor.php'; - parent::setUp(); + // This needs to come after the mock image editor class is loaded. + parent::set_up(); } /** @@ -74,20 +75,20 @@ public function test_set_quality() { $editor->set_mime_type( 'image/jpeg' ); // Ensure mime-specific filters act properly. // Check default value. - $this->assertEquals( 82, $editor->get_quality() ); + $this->assertSame( 82, $editor->get_quality() ); // Ensure the quality filters do not have precedence if created after editor instantiation. $func_100_percent = array( $this, 'return_integer_100' ); add_filter( 'wp_editor_set_quality', $func_100_percent ); - $this->assertEquals( 82, $editor->get_quality() ); + $this->assertSame( 82, $editor->get_quality() ); $func_95_percent = array( $this, 'return_integer_95' ); add_filter( 'jpeg_quality', $func_95_percent ); - $this->assertEquals( 82, $editor->get_quality() ); + $this->assertSame( 82, $editor->get_quality() ); // Ensure set_quality() works and overrides the filters. $this->assertTrue( $editor->set_quality( 75 ) ); - $this->assertEquals( 75, $editor->get_quality() ); + $this->assertSame( 75, $editor->get_quality() ); // Get a new editor to clear default quality state. unset( $editor ); @@ -95,7 +96,7 @@ public function test_set_quality() { $editor->set_mime_type( 'image/jpeg' ); // Ensure mime-specific filters act properly. // Ensure jpeg_quality filter applies if it exists before editor instantiation. - $this->assertEquals( 95, $editor->get_quality() ); + $this->assertSame( 95, $editor->get_quality() ); // Get a new editor to clear jpeg_quality state. remove_filter( 'jpeg_quality', $func_95_percent ); @@ -103,12 +104,98 @@ public function test_set_quality() { $editor = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' ); // Ensure wp_editor_set_quality filter applies if it exists before editor instantiation. - $this->assertEquals( 100, $editor->get_quality() ); + $this->assertSame( 100, $editor->get_quality() ); // Clean up. remove_filter( 'wp_editor_set_quality', $func_100_percent ); } + /** + * Test test_quality when converting image + * + * @ticket 6821 + */ + public function test_set_quality_with_image_conversion() { + $editor = wp_get_image_editor( DIR_TESTDATA . '/images/test-image.png' ); + $editor->set_mime_type( 'image/png' ); // Ensure mime-specific filters act properly. + + // Set conversions for uploaded images. + add_filter( 'image_editor_output_format', array( $this, 'image_editor_output_formats' ) ); + + // Quality setting for the source image. For PNG the fallback default of 82 is used. + $this->assertSame( 82, $editor->get_quality(), 'Default quality setting is 82.' ); + + // Quality should change to the output format's value. + // A PNG image will be converted to WEBP whose quialty should be 86. + $editor->save(); + $this->assertSame( 86, $editor->get_quality(), 'Output image format is WEBP. Quality setting for it should be 86.' ); + + // Removing PNG to WEBP conversion on save. Quality setting should reset to the default. + remove_filter( 'image_editor_output_format', array( $this, 'image_editor_output_formats' ) ); + $editor->save(); + $this->assertSame( 82, $editor->get_quality(), 'After removing image conversion quality setting should reset to the default of 82.' ); + + unset( $editor ); + + // Set conversions for uploaded images. + add_filter( 'image_editor_output_format', array( $this, 'image_editor_output_formats' ) ); + // Change the quality values. + add_filter( 'wp_editor_set_quality', array( $this, 'image_editor_change_quality' ), 10, 2 ); + + // Get a new editor to clear quality state. + $editor = wp_get_image_editor( DIR_TESTDATA . '/images/test-image.jpg' ); + $editor->set_mime_type( 'image/jpeg' ); + + $this->assertSame( 56, $editor->get_quality(), 'Filtered default quality for JPEG is 56.' ); + + // Quality should change to the output format's value as filtered above. + // A JPEG image will be converted to WEBP whose quialty should be 42. + $editor->save(); + $this->assertSame( 42, $editor->get_quality(), 'Image conversion from JPEG to WEBP. Filtered WEBP quality shoild be 42.' ); + + // After removing the conversion the quality setting should reset to the filtered value for the original image type, JPEG. + remove_filter( 'image_editor_output_format', array( $this, 'image_editor_output_formats' ) ); + $editor->save(); + $this->assertSame( + 56, + $editor->get_quality(), + 'After removing image conversion the quality setting should reset to the filtered value for JPEG, 56.' + ); + + remove_filter( 'wp_editor_set_quality', array( $this, 'image_editor_change_quality' ) ); + } + + /** + * Changes the output format when editing images. PNG and JPEG files + * will be converted to WEBP (if the image editor in PHP supports it). + * + * @param array $formats + * + * @return array + */ + public function image_editor_output_formats( $formats ) { + $formats['image/png'] = 'image/webp'; + $formats['image/jpeg'] = 'image/webp'; + return $formats; + } + + /** + * Changes the quality according to the mime-type. + * + * @param int $quality Default quality. + * @param string $mime_type Image mime-type. + * @return int The changed quality. + */ + public function image_editor_change_quality( $quality, $mime_type ) { + if ( 'image/jpeg' === $mime_type ) { + return 56; + } elseif ( 'image/webp' === $mime_type ) { + return 42; + } else { + return 30; + } + } + /** * Test generate_filename * @@ -130,19 +217,22 @@ public function test_generate_filename() { ); // Test with no parameters. - $this->assertEquals( 'canola-100x50.jpg', wp_basename( $editor->generate_filename() ) ); + $this->assertSame( 'canola-100x50.jpg', wp_basename( $editor->generate_filename() ) ); // Test with a suffix only. - $this->assertEquals( 'canola-new.jpg', wp_basename( $editor->generate_filename( 'new' ) ) ); + $this->assertSame( 'canola-new.jpg', wp_basename( $editor->generate_filename( 'new' ) ) ); // Test with a destination dir only. - $this->assertEquals( trailingslashit( realpath( get_temp_dir() ) ), trailingslashit( realpath( dirname( $editor->generate_filename( null, get_temp_dir() ) ) ) ) ); + $this->assertSame( trailingslashit( realpath( get_temp_dir() ) ), trailingslashit( realpath( dirname( $editor->generate_filename( null, get_temp_dir() ) ) ) ) ); // Test with a suffix only. - $this->assertEquals( 'canola-100x50.png', wp_basename( $editor->generate_filename( null, null, 'png' ) ) ); + $this->assertSame( 'canola-100x50.png', wp_basename( $editor->generate_filename( null, null, 'png' ) ) ); // Combo! - $this->assertEquals( trailingslashit( realpath( get_temp_dir() ) ) . 'canola-new.png', $editor->generate_filename( 'new', realpath( get_temp_dir() ), 'png' ) ); + $this->assertSame( trailingslashit( realpath( get_temp_dir() ) ) . 'canola-new.png', $editor->generate_filename( 'new', realpath( get_temp_dir() ), 'png' ) ); + + // Test with a stream destination. + $this->assertSame( 'file://testing/path/canola-100x50.jpg', $editor->generate_filename( null, 'file://testing/path' ) ); } /** @@ -166,7 +256,7 @@ public function test_get_size() { $property->setAccessible( true ); $property->setValue( $editor, $size ); - $this->assertEquals( $size, $editor->get_size() ); + $this->assertSame( $size, $editor->get_size() ); } /** @@ -189,6 +279,87 @@ public function test_get_suffix() { $property->setAccessible( true ); $property->setValue( $editor, $size ); - $this->assertEquals( '100x50', $editor->get_suffix() ); + $this->assertSame( '100x50', $editor->get_suffix() ); + } + + /** + * Test wp_get_webp_info. + * + * @ticket 35725 + * @dataProvider _test_wp_get_webp_info + * + */ + public function test_wp_get_webp_info( $file, $expected ) { + $editor = wp_get_image_editor( $file ); + + if ( is_wp_error( $editor ) || ! $editor->supports_mime_type( 'image/webp' ) ) { + $this->markTestSkipped( sprintf( 'No WebP support in the editor engine %s on this system.', $this->editor_engine ) ); + } + + $file_data = wp_get_webp_info( $file ); + $this->assertSame( $file_data, $expected ); } + + /** + * Data provider for test_wp_get_webp_info(). + */ + public function _test_wp_get_webp_info() { + return array( + // Standard JPEG. + array( + DIR_TESTDATA . '/images/test-image.jpg', + array( + 'width' => false, + 'height' => false, + 'type' => false, + ), + ), + // Standard GIF. + array( + DIR_TESTDATA . '/images/test-image.gif', + array( + 'width' => false, + 'height' => false, + 'type' => false, + ), + ), + // Animated WebP. + array( + DIR_TESTDATA . '/images/webp-animated.webp', + array( + 'width' => 100, + 'height' => 100, + 'type' => 'animated-alpha', + ), + ), + // Lossless WebP. + array( + DIR_TESTDATA . '/images/webp-lossless.webp', + array( + 'width' => 1200, + 'height' => 675, + 'type' => 'lossless', + ), + ), + // Lossy WebP. + array( + DIR_TESTDATA . '/images/webp-lossy.webp', + array( + 'width' => 1200, + 'height' => 675, + 'type' => 'lossy', + ), + ), + // Transparent WebP. + array( + DIR_TESTDATA . '/images/webp-transparent.webp', + array( + 'width' => 1200, + 'height' => 675, + 'type' => 'animated-alpha', + ), + ), + ); + } + } diff --git a/tests/phpunit/tests/image/editorGd.php b/tests/phpunit/tests/image/editorGd.php index 0c9ddd650b761..781ff96cb45c7 100644 --- a/tests/phpunit/tests/image/editorGd.php +++ b/tests/phpunit/tests/image/editorGd.php @@ -13,14 +13,15 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase { public $editor_engine = 'WP_Image_Editor_GD'; - public function setUp() { + public function set_up() { require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; - parent::setUp(); + // This needs to come after the mock image editor class is loaded. + parent::set_up(); } - public function tearDown() { + public function tear_down() { $folder = DIR_TESTDATA . '/images/waffles-*.jpg'; foreach ( glob( $folder ) as $file ) { @@ -29,29 +30,31 @@ public function tearDown() { $this->remove_added_uploads(); - parent::tearDown(); + parent::tear_down(); } public function test_supports_mime_type_jpeg() { $gd_image_editor = new WP_Image_Editor_GD( null ); - $expected = imagetypes() & IMG_JPG; - $this->assertEquals( $expected, $gd_image_editor->supports_mime_type( 'image/jpeg' ) ); + $expected = (bool) ( imagetypes() & IMG_JPG ); + $this->assertSame( $expected, $gd_image_editor->supports_mime_type( 'image/jpeg' ) ); } public function test_supports_mime_type_png() { $gd_image_editor = new WP_Image_Editor_GD( null ); - $expected = imagetypes() & IMG_PNG; - $this->assertEquals( $expected, $gd_image_editor->supports_mime_type( 'image/png' ) ); + $expected = (bool) ( imagetypes() & IMG_PNG ); + $this->assertSame( $expected, $gd_image_editor->supports_mime_type( 'image/png' ) ); } public function test_supports_mime_type_gif() { $gd_image_editor = new WP_Image_Editor_GD( null ); - $expected = imagetypes() & IMG_GIF; - $this->assertEquals( $expected, $gd_image_editor->supports_mime_type( 'image/gif' ) ); + $expected = (bool) ( imagetypes() & IMG_GIF ); + $this->assertSame( $expected, $gd_image_editor->supports_mime_type( 'image/gif' ) ); } /** * Test resizing an image, not using crop + * + * @requires function imagejpeg */ public function test_resize() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -61,7 +64,7 @@ public function test_resize() { $gd_image_editor->resize( 100, 50 ); - $this->assertEquals( + $this->assertSame( array( 'width' => 75, 'height' => 50, @@ -72,6 +75,8 @@ public function test_resize() { /** * Test multi_resize with single image resize and no crop + * + * @requires function imagejpeg */ public function test_single_multi_resize() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -88,7 +93,7 @@ public function test_single_multi_resize() { $resized = $gd_image_editor->multi_resize( $sizes_array ); - # First, check to see if returned array is as expected + // First, check to see if returned array is as expected. $expected_array = array( array( 'file' => 'waffles-50x33.jpg', @@ -98,7 +103,7 @@ public function test_single_multi_resize() { ), ); - $this->assertEquals( $expected_array, $resized ); + $this->assertSame( $expected_array, $resized ); // Now, verify real dimensions are as expected. $image_path = DIR_TESTDATA . '/images/' . $resized[0]['file']; @@ -113,7 +118,7 @@ public function test_single_multi_resize() { * Ensure multi_resize doesn't create an image when * both height and weight are missing, null, or 0. * - * ticket 26823 + * @ticket 26823 */ public function test_multi_resize_does_not_create() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -181,7 +186,8 @@ public function test_multi_resize_does_not_create() { /** * Test multi_resize with multiple sizes * - * ticket 26823 + * @ticket 26823 + * @requires function imagejpeg */ public function test_multi_resize() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -216,7 +222,7 @@ public function test_multi_resize() { * By aspect, should be 30x20 output. */ array( - 'width' => 9999, # Arbitrary High Value + 'width' => 9999, // Arbitrary high value. 'height' => 20, 'crop' => false, ), @@ -227,7 +233,7 @@ public function test_multi_resize() { */ array( 'width' => 45, - 'height' => 9999, # Arbitrary High Value + 'height' => 9999, // Arbitrary high value. 'crop' => true, ), @@ -270,7 +276,7 @@ public function test_multi_resize() { * By aspect, should be 105x70 output. */ array( - 'width' => -9999, # Arbitrary Negative Value + 'width' => -9999, // Arbitrary negative value. 'height' => 70, ), @@ -280,7 +286,7 @@ public function test_multi_resize() { */ array( 'width' => 200, - 'height' => -9999, # Arbitrary Negative Value + 'height' => -9999, // Arbitrary negative value. ), ); @@ -370,7 +376,7 @@ public function test_multi_resize() { ); $this->assertNotNull( $resized ); - $this->assertEquals( $expected_array, $resized ); + $this->assertSame( $expected_array, $resized ); foreach ( $resized as $key => $image_data ) { $image_path = DIR_TESTDATA . '/images/' . $image_data['file']; @@ -395,7 +401,7 @@ public function test_resize_and_crop() { $gd_image_editor->resize( 100, 50, true ); - $this->assertEquals( + $this->assertSame( array( 'width' => 100, 'height' => 50, @@ -405,25 +411,128 @@ public function test_resize_and_crop() { } /** - * Test cropping an image + * Test cropping an image. + * + * @ticket 51937 + * + * @dataProvider data_crop */ - public function test_crop() { + public function test_crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { $file = DIR_TESTDATA . '/images/gradient-square.jpg'; $gd_image_editor = new WP_Image_Editor_GD( $file ); $gd_image_editor->load(); - $gd_image_editor->crop( 0, 0, 50, 50 ); + $gd_image_editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs ); - $this->assertEquals( + $this->assertSame( array( - 'width' => 50, - 'height' => 50, + 'width' => (int) $src_w, + 'height' => (int) $src_h, ), $gd_image_editor->get_size() ); } + public function data_crop() { + return array( + 'src height and width must be greater than 0' => array( + 'src_x' => 0, + 'src_y' => 0, + 'src_w' => 50, + 'src_h' => 50, + ), + 'src height and width can be string but must be greater than 0' => array( + 'src_x' => 10, + 'src_y' => '10', + 'src_w' => '50', + 'src_h' => '50', + ), + 'dst height and width must be greater than 0' => array( + 'src_x' => 10, + 'src_y' => '10', + 'src_w' => 150, + 'src_h' => 150, + 'dst_w' => 150, + 'dst_h' => 150, + ), + 'dst height and width can be string but must be greater than 0' => array( + 'src_x' => 10, + 'src_y' => '10', + 'src_w' => 150, + 'src_h' => 150, + 'dst_w' => '150', + 'dst_h' => '150', + ), + ); + } + + /** + * Test should return WP_Error when dimensions are not integer or are <= 0. + * + * @ticket 51937 + * + * @dataProvider data_crop_invalid_dimensions + */ + public function test_crop_invalid_dimensions( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { + $file = DIR_TESTDATA . '/images/gradient-square.jpg'; + + $gd_image_editor = new WP_Image_Editor_GD( $file ); + $gd_image_editor->load(); + + $actual = $gd_image_editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs ); + + $this->assertInstanceOf( 'WP_Error', $actual ); + $this->assertSame( 'image_crop_error', $actual->get_error_code() ); + } + + public function data_crop_invalid_dimensions() { + return array( + 'src height must be greater than 0' => array( + 'src_x' => 0, + 'src_y' => 0, + 'src_w' => 100, + 'src_h' => 0, + ), + 'src width must be greater than 0' => array( + 'src_x' => 10, + 'src_y' => '10', + 'src_w' => 0, + 'src_h' => 100, + ), + 'src height must be numeric and greater than 0' => array( + 'src_x' => 10, + 'src_y' => '10', + 'src_w' => 100, + 'src_h' => 'NaN', + ), + 'dst height must be numeric and greater than 0' => array( + 'src_x' => 0, + 'src_y' => 0, + 'src_w' => 100, + 'src_h' => 50, + 'dst_w' => '100', + 'dst_h' => 'NaN', + ), + 'src and dst height and width must be greater than 0' => array( + 'src_x' => 0, + 'src_y' => 0, + 'src_w' => 0, + 'src_h' => 0, + 'dst_w' => 0, + 'dst_h' => 0, + ), + 'src and dst height and width can be string but must be greater than 0' => array( + 'src_x' => 0, + 'src_y' => 0, + 'src_w' => '0', + 'src_h' => '0', + 'dst_w' => '0', + 'dst_h' => '0', + ), + ); + } + /** * Test rotating an image 180 deg */ @@ -440,7 +549,7 @@ public function test_rotate() { $gd_image_editor->rotate( 180 ); - $this->assertEquals( $color_top_left, imagecolorat( $property->getValue( $gd_image_editor ), 99, 99 ) ); + $this->assertSame( $color_top_left, imagecolorat( $property->getValue( $gd_image_editor ), 99, 99 ) ); } /** @@ -459,7 +568,7 @@ public function test_flip() { $gd_image_editor->flip( true, false ); - $this->assertEquals( $color_top_left, imagecolorat( $property->getValue( $gd_image_editor ), 0, 99 ) ); + $this->assertSame( $color_top_left, imagecolorat( $property->getValue( $gd_image_editor ), 0, 99 ) ); } /** @@ -531,7 +640,6 @@ public function test_image_preserves_alpha_on_rotate() { $expected = imagecolorsforindex( $image, $rgb ); $editor = new WP_Image_Editor_GD( $file ); - $this->assertNotWPError( $editor ); $editor->load(); $editor->rotate( 180 ); $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; diff --git a/tests/phpunit/tests/image/editorImagick.php b/tests/phpunit/tests/image/editorImagick.php index 812b112b774e3..e82486d828055 100644 --- a/tests/phpunit/tests/image/editorImagick.php +++ b/tests/phpunit/tests/image/editorImagick.php @@ -13,14 +13,16 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase { public $editor_engine = 'WP_Image_Editor_Imagick'; - public function setUp() { + public function set_up() { require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php'; + require_once DIR_TESTROOT . '/includes/class-wp-test-stream.php'; - parent::setUp(); + // This needs to come after the mock image editor class is loaded. + parent::set_up(); } - public function tearDown() { + public function tear_down() { $folder = DIR_TESTDATA . '/images/waffles-*.jpg'; foreach ( glob( $folder ) as $file ) { @@ -29,7 +31,7 @@ public function tearDown() { $this->remove_added_uploads(); - parent::tearDown(); + parent::tear_down(); } /** @@ -54,7 +56,7 @@ public function test_resize() { $imagick_image_editor->resize( 100, 50 ); - $this->assertEquals( + $this->assertSame( array( 'width' => 75, 'height' => 50, @@ -81,7 +83,7 @@ public function test_single_multi_resize() { $resized = $imagick_image_editor->multi_resize( $sizes_array ); - # First, check to see if returned array is as expected + // First, check to see if returned array is as expected. $expected_array = array( array( 'file' => 'waffles-50x33.jpg', @@ -91,7 +93,7 @@ public function test_single_multi_resize() { ), ); - $this->assertEquals( $expected_array, $resized ); + $this->assertSame( $expected_array, $resized ); // Now, verify real dimensions are as expected. $image_path = DIR_TESTDATA . '/images/' . $resized[0]['file']; @@ -106,7 +108,7 @@ public function test_single_multi_resize() { * Ensure multi_resize doesn't create an image when * both height and weight are missing, null, or 0. * - * ticket 26823 + * @ticket 26823 */ public function test_multi_resize_does_not_create() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -174,7 +176,7 @@ public function test_multi_resize_does_not_create() { /** * Test multi_resize with multiple sizes * - * ticket 26823 + * @ticket 26823 */ public function test_multi_resize() { $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -209,7 +211,7 @@ public function test_multi_resize() { * By aspect, should be 30x20 output. */ array( - 'width' => 9999, # Arbitrary High Value + 'width' => 9999, // Arbitrary high value. 'height' => 20, 'crop' => false, ), @@ -220,7 +222,7 @@ public function test_multi_resize() { */ array( 'width' => 45, - 'height' => 9999, # Arbitrary High Value + 'height' => 9999, // Arbitrary high value. 'crop' => true, ), @@ -263,7 +265,7 @@ public function test_multi_resize() { * By aspect, should be 105x70 output. */ array( - 'width' => -9999, # Arbitrary Negative Value + 'width' => -9999, // Arbitrary negative value. 'height' => 70, ), @@ -273,7 +275,7 @@ public function test_multi_resize() { */ array( 'width' => 200, - 'height' => -9999, # Arbitrary Negative Value + 'height' => -9999, // Arbitrary negative value. ), ); @@ -363,7 +365,7 @@ public function test_multi_resize() { ); $this->assertNotNull( $resized ); - $this->assertEquals( $expected_array, $resized ); + $this->assertSame( $expected_array, $resized ); foreach ( $resized as $key => $image_data ) { $image_path = DIR_TESTDATA . '/images/' . $image_data['file']; @@ -388,7 +390,7 @@ public function test_resize_and_crop() { $imagick_image_editor->resize( 100, 50, true ); - $this->assertEquals( + $this->assertSame( array( 'width' => 100, 'height' => 50, @@ -408,7 +410,7 @@ public function test_crop() { $imagick_image_editor->crop( 0, 0, 50, 50 ); - $this->assertEquals( + $this->assertSame( array( 'width' => 50, 'height' => 50, @@ -433,7 +435,7 @@ public function test_rotate() { $imagick_image_editor->rotate( 180 ); - $this->assertEquals( $color_top_left, $property->getValue( $imagick_image_editor )->getImagePixelColor( 99, 99 )->getColor() ); + $this->assertSame( $color_top_left, $property->getValue( $imagick_image_editor )->getImagePixelColor( 99, 99 )->getColor() ); } /** @@ -452,7 +454,7 @@ public function test_flip() { $imagick_image_editor->flip( true, false ); - $this->assertEquals( $color_top_left, $property->getValue( $imagick_image_editor )->getImagePixelColor( 0, 99 )->getColor() ); + $this->assertSame( $color_top_left, $property->getValue( $imagick_image_editor )->getImagePixelColor( 0, 99 )->getColor() ); } /** @@ -464,9 +466,6 @@ public function test_image_preserves_alpha_on_resize() { $file = DIR_TESTDATA . '/images/transparent.png'; $editor = new WP_Image_Editor_Imagick( $file ); - - $this->assertNotWPError( $editor ); - $editor->load(); $editor->resize( 5, 5 ); $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; @@ -491,9 +490,6 @@ public function test_image_preserves_alpha() { $file = DIR_TESTDATA . '/images/transparent.png'; $editor = new WP_Image_Editor_Imagick( $file ); - - $this->assertNotWPError( $editor ); - $editor->load(); $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; @@ -524,7 +520,6 @@ public function test_image_preserves_alpha_on_rotate() { $image_editor = new WP_Image_Editor_Imagick( $save_to_file ); $image_editor->load(); - $this->assertNotWPError( $image_editor ); $image_editor->rotate( 180 ); $image_editor->save( $save_to_file ); @@ -548,17 +543,14 @@ public function test_image_non_existent_extension() { * Test resetting Exif orientation data on rotate * * @ticket 37140 + * @requires function exif_read_data */ public function test_remove_orientation_data_on_rotate() { - if ( ! function_exists( 'exif_read_data' ) ) { - $this->markTestSkipped( 'This test requires the exif_read_data function.' ); - } - $file = DIR_TESTDATA . '/images/test-image-upside-down.jpg'; $data = wp_read_image_metadata( $file ); // The orientation value 3 is equivalent to rotated upside down (180 degrees). - $this->assertEquals( 3, intval( $data['orientation'] ), 'Orientation value read from does not match image file Exif data: ' . $file ); + $this->assertSame( 3, (int) $data['orientation'], 'Orientation value read from does not match image file Exif data: ' . $file ); $temp_file = wp_tempnam( $file ); $image = wp_get_image_editor( $file ); @@ -570,11 +562,63 @@ public function test_remove_orientation_data_on_rotate() { $data = wp_read_image_metadata( $ret['path'] ); // Make sure the image is no longer in The Upside Down Exif orientation. - $this->assertEquals( 1, intval( $data['orientation'] ), 'Orientation Exif data was not updated after rotating image: ' . $file ); + $this->assertSame( 1, (int) $data['orientation'], 'Orientation Exif data was not updated after rotating image: ' . $file ); // Remove both the generated file ending in .tmp and tmp.jpg due to wp_tempnam(). unlink( $temp_file ); unlink( $ret['path'] ); } + /** + * Test that images can be loaded and written over streams + */ + public function test_streams() { + stream_wrapper_register( 'wptest', 'WP_Test_Stream' ); + WP_Test_Stream::$data = array( + 'Tests_Image_Editor_Imagick' => array( + '/read.jpg' => file_get_contents( DIR_TESTDATA . '/images/waffles.jpg' ), + ), + ); + + $file = 'wptest://Tests_Image_Editor_Imagick/read.jpg'; + $imagick_image_editor = new WP_Image_Editor_Imagick( $file ); + + $ret = $imagick_image_editor->load(); + $this->assertNotWPError( $ret ); + + $temp_file = 'wptest://Tests_Image_Editor_Imagick/write.jpg'; + + $ret = $imagick_image_editor->save( $temp_file ); + $this->assertNotWPError( $ret ); + + $this->assertSame( $temp_file, $ret['path'] ); + + if ( $temp_file !== $ret['path'] ) { + unlink( $ret['path'] ); + } + unlink( $temp_file ); + } + + /** + * @ticket 51665 + */ + public function test_directory_creation() { + $file = realpath( DIR_TESTDATA ) . '/images/a2-small.jpg'; + $directory = realpath( DIR_TESTDATA ) . '/images/nonexistent-directory'; + $editor = new WP_Image_Editor_Imagick( $file ); + + $this->assertFileDoesNotExist( $directory ); + + $loaded = $editor->load(); + $this->assertNotWPError( $loaded ); + + $resized = $editor->resize( 100, 100, true ); + $this->assertNotWPError( $resized ); + + $saved = $editor->save( $directory . '/a2-small-cropped.jpg' ); + $this->assertNotWPError( $saved ); + + unlink( $directory . '/a2-small-cropped.jpg' ); + rmdir( $directory ); + } } diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 444d730fdca3b..488731a0e83fa 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -10,8 +10,8 @@ class Tests_Image_Functions extends WP_UnitTestCase { /** * Setup test fixture */ - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; @@ -20,9 +20,9 @@ public function setUp() { require_once DIR_TESTDATA . '/../includes/mock-image-editor.php'; // Ensure no legacy / failed tests detritus. - $folder = '/tmp/wordpress-gsoc-flyer*.{jpg,pdf}'; + $folder = get_temp_dir() . 'wordpress-gsoc-flyer*.*'; - foreach ( glob( $folder, GLOB_BRACE ) as $file ) { + foreach ( glob( $folder ) as $file ) { unlink( $file ); } } @@ -45,7 +45,7 @@ protected function get_mime_type( $filename ) { return $mime_type; } - function test_is_image_positive() { + public function test_is_image_positive() { // These are all image files recognized by PHP. $files = array( 'test-image-cmyk.jpg', @@ -59,6 +59,10 @@ function test_is_image_positive() { 'test-image.psd', 'test-image-zip.tiff', 'test-image.jpg', + 'webp-animated.webp', + 'webp-lossless.webp', + 'webp-lossy.webp', + 'webp-transparent.webp', ); // IMAGETYPE_ICO is only defined in PHP 5.3+. @@ -71,7 +75,7 @@ function test_is_image_positive() { } } - function test_is_image_negative() { + public function test_is_image_negative() { // These are actually image files but aren't recognized or usable by PHP. $files = array( 'test-image.pct', @@ -84,7 +88,7 @@ function test_is_image_negative() { } } - function test_is_displayable_image_positive() { + public function test_is_displayable_image_positive() { // These are all usable in typical web browsers. $files = array( 'test-image.gif', @@ -92,6 +96,22 @@ function test_is_displayable_image_positive() { 'test-image.jpg', ); + // Add WebP images if the image editor supports them. + $file = DIR_TESTDATA . '/images/test-image.webp'; + $editor = wp_get_image_editor( $file ); + + if ( ! is_wp_error( $editor ) && $editor->supports_mime_type( 'image/webp' ) ) { + $files = array_merge( + $files, + array( + 'webp-animated.webp', + 'webp-lossless.webp', + 'webp-lossy.webp', + 'webp-transparent.webp', + ) + ); + } + // IMAGETYPE_ICO is only defined in PHP 5.3+. if ( defined( 'IMAGETYPE_ICO' ) ) { $files[] = 'test-image.ico'; @@ -102,7 +122,7 @@ function test_is_displayable_image_positive() { } } - function test_is_displayable_image_negative() { + public function test_is_displayable_image_negative() { // These are image files but aren't suitable for web pages because of compatibility or size issues. $files = array( // 'test-image-cmyk.jpg', Allowed in r9727. @@ -123,15 +143,36 @@ function test_is_displayable_image_negative() { } } + + /** + * @ticket 50833 + */ + public function test_is_gd_image_invalid_types() { + $this->assertFalse( is_gd_image( new stdClass() ) ); + $this->assertFalse( is_gd_image( array() ) ); + $this->assertFalse( is_gd_image( null ) ); + + $handle = fopen( __FILE__, 'r' ); + $this->assertFalse( is_gd_image( $handle ) ); + fclose( $handle ); + } + + /** + * @ticket 50833 + * @requires extension gd + */ + public function test_is_gd_image_valid_types() { + $this->assertTrue( is_gd_image( imagecreate( 5, 5 ) ) ); + } + /** * Test save image file and mime_types * * @ticket 6821 + * @requires extension fileinfo */ public function test_wp_save_image_file() { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); - } + $classes = $this->get_image_editor_engine_classes(); require_once ABSPATH . 'wp-admin/includes/image-edit.php'; @@ -142,15 +183,13 @@ public function test_wp_save_image_file() { 'image/png', ); + // Include WebP in tests when platform supports it. + if ( function_exists( 'imagewebp' ) ) { + array_push( $mime_types, 'image/webp' ); + } + // Test each image editor engine. - $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); foreach ( $classes as $class ) { - - // If the image editor isn't available, skip it. - if ( ! call_user_func( array( $class, 'test' ) ) ) { - continue; - } - $img = new $class( DIR_TESTDATA . '/images/canola.jpg' ); $loaded = $img->load(); @@ -164,7 +203,7 @@ public function test_wp_save_image_file() { $ret = wp_save_image_file( $file, $img, $mime_type, 1 ); $this->assertNotEmpty( $ret ); $this->assertNotWPError( $ret ); - $this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) ); + $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ) ); // Clean up. unlink( $file ); @@ -180,21 +219,13 @@ public function test_wp_save_image_file() { * Test that a passed mime type overrides the extension in the filename * * @ticket 6821 + * @requires extension fileinfo */ public function test_mime_overrides_filename() { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); - } + $classes = $this->get_image_editor_engine_classes(); // Test each image editor engine. - $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); foreach ( $classes as $class ) { - - // If the image editor isn't available, skip it. - if ( ! call_user_func( array( $class, 'test' ) ) ) { - continue; - } - $img = new $class( DIR_TESTDATA . '/images/canola.jpg' ); $loaded = $img->load(); @@ -206,7 +237,7 @@ public function test_mime_overrides_filename() { // Make assertions. $this->assertNotEmpty( $ret ); $this->assertNotWPError( $ret ); - $this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) ); + $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ) ); // Clean up. unlink( $file ); @@ -219,11 +250,10 @@ public function test_mime_overrides_filename() { * Test that mime types are correctly inferred from file extensions * * @ticket 6821 + * @requires extension fileinfo */ public function test_inferred_mime_types() { - if ( ! extension_loaded( 'fileinfo' ) ) { - $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); - } + $classes = $this->get_image_editor_engine_classes(); // Mime types. $mime_types = array( @@ -232,18 +262,12 @@ public function test_inferred_mime_types() { 'jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', - 'unk' => 'image/jpeg', // Default, unknown. + 'webp' => 'image/webp', + 'unk' => 'image/jpeg', // Default, unknown. ); // Test each image editor engine. - $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); foreach ( $classes as $class ) { - - // If the image editor isn't available, skip it. - if ( ! call_user_func( array( $class, 'test' ) ) ) { - continue; - } - $img = new $class( DIR_TESTDATA . '/images/canola.jpg' ); $loaded = $img->load(); @@ -261,7 +285,7 @@ public function test_inferred_mime_types() { $ret = $img->save( trailingslashit( $temp ) . $file ); $this->assertNotEmpty( $ret ); $this->assertNotWPError( $ret ); - $this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) ); + $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ) ); unlink( $ret['path'] ); } @@ -280,32 +304,49 @@ public function test_load_directory() { // First, test with deprecated wp_load_image function. $editor1 = wp_load_image( DIR_TESTDATA ); - $this->assertNotInternalType( 'resource', $editor1 ); + $this->assertIsString( $editor1 ); $editor2 = wp_get_image_editor( DIR_TESTDATA ); - $this->assertNotInternalType( 'resource', $editor2 ); + $this->assertInstanceOf( 'WP_Error', $editor2 ); + + $classes = $this->get_image_editor_engine_classes(); // Then, test with editors. - $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); foreach ( $classes as $class ) { - // If the image editor isn't available, skip it. - if ( ! call_user_func( array( $class, 'test' ) ) ) { - continue; - } - $editor = new $class( DIR_TESTDATA ); $loaded = $editor->load(); $this->assertInstanceOf( 'WP_Error', $loaded ); - $this->assertEquals( 'error_loading_image', $loaded->get_error_code() ); + $this->assertSame( 'error_loading_image', $loaded->get_error_code() ); } } - public function test_wp_crop_image_file() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); + /** + * Get the available image editor engine class(es). + * + * @return string[] Available image editor classes; empty array when none are avaialble. + */ + private function get_image_editor_engine_classes() { + $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); + + foreach ( $classes as $key => $class ) { + if ( ! call_user_func( array( $class, 'test' ) ) ) { + // If the image editor isn't available, skip it. + unset( $classes[ $key ] ); + } + } + + if ( empty( $classes ) ) { + $this->markTestSkipped( 'Image editor engines WP_Image_Editor_GD and WP_Image_Editor_Imagick are not supported on this system.' ); } + return $classes; + } + + /** + * @requires function imagejpeg + */ + public function test_wp_crop_image_file() { $file = wp_crop_image( DIR_TESTDATA . '/images/canola.jpg', 0, @@ -319,21 +360,17 @@ public function test_wp_crop_image_file() { $this->assertFileExists( $file ); $image = wp_get_image_editor( $file ); $size = $image->get_size(); - $this->assertEquals( 100, $size['height'] ); - $this->assertEquals( 100, $size['width'] ); + $this->assertSame( 100, $size['height'] ); + $this->assertSame( 100, $size['width'] ); unlink( $file ); } + /** + * @requires function imagejpeg + * @requires extension openssl + */ public function test_wp_crop_image_url() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - - if ( ! extension_loaded( 'openssl' ) ) { - $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' ); - } - $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', 0, @@ -345,12 +382,17 @@ public function test_wp_crop_image_url() { false, DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg' ); + + if ( is_wp_error( $file ) && $file->get_error_code() === 'invalid_image' ) { + $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() cannot access remote image.' ); + } + $this->assertNotWPError( $file ); $this->assertFileExists( $file ); $image = wp_get_image_editor( $file ); $size = $image->get_size(); - $this->assertEquals( 100, $size['height'] ); - $this->assertEquals( 100, $size['width'] ); + $this->assertSame( 100, $size['height'] ); + $this->assertSame( 100, $size['width'] ); unlink( $file ); } @@ -368,11 +410,10 @@ public function test_wp_crop_image_file_not_exist() { $this->assertInstanceOf( 'WP_Error', $file ); } + /** + * @requires extension openssl + */ public function test_wp_crop_image_url_not_exist() { - if ( ! extension_loaded( 'openssl' ) ) { - $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' ); - } - $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', 0, @@ -385,7 +426,7 @@ public function test_wp_crop_image_url_not_exist() { $this->assertInstanceOf( 'WP_Error', $file ); } - function mock_image_editor( $editors ) { + public function mock_image_editor( $editors ) { return array( 'WP_Image_Editor_Mock' ); } @@ -420,9 +461,14 @@ public function test_wp_generate_attachment_metadata_pdf() { } $orig_file = DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf'; - $test_file = '/tmp/wordpress-gsoc-flyer.pdf'; + $test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $editor = wp_get_image_editor( $test_file ); + if ( is_wp_error( $editor ) ) { + $this->markTestSkipped( $editor->get_error_message() ); + } + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -466,8 +512,9 @@ public function test_wp_generate_attachment_metadata_pdf() { $this->assertSame( $expected, $metadata ); unlink( $test_file ); + $temp_dir = get_temp_dir(); foreach ( $metadata['sizes'] as $size ) { - unlink( '/tmp/' . $size['file'] ); + unlink( $temp_dir . $size['file'] ); } } @@ -477,7 +524,6 @@ public function test_wp_generate_attachment_metadata_pdf() { * @ticket 43226 */ public function test_crop_setting_for_pdf() { - if ( ! wp_image_editor_supports( array( 'mime_type' => 'application/pdf' ) ) ) { $this->markTestSkipped( 'Rendering PDFs is not supported on this system.' ); } @@ -488,6 +534,11 @@ public function test_crop_setting_for_pdf() { $test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $editor = wp_get_image_editor( $test_file ); + if ( is_wp_error( $editor ) ) { + $this->markTestSkipped( $editor->get_error_message() ); + } + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -545,9 +596,14 @@ public function test_fallback_intermediate_image_sizes() { } $orig_file = DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf'; - $test_file = '/tmp/wordpress-gsoc-flyer.pdf'; + $test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf'; copy( $orig_file, $test_file ); + $editor = wp_get_image_editor( $test_file ); + if ( is_wp_error( $editor ) ) { + $this->markTestSkipped( $editor->get_error_message() ); + } + $attachment_id = $this->factory->attachment->create_object( $test_file, 0, @@ -569,19 +625,20 @@ public function test_fallback_intermediate_image_sizes() { ); $metadata = wp_generate_attachment_metadata( $attachment_id, $test_file ); - $this->assertTrue( isset( $metadata['sizes']['test-size'] ), 'The `test-size` was not added to the metadata.' ); + $this->assertArrayHasKey( 'test-size', $metadata['sizes'], 'The `test-size` was not added to the metadata.' ); $this->assertSame( $metadata['sizes']['test-size'], $expected ); remove_image_size( 'test-size' ); remove_filter( 'fallback_intermediate_image_sizes', array( $this, 'filter_fallback_intermediate_image_sizes' ), 10 ); unlink( $test_file ); + $temp_dir = get_temp_dir(); foreach ( $metadata['sizes'] as $size ) { - unlink( '/tmp/' . $size['file'] ); + unlink( $temp_dir . $size['file'] ); } } - function filter_fallback_intermediate_image_sizes( $fallback_sizes, $metadata ) { + public function filter_fallback_intermediate_image_sizes( $fallback_sizes, $metadata ) { // Add the 'test-size' to the list of fallback sizes. $fallback_sizes[] = 'test-size'; @@ -598,16 +655,23 @@ public function test_pdf_preview_doesnt_overwrite_existing_jpeg() { $this->markTestSkipped( 'Rendering PDFs is not supported on this system.' ); } + $temp_dir = get_temp_dir(); + // Dummy JPEGs. - $jpg1_path = '/tmp/test.jpg'; // Straight. + $jpg1_path = $temp_dir . 'test.jpg'; // Straight. file_put_contents( $jpg1_path, 'asdf' ); - $jpg2_path = '/tmp/test-pdf.jpg'; // With PDF marker. + $jpg2_path = $temp_dir . 'test-pdf.jpg'; // With PDF marker. file_put_contents( $jpg2_path, 'fdsa' ); // PDF with same name as JPEG. - $pdf_path = '/tmp/test.pdf'; + $pdf_path = $temp_dir . 'test.pdf'; copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path ); + $editor = wp_get_image_editor( $pdf_path ); + if ( is_wp_error( $editor ) ) { + $this->markTestSkipped( $editor->get_error_message() ); + } + $attachment_id = $this->factory->attachment->create_object( $pdf_path, 0, @@ -617,7 +681,7 @@ public function test_pdf_preview_doesnt_overwrite_existing_jpeg() { ); $metadata = wp_generate_attachment_metadata( $attachment_id, $pdf_path ); - $preview_path = '/tmp/' . $metadata['sizes']['full']['file']; + $preview_path = $temp_dir . $metadata['sizes']['full']['file']; // PDF preview didn't overwrite PDF. $this->assertNotEquals( $pdf_path, $preview_path ); @@ -633,7 +697,7 @@ public function test_pdf_preview_doesnt_overwrite_existing_jpeg() { unlink( $jpg2_path ); unlink( $pdf_path ); foreach ( $metadata['sizes'] as $size ) { - unlink( '/tmp/' . $size['file'] ); + unlink( $temp_dir . $size['file'] ); } } } diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php index 1a619cdc6d005..6b480a953c46e 100644 --- a/tests/phpunit/tests/image/header.php +++ b/tests/phpunit/tests/image/header.php @@ -6,14 +6,14 @@ * @group header */ class Tests_Image_Header extends WP_UnitTestCase { - var $custom_image_header; + public $custom_image_header; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->custom_image_header = new Custom_Image_Header( '__return_null' ); } - function test_header_image_has_correct_dimensions_with_max_width() { + public function test_header_image_has_correct_dimensions_with_max_width() { global $_wp_theme_features; $_wp_theme_features['custom-header'][0]['max-width'] = 1600; @@ -28,12 +28,12 @@ function test_header_image_has_correct_dimensions_with_max_width() { 'height' => 1200, ) ); - $this->assertEquals( 1200, $dimensions['dst_width'] ); - $this->assertEquals( 230, $dimensions['dst_height'] ); + $this->assertSame( 1200, $dimensions['dst_width'] ); + $this->assertSame( 230, $dimensions['dst_height'] ); } - function test_header_image_has_correct_dimensions_with_fixed() { + public function test_header_image_has_correct_dimensions_with_fixed() { global $_wp_theme_features; unset( $_wp_theme_features['custom-header'][0]['max-width'] ); @@ -48,12 +48,12 @@ function test_header_image_has_correct_dimensions_with_fixed() { 'height' => 1200, ) ); - $this->assertEquals( 1200, $dimensions['dst_width'] ); - $this->assertEquals( 230, $dimensions['dst_height'] ); + $this->assertSame( 1200, $dimensions['dst_width'] ); + $this->assertSame( 230, $dimensions['dst_height'] ); } - function test_header_image_has_correct_dimensions_with_flex_height() { + public function test_header_image_has_correct_dimensions_with_flex_height() { global $_wp_theme_features; unset( $_wp_theme_features['custom-header'][0]['max-width'] ); @@ -68,12 +68,12 @@ function test_header_image_has_correct_dimensions_with_flex_height() { 'height' => 1200, ) ); - $this->assertEquals( 1200, $dimensions['dst_width'] ); - $this->assertEquals( 900, $dimensions['dst_height'] ); + $this->assertSame( 1200, $dimensions['dst_width'] ); + $this->assertSame( 900, $dimensions['dst_height'] ); } - function test_header_image_has_correct_dimensions_with_flex_width() { + public function test_header_image_has_correct_dimensions_with_flex_width() { global $_wp_theme_features; unset( $_wp_theme_features['custom-header'][0]['max-width'] ); @@ -88,12 +88,12 @@ function test_header_image_has_correct_dimensions_with_flex_width() { 'height' => 1200, ) ); - $this->assertEquals( 1500, $dimensions['dst_width'] ); // Max width. - $this->assertEquals( 230, $dimensions['dst_height'] ); + $this->assertSame( 1500, $dimensions['dst_width'] ); // Max width. + $this->assertSame( 230, $dimensions['dst_height'] ); } - function test_header_image_has_correct_dimensions_with_flex_width_and_height() { + public function test_header_image_has_correct_dimensions_with_flex_width_and_height() { global $_wp_theme_features; $_wp_theme_features['custom-header'][0]['max-width'] = 1800; @@ -108,12 +108,12 @@ function test_header_image_has_correct_dimensions_with_flex_width_and_height() { 'height' => 1200, ) ); - $this->assertEquals( 1600, $dimensions['dst_width'] ); - $this->assertEquals( 1200, $dimensions['dst_height'] ); + $this->assertSame( 1600, $dimensions['dst_width'] ); + $this->assertSame( 1200, $dimensions['dst_height'] ); } - function test_create_attachment_object() { + public function test_create_attachment_object() { $id = wp_insert_attachment( array( 'post_status' => 'publish', @@ -126,13 +126,13 @@ function test_create_attachment_object() { $cropped = 'foo-cropped.png'; $object = $this->custom_image_header->create_attachment_object( $cropped, $id ); - $this->assertEquals( 'foo-cropped.png', $object['post_title'] ); - $this->assertEquals( 'http://localhost/' . $cropped, $object['guid'] ); - $this->assertEquals( 'custom-header', $object['context'] ); - $this->assertEquals( 'image/jpeg', $object['post_mime_type'] ); + $this->assertSame( 'foo-cropped.png', $object['post_title'] ); + $this->assertSame( 'http://localhost/' . $cropped, $object['guid'] ); + $this->assertSame( 'custom-header', $object['context'] ); + $this->assertSame( 'image/jpeg', $object['post_mime_type'] ); } - function test_insert_cropped_attachment() { + public function test_insert_cropped_attachment() { $id = wp_insert_attachment( array( 'post_status' => 'publish', @@ -147,14 +147,14 @@ function test_insert_cropped_attachment() { $cropped_id = $this->custom_image_header->insert_attachment( $object, $cropped ); - $this->assertInternalType( 'int', $cropped_id ); + $this->assertIsInt( $cropped_id ); $this->assertGreaterThan( 0, $cropped_id ); } /** * @ticket 21819 */ - function test_check_get_previous_crop() { + public function test_check_get_previous_crop() { $id = wp_insert_attachment( array( 'post_status' => 'publish', diff --git a/tests/phpunit/tests/image/intermediateSize.php b/tests/phpunit/tests/image/intermediateSize.php index c7d8307afc3a9..b67e795163e55 100644 --- a/tests/phpunit/tests/image/intermediateSize.php +++ b/tests/phpunit/tests/image/intermediateSize.php @@ -5,14 +5,14 @@ * @group upload */ class Tests_Image_Intermediate_Size extends WP_UnitTestCase { - function tearDown() { + public function tear_down() { $this->remove_added_uploads(); remove_image_size( 'test-size' ); remove_image_size( 'false-height' ); remove_image_size( 'false-width' ); remove_image_size( 'off-by-one' ); - parent::tearDown(); + parent::tear_down(); } public function _make_attachment( $file, $parent_post_id = 0 ) { @@ -22,53 +22,77 @@ public function _make_attachment( $file, $parent_post_id = 0 ) { return parent::_make_attachment( $upload, $parent_post_id ); } - function test_make_intermediate_size_no_size() { + public function test_make_intermediate_size_no_size() { $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 0, 0, false ); $this->assertFalse( $image ); } - function test_make_intermediate_size_width() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - + /** + * @requires function imagejpeg + */ + public function test_make_intermediate_size_width() { $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 0, false ); - $this->assertInternalType( 'array', $image ); + $this->assertIsArray( $image ); } - function test_make_intermediate_size_height() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - + /** + * @requires function imagejpeg + */ + public function test_make_intermediate_size_height() { $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 0, 75, false ); - $this->assertInternalType( 'array', $image ); + $this->assertIsArray( $image ); } - function test_make_intermediate_size_successful() { - if ( ! function_exists( 'imagejpeg' ) ) { - $this->fail( 'jpeg support unavailable' ); - } - + /** + * @requires function imagejpeg + */ + public function test_make_intermediate_size_successful() { $image = image_make_intermediate_size( DIR_TESTDATA . '/images/a2-small.jpg', 100, 75, true ); - $this->assertInternalType( 'array', $image ); - $this->assertEquals( 100, $image['width'] ); - $this->assertEquals( 75, $image['height'] ); - $this->assertEquals( 'image/jpeg', $image['mime-type'] ); + unlink( DIR_TESTDATA . '/images/a2-small-100x75.jpg' ); - $this->assertFalse( isset( $image['path'] ) ); + $this->assertIsArray( $image ); + $this->assertSame( 100, $image['width'] ); + $this->assertSame( 75, $image['height'] ); + $this->assertSame( 'image/jpeg', $image['mime-type'] ); - unlink( DIR_TESTDATA . '/images/a2-small-100x75.jpg' ); + $this->assertArrayNotHasKey( 'path', $image ); + } + + /** + * @ticket 52867 + * @requires function imagejpeg + */ + public function test_image_editor_output_format_filter() { + add_filter( + 'image_editor_output_format', + static function() { + return array( 'image/jpeg' => 'image/webp' ); + } + ); + + $file = DIR_TESTDATA . '/images/waffles.jpg'; + $image = image_make_intermediate_size( $file, 100, 75, true ); + $editor = wp_get_image_editor( $file ); + + unlink( DIR_TESTDATA . '/images/' . $image['file'] ); + remove_all_filters( 'image_editor_output_format' ); + + if ( is_wp_error( $editor ) || ! $editor->supports_mime_type( 'image/webp' ) ) { + $this->assertSame( 'image/jpeg', $image['mime-type'] ); + } else { + $this->assertSame( 'image/webp', $image['mime-type'] ); + } } /** * @ticket 17626 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_name() { + public function test_get_intermediate_sizes_by_name() { add_image_size( 'test-size', 330, 220, true ); $file = DIR_TESTDATA . '/images/waffles.jpg'; @@ -82,13 +106,14 @@ function test_get_intermediate_sizes_by_name() { // Test for the expected string because the array will by definition // return with the correct height and width attributes. - $this->assertTrue( strpos( $image['file'], '330x220' ) > 0 ); + $this->assertStringContainsString( '330x220', $image['file'] ); } /** * @ticket 17626 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_array_exact() { + public function test_get_intermediate_sizes_by_array_exact() { // Only one dimention match shouldn't return false positive (see: #17626). add_image_size( 'test-size', 330, 220, true ); add_image_size( 'false-height', 330, 400, true ); @@ -103,13 +128,14 @@ function test_get_intermediate_sizes_by_array_exact() { // Test for the expected string because the array will by definition // return with the correct height and width attributes. - $this->assertTrue( strpos( $image['file'], '330x220' ) > 0 ); + $this->assertStringContainsString( '330x220', $image['file'] ); } /** * @ticket 17626 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_array_nearest() { + public function test_get_intermediate_sizes_by_array_nearest() { // If an exact size is not found, it should be returned. // If not, find nearest size that is larger (see: #17626). add_image_size( 'test-size', 450, 300, true ); @@ -125,13 +151,14 @@ function test_get_intermediate_sizes_by_array_nearest() { // Test for the expected string because the array will by definition // return with the correct height and width attributes. - $this->assertTrue( strpos( $image['file'], '450x300' ) > 0 ); + $this->assertStringContainsString( '450x300', $image['file'] ); } /** * @ticket 17626 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_array_nearest_false() { + public function test_get_intermediate_sizes_by_array_nearest_false() { // If an exact size is not found, it should be returned. // If not, find nearest size that is larger, otherwise return false (see: #17626). add_image_size( 'false-height', 330, 100, true ); @@ -151,8 +178,9 @@ function test_get_intermediate_sizes_by_array_nearest_false() { /** * @ticket 17626 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_array_zero_height() { + public function test_get_intermediate_sizes_by_array_zero_height() { // Generate random width. $random_w = rand( 300, 400 ); @@ -173,14 +201,15 @@ function test_get_intermediate_sizes_by_array_zero_height() { // Test for the expected string because the array will by definition // return with the correct height and width attributes. - $this->assertTrue( strpos( $image['file'], $image_w . 'x' . $image_h ) > 0 ); + $this->assertStringContainsString( $image_w . 'x' . $image_h, $image['file'] ); } /** * @ticket 17626 * @ticket 34087 + * @requires function imagejpeg */ - function test_get_intermediate_sizes_by_array_zero_width() { + public function test_get_intermediate_sizes_by_array_zero_width() { // 202 is the smallest height that will trigger a miss for 'false-height'. $height = 202; @@ -201,12 +230,13 @@ function test_get_intermediate_sizes_by_array_zero_width() { // Test for the expected string because the array will by definition // return with the correct height and width attributes. - $this->assertTrue( strpos( $image['file'], $image_w . 'x' . $image_h ) > 0 ); + $this->assertStringContainsString( $image_w . 'x' . $image_h, $image['file'] ); } /** * @ticket 17626 * @ticket 34087 + * @requires function imagejpeg */ public function test_get_intermediate_sizes_should_match_size_with_off_by_one_aspect_ratio() { // Original is 600x400. 300x201 is close enough to match. @@ -225,11 +255,12 @@ public function test_get_intermediate_sizes_should_match_size_with_off_by_one_as // Note: Staying larger than 300px to miss default medium crop. $image = image_get_intermediate_size( $id, array( 0, $height ) ); - $this->assertTrue( strpos( $image['file'], $width . 'x' . $height ) > 0 ); + $this->assertStringContainsString( $width . 'x' . $height, $image['file'] ); } /** * @ticket 34384 + * @requires function imagejpeg */ public function test_get_intermediate_size_with_small_size_array() { // Add a hard cropped size that matches the aspect ratio we're going to test. @@ -242,11 +273,12 @@ public function test_get_intermediate_size_with_small_size_array() { $image = image_get_intermediate_size( $id, array( 50, 25 ) ); // We should get the 'test-size' file and not the thumbnail. - $this->assertTrue( strpos( $image['file'], '200x100' ) > 0 ); + $this->assertStringContainsString( '200x100', $image['file'] ); } /** * @ticket 34384 + * @requires function imagejpeg */ public function test_get_intermediate_size_with_small_size_array_fallback() { $file = DIR_TESTDATA . '/images/waffles.jpg'; diff --git a/tests/phpunit/tests/image/meta.php b/tests/phpunit/tests/image/meta.php index f22bcca845d61..39e68b33c3ce8 100644 --- a/tests/phpunit/tests/image/meta.php +++ b/tests/phpunit/tests/image/meta.php @@ -4,135 +4,144 @@ * @group image * @group media * @group upload + * @requires extension gd + * @requires extension exif + * + * @covers ::wp_read_image_metadata */ class Tests_Image_Meta extends WP_UnitTestCase { - function setUp() { - if ( ! extension_loaded( 'gd' ) ) { - $this->markTestSkipped( 'The gd PHP extension is not loaded.' ); - } - if ( ! extension_loaded( 'exif' ) ) { - $this->markTestSkipped( 'The exif PHP extension is not loaded.' ); - } - - parent::setUp(); + + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + require_once DIR_TESTROOT . '/includes/class-wp-test-stream.php'; + stream_wrapper_register( 'testimagemeta', 'WP_Test_Stream' ); + + WP_Test_Stream::$data = array( + 'wp_read_image_metadata' => array( + '/image1.jpg' => file_get_contents( DIR_TESTDATA . '/images/test-image-upside-down.jpg' ), + '/image2.jpg' => file_get_contents( DIR_TESTDATA . '/images/2004-07-22-DSC_0007.jpg' ), + '/image3.jpg' => file_get_contents( DIR_TESTDATA . '/images/33772.jpg' ), + ), + ); + } + + public static function wpTearDownAfterClass() { + stream_wrapper_unregister( 'testimagemeta' ); } - function test_exif_d70() { + public function test_exif_d70() { // Exif from a Nikon D70. $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2004-07-22-DSC_0008.jpg' ); $this->assertEquals( 6.3, $out['aperture'] ); - $this->assertEquals( '', $out['credit'] ); - $this->assertEquals( 'NIKON D70', $out['camera'] ); - $this->assertEquals( '', $out['caption'] ); + $this->assertSame( '', $out['credit'] ); + $this->assertSame( 'NIKON D70', $out['camera'] ); + $this->assertSame( '', $out['caption'] ); $this->assertEquals( strtotime( '2004-07-22 17:14:59' ), $out['created_timestamp'] ); - $this->assertEquals( '', $out['copyright'] ); + $this->assertSame( '', $out['copyright'] ); $this->assertEquals( 27, $out['focal_length'] ); $this->assertEquals( 400, $out['iso'] ); $this->assertEquals( 1 / 40, $out['shutter_speed'] ); - $this->assertEquals( '', $out['title'] ); + $this->assertSame( '', $out['title'] ); } - function test_exif_d70_mf() { + public function test_exif_d70_mf() { // Exif from a Nikon D70 - manual focus lens, so some data is unavailable. $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG' ); - $this->assertEquals( 0, $out['aperture'] ); - $this->assertEquals( '', $out['credit'] ); - $this->assertEquals( 'NIKON D70', $out['camera'] ); - $this->assertEquals( '', $out['caption'] ); + $this->assertSame( '0', $out['aperture'] ); + $this->assertSame( '', $out['credit'] ); + $this->assertSame( 'NIKON D70', $out['camera'] ); + $this->assertSame( '', $out['caption'] ); $this->assertEquals( strtotime( '2007-06-17 21:18:00' ), $out['created_timestamp'] ); - $this->assertEquals( '', $out['copyright'] ); + $this->assertSame( '', $out['copyright'] ); $this->assertEquals( 0, $out['focal_length'] ); $this->assertEquals( 0, $out['iso'] ); // Interesting - a Nikon bug? $this->assertEquals( 1 / 500, $out['shutter_speed'] ); - $this->assertEquals( '', $out['title'] ); - // $this->assertEquals( array( 'Flowers' ), $out['keywords'] ); + $this->assertSame( '', $out['title'] ); + // $this->assertSame( array( 'Flowers' ), $out['keywords'] ); } - function test_exif_d70_iptc() { + public function test_exif_d70_iptc() { // Exif from a Nikon D70 with IPTC data added later. $out = wp_read_image_metadata( DIR_TESTDATA . '/images/2004-07-22-DSC_0007.jpg' ); $this->assertEquals( 6.3, $out['aperture'] ); - $this->assertEquals( 'IPTC Creator', $out['credit'] ); - $this->assertEquals( 'NIKON D70', $out['camera'] ); - $this->assertEquals( 'IPTC Caption', $out['caption'] ); + $this->assertSame( 'IPTC Creator', $out['credit'] ); + $this->assertSame( 'NIKON D70', $out['camera'] ); + $this->assertSame( 'IPTC Caption', $out['caption'] ); $this->assertEquals( strtotime( '2004-07-22 17:14:35' ), $out['created_timestamp'] ); - $this->assertEquals( 'IPTC Copyright', $out['copyright'] ); + $this->assertSame( 'IPTC Copyright', $out['copyright'] ); $this->assertEquals( 18, $out['focal_length'] ); $this->assertEquals( 200, $out['iso'] ); $this->assertEquals( 1 / 25, $out['shutter_speed'] ); - $this->assertEquals( 'IPTC Headline', $out['title'] ); + $this->assertSame( 'IPTC Headline', $out['title'] ); } - function test_exif_fuji() { + public function test_exif_fuji() { // Exif from a Fuji FinePix S5600 (thanks Mark). $out = wp_read_image_metadata( DIR_TESTDATA . '/images/a2-small.jpg' ); $this->assertEquals( 4.5, $out['aperture'] ); - $this->assertEquals( '', $out['credit'] ); - $this->assertEquals( 'FinePix S5600', $out['camera'] ); - $this->assertEquals( '', $out['caption'] ); + $this->assertSame( '', $out['credit'] ); + $this->assertSame( 'FinePix S5600', $out['camera'] ); + $this->assertSame( '', $out['caption'] ); $this->assertEquals( strtotime( '2007-09-03 10:17:03' ), $out['created_timestamp'] ); - $this->assertEquals( '', $out['copyright'] ); + $this->assertSame( '', $out['copyright'] ); $this->assertEquals( 6.3, $out['focal_length'] ); $this->assertEquals( 64, $out['iso'] ); $this->assertEquals( 1 / 320, $out['shutter_speed'] ); - $this->assertEquals( '', $out['title'] ); + $this->assertSame( '', $out['title'] ); } /** * @ticket 6571 */ - function test_exif_error() { + public function test_exif_error() { // https://core.trac.wordpress.org/ticket/6571 // This triggers a warning mesage when reading the Exif block. $out = wp_read_image_metadata( DIR_TESTDATA . '/images/waffles.jpg' ); $this->assertEquals( 0, $out['aperture'] ); - $this->assertEquals( '', $out['credit'] ); - $this->assertEquals( '', $out['camera'] ); - $this->assertEquals( '', $out['caption'] ); + $this->assertSame( '', $out['credit'] ); + $this->assertSame( '', $out['camera'] ); + $this->assertSame( '', $out['caption'] ); $this->assertEquals( 0, $out['created_timestamp'] ); - $this->assertEquals( '', $out['copyright'] ); + $this->assertSame( '', $out['copyright'] ); $this->assertEquals( 0, $out['focal_length'] ); $this->assertEquals( 0, $out['iso'] ); $this->assertEquals( 0, $out['shutter_speed'] ); - $this->assertEquals( '', $out['title'] ); + $this->assertSame( '', $out['title'] ); } - function test_exif_no_data() { + public function test_exif_no_data() { // No Exif data in this image (from burningwell.org). $out = wp_read_image_metadata( DIR_TESTDATA . '/images/canola.jpg' ); $this->assertEquals( 0, $out['aperture'] ); - $this->assertEquals( '', $out['credit'] ); - $this->assertEquals( '', $out['camera'] ); - $this->assertEquals( '', $out['caption'] ); + $this->assertSame( '', $out['credit'] ); + $this->assertSame( '', $out['camera'] ); + $this->assertSame( '', $out['caption'] ); $this->assertEquals( 0, $out['created_timestamp'] ); - $this->assertEquals( '', $out['copyright'] ); + $this->assertSame( '', $out['copyright'] ); $this->assertEquals( 0, $out['focal_length'] ); $this->assertEquals( 0, $out['iso'] ); $this->assertEquals( 0, $out['shutter_speed'] ); - $this->assertEquals( '', $out['title'] ); + $this->assertSame( '', $out['title'] ); } /** * @ticket 9417 */ - function test_utf8_iptc_tags() { + public function test_utf8_iptc_tags() { // Trilingual UTF-8 text in the ITPC caption-abstract field. $out = wp_read_image_metadata( DIR_TESTDATA . '/images/test-image-iptc.jpg' ); - $this->assertEquals( 'This is a comment. / Это комментарий. / Βλέπετε ένα ĻƒĻ‡ĻŒĪ»Ī¹Īæ.', $out['caption'] ); + $this->assertSame( 'This is a comment. / Это комментарий. / Βλέπετε ένα ĻƒĻ‡ĻŒĪ»Ī¹Īæ.', $out['caption'] ); } /** - * wp_read_image_metadata() should false if the image file doesn't exist - * - * @return void + * wp_read_image_metadata() should return false if the image file doesn't exist. */ public function test_missing_image_file() { $out = wp_read_image_metadata( DIR_TESTDATA . '/images/404_image.png' ); @@ -146,18 +155,88 @@ public function test_missing_image_file() { public function test_exif_keywords() { $out = wp_read_image_metadata( DIR_TESTDATA . '/images/33772.jpg' ); - $this->assertEquals( '8', $out['aperture'] ); - $this->assertEquals( 'Photoshop Author', $out['credit'] ); - $this->assertEquals( 'DMC-LX2', $out['camera'] ); - $this->assertEquals( 'Photoshop Description', $out['caption'] ); + $this->assertSame( '8', $out['aperture'] ); + $this->assertSame( 'Photoshop Author', $out['credit'] ); + $this->assertSame( 'DMC-LX2', $out['camera'] ); + $this->assertSame( 'Photoshop Description', $out['caption'] ); $this->assertEquals( 1306315327, $out['created_timestamp'] ); - $this->assertEquals( 'Photoshop Copyrright Notice', $out['copyright'] ); - $this->assertEquals( '6.3', $out['focal_length'] ); - $this->assertEquals( '100', $out['iso'] ); - $this->assertEquals( '0.0025', $out['shutter_speed'] ); - $this->assertEquals( 'Photoshop Document Ttitle', $out['title'] ); + $this->assertSame( 'Photoshop Copyrright Notice', $out['copyright'] ); + $this->assertSame( '6.3', $out['focal_length'] ); + $this->assertSame( '100', $out['iso'] ); + $this->assertSame( '0.0025', $out['shutter_speed'] ); + $this->assertSame( 'Photoshop Document Ttitle', $out['title'] ); $this->assertEquals( 1, $out['orientation'] ); - $this->assertEquals( array( 'beach', 'baywatch', 'LA', 'sunset' ), $out['keywords'] ); + $this->assertSame( array( 'beach', 'baywatch', 'LA', 'sunset' ), $out['keywords'] ); } + /** + * @dataProvider data_stream + * + * @ticket 52826 + * @ticket 52922 + * + * @param string Stream's URI. + * @param array Expected metadata. + */ + public function test_stream( $file, $expected ) { + $actual = wp_read_image_metadata( $file ); + + $this->assertSame( $expected, $actual ); + } + + public function data_stream() { + return array( + 'Orientation only metadata' => array( + 'file' => 'testimagemeta://wp_read_image_metadata/image1.jpg', + 'metadata' => array( + 'aperture' => '0', + 'credit' => '', + 'camera' => '', + 'caption' => '', + 'created_timestamp' => '0', + 'copyright' => '', + 'focal_length' => '0', + 'iso' => '0', + 'shutter_speed' => '0', + 'title' => '', + 'orientation' => '3', + 'keywords' => array(), + ), + ), + 'Exif from a Nikon D70 with IPTC data added later' => array( + 'file' => 'testimagemeta://wp_read_image_metadata/image2.jpg', + 'metadata' => array( + 'aperture' => '6.3', + 'credit' => 'IPTC Creator', + 'camera' => 'NIKON D70', + 'caption' => 'IPTC Caption', + 'created_timestamp' => '1090516475', + 'copyright' => 'IPTC Copyright', + 'focal_length' => '18', + 'iso' => '200', + 'shutter_speed' => '0.04', + 'title' => 'IPTC Headline', + 'orientation' => '0', + 'keywords' => array(), + ), + ), + 'Exif from a DMC-LX2 camera with keywords' => array( + 'file' => 'testimagemeta://wp_read_image_metadata/image3.jpg', + 'metadata' => array( + 'aperture' => '8', + 'credit' => 'Photoshop Author', + 'camera' => 'DMC-LX2', + 'caption' => 'Photoshop Description', + 'created_timestamp' => '1306315327', + 'copyright' => 'Photoshop Copyrright Notice', + 'focal_length' => '6.3', + 'iso' => '100', + 'shutter_speed' => '0.0025', + 'title' => 'Photoshop Document Ttitle', + 'orientation' => '1', + 'keywords' => array( 'beach', 'baywatch', 'LA', 'sunset' ), + ), + ), + ); + } } diff --git a/tests/phpunit/tests/image/resize.php b/tests/phpunit/tests/image/resize.php index c03916af2a392..12cf8eb7ad920 100644 --- a/tests/phpunit/tests/image/resize.php +++ b/tests/phpunit/tests/image/resize.php @@ -10,142 +10,154 @@ abstract class WP_Tests_Image_Resize_UnitTestCase extends WP_Image_UnitTestCase { - public function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); add_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) ); } - public function tearDown() { - remove_filter( 'wp_image_editors', array( $this, 'wp_image_editors' ) ); - - parent::tearDown(); - } - public function wp_image_editors() { return array( $this->editor_engine ); } - function test_resize_jpg() { + public function test_resize_jpg() { $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.jpg', 25, 25 ); - $this->assertEquals( 'test-image-25x25.jpg', wp_basename( $image ) ); + $this->assertSame( 'test-image-25x25.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 25, $w ); - $this->assertEquals( 25, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 25, $w ); + $this->assertSame( 25, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_png() { + public function test_resize_png() { $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.png', 25, 25 ); if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion. - $this->fail( sprintf( 'No PNG support in the editor engine %s on this system', $this->editor_engine ) ); + $this->fail( sprintf( 'No PNG support in the editor engine %s on this system.', $this->editor_engine ) ); } - $this->assertEquals( 'test-image-25x25.png', wp_basename( $image ) ); + $this->assertSame( 'test-image-25x25.png', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 25, $w ); - $this->assertEquals( 25, $h ); - $this->assertEquals( IMAGETYPE_PNG, $type ); + $this->assertSame( 25, $w ); + $this->assertSame( 25, $h ); + $this->assertSame( IMAGETYPE_PNG, $type ); unlink( $image ); } - function test_resize_gif() { + public function test_resize_gif() { $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.gif', 25, 25 ); if ( ! is_string( $image ) ) { // WP_Error, stop GLib-GObject-CRITICAL assertion. - $this->fail( sprintf( 'No GIF support in the editor engine %s on this system', $this->editor_engine ) ); + $this->fail( sprintf( 'No GIF support in the editor engine %s on this system.', $this->editor_engine ) ); } - $this->assertEquals( 'test-image-25x25.gif', wp_basename( $image ) ); + $this->assertSame( 'test-image-25x25.gif', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 25, $w ); - $this->assertEquals( 25, $h ); - $this->assertEquals( IMAGETYPE_GIF, $type ); + $this->assertSame( 25, $w ); + $this->assertSame( 25, $h ); + $this->assertSame( IMAGETYPE_GIF, $type ); + + unlink( $image ); + } + + public function test_resize_webp() { + $file = DIR_TESTDATA . '/images/test-image.webp'; + $editor = wp_get_image_editor( $file ); + + // Check if the editor supports the webp mime type. + if ( is_wp_error( $editor ) || ! $editor->supports_mime_type( 'image/webp' ) ) { + $this->markTestSkipped( sprintf( 'No WebP support in the editor engine %s on this system.', $this->editor_engine ) ); + } + $image = $this->resize_helper( $file, 25, 25 ); + $this->assertSame( 'test-image-25x25.webp', wp_basename( $image ) ); + list($w, $h, $type) = wp_getimagesize( $image ); + $this->assertSame( 25, $w ); + $this->assertSame( 25, $h ); + $this->assertSame( IMAGETYPE_WEBP, $type ); unlink( $image ); } - function test_resize_larger() { + public function test_resize_larger() { // image_resize() should refuse to make an image larger. $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.jpg', 100, 100 ); $this->assertInstanceOf( 'WP_Error', $image ); - $this->assertEquals( 'error_getting_dimensions', $image->get_error_code() ); + $this->assertSame( 'error_getting_dimensions', $image->get_error_code() ); } - function test_resize_thumb_128x96() { + public function test_resize_thumb_128x96() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 96 ); - $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 64, $w ); - $this->assertEquals( 96, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 64, $w ); + $this->assertSame( 96, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_thumb_128x0() { + public function test_resize_thumb_128x0() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 0 ); - $this->assertEquals( '2007-06-17DSC_4173-128x193.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-128x193.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 128, $w ); - $this->assertEquals( 193, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 128, $w ); + $this->assertSame( 193, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_thumb_0x96() { + public function test_resize_thumb_0x96() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 0, 96 ); - $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 64, $w ); - $this->assertEquals( 96, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 64, $w ); + $this->assertSame( 96, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_thumb_150x150_crop() { + public function test_resize_thumb_150x150_crop() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 150, true ); - $this->assertEquals( '2007-06-17DSC_4173-150x150.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-150x150.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 150, $w ); - $this->assertEquals( 150, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 150, $w ); + $this->assertSame( 150, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_thumb_150x100_crop() { + public function test_resize_thumb_150x100_crop() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 100, true ); - $this->assertEquals( '2007-06-17DSC_4173-150x100.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-150x100.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 150, $w ); - $this->assertEquals( 100, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 150, $w ); + $this->assertSame( 100, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } - function test_resize_thumb_50x150_crop() { + public function test_resize_thumb_50x150_crop() { $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 50, 150, true ); - $this->assertEquals( '2007-06-17DSC_4173-50x150.jpg', wp_basename( $image ) ); + $this->assertSame( '2007-06-17DSC_4173-50x150.jpg', wp_basename( $image ) ); list($w, $h, $type) = getimagesize( $image ); - $this->assertEquals( 50, $w ); - $this->assertEquals( 150, $h ); - $this->assertEquals( IMAGETYPE_JPEG, $type ); + $this->assertSame( 50, $w ); + $this->assertSame( 150, $h ); + $this->assertSame( IMAGETYPE_JPEG, $type ); unlink( $image ); } @@ -159,7 +171,7 @@ public function test_resize_non_existent_image() { $image = $this->resize_helper( DIR_TESTDATA . '/images/test-non-existent-image.jpg', 25, 25 ); $this->assertInstanceOf( 'WP_Error', $image ); - $this->assertEquals( 'error_loading_image', $image->get_error_code() ); + $this->assertSame( 'error_loading_image', $image->get_error_code() ); } /** diff --git a/tests/phpunit/tests/image/resizeGd.php b/tests/phpunit/tests/image/resizeGd.php index 51bbb8e193752..40a3faebfc4b1 100644 --- a/tests/phpunit/tests/image/resizeGd.php +++ b/tests/phpunit/tests/image/resizeGd.php @@ -5,6 +5,8 @@ * @group media * @group upload * @group resize + * + * @requires function imagejpeg */ require_once __DIR__ . '/resize.php'; @@ -17,11 +19,12 @@ class Test_Image_Resize_GD extends WP_Tests_Image_Resize_UnitTestCase { */ public $editor_engine = 'WP_Image_Editor_GD'; - public function setUp() { + public function set_up() { require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; - parent::setUp(); + // This needs to come after the mock image editor class is loaded. + parent::set_up(); } /** @@ -33,7 +36,7 @@ public function test_resize_bad_image() { $image = $this->resize_helper( DIR_TESTDATA . '/export/crazy-cdata.xml', 25, 25 ); $this->assertInstanceOf( 'WP_Error', $image ); - $this->assertEquals( 'invalid_image', $image->get_error_code() ); + $this->assertSame( 'invalid_image', $image->get_error_code() ); } } diff --git a/tests/phpunit/tests/image/resizeImagick.php b/tests/phpunit/tests/image/resizeImagick.php index ae402ee45764f..4243ea18e4dca 100644 --- a/tests/phpunit/tests/image/resizeImagick.php +++ b/tests/phpunit/tests/image/resizeImagick.php @@ -17,10 +17,11 @@ class Test_Image_Resize_Imagick extends WP_Tests_Image_Resize_UnitTestCase { */ public $editor_engine = 'WP_Image_Editor_Imagick'; - public function setUp() { + public function set_up() { require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php'; - parent::setUp(); + // This needs to come after the mock image editor class is loaded. + parent::set_up(); } } diff --git a/tests/phpunit/tests/image/siteIcon.php b/tests/phpunit/tests/image/siteIcon.php index c55bdc7e4bf09..369aed06f9700 100644 --- a/tests/phpunit/tests/image/siteIcon.php +++ b/tests/phpunit/tests/image/siteIcon.php @@ -12,23 +12,23 @@ class Tests_WP_Site_Icon extends WP_UnitTestCase { public $attachment_id = 0; - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); $this->wp_site_icon = new WP_Site_Icon(); } - function tearDown() { - $this->_remove_custom_logo(); + public function tear_down() { + $this->remove_custom_logo(); $this->remove_added_uploads(); - parent::tearDown(); + parent::tear_down(); } - function _remove_custom_logo() { + private function remove_custom_logo() { remove_theme_mod( 'custom_logo' ); } - function test_intermediate_image_sizes() { + public function test_intermediate_image_sizes() { $image_sizes = $this->wp_site_icon->intermediate_image_sizes( array() ); $sizes = array(); @@ -36,11 +36,11 @@ function test_intermediate_image_sizes() { $sizes[] = 'site_icon-' . $size; } - $this->assertEquals( $sizes, $image_sizes ); + $this->assertSame( $sizes, $image_sizes ); } - function test_intermediate_image_sizes_with_filter() { - add_filter( 'site_icon_image_sizes', array( $this, '_custom_test_sizes' ) ); + public function test_intermediate_image_sizes_with_filter() { + add_filter( 'site_icon_image_sizes', array( $this, 'custom_test_sizes' ) ); $image_sizes = $this->wp_site_icon->intermediate_image_sizes( array() ); $sizes = array(); @@ -52,15 +52,15 @@ function test_intermediate_image_sizes_with_filter() { $this->assertContains( 'site_icon-321', $image_sizes ); // All icon sizes should be part of the array, including sizes added through the filter. - $this->assertEquals( $sizes, $image_sizes ); + $this->assertSame( $sizes, $image_sizes ); // Remove custom size. unset( $this->wp_site_icon->site_icon_sizes[ array_search( 321, $this->wp_site_icon->site_icon_sizes, true ) ] ); // Remove the filter we added. - remove_filter( 'site_icon_image_sizes', array( $this, '_custom_test_sizes' ) ); + remove_filter( 'site_icon_image_sizes', array( $this, 'custom_test_sizes' ) ); } - function test_additional_sizes() { + public function test_additional_sizes() { $image_sizes = $this->wp_site_icon->additional_sizes( array() ); $sizes = array(); @@ -72,11 +72,11 @@ function test_additional_sizes() { ); } - $this->assertEquals( $sizes, $image_sizes ); + $this->assertSame( $sizes, $image_sizes ); } - function test_additional_sizes_with_filter() { - add_filter( 'site_icon_image_sizes', array( $this, '_custom_test_sizes' ) ); + public function test_additional_sizes_with_filter() { + add_filter( 'site_icon_image_sizes', array( $this, 'custom_test_sizes' ) ); $image_sizes = $this->wp_site_icon->additional_sizes( array() ); $sizes = array(); @@ -92,40 +92,40 @@ function test_additional_sizes_with_filter() { $this->assertArrayHasKey( 'site_icon-321', $image_sizes ); // All icon sizes should be part of the array, including sizes added through the filter. - $this->assertEquals( $sizes, $image_sizes ); + $this->assertSame( $sizes, $image_sizes ); // Remove custom size. unset( $this->wp_site_icon->site_icon_sizes[ array_search( 321, $this->wp_site_icon->site_icon_sizes, true ) ] ); } - function test_create_attachment_object() { - $attachment_id = $this->_insert_attachment(); + public function test_create_attachment_object() { + $attachment_id = $this->insert_attachment(); $parent_url = get_post( $attachment_id )->guid; $cropped = str_replace( wp_basename( $parent_url ), 'cropped-test-image.jpg', $parent_url ); $object = $this->wp_site_icon->create_attachment_object( $cropped, $attachment_id ); - $this->assertEquals( $object['post_title'], 'cropped-test-image.jpg' ); - $this->assertEquals( $object['context'], 'site-icon' ); - $this->assertEquals( $object['post_mime_type'], 'image/jpeg' ); - $this->assertEquals( $object['post_content'], $cropped ); - $this->assertEquals( $object['guid'], $cropped ); + $this->assertSame( $object['post_title'], 'cropped-test-image.jpg' ); + $this->assertSame( $object['context'], 'site-icon' ); + $this->assertSame( $object['post_mime_type'], 'image/jpeg' ); + $this->assertSame( $object['post_content'], $cropped ); + $this->assertSame( $object['guid'], $cropped ); } - function test_insert_cropped_attachment() { - $attachment_id = $this->_insert_attachment(); + public function test_insert_cropped_attachment() { + $attachment_id = $this->insert_attachment(); $parent_url = get_post( $attachment_id )->guid; $cropped = str_replace( wp_basename( $parent_url ), 'cropped-test-image.jpg', $parent_url ); $object = $this->wp_site_icon->create_attachment_object( $cropped, $attachment_id ); $cropped_id = $this->wp_site_icon->insert_attachment( $object, $cropped ); - $this->assertInternalType( 'int', $cropped_id ); + $this->assertIsInt( $cropped_id ); $this->assertGreaterThan( 0, $cropped_id ); } - function test_delete_attachment_data() { - $attachment_id = $this->_insert_attachment(); + public function test_delete_attachment_data() { + $attachment_id = $this->insert_attachment(); update_option( 'site_icon', $attachment_id ); wp_delete_attachment( $attachment_id, true ); @@ -136,8 +136,8 @@ function test_delete_attachment_data() { /** * @ticket 34368 */ - function test_get_post_metadata() { - $attachment_id = $this->_insert_attachment(); + public function test_get_post_metadata() { + $attachment_id = $this->insert_attachment(); update_option( 'site_icon', $attachment_id ); $this->wp_site_icon->get_post_metadata( '', $attachment_id, '_some_post_meta', true ); @@ -149,13 +149,13 @@ function test_get_post_metadata() { wp_delete_attachment( $attachment_id, true ); } - function _custom_test_sizes( $sizes ) { + public function custom_test_sizes( $sizes ) { $sizes[] = 321; return $sizes; } - function _insert_attachment() { + private function insert_attachment() { if ( $this->attachment_id ) { return $this->attachment_id; } diff --git a/tests/phpunit/tests/image/size.php b/tests/phpunit/tests/image/size.php index 0466cd066f856..60819b41b5500 100644 --- a/tests/phpunit/tests/image/size.php +++ b/tests/phpunit/tests/image/size.php @@ -7,7 +7,7 @@ */ class Tests_Image_Size extends WP_UnitTestCase { - function test_constrain_dims_zero() { + public function test_constrain_dims_zero() { // No constraint - should have no effect. $out = wp_constrain_dimensions( 640, 480, 0, 0 ); $this->assertSame( array( 640, 480 ), $out ); @@ -22,7 +22,7 @@ function test_constrain_dims_zero() { $this->assertSame( array( 118, 177 ), $out ); } - function test_constrain_dims_smaller() { + public function test_constrain_dims_smaller() { // Image size is smaller than the constraint - no effect. $out = wp_constrain_dimensions( 500, 600, 1024, 768 ); $this->assertSame( array( 500, 600 ), $out ); @@ -34,7 +34,7 @@ function test_constrain_dims_smaller() { $this->assertSame( array( 500, 600 ), $out ); } - function test_constrain_dims_equal() { + public function test_constrain_dims_equal() { // Image size is equal to the constraint - no effect. $out = wp_constrain_dimensions( 1024, 768, 1024, 768 ); $this->assertSame( array( 1024, 768 ), $out ); @@ -46,7 +46,7 @@ function test_constrain_dims_equal() { $this->assertSame( array( 1024, 768 ), $out ); } - function test_constrain_dims_larger() { + public function test_constrain_dims_larger() { // Image size is larger than the constraint - result should be constrained. $out = wp_constrain_dimensions( 1024, 768, 500, 600 ); $this->assertSame( array( 500, 375 ), $out ); @@ -68,7 +68,7 @@ function test_constrain_dims_larger() { $this->assertSame( array( 200, 533 ), $out ); } - function test_constrain_dims_boundary() { + public function test_constrain_dims_boundary() { // One dimension is larger than the constraint, one smaller - result should be constrained. $out = wp_constrain_dimensions( 1024, 768, 500, 800 ); $this->assertSame( array( 500, 375 ), $out ); @@ -87,7 +87,7 @@ function test_constrain_dims_boundary() { /** * @expectedDeprecated wp_shrink_dimensions */ - function test_shrink_dimensions_default() { + public function test_shrink_dimensions_default() { $out = wp_shrink_dimensions( 640, 480 ); $this->assertSame( array( 128, 96 ), $out ); @@ -98,7 +98,7 @@ function test_shrink_dimensions_default() { /** * @expectedDeprecated wp_shrink_dimensions */ - function test_shrink_dimensions_smaller() { + public function test_shrink_dimensions_smaller() { // Image size is smaller than the constraint - no effect. $out = wp_shrink_dimensions( 500, 600, 1024, 768 ); $this->assertSame( array( 500, 600 ), $out ); @@ -110,7 +110,7 @@ function test_shrink_dimensions_smaller() { /** * @expectedDeprecated wp_shrink_dimensions */ - function test_shrink_dimensions_equal() { + public function test_shrink_dimensions_equal() { // Image size is equal to the constraint - no effect. $out = wp_shrink_dimensions( 500, 600, 500, 600 ); $this->assertSame( array( 500, 600 ), $out ); @@ -122,7 +122,7 @@ function test_shrink_dimensions_equal() { /** * @expectedDeprecated wp_shrink_dimensions */ - function test_shrink_dimensions_larger() { + public function test_shrink_dimensions_larger() { // Image size is larger than the constraint - result should be constrained. $out = wp_shrink_dimensions( 1024, 768, 500, 600 ); $this->assertSame( array( 500, 375 ), $out ); @@ -134,7 +134,7 @@ function test_shrink_dimensions_larger() { /** * @expectedDeprecated wp_shrink_dimensions */ - function test_shrink_dimensions_boundary() { + public function test_shrink_dimensions_boundary() { // One dimension is larger than the constraint, one smaller - result should be constrained. $out = wp_shrink_dimensions( 1024, 768, 500, 800 ); $this->assertSame( array( 500, 375 ), $out ); @@ -150,7 +150,7 @@ function test_shrink_dimensions_boundary() { $this->assertSame( array( 525, 700 ), $out ); } - function test_constrain_size_for_editor_thumb() { + public function test_constrain_size_for_editor_thumb() { $out = image_constrain_size_for_editor( 600, 400, 'thumb' ); $this->assertSame( array( 150, 100 ), $out ); @@ -158,7 +158,7 @@ function test_constrain_size_for_editor_thumb() { $this->assertSame( array( 64, 64 ), $out ); } - function test_constrain_size_for_editor_medium() { + public function test_constrain_size_for_editor_medium() { // Default max width is 500, no constraint on height. global $content_width; @@ -185,7 +185,7 @@ function test_constrain_size_for_editor_medium() { $content_width = $_content_width; } - function test_constrain_size_for_editor_full() { + public function test_constrain_size_for_editor_full() { global $content_width; $_content_width = $content_width; diff --git a/tests/phpunit/tests/import/base.php b/tests/phpunit/tests/import/base.php index 7d52aee69b9b8..db83296c0afcb 100644 --- a/tests/phpunit/tests/import/base.php +++ b/tests/phpunit/tests/import/base.php @@ -24,7 +24,7 @@ protected function _import_wp( $filename, $users = array(), $fetch_files = true $importer = new WP_Import(); $file = realpath( $filename ); - $this->assertTrue( ! empty( $file ), 'Path to import file is empty.' ); + $this->assertNotEmpty( $file, 'Path to import file is empty.' ); $this->assertTrue( is_file( $file ), 'Import file is not a file.' ); $authors = array(); diff --git a/tests/phpunit/tests/import/import.php b/tests/phpunit/tests/import/import.php index fbf8828e7d679..1053b01dbb1c0 100644 --- a/tests/phpunit/tests/import/import.php +++ b/tests/phpunit/tests/import/import.php @@ -6,8 +6,8 @@ * @group import */ class Tests_Import_Import extends WP_Import_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); if ( ! defined( 'WP_IMPORTING' ) ) { define( 'WP_IMPORTING', true ); @@ -33,13 +33,7 @@ function setUp() { } } - function tearDown() { - remove_filter( 'import_allow_create_users', '__return_true' ); - - parent::tearDown(); - } - - function test_small_import() { + public function test_small_import() { global $wpdb; $authors = array( @@ -51,27 +45,27 @@ function test_small_import() { // Ensure that authors were imported correctly. $user_count = count_users(); - $this->assertEquals( 3, $user_count['total_users'] ); + $this->assertSame( 3, $user_count['total_users'] ); $admin = get_user_by( 'login', 'admin' ); - $this->assertEquals( 'admin', $admin->user_login ); - $this->assertEquals( 'local@host.null', $admin->user_email ); + $this->assertSame( 'admin', $admin->user_login ); + $this->assertSame( 'local@host.null', $admin->user_email ); $editor = get_user_by( 'login', 'editor' ); - $this->assertEquals( 'editor', $editor->user_login ); - $this->assertEquals( 'editor@example.org', $editor->user_email ); - $this->assertEquals( 'FirstName', $editor->user_firstname ); - $this->assertEquals( 'LastName', $editor->user_lastname ); + $this->assertSame( 'editor', $editor->user_login ); + $this->assertSame( 'editor@example.org', $editor->user_email ); + $this->assertSame( 'FirstName', $editor->user_firstname ); + $this->assertSame( 'LastName', $editor->user_lastname ); $author = get_user_by( 'login', 'author' ); - $this->assertEquals( 'author', $author->user_login ); - $this->assertEquals( 'author@example.org', $author->user_email ); + $this->assertSame( 'author', $author->user_login ); + $this->assertSame( 'author@example.org', $author->user_email ); // Check that terms were imported correctly. - $this->assertEquals( 30, wp_count_terms( 'category' ) ); - $this->assertEquals( 3, wp_count_terms( 'post_tag' ) ); + $this->assertEquals( 30, wp_count_terms( array( 'taxonomy' => 'category' ) ) ); + $this->assertEquals( 3, wp_count_terms( array( 'taxonomy' => 'post_tag' ) ) ); $foo = get_term_by( 'slug', 'foo', 'category' ); - $this->assertEquals( 0, $foo->parent ); + $this->assertSame( 0, $foo->parent ); $bar = get_term_by( 'slug', 'bar', 'category' ); $foo_bar = get_term_by( 'slug', 'foo-bar', 'category' ); - $this->assertEquals( $bar->term_id, $foo_bar->parent ); + $this->assertSame( $bar->term_id, $foo_bar->parent ); // Check that posts/pages were imported correctly. $post_count = wp_count_posts( 'post' ); @@ -91,123 +85,123 @@ function test_small_import() { 'orderby' => 'ID', ) ); - $this->assertEquals( 11, count( $posts ) ); + $this->assertCount( 11, $posts ); $post = $posts[0]; - $this->assertEquals( 'Many Categories', $post->post_title ); - $this->assertEquals( 'many-categories', $post->post_name ); + $this->assertSame( 'Many Categories', $post->post_title ); + $this->assertSame( 'many-categories', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID ); - $this->assertEquals( 27, count( $cats ) ); + $this->assertCount( 27, $cats ); $post = $posts[1]; - $this->assertEquals( 'Non-standard post format', $post->post_title ); - $this->assertEquals( 'non-standard-post-format', $post->post_name ); + $this->assertSame( 'Non-standard post format', $post->post_title ); + $this->assertSame( 'non-standard-post-format', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID ); - $this->assertEquals( 1, count( $cats ) ); + $this->assertCount( 1, $cats ); $this->assertTrue( has_post_format( 'aside', $post->ID ) ); $post = $posts[2]; - $this->assertEquals( 'Top-level Foo', $post->post_title ); - $this->assertEquals( 'top-level-foo', $post->post_name ); + $this->assertSame( 'Top-level Foo', $post->post_title ); + $this->assertSame( 'top-level-foo', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) ); - $this->assertEquals( 1, count( $cats ) ); - $this->assertEquals( 'foo', $cats[0]->slug ); + $this->assertCount( 1, $cats ); + $this->assertSame( 'foo', $cats[0]->slug ); $post = $posts[3]; - $this->assertEquals( 'Foo-child', $post->post_title ); - $this->assertEquals( 'foo-child', $post->post_name ); + $this->assertSame( 'Foo-child', $post->post_title ); + $this->assertSame( 'foo-child', $post->post_name ); $this->assertEquals( $editor->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) ); - $this->assertEquals( 1, count( $cats ) ); - $this->assertEquals( 'foo-bar', $cats[0]->slug ); + $this->assertCount( 1, $cats ); + $this->assertSame( 'foo-bar', $cats[0]->slug ); $post = $posts[4]; - $this->assertEquals( 'Private Post', $post->post_title ); - $this->assertEquals( 'private-post', $post->post_name ); + $this->assertSame( 'Private Post', $post->post_title ); + $this->assertSame( 'private-post', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'private', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'private', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID ); - $this->assertEquals( 1, count( $cats ) ); + $this->assertCount( 1, $cats ); $tags = wp_get_post_tags( $post->ID ); - $this->assertEquals( 3, count( $tags ) ); - $this->assertEquals( 'tag1', $tags[0]->slug ); - $this->assertEquals( 'tag2', $tags[1]->slug ); - $this->assertEquals( 'tag3', $tags[2]->slug ); + $this->assertCount( 3, $tags ); + $this->assertSame( 'tag1', $tags[0]->slug ); + $this->assertSame( 'tag2', $tags[1]->slug ); + $this->assertSame( 'tag3', $tags[2]->slug ); $post = $posts[5]; - $this->assertEquals( '1-col page', $post->post_title ); - $this->assertEquals( '1-col-page', $post->post_name ); + $this->assertSame( '1-col page', $post->post_title ); + $this->assertSame( '1-col-page', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'page', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); - $this->assertEquals( 'onecolumn-page.php', get_post_meta( $post->ID, '_wp_page_template', true ) ); + $this->assertSame( 'page', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); + $this->assertSame( 'onecolumn-page.php', get_post_meta( $post->ID, '_wp_page_template', true ) ); $post = $posts[6]; - $this->assertEquals( 'Draft Page', $post->post_title ); - $this->assertEquals( '', $post->post_name ); + $this->assertSame( 'Draft Page', $post->post_title ); + $this->assertSame( '', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'page', $post->post_type ); - $this->assertEquals( 'draft', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); - $this->assertEquals( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); + $this->assertSame( 'page', $post->post_type ); + $this->assertSame( 'draft', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); + $this->assertSame( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); $post = $posts[7]; - $this->assertEquals( 'Parent Page', $post->post_title ); - $this->assertEquals( 'parent-page', $post->post_name ); + $this->assertSame( 'Parent Page', $post->post_title ); + $this->assertSame( 'parent-page', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'page', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); - $this->assertEquals( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); + $this->assertSame( 'page', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); + $this->assertSame( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); $post = $posts[8]; - $this->assertEquals( 'Child Page', $post->post_title ); - $this->assertEquals( 'child-page', $post->post_name ); + $this->assertSame( 'Child Page', $post->post_title ); + $this->assertSame( 'child-page', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'page', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( $posts[7]->ID, $post->post_parent ); - $this->assertEquals( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); + $this->assertSame( 'page', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( $posts[7]->ID, $post->post_parent ); + $this->assertSame( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); $post = $posts[9]; - $this->assertEquals( 'Sample Page', $post->post_title ); - $this->assertEquals( 'sample-page', $post->post_name ); + $this->assertSame( 'Sample Page', $post->post_title ); + $this->assertSame( 'sample-page', $post->post_name ); $this->assertEquals( $admin->ID, $post->post_author ); - $this->assertEquals( 'page', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); - $this->assertEquals( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); + $this->assertSame( 'page', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); + $this->assertSame( 'default', get_post_meta( $post->ID, '_wp_page_template', true ) ); $post = $posts[10]; - $this->assertEquals( 'Hello world!', $post->post_title ); - $this->assertEquals( 'hello-world', $post->post_name ); + $this->assertSame( 'Hello world!', $post->post_title ); + $this->assertSame( 'hello-world', $post->post_name ); $this->assertEquals( $author->ID, $post->post_author ); - $this->assertEquals( 'post', $post->post_type ); - $this->assertEquals( 'publish', $post->post_status ); - $this->assertEquals( 0, $post->post_parent ); + $this->assertSame( 'post', $post->post_type ); + $this->assertSame( 'publish', $post->post_status ); + $this->assertSame( 0, $post->post_parent ); $cats = wp_get_post_categories( $post->ID ); - $this->assertEquals( 1, count( $cats ) ); + $this->assertCount( 1, $cats ); } - function test_double_import() { + public function test_double_import() { $authors = array( 'admin' => false, 'editor' => false, @@ -217,26 +211,26 @@ function test_double_import() { $this->_import_wp( DIR_TESTDATA . '/export/small-export.xml', $authors ); $user_count = count_users(); - $this->assertEquals( 3, $user_count['total_users'] ); + $this->assertSame( 3, $user_count['total_users'] ); $admin = get_user_by( 'login', 'admin' ); - $this->assertEquals( 'admin', $admin->user_login ); - $this->assertEquals( 'local@host.null', $admin->user_email ); + $this->assertSame( 'admin', $admin->user_login ); + $this->assertSame( 'local@host.null', $admin->user_email ); $editor = get_user_by( 'login', 'editor' ); - $this->assertEquals( 'editor', $editor->user_login ); - $this->assertEquals( 'editor@example.org', $editor->user_email ); - $this->assertEquals( 'FirstName', $editor->user_firstname ); - $this->assertEquals( 'LastName', $editor->user_lastname ); + $this->assertSame( 'editor', $editor->user_login ); + $this->assertSame( 'editor@example.org', $editor->user_email ); + $this->assertSame( 'FirstName', $editor->user_firstname ); + $this->assertSame( 'LastName', $editor->user_lastname ); $author = get_user_by( 'login', 'author' ); - $this->assertEquals( 'author', $author->user_login ); - $this->assertEquals( 'author@example.org', $author->user_email ); + $this->assertSame( 'author', $author->user_login ); + $this->assertSame( 'author@example.org', $author->user_email ); - $this->assertEquals( 30, wp_count_terms( 'category' ) ); - $this->assertEquals( 3, wp_count_terms( 'post_tag' ) ); + $this->assertEquals( 30, wp_count_terms( array( 'taxonomy' => 'category' ) ) ); + $this->assertEquals( 3, wp_count_terms( array( 'taxonomy' => 'post_tag' ) ) ); $foo = get_term_by( 'slug', 'foo', 'category' ); - $this->assertEquals( 0, $foo->parent ); + $this->assertSame( 0, $foo->parent ); $bar = get_term_by( 'slug', 'bar', 'category' ); $foo_bar = get_term_by( 'slug', 'foo-bar', 'category' ); - $this->assertEquals( $bar->term_id, $foo_bar->parent ); + $this->assertSame( $bar->term_id, $foo_bar->parent ); $post_count = wp_count_posts( 'post' ); $this->assertEquals( 5, $post_count->publish ); @@ -248,7 +242,7 @@ function test_double_import() { $this->assertSame( 1, $comment_count->total_comments ); } - function test_ordering_of_importers() { + public function test_ordering_of_importers() { global $wp_importers; $_wp_importers = $wp_importers; // Preserve global state. $wp_importers = array( @@ -258,7 +252,7 @@ function test_ordering_of_importers() { 'ABC1' => array( 'ABC1' ), 'def1' => array( 'def1' ), ); - $this->assertEquals( + $this->assertSame( array( 'ABC1' => array( 'ABC1' ), 'abc2' => array( 'abc2' ), diff --git a/tests/phpunit/tests/import/parser.php b/tests/phpunit/tests/import/parser.php index af27b0b29e215..40ed789ac68f1 100644 --- a/tests/phpunit/tests/import/parser.php +++ b/tests/phpunit/tests/import/parser.php @@ -6,8 +6,8 @@ * @group import */ class Tests_Import_Parser extends WP_Import_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); if ( ! defined( 'WP_IMPORTING' ) ) { define( 'WP_IMPORTING', true ); @@ -24,7 +24,7 @@ function setUp() { require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php'; } - function test_malformed_wxr() { + public function test_malformed_wxr() { $file = DIR_TESTDATA . '/export/malformed.xml'; // Regex based parser cannot detect malformed XML. @@ -32,11 +32,11 @@ function test_malformed_wxr() { $parser = new $p; $result = $parser->parse( $file ); $this->assertWPError( $result ); - $this->assertEquals( 'There was an error when reading this WXR file', $result->get_error_message() ); + $this->assertSame( 'There was an error when reading this WXR file', $result->get_error_message() ); } } - function test_invalid_wxr() { + public function test_invalid_wxr() { $f1 = DIR_TESTDATA . '/export/missing-version-tag.xml'; $f2 = DIR_TESTDATA . '/export/invalid-version-tag.xml'; @@ -45,12 +45,12 @@ function test_invalid_wxr() { $parser = new $p; $result = $parser->parse( $file ); $this->assertWPError( $result ); - $this->assertEquals( 'This does not appear to be a WXR file, missing/invalid WXR version number', $result->get_error_message() ); + $this->assertSame( 'This does not appear to be a WXR file, missing/invalid WXR version number', $result->get_error_message() ); } } } - function test_wxr_version_1_1() { + public function test_wxr_version_1_1() { $file = DIR_TESTDATA . '/export/valid-wxr-1.1.xml'; foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { @@ -58,8 +58,8 @@ function test_wxr_version_1_1() { $parser = new $p; $result = $parser->parse( $file ); - $this->assertTrue( is_array( $result ), $message ); - $this->assertEquals( 'http://localhost/', $result['base_url'], $message ); + $this->assertIsArray( $result, $message ); + $this->assertSame( 'http://localhost/', $result['base_url'], $message ); $this->assertEquals( array( 'author_id' => 2, @@ -106,9 +106,9 @@ function test_wxr_version_1_1() { $message ); - $this->assertEquals( 2, count( $result['posts'] ), $message ); - $this->assertEquals( 19, count( $result['posts'][0] ), $message ); - $this->assertEquals( 18, count( $result['posts'][1] ), $message ); + $this->assertCount( 2, $result['posts'], $message ); + $this->assertCount( 19, $result['posts'][0], $message ); + $this->assertCount( 18, $result['posts'][1], $message ); $this->assertEquals( array( array( @@ -130,7 +130,7 @@ function test_wxr_version_1_1() { $result['posts'][0]['terms'], $message ); - $this->assertEquals( + $this->assertSame( array( array( 'key' => '_wp_page_template', @@ -143,7 +143,7 @@ function test_wxr_version_1_1() { } } - function test_wxr_version_1_0() { + public function test_wxr_version_1_0() { $file = DIR_TESTDATA . '/export/valid-wxr-1.0.xml'; foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { @@ -151,18 +151,18 @@ function test_wxr_version_1_0() { $parser = new $p; $result = $parser->parse( $file ); - $this->assertTrue( is_array( $result ), $message ); - $this->assertEquals( 'http://localhost/', $result['base_url'], $message ); - $this->assertEquals( $result['categories'][0]['category_nicename'], 'alpha', $message ); - $this->assertEquals( $result['categories'][0]['cat_name'], 'alpha', $message ); - $this->assertEquals( $result['categories'][0]['category_parent'], '', $message ); - $this->assertEquals( $result['categories'][0]['category_description'], 'The alpha category', $message ); - $this->assertEquals( $result['tags'][0]['tag_slug'], 'chicken', $message ); - $this->assertEquals( $result['tags'][0]['tag_name'], 'chicken', $message ); + $this->assertIsArray( $result, $message ); + $this->assertSame( 'http://localhost/', $result['base_url'], $message ); + $this->assertSame( $result['categories'][0]['category_nicename'], 'alpha', $message ); + $this->assertSame( $result['categories'][0]['cat_name'], 'alpha', $message ); + $this->assertSame( $result['categories'][0]['category_parent'], '', $message ); + $this->assertSame( $result['categories'][0]['category_description'], 'The alpha category', $message ); + $this->assertSame( $result['tags'][0]['tag_slug'], 'chicken', $message ); + $this->assertSame( $result['tags'][0]['tag_name'], 'chicken', $message ); - $this->assertEquals( 6, count( $result['posts'] ), $message ); - $this->assertEquals( 19, count( $result['posts'][0] ), $message ); - $this->assertEquals( 18, count( $result['posts'][1] ), $message ); + $this->assertCount( 6, $result['posts'], $message ); + $this->assertCount( 19, $result['posts'][0], $message ); + $this->assertCount( 18, $result['posts'][1], $message ); $this->assertEquals( array( @@ -218,7 +218,7 @@ function test_wxr_version_1_0() { $message ); - $this->assertEquals( + $this->assertSame( array( array( 'key' => '_wp_page_template', @@ -237,7 +237,7 @@ function test_wxr_version_1_0() { * * @link https://core.trac.wordpress.org/ticket/15203 */ - function test_escaped_cdata_closing_sequence() { + public function test_escaped_cdata_closing_sequence() { $file = DIR_TESTDATA . '/export/crazy-cdata-escaped.xml'; foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { @@ -246,7 +246,7 @@ function test_escaped_cdata_closing_sequence() { $result = $parser->parse( $file ); $post = $result['posts'][0]; - $this->assertEquals( 'Content with nested :)', $post['post_content'], $message ); + $this->assertSame( 'Content with nested :)', $post['post_content'], $message ); foreach ( $post['postmeta'] as $meta ) { switch ( $meta['key'] ) { case 'Plain string': @@ -259,9 +259,9 @@ function test_escaped_cdata_closing_sequence() { $value = 'This has closing '; break; default: - $this->fail( 'Unknown postmeta (' . $meta['key'] . ') was parsed out by' . $p ); + $this->fail( sprintf( 'Unknown postmeta (%1$s) was parsed out by %2$s.', $meta['key'], $p ) ); } - $this->assertEquals( $value, $meta['value'], $message ); + $this->assertSame( $value, $meta['value'], $message ); } } } @@ -270,14 +270,14 @@ function test_escaped_cdata_closing_sequence() { * Ensure that the regex parser can still parse invalid CDATA blocks (i.e. those * with "]]>" unescaped within a CDATA section). */ - function test_unescaped_cdata_closing_sequence() { + public function test_unescaped_cdata_closing_sequence() { $file = DIR_TESTDATA . '/export/crazy-cdata.xml'; $parser = new WXR_Parser_Regex; $result = $parser->parse( $file ); $post = $result['posts'][0]; - $this->assertEquals( 'Content with nested :)', $post['post_content'] ); + $this->assertSame( 'Content with nested :)', $post['post_content'] ); foreach ( $post['postmeta'] as $meta ) { switch ( $meta['key'] ) { case 'Plain string': @@ -290,9 +290,9 @@ function test_unescaped_cdata_closing_sequence() { $value = 'This has closing '; break; default: - $this->fail( 'Unknown postmeta (' . $meta['key'] . ') was parsed out by' . $p ); + $this->fail( sprintf( 'Unknown postmeta (%1$s) was parsed out by %2$s.', $meta['key'], $p ) ); } - $this->assertEquals( $value, $meta['value'] ); + $this->assertSame( $value, $meta['value'] ); } } diff --git a/tests/phpunit/tests/import/postmeta.php b/tests/phpunit/tests/import/postmeta.php index d4d9c5c3a0cf4..0abd7f0a9d54e 100644 --- a/tests/phpunit/tests/import/postmeta.php +++ b/tests/phpunit/tests/import/postmeta.php @@ -6,8 +6,8 @@ * @group import */ class Tests_Import_Postmeta extends WP_Import_UnitTestCase { - function setUp() { - parent::setUp(); + public function set_up() { + parent::set_up(); if ( ! defined( 'WP_IMPORTING' ) ) { define( 'WP_IMPORTING', true ); @@ -24,14 +24,14 @@ function setUp() { require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php'; } - function test_serialized_postmeta_no_cdata() { + public function test_serialized_postmeta_no_cdata() { $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-no-cdata.xml', array( 'johncoswell' => 'john' ) ); $expected['special_post_title'] = 'A special title'; $expected['is_calendar'] = ''; - $this->assertEquals( $expected, get_post_meta( 122, 'post-options', true ) ); + $this->assertSame( $expected, get_post_meta( 122, 'post-options', true ) ); } - function test_utw_postmeta() { + public function test_utw_postmeta() { $this->_import_wp( DIR_TESTDATA . '/export/test-utw-post-meta-import.xml', array( 'johncoswell' => 'john' ) ); $classy = new StdClass(); @@ -80,23 +80,23 @@ function test_utw_postmeta() { /** * @ticket 9633 */ - function test_serialized_postmeta_with_cdata() { + public function test_serialized_postmeta_with_cdata() { $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) ); // HTML in the CDATA should work with old WordPress version. - $this->assertEquals( '
          some html
          ', get_post_meta( 10, 'contains-html', true ) ); + $this->assertSame( '
          some html
          ', get_post_meta( 10, 'contains-html', true ) ); // Serialised will only work with 3.0 onwards. $expected['special_post_title'] = 'A special title'; $expected['is_calendar'] = ''; - $this->assertEquals( $expected, get_post_meta( 10, 'post-options', true ) ); + $this->assertSame( $expected, get_post_meta( 10, 'post-options', true ) ); } /** * @ticket 11574 */ - function test_serialized_postmeta_with_evil_stuff_in_cdata() { + public function test_serialized_postmeta_with_evil_stuff_in_cdata() { $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) ); // Evil content in the CDATA. - $this->assertEquals( 'evil', get_post_meta( 10, 'evil', true ) ); + $this->assertSame( 'evil', get_post_meta( 10, 'evil', true ) ); } } diff --git a/tests/phpunit/tests/includes/factory.php b/tests/phpunit/tests/includes/factory.php index 63f87ce619f3d..c1ab1c2a0d278 100644 --- a/tests/phpunit/tests/includes/factory.php +++ b/tests/phpunit/tests/includes/factory.php @@ -1,32 +1,32 @@ category_factory = new WP_UnitTest_Factory_For_Term( null, 'category' ); } - function test_create_creates_a_category() { + public function test_create_creates_a_category() { $id = $this->category_factory->create(); $this->assertTrue( (bool) get_term_by( 'id', $id, 'category' ) ); } - function test_get_object_by_id_gets_an_object() { + public function test_get_object_by_id_gets_an_object() { $id = $this->category_factory->create(); $this->assertTrue( (bool) $this->category_factory->get_object_by_id( $id ) ); } - function test_get_object_by_id_gets_an_object_with_the_same_name() { + public function test_get_object_by_id_gets_an_object_with_the_same_name() { $id = $this->category_factory->create( array( 'name' => 'Boo' ) ); $object = $this->category_factory->get_object_by_id( $id ); - $this->assertEquals( 'Boo', $object->name ); + $this->assertSame( 'Boo', $object->name ); } - function test_the_taxonomy_argument_overrules_the_factory_taxonomy() { + public function test_the_taxonomy_argument_overrules_the_factory_taxonomy() { $term_factory = new WP_UnitTest_Factory_For_term( null, 'category' ); $id = $term_factory->create( array( 'taxonomy' => 'post_tag' ) ); $term = get_term( $id, 'post_tag' ); - $this->assertEquals( $id, $term->term_id ); + $this->assertSame( $id, $term->term_id ); } /** @@ -35,7 +35,7 @@ function test_the_taxonomy_argument_overrules_the_factory_taxonomy() { public function test_term_factory_create_and_get_should_return_term_object() { register_taxonomy( 'wptests_tax', 'post' ); $term = self::factory()->term->create_and_get( array( 'taxonomy' => 'wptests_tax' ) ); - $this->assertInternalType( 'object', $term ); + $this->assertIsObject( $term ); $this->assertNotEmpty( $term->term_id ); } } diff --git a/tests/phpunit/tests/includes/helpers.php b/tests/phpunit/tests/includes/helpers.php index c17a7006ae4a8..74bd8e4afafde 100644 --- a/tests/phpunit/tests/includes/helpers.php +++ b/tests/phpunit/tests/includes/helpers.php @@ -7,7 +7,7 @@ class Tests_TestHelpers extends WP_UnitTestCase { /** * @ticket 30522 */ - function data_assertEqualSets() { + public function data_assertSameSets() { return array( array( array( 1, 2, 3 ), // Test expected. @@ -48,27 +48,27 @@ function data_assertEqualSets() { } /** - * @dataProvider data_assertEqualSets + * @dataProvider data_assertSameSets * @ticket 30522 */ - function test_assertEqualSets( $expected, $actual, $exception ) { + public function test_assertSameSets( $expected, $actual, $exception ) { if ( $exception ) { try { - $this->assertEqualSets( $expected, $actual ); + $this->assertSameSets( $expected, $actual ); } catch ( PHPUnit_Framework_ExpectationFailedException $ex ) { return; } $this->fail(); } else { - $this->assertEqualSets( $expected, $actual ); + $this->assertSameSets( $expected, $actual ); } } /** * @ticket 30522 */ - function data_assertEqualSetsWithIndex() { + public function data_assertSameSetsWithIndex() { return array( array( array( 1, 2, 3 ), // Test expected. @@ -204,20 +204,20 @@ function data_assertEqualSetsWithIndex() { ); } /** - * @dataProvider data_assertEqualSetsWithIndex + * @dataProvider data_assertSameSetsWithIndex * @ticket 30522 */ - function test_assertEqualSetsWithIndex( $expected, $actual, $exception ) { + public function test_assertSameSetsWithIndex( $expected, $actual, $exception ) { if ( $exception ) { try { - $this->assertEqualSetsWithIndex( $expected, $actual ); + $this->assertSameSetsWithIndex( $expected, $actual ); } catch ( PHPUnit_Framework_ExpectationFailedException $ex ) { return; } $this->fail(); } else { - $this->assertEqualSetsWithIndex( $expected, $actual ); + $this->assertSameSetsWithIndex( $expected, $actual ); } } @@ -227,7 +227,7 @@ public function test__unregister_post_status() { $stati = get_post_stati(); - $this->assertFalse( isset( $stati['foo'] ) ); + $this->assertArrayNotHasKey( 'foo', $stati ); } /** @@ -268,17 +268,18 @@ protected function mock_incorrect_usage() { /** * @ticket 36166 - * @expectedException WPDieException */ public function test_die_handler_should_handle_wp_error() { + $this->expectException( 'WPDieException' ); + wp_die( new WP_Error( 'test', 'test' ) ); } /** * @ticket 46813 - * @expectedException WPDieException */ public function test_die_handler_should_not_cause_doing_it_wrong_notice_without_wp_query_set() { + $this->expectException( 'WPDieException' ); unset( $GLOBALS['wp_query'] ); wp_die(); @@ -312,7 +313,7 @@ public function test_die_process_input( $input, $expected ) { $this->assertSame( $expected['title'], $title ); // Only check arguments that are explicitly asked for. - $this->assertEqualSets( $expected['args'], array_intersect_key( $args, $expected['args'] ) ); + $this->assertSameSets( $expected['args'], array_intersect_key( $args, $expected['args'] ) ); } public function data_die_process_input() { diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index a74903bd80d6a..7f5bb646d1069 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -8,34 +8,76 @@ class Tests_Kses extends WP_UnitTestCase { /** + * @dataProvider data_wp_filter_post_kses_address * @ticket 20210 + * + * @param string $string Test string for kses. + * @param string $expect_string Expected result after passing through kses. */ - function test_wp_filter_post_kses_address() { + public function test_wp_filter_post_kses_address( $string, $expect_string ) { global $allowedposttags; + $this->assertSame( $expect_string, wp_kses( $string, $allowedposttags ) ); + } + + /** + * Data provider for test_wp_filter_post_kses_address. + * + * @return array[] Arguments { + * @type string $string Test string for kses. + * @type string $expect_string Expected result after passing through kses. + * } + */ + public function data_wp_filter_post_kses_address() { $attributes = array( 'class' => 'classname', 'id' => 'id', - 'style' => 'color: red;', - 'style' => 'color: red', - 'style' => 'color: red; text-align:center', - 'style' => 'color: red; text-align:center;', + 'style' => array( + 'color: red;', + 'color: red', + 'color: red; text-align:center', + 'color: red; text-align:center;', + ), 'title' => 'title', ); - foreach ( $attributes as $name => $value ) { - $string = "
          1 WordPress Avenue, The Internet.
          "; - $expect_string = "
          1 WordPress Avenue, The Internet.
          "; - $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); + $data = array(); + + foreach ( $attributes as $name => $values ) { + foreach ( (array) $values as $value ) { + $string = "
          1 WordPress Avenue, The Internet.
          "; + $expect_string = "
          1 WordPress Avenue, The Internet.
          "; + + $data[] = array( $string, $expect_string ); + } } + + return $data; } /** + * @dataProvider data_wp_filter_post_kses_a * @ticket 20210 + * + * @param string $string Test string for kses. + * @param string $expect_string Expected result after passing through kses. + * @return void */ - function test_wp_filter_post_kses_a() { + public function test_wp_filter_post_kses_a( $string, $expect_string ) { global $allowedposttags; + $this->assertSame( $expect_string, wp_kses( $string, $allowedposttags ) ); + } + + /** + * Data provider for test_wp_filter_post_kses_a. + * + * @return array[] Arguments { + * @type string $string Test string for kses. + * @type string $expect_string Expected result after passing through kses. + * } + */ + public function data_wp_filter_post_kses_a() { $attributes = array( 'class' => 'classname', 'id' => 'id', @@ -49,6 +91,8 @@ function test_wp_filter_post_kses_a() { 'download' => '', ); + $data = array(); + foreach ( $attributes as $name => $value ) { if ( $value ) { $attr = "$name='$value'"; @@ -59,16 +103,89 @@ function test_wp_filter_post_kses_a() { } $string = "I link this"; $expect_string = "I link this"; - $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); + $data[] = array( $string, $expect_string ); } + + return $data; + } + + /** + * Test video tag. + * + * @ticket 50167 + * @ticket 29826 + * @dataProvider data_wp_kses_video + * + * @param string $source Source HTML. + * @param string $context Context to use for parsing source. + * @param string $expected Expected output following KSES parsing. + */ + public function test_wp_kses_video( $source, $context, $expected ) { + $actual = wp_kses( $source, $context ); + $this->assertSame( $expected, $actual ); } /** + * Data provider for test_wp_kses_video + * + * @return array[] Array containing test data { + * @type string $source Source HTML. + * @type string $context Context to use for parsing source. + * @type string $expected Expected output following KSES parsing. + * } + */ + public function data_wp_kses_video() { + return array( + // Set 0: Valid post object params in post context. + array( + '