From 94a4691daad5870b0d200e569327bef8f37bff13 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 7 May 2020 19:13:24 +0000 Subject: [PATCH 01/19] Update dependency terser-webpack-plugin to v2.3.6 --- package-lock.json | 36 +++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 921279940b1..abc9fd00f42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,12 +4113,6 @@ "requires": { "type-fest": "^0.8.1" } - }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true } } }, @@ -17513,6 +17507,12 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -20487,19 +20487,19 @@ } }, "terser-webpack-plugin": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz", - "integrity": "sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz", + "integrity": "sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg==", "dev": true, "requires": { "cacache": "^13.0.1", - "find-cache-dir": "^3.2.0", - "jest-worker": "^25.1.0", - "p-limit": "^2.2.2", - "schema-utils": "^2.6.4", - "serialize-javascript": "^2.1.2", + "find-cache-dir": "^3.3.1", + "jest-worker": "^25.4.0", + "p-limit": "^2.3.0", + "schema-utils": "^2.6.6", + "serialize-javascript": "^3.0.0", "source-map": "^0.6.1", - "terser": "^4.4.3", + "terser": "^4.6.12", "webpack-sources": "^1.4.3" }, "dependencies": { @@ -20623,6 +20623,12 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", diff --git a/package.json b/package.json index 8762aa75a1e..454a8780134 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "rtlcss-webpack-plugin": "4.0.3", "source-map-loader": "0.2.4", "svg-inline-loader": "0.8.2", - "terser-webpack-plugin": "2.3.5", + "terser-webpack-plugin": "2.3.6", "travis-size-report": "1.1.0", "uuid": "7.0.2", "webpack": "4.42.1", From 87d7b82b4b4db157d973e02b0ae66d9261b49445 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 8 May 2020 20:14:44 +0000 Subject: [PATCH 02/19] Update dependency eslint to v7 --- package-lock.json | 401 ++++++++++++++++++++++++++++++++++++++++------ package.json | 2 +- 2 files changed, 353 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 921279940b1..313611f8787 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,12 +4113,6 @@ "requires": { "type-fest": "^0.8.1" } - }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true } } }, @@ -4681,18 +4675,193 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "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" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "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", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.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", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "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", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "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" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "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 + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "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" + } + } + } + }, + "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==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "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" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, "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 }, + "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 + }, "prettier": { "version": "npm:wp-prettier@1.19.1", "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", "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": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -4701,6 +4870,15 @@ "requires": { "has-flag": "^4.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" + } } } }, @@ -8620,22 +8798,22 @@ } }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz", + "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.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-utils": "^2.0.0", "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "espree": "^7.0.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", @@ -8648,41 +8826,77 @@ "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", + "levn": "^0.4.1", "lodash": "^4.17.14", "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", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "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==", + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "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" + } + }, + "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 + }, "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.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", "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 - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { @@ -8703,12 +8917,14 @@ "esutils": "^2.0.2" } }, - "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==", + "espree": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", + "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", "dev": true, "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -8730,25 +8946,106 @@ "type-fest": "^0.8.1" } }, + "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 + }, + "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": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.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 }, + "optionator": { + "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.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "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 + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "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": { - "isexe": "^2.0.0" + "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 + }, + "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==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "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.2.1" } } } @@ -17513,6 +17810,12 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/package.json b/package.json index 8762aa75a1e..a8876073b9a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "css-loader": "3.5.3", "cssnano": "4.1.10", "enzyme": "3.11.0", - "eslint": "6.8.0", + "eslint": "7.0.0", "eslint-plugin-eslint-comments": "3.1.2", "eslint-plugin-import": "2.20.2", "eslint-plugin-jest": "23.8.2", From 68e156fb9e158882e82815be5b69fb4de7b0d3fc Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 May 2020 03:13:34 +0000 Subject: [PATCH 03/19] Update dependency xwp/wp-dev-lib to v1.6.4 --- composer.json | 2 +- composer.lock | 90 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 73 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 10625a185da..2cba366b397 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "roave/security-advisories": "dev-master", "sirbrillig/phpcs-variable-analysis": "2.8.1", "wp-coding-standards/wpcs": "2.2.1", - "xwp/wp-dev-lib": "1.6.3" + "xwp/wp-dev-lib": "1.6.4" }, "suggest": { "ext-intl": "Enables use of idn_to_utf8() to convert punycode domains to UTF-8 for use with an AMP Cache.", diff --git a/composer.lock b/composer.lock index 805bf8b60bf..2137661b4a0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dc4adfe75b6861336edb1aafb2e56c97", + "content-hash": "25c250a03f59fcb0b64aac20e60ae572", "packages": [ { "name": "ampproject/common", @@ -12,18 +12,18 @@ "dist": { "type": "path", "url": "lib/common", - "reference": "f85534d4a8d47ed69162f34c1292a0ef1e4698a8" + "reference": "a118586dd2348c3222fb152b68f6fb4d96293baa" }, "require": { "ext-dom": "*", "ext-iconv": "*", "ext-json": "*", "ext-libxml": "*", - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0", + "php-parallel-lint/php-parallel-lint": "^1.2" }, "require-dev": { "civicrm/composer-downloads-plugin": "^2.1", - "jakub-onderka/php-parallel-lint": "^1.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3" }, @@ -92,19 +92,19 @@ "dist": { "type": "path", "url": "lib/optimizer", - "reference": "35613106e504f0ad21dd2ae72cc217b67affda25" + "reference": "655b471c5862e5c7004008bbecbbde1aba5a7e71" }, "require": { "ampproject/common": "^1", "ext-dom": "*", "ext-iconv": "*", "ext-libxml": "*", - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0", + "php-parallel-lint/php-parallel-lint": "^1.2" }, "require-dev": { "civicrm/composer-downloads-plugin": "^2.1", "ext-zip": "*", - "jakub-onderka/php-parallel-lint": "^1.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3" }, @@ -273,6 +273,59 @@ ], "time": "2019-05-25T14:33:33+00:00" }, + { + "name": "php-parallel-lint/php-parallel-lint", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", + "reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/474f18bc6cc6aca61ca40bfab55139de614e51ca", + "reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.4.0" + }, + "replace": { + "grogy/php-parallel-lint": "*", + "jakub-onderka/php-parallel-lint": "*" + }, + "require-dev": { + "nette/tester": "^1.3 || ^2.0", + "php-parallel-lint/php-console-highlighter": "~0.3", + "squizlabs/php_codesniffer": "~3.0" + }, + "suggest": { + "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" + }, + "bin": [ + "parallel-lint" + ], + "type": "library", + "autoload": { + "classmap": [ + "./" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "ahoj@jakubonderka.cz" + } + ], + "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "time": "2020-04-04T12:18:32+00:00" + }, { "name": "sabberworm/php-css-parser", "version": "dev-master", @@ -735,12 +788,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "478dd17a48d0eb007ff854f4b885034df5db7c29" + "reference": "ec1a75b10126327b351fdea7c2b9bfb94e2f6f35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/478dd17a48d0eb007ff854f4b885034df5db7c29", - "reference": "478dd17a48d0eb007ff854f4b885034df5db7c29", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ec1a75b10126327b351fdea7c2b9bfb94e2f6f35", + "reference": "ec1a75b10126327b351fdea7c2b9bfb94e2f6f35", "shasum": "" }, "conflict": { @@ -753,6 +806,7 @@ "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", "bagisto/bagisto": "<0.1.5", + "barrelstrength/sprout-base-email": "<3.9", "bolt/bolt": "<3.6.10", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<5.1.2", @@ -830,7 +884,7 @@ "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", "monolog/monolog": ">=1.8,<1.12", "namshi/jose": "<2.2", - "nzo/url-encryptor-bundle": "<5.0.1", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "openid/php-openid": "<2.3", @@ -885,7 +939,7 @@ "socalnick/scn-social-auth": "<1.15.2", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<0.25.3", + "ssddanbrown/bookstack": "<0.29.2", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.49", "swiftmailer/swiftmailer": ">=4,<5.4.5", @@ -1004,7 +1058,7 @@ "type": "tidelift" } ], - "time": "2020-05-03T18:57:18+00:00" + "time": "2020-05-09T00:00:21+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", @@ -1185,16 +1239,16 @@ }, { "name": "xwp/wp-dev-lib", - "version": "1.6.3", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/xwp/wp-dev-lib.git", - "reference": "a0e93ff45b3ff1a5488195d935edaf31af49eaf5" + "reference": "38bef6879b1c71f8dec75beee77a13a89d2b1f79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xwp/wp-dev-lib/zipball/a0e93ff45b3ff1a5488195d935edaf31af49eaf5", - "reference": "a0e93ff45b3ff1a5488195d935edaf31af49eaf5", + "url": "https://api.github.com/repos/xwp/wp-dev-lib/zipball/38bef6879b1c71f8dec75beee77a13a89d2b1f79", + "reference": "38bef6879b1c71f8dec75beee77a13a89d2b1f79", "shasum": "" }, "type": "library", @@ -1218,7 +1272,7 @@ "tools", "wordpress" ], - "time": "2020-04-28T02:24:13+00:00" + "time": "2020-05-12T02:27:04+00:00" } ], "aliases": [], From e1994de4d30dd0d87b74349bf302ed480afa36da Mon Sep 17 00:00:00 2001 From: Pierre Gordon Date: Tue, 12 May 2020 01:02:52 -0400 Subject: [PATCH 04/19] Use amp-embedly-card for Tiktok embeds --- .../embeds/class-amp-tiktok-embed-handler.php | 41 +++++++------------ .../test-class-amp-tiktok-embed-handler.php | 5 +-- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/includes/embeds/class-amp-tiktok-embed-handler.php b/includes/embeds/class-amp-tiktok-embed-handler.php index b2a62c7129e..ff8be9d52c7 100644 --- a/includes/embeds/class-amp-tiktok-embed-handler.php +++ b/includes/embeds/class-amp-tiktok-embed-handler.php @@ -50,7 +50,7 @@ public function sanitize_raw_embeds( Document $dom ) { * @return bool Whether the node is a raw embed. */ protected function is_raw_embed( DOMElement $node ) { - return ! $node->firstChild || ( $node->firstChild && 'amp-iframe' !== $node->firstChild->nodeName ); + return ! $node->firstChild || ( $node->firstChild && 'amp-embedly-card' !== $node->firstChild->nodeName ); } /** @@ -59,34 +59,24 @@ protected function is_raw_embed( DOMElement $node ) { * @param DOMElement $blockquote_node The
node to make AMP compatible. */ protected function make_embed_amp_compatible( DOMElement $blockquote_node ) { - $dom = $blockquote_node->ownerDocument; - $video_id = $blockquote_node->getAttribute( 'data-video-id' ); + $dom = $blockquote_node->ownerDocument; + $video_url = $blockquote_node->getAttribute( 'cite' ); - // If there is no video ID, stop here as its needed for the iframe `src` attribute. - if ( empty( $video_id ) ) { + // If there is no video ID, stop here as its needed for the `data-url` parameter. + if ( empty( $video_url ) ) { return; } $this->remove_embed_script( $blockquote_node ); - $amp_iframe_node = AMP_DOM_Utils::create_node( + $amp_node = AMP_DOM_Utils::create_node( Document::fromNode( $dom ), - 'amp-iframe', + 'amp-embedly-card', [ - 'layout' => 'fixed-height', - - /* - * The iframe dimensions cannot be derived from the embed, so we default to a dimension that should - * allow the embed to be fully shown. - */ - 'height' => 900, - - /* - * A `lang` query parameter is added to the URL via JS. This can't be determined here so it is not - * added. Whether it alters the embed in any way or not has not been determined. - */ - 'src' => 'https://www.tiktok.com/embed/v2/' . $video_id, - 'sandbox' => 'allow-scripts allow-same-origin allow-popups', + 'layout' => 'responsive', + 'height' => 700, + 'width' => 340, + 'data-url' => $video_url, ] ); @@ -99,23 +89,22 @@ protected function make_embed_amp_compatible( DOMElement $blockquote_node ) { // Append the placeholder if it was found. if ( 'section' === $child->nodeName ) { /** - * Placeholder to append to the iframe. + * Placeholder to append to the AMP component. * * @var DOMElement $placeholder_node */ $placeholder_node = $blockquote_node->removeChild( $child ); $placeholder_node->setAttribute( 'placeholder', '' ); - $amp_iframe_node->appendChild( $placeholder_node ); + $amp_node->appendChild( $placeholder_node ); break; } } - // On the non-amp page the embed is wrapped with a
, so the same is done here. - $blockquote_node->appendChild( $amp_iframe_node ); + $blockquote_node->parentNode->replaceChild( $amp_node, $blockquote_node ); } /** - * Remove TikTok's embed script if it exists. + * Remove the TikTok embed script if it exists. * * @param DOMElement $node The DOMNode to make AMP compatible. */ diff --git a/tests/php/test-class-amp-tiktok-embed-handler.php b/tests/php/test-class-amp-tiktok-embed-handler.php index 0ab5d8196c8..3a8dc051f28 100644 --- a/tests/php/test-class-amp-tiktok-embed-handler.php +++ b/tests/php/test-class-amp-tiktok-embed-handler.php @@ -71,10 +71,9 @@ public function get_conversion_data() { 'url_simple' => [ 'https://www.tiktok.com/@scout2015/video/6718335390845095173' . PHP_EOL, - '
' . PHP_EOL . PHP_EOL . - '
@scout2015 ' . PHP_EOL . + '
@scout2015 ' . PHP_EOL . '

Scramble up ur name & I’ll try to guess it😍❀️ #foryoupage #petsoftiktok #aesthetic

' . PHP_EOL . - '

♬ original sound – π‡πšπ°πšπ’π’π“†‰

' . PHP_EOL . PHP_EOL, + '

♬ original sound – π‡πšπ°πšπ’π’π“†‰

' . PHP_EOL . PHP_EOL, ], ]; } From 8ab4907e9e2516443a5be58817b13a7dedcc81f0 Mon Sep 17 00:00:00 2001 From: Pierre Gordon Date: Tue, 12 May 2020 01:36:28 -0400 Subject: [PATCH 05/19] Disable share icons --- includes/embeds/class-amp-tiktok-embed-handler.php | 9 +++++---- tests/php/test-class-amp-tiktok-embed-handler.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/embeds/class-amp-tiktok-embed-handler.php b/includes/embeds/class-amp-tiktok-embed-handler.php index ff8be9d52c7..7158f7da8a3 100644 --- a/includes/embeds/class-amp-tiktok-embed-handler.php +++ b/includes/embeds/class-amp-tiktok-embed-handler.php @@ -73,10 +73,11 @@ protected function make_embed_amp_compatible( DOMElement $blockquote_node ) { Document::fromNode( $dom ), 'amp-embedly-card', [ - 'layout' => 'responsive', - 'height' => 700, - 'width' => 340, - 'data-url' => $video_url, + 'layout' => 'responsive', + 'height' => 700, + 'width' => 340, + 'data-card-controls' => 0, + 'data-url' => $video_url, ] ); diff --git a/tests/php/test-class-amp-tiktok-embed-handler.php b/tests/php/test-class-amp-tiktok-embed-handler.php index 3a8dc051f28..86bfe9f4373 100644 --- a/tests/php/test-class-amp-tiktok-embed-handler.php +++ b/tests/php/test-class-amp-tiktok-embed-handler.php @@ -71,7 +71,7 @@ public function get_conversion_data() { 'url_simple' => [ 'https://www.tiktok.com/@scout2015/video/6718335390845095173' . PHP_EOL, - '
@scout2015 ' . PHP_EOL . + '
@scout2015 ' . PHP_EOL . '

Scramble up ur name & I’ll try to guess it😍❀️ #foryoupage #petsoftiktok #aesthetic

' . PHP_EOL . '

♬ original sound – π‡πšπ°πšπ’π’π“†‰

' . PHP_EOL . PHP_EOL, ], From 5332ec426af87fc1d38b37569f502c4d10e140d1 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 11 May 2020 23:28:57 -0700 Subject: [PATCH 06/19] Strip leading BOM and whitespace and trailing HTML comment before parsing validation response JSON (#4679) --- includes/validation/class-amp-validation-manager.php | 11 +++++++++++ .../validation/test-class-amp-validation-manager.php | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/includes/validation/class-amp-validation-manager.php b/includes/validation/class-amp-validation-manager.php index 466f5055969..541a77a473f 100644 --- a/includes/validation/class-amp-validation-manager.php +++ b/includes/validation/class-amp-validation-manager.php @@ -2114,6 +2114,17 @@ public static function validate_url( $url ) { $validation_url ); + // Strip byte order mark (BOM). + if ( "\xEF\xBB\xBF" === substr( $response, 0, 3 ) ) { + $response = substr( $response, 3 ); + } + + // Strip any leading whitespace. + $response = ltrim( $response ); + + // Strip HTML comments that may have been injected at the end of the response (e.g. by a caching plugin). + $response = preg_replace( '/\s*$/s', '', $response ); + if ( '' === $response ) { return new WP_Error( 'white_screen_of_death' ); } diff --git a/tests/php/validation/test-class-amp-validation-manager.php b/tests/php/validation/test-class-amp-validation-manager.php index 89ef2995793..1af344c1532 100644 --- a/tests/php/validation/test-class-amp-validation-manager.php +++ b/tests/php/validation/test-class-amp-validation-manager.php @@ -2183,7 +2183,8 @@ public function test_validate_url() { } return [ - 'body' => wp_json_encode( $validation ), + // Prepend JSON with byte order mark, whitespace, and append with HTML comment to ensure stripped. + 'body' => "\xEF\xBB\xBF" . ' ' . wp_json_encode( $validation ) . "\n\n", 'headers' => [ 'content-type' => 'application/json', ], From 7f36afdeb5289035a3fa13dd66c5375338d66c00 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 11 May 2020 23:59:05 -0700 Subject: [PATCH 07/19] Strip multiple BOM characters (#4683) Amends #4679 --- includes/validation/class-amp-validation-manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/validation/class-amp-validation-manager.php b/includes/validation/class-amp-validation-manager.php index 541a77a473f..be23c12deee 100644 --- a/includes/validation/class-amp-validation-manager.php +++ b/includes/validation/class-amp-validation-manager.php @@ -2115,7 +2115,7 @@ public static function validate_url( $url ) { ); // Strip byte order mark (BOM). - if ( "\xEF\xBB\xBF" === substr( $response, 0, 3 ) ) { + while ( "\xEF\xBB\xBF" === substr( $response, 0, 3 ) ) { $response = substr( $response, 3 ); } From cc6cc7186542a42d602b384b0a34ee552a567cc4 Mon Sep 17 00:00:00 2001 From: Pierre Gordon <16200219+pierlon@users.noreply.github.com> Date: Wed, 13 May 2020 14:42:51 -0400 Subject: [PATCH 08/19] Pin amp-experiment to v0.1 (#4690) --- includes/amp-helper-functions.php | 8 ++++++++ tests/php/test-class-amp-theme-support.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/amp-helper-functions.php b/includes/amp-helper-functions.php index 7d4b7fff377..98f332ae39e 100644 --- a/includes/amp-helper-functions.php +++ b/includes/amp-helper-functions.php @@ -834,6 +834,14 @@ function amp_register_default_scripts( $wp_scripts ) { null ); } + + if ( $wp_scripts->query( 'amp-experiment', 'registered' ) ) { + /* + * Version 1.0 of amp-experiment is still experimental and requires the user to enable it. + * @todo Revisit once amp-experiment is no longer experimental. + */ + $wp_scripts->registered['amp-experiment']->src = 'https://cdn.ampproject.org/v0/amp-experiment-0.1.js'; + } } /** diff --git a/tests/php/test-class-amp-theme-support.php b/tests/php/test-class-amp-theme-support.php index fbbb9918f8a..a5cf91a3c87 100644 --- a/tests/php/test-class-amp-theme-support.php +++ b/tests/php/test-class-amp-theme-support.php @@ -1982,11 +1982,11 @@ static function ( $url ) { '', '', '', - '', + '', '', '', - '', + '', '#\s*#s', '##s', From 2da4b55fe65cc1620ed5253f9e7b3b495145f00a Mon Sep 17 00:00:00 2001 From: Pierre Gordon <16200219+pierlon@users.noreply.github.com> Date: Wed, 13 May 2020 21:34:19 -0400 Subject: [PATCH 09/19] Suppress Site Health ICU test if site or home URL is not an IDN (#4698) * Suppress ICU test if site or home URL is not an IDN * Check if any domain labels start with `xn--` to determine if a domain is an IDN * Return true if IDN domain found * Update src/Admin/SiteHealth.php Make `is_intl_extension_needed()` private Co-authored-by: Weston Ruter Co-authored-by: Weston Ruter --- src/Admin/SiteHealth.php | 91 ++++++++++++++++++---------- tests/php/test-class-site-health.php | 40 ++++++++++-- 2 files changed, 94 insertions(+), 37 deletions(-) diff --git a/src/Admin/SiteHealth.php b/src/Admin/SiteHealth.php index 10a75bd157f..987ec3076d6 100644 --- a/src/Admin/SiteHealth.php +++ b/src/Admin/SiteHealth.php @@ -49,15 +49,19 @@ public function add_tests( $tests ) { 'label' => esc_html__( 'cURL multi functions', 'amp' ), 'test' => [ $this, 'curl_multi_functions' ], ]; - $tests['direct']['amp_icu_version'] = [ - 'label' => esc_html__( 'ICU version', 'amp' ), - 'test' => [ $this, 'icu_version' ], - ]; - $tests['direct']['amp_css_transient_caching'] = [ + + if ( $this->is_intl_extension_needed() ) { + $tests['direct']['amp_icu_version'] = [ + 'label' => esc_html__( 'ICU version', 'amp' ), + 'test' => [ $this, 'icu_version' ], + ]; + } + + $tests['direct']['amp_css_transient_caching'] = [ 'label' => esc_html__( 'Transient caching of stylesheets', 'amp' ), 'test' => [ $this, 'css_transient_caching' ], ]; - $tests['direct']['amp_xdebug_extension'] = [ + $tests['direct']['amp_xdebug_extension'] = [ 'label' => esc_html__( 'Xdebug extension', 'amp' ), 'test' => [ $this, 'xdebug_extension' ], ]; @@ -512,33 +516,35 @@ private function get_css_transient_caching_sampling_range() { /** * Adds suggested PHP extensions to those that Core depends on. * - * @param array $extensions The existing extensions from Core. + * @param array $core_extensions The existing extensions from Core. * @return array The extensions, including those for AMP. */ - public function add_extensions( $extensions ) { - return array_merge( - $extensions, - [ - 'intl' => [ - 'extension' => 'intl', - 'function' => 'idn_to_utf8', - 'required' => false, - ], - 'json' => [ - 'extension' => 'json', - 'function' => 'json_encode', - 'required' => false, - ], - 'mbstring' => [ - 'extension' => 'mbstring', - 'required' => false, - ], - 'zip' => [ - 'extension' => 'zip', - 'required' => false, - ], - ] - ); + public function add_extensions( $core_extensions ) { + $extensions = [ + 'json' => [ + 'extension' => 'json', + 'function' => 'json_encode', + 'required' => false, + ], + 'mbstring' => [ + 'extension' => 'mbstring', + 'required' => false, + ], + 'zip' => [ + 'extension' => 'zip', + 'required' => false, + ], + ]; + + if ( $this->is_intl_extension_needed() ) { + $extensions['intl'] = [ + 'extension' => 'intl', + 'function' => 'idn_to_utf8', + 'required' => false, + ]; + } + + return array_merge( $core_extensions, $extensions ); } /** @@ -577,4 +583,27 @@ public function add_styles() { '; } + + /** + * Determine if the `intl` extension is needed. + * + * @return bool True if the `intl` extension is needed, otherwise false. + */ + private function is_intl_extension_needed() { + // Publisher's own origins. + $domains = array_unique( + [ + wp_parse_url( site_url(), PHP_URL_HOST ), + wp_parse_url( home_url(), PHP_URL_HOST ), + ] + ); + + foreach ( $domains as $domain ) { + if ( preg_match( '/(^|\.)xn--/', $domain ) ) { + return true; + } + } + + return false; + } } diff --git a/tests/php/test-class-site-health.php b/tests/php/test-class-site-health.php index 30d37a341ed..4e79b234ed0 100644 --- a/tests/php/test-class-site-health.php +++ b/tests/php/test-class-site-health.php @@ -67,8 +67,16 @@ public function test_add_tests() { $this->assertArrayHasKey( 'direct', $tests ); $this->assertArrayHasKey( 'amp_persistent_object_cache', $tests['direct'] ); $this->assertArrayHasKey( 'amp_curl_multi_functions', $tests['direct'] ); - $this->assertArrayHasKey( 'amp_icu_version', $tests['direct'] ); + $this->assertArrayNotHasKey( 'amp_icu_version', $tests['direct'] ); $this->assertArrayHasKey( 'amp_xdebug_extension', $tests['direct'] ); + + // Test that the the ICU version test is added only when site URL is an IDN. + add_filter( 'site_url', [ self::class, 'get_idn' ], 10, 4 ); + + $tests = $this->instance->add_tests( [] ); + $this->assertArrayHasKey( 'amp_icu_version', $tests['direct'] ); + + remove_filter( 'site_url', [ self::class, 'get_idn' ] ); } /** @@ -370,11 +378,6 @@ public function test_get_serve_all_templates( $theme_support, $do_serve_all_temp public function test_add_extensions() { $this->assertEquals( [ - 'intl' => [ - 'extension' => 'intl', - 'function' => 'idn_to_utf8', - 'required' => false, - ], 'json' => [ 'extension' => 'json', 'function' => 'json_encode', @@ -391,5 +394,30 @@ public function test_add_extensions() { ], $this->instance->add_extensions( [] ) ); + + // Test that the the `intl` extension is added only when site URL is an IDN. + add_filter( 'site_url', [ self::class, 'get_idn' ], 10, 4 ); + + $extensions = $this->instance->add_extensions( [] ); + $this->assertArrayHasKey( 'intl', $extensions ); + $this->assertEquals( + [ + 'extension' => 'intl', + 'function' => 'idn_to_utf8', + 'required' => false, + ], + $extensions['intl'] + ); + + remove_filter( 'site_url', [ self::class, 'get_idn' ] ); + } + + /** + * Get a an IDN for testing purposes. + * + * @return string + */ + public static function get_idn() { + return 'https://foo.xn--57h.bar.com'; } } From f8910e7206bda6ce2d64df4bacf86c24e08cedfb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:28:47 +0200 Subject: [PATCH 10/19] Update dependency wp-coding-standards/wpcs to v2.3.0 (#4721) --- composer.json | 2 +- composer.lock | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 2cba366b397..ef90f75fda7 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpcompatibility/phpcompatibility-wp": "2.1.0", "roave/security-advisories": "dev-master", "sirbrillig/phpcs-variable-analysis": "2.8.1", - "wp-coding-standards/wpcs": "2.2.1", + "wp-coding-standards/wpcs": "2.3.0", "xwp/wp-dev-lib": "1.6.4" }, "suggest": { diff --git a/composer.lock b/composer.lock index 2137661b4a0..d7a44527235 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "25c250a03f59fcb0b64aac20e60ae572", + "content-hash": "a00ed3a11a442c1235e0d80da880b211", "packages": [ { "name": "ampproject/common", @@ -788,12 +788,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "ec1a75b10126327b351fdea7c2b9bfb94e2f6f35" + "reference": "9b0501ceb2d00bea5814316c5333d513d7622ed5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ec1a75b10126327b351fdea7c2b9bfb94e2f6f35", - "reference": "ec1a75b10126327b351fdea7c2b9bfb94e2f6f35", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/9b0501ceb2d00bea5814316c5333d513d7622ed5", + "reference": "9b0501ceb2d00bea5814316c5333d513d7622ed5", "shasum": "" }, "conflict": { @@ -977,6 +977,7 @@ "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "t3g/svg-sanitizer": "<1.0.3", "tecnickcom/tcpdf": "<6.2.22", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1-beta.1,<2.1.3", @@ -984,8 +985,8 @@ "titon/framework": ">=0,<9.9.99", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.38|>=2,<2.7", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.30|>=9,<9.5.12|>=10,<10.2.1", - "typo3/cms-core": ">=8,<8.7.30|>=9,<9.5.12|>=10,<10.2.1", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.30|>=9,<9.5.17|>=10,<10.4.2", + "typo3/cms-core": ">=8,<8.7.30|>=9,<9.5.17|>=10,<10.4.2", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", @@ -1058,7 +1059,7 @@ "type": "tidelift" } ], - "time": "2020-05-09T00:00:21+00:00" + "time": "2020-05-14T00:01:29+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", @@ -1194,16 +1195,16 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "b5a453203114cc2284b1a614c4953456fbe4f546" + "reference": "7da1894633f168fe244afc6de00d141f27517b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b5a453203114cc2284b1a614c4953456fbe4f546", - "reference": "b5a453203114cc2284b1a614c4953456fbe4f546", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", "shasum": "" }, "require": { @@ -1213,6 +1214,7 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { @@ -1235,7 +1237,7 @@ "standards", "wordpress" ], - "time": "2020-02-04T02:52:06+00:00" + "time": "2020-05-13T23:57:56+00:00" }, { "name": "xwp/wp-dev-lib", From 7e0669ca4aa38c506d5ffe149378bb8925d78106 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:28:55 +0200 Subject: [PATCH 11/19] Update dependency uuid to v7.0.3 (#4490) --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 313611f8787..feed63788d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,6 +4113,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true } } }, @@ -17810,12 +17816,6 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -20717,9 +20717,9 @@ "dev": true }, "tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", + "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", "dev": true, "requires": { "chownr": "^1.1.1", @@ -21723,9 +21723,9 @@ "dev": true }, "uuid": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.2.tgz", - "integrity": "sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", "dev": true }, "v8-compile-cache": { diff --git a/package.json b/package.json index a8876073b9a..3eaf9284456 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "svg-inline-loader": "0.8.2", "terser-webpack-plugin": "2.3.5", "travis-size-report": "1.1.0", - "uuid": "7.0.2", + "uuid": "7.0.3", "webpack": "4.42.1", "webpack-cli": "3.3.11", "webpackbar": "4.0.0" From bfa3109f94bce19e16926386e92b19f96843b7d4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:29:15 +0200 Subject: [PATCH 12/19] Update dependency babel-jest to v26 (#4652) --- package-lock.json | 325 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 316 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index feed63788d9..e47462e7f4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4212,6 +4212,80 @@ "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", "enzyme-to-json": "^3.4.4" + }, + "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==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "babel-jest": { + "version": "25.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.5.1.tgz", + "integrity": "sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ==", + "dev": true, + "requires": { + "@jest/transform": "^25.5.1", + "@jest/types": "^25.5.0", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^25.5.0", + "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + } + }, + "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" + } + }, + "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 + }, + "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 + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "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==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "@wordpress/jest-puppeteer-axe": { @@ -4656,6 +4730,34 @@ "color-convert": "^2.0.1" } }, + "babel-jest": { + "version": "25.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.5.1.tgz", + "integrity": "sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ==", + "dev": true, + "requires": { + "@jest/transform": "^25.5.1", + "@jest/types": "^25.5.0", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^25.5.0", + "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "dependencies": { + "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" + } + } + } + }, "chalk": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", @@ -4868,6 +4970,12 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -5650,20 +5758,56 @@ } }, "babel-jest": { - "version": "25.4.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.4.0.tgz", - "integrity": "sha512-p+epx4K0ypmHuCnd8BapfyOwWwosNCYhedetQey1awddtfmEX0MmdxctGl956uwUmjwXR5VSS5xJcGX9DvdIog==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.0.1.tgz", + "integrity": "sha512-Z4GGmSNQ8pX3WS1O+6v3fo41YItJJZsVxG5gIQ+HuB/iuAQBJxMTHTwz292vuYws1LnHfwSRgoqI+nxdy/pcvw==", "dev": true, "requires": { - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^25.4.0", - "chalk": "^3.0.0", + "babel-preset-jest": "^26.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", "slash": "^3.0.0" }, "dependencies": { + "@jest/transform": { + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.0.1.tgz", + "integrity": "sha512-pPRkVkAQ91drKGbzCfDOoHN838+FSbYaEAvBXvKuWeeRRUD8FjwXkqfUNUZL6Ke48aA/1cqq/Ni7kVMCoqagWA==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.0.1", + "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.2.4", + "jest-haste-map": "^26.0.1", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.0.1", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + } + }, + "@jest/types": { + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.0.1.tgz", + "integrity": "sha512-IbtjvqI9+eS1qFnOIEL7ggWmT+iK/U+Vde9cGWtYb/b6XgKb3X44ZAe/z9YZzoAAZ/E92m0DqrilF934IGNnQA==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", @@ -5674,10 +5818,50 @@ "color-convert": "^2.0.1" } }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "babel-plugin-jest-hoist": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.0.0.tgz", + "integrity": "sha512-+AuoehOrjt9irZL7DOt2+4ZaTM6dlu1s5TTS46JBa0/qem4dy7VNW3tMb96qeEqcIh20LD73TVNtmVEeymTG7w==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-jest": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.0.0.tgz", + "integrity": "sha512-9ce+DatAa31DpR4Uir8g4Ahxs5K4W4L8refzt+qHWQANb6LhGcAEfIFgLUwk67oya2cCUd6t4eUMtO/z64ocNw==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^26.0.0", + "babel-preset-current-node-syntax": "^0.1.2" + } + }, + "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" + } + }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -5699,18 +5883,130 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "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" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": 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 }, + "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 + }, + "jest-haste-map": { + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.0.1.tgz", + "integrity": "sha512-J9kBl/EdjmDsvyv7CiyKY5+DsTvVOScenprz/fGqfLg/pm1gdjbwwQ98nW0t+OIt+f+5nAVaElvn/6wP5KO7KA==", + "dev": true, + "requires": { + "@jest/types": "^26.0.1", + "@types/graceful-fs": "^4.1.2", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-serializer": "^26.0.0", + "jest-util": "^26.0.1", + "jest-worker": "^26.0.0", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7", + "which": "^2.0.2" + } + }, + "jest-regex-util": { + "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-serializer": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.0.0.tgz", + "integrity": "sha512-sQGXLdEGWFAE4wIJ2ZaIDb+ikETlUirEOBsLXdoBbeLhTHkZUJwgk3+M8eyFizhM6le43PDCCKPA1hzkSDo4cQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4" + } + }, + "jest-util": { + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.0.1.tgz", + "integrity": "sha512-byQ3n7ad1BO/WyFkYvlWQHTsomB6GIewBh8tlGtusiylAlaxQ1UpS0XYH0ngOyhZuHVLN79Qvl6/pMiDMSSG1g==", + "dev": true, + "requires": { + "@jest/types": "^26.0.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "make-dir": "^3.0.0" + } + }, + "jest-worker": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.0.0.tgz", + "integrity": "sha512-pPaYa2+JnwmiZjK9x7p9BoZht+47ecFCDFA/CJxspHzeDvQcfVBLWzCiWyo+EGrSiQMWZtCFo9iSvMZnAAo8vw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^7.0.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" + } + }, + "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" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "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 + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -5719,6 +6015,15 @@ "requires": { "has-flag": "^4.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" + } } } }, diff --git a/package.json b/package.json index 3eaf9284456..0427b25a9c1 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@wordpress/url": "2.14.0", "autoprefixer": "9.7.6", "babel-eslint": "10.1.0", - "babel-jest": "25.4.0", + "babel-jest": "26.0.1", "babel-loader": "8.1.0", "babel-plugin-inline-react-svg": "1.1.1", "babel-plugin-transform-react-remove-prop-types": "0.4.24", From 22dc84c5e316e3237806fab989589e893b29edc9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:29:36 +0200 Subject: [PATCH 13/19] Update dependency moment to v2.25.3 (#4639) --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index e47462e7f4d..73957cd4502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,12 +4113,6 @@ "requires": { "type-fest": "^0.8.1" } - }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true } } }, @@ -15832,9 +15826,9 @@ "dev": true }, "moment": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz", + "integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg==", "dev": true }, "moment-timezone": { @@ -18121,6 +18115,12 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/package.json b/package.json index 0427b25a9c1..254548df9c3 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "jest-silent-reporter": "0.2.1", "lodash": "4.17.15", "mini-css-extract-plugin": "0.9.0", - "moment": "2.24.0", + "moment": "2.25.3", "npm-run-all": "4.1.5", "optimize-css-assets-webpack-plugin": "5.0.3", "postcss": "7.0.28", From 45937928ad35dbacfe72a584ef9e527e3b739042 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:30:01 +0200 Subject: [PATCH 14/19] Update dependency postcss to v7.0.30 (#4649) --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73957cd4502..ba0006b7504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16988,9 +16988,9 @@ "dev": true }, "postcss": { - "version": "7.0.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.28.tgz", - "integrity": "sha512-YU6nVhyWIsVtlNlnAj1fHTsUKW5qxm3KEgzq2Jj6KTEFOTK8QWR12eIDvrlWhiSTK8WIBFTBhOJV4DY6dUuEbw==", + "version": "7.0.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.30.tgz", + "integrity": "sha512-nu/0m+NtIzoubO+xdAlwZl/u5S5vi/y6BCsoL8D+8IxsD3XvBS8X4YEADNIVXKVuQvduiucnRv+vPIqj56EGMQ==", "dev": true, "requires": { "chalk": "^2.4.2", diff --git a/package.json b/package.json index 254548df9c3..67f65625af9 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "moment": "2.25.3", "npm-run-all": "4.1.5", "optimize-css-assets-webpack-plugin": "5.0.3", - "postcss": "7.0.28", + "postcss": "7.0.30", "postcss-color-function": "4.1.0", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", From cb82b98d07fb5eb7afcf2de980682d15a4eefb45 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 May 2020 16:30:12 +0200 Subject: [PATCH 15/19] Update dependency eslint-plugin-react to v7.20.0 (#4691) --- package-lock.json | 27 +++++++++------------------ package.json | 2 +- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba0006b7504..03e418b694c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,6 +4113,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true } } }, @@ -9593,9 +9599,9 @@ } }, "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==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.0.tgz", + "integrity": "sha512-rqe1abd0vxMjmbPngo4NaYxTcR3Y4Hrmc/jg4T+sYz63yqlmJRknpEQfmWY+eDWPuMmix6iUIK+mv0zExjeLgA==", "dev": true, "requires": { "array-includes": "^3.1.1", @@ -9607,17 +9613,8 @@ "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" - }, - "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 - } } }, "eslint-plugin-react-hooks": { @@ -18115,12 +18112,6 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/package.json b/package.json index 67f65625af9..ed8477058c9 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "eslint-plugin-eslint-comments": "3.1.2", "eslint-plugin-import": "2.20.2", "eslint-plugin-jest": "23.8.2", - "eslint-plugin-react": "7.19.0", + "eslint-plugin-react": "7.20.0", "grunt": "1.1.0", "grunt-contrib-clean": "2.0.0", "grunt-contrib-copy": "1.0.0", From ecef8f2ba755d132f7798700a425afffdf55e06b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 14 May 2020 14:33:06 +0000 Subject: [PATCH 16/19] Update dependency eslint-plugin-jest to v23.11.0 --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6343addbdbe..ca27c341493 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2508,21 +2508,21 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.31.0.tgz", - "integrity": "sha512-MI6IWkutLYQYTQgZ48IVnRXmLR/0Q6oAyJgiOror74arUMh7EWjJkADfirZhRsUMHeLJ85U2iySDwHTSnNi9vA==", + "version": "2.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.33.0.tgz", + "integrity": "sha512-qzPM2AuxtMrRq78LwyZa8Qn6gcY8obkIrBs1ehqmQADwkYzTE1Pb4y2W+U3rE/iFkSWcWHG2LS6MJfj6SmHApg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.31.0", + "@typescript-eslint/typescript-estree": "2.33.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.31.0.tgz", - "integrity": "sha512-vxW149bXFXXuBrAak0eKHOzbcu9cvi6iNcJDzEtOkRwGHxJG15chiAQAwhLOsk+86p9GTr/TziYvw+H9kMaIgA==", + "version": "2.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.33.0.tgz", + "integrity": "sha512-d8rY6/yUxb0+mEwTShCQF2zYQdLlqihukNfG9IUlLYz5y1CH6G/9XYbrxQLq3Z14RNvkCC6oe+OcFlyUpwUbkg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -2530,7 +2530,7 @@ "glob": "^7.1.6", "is-glob": "^4.0.1", "lodash": "^4.17.15", - "semver": "^6.3.0", + "semver": "^7.3.2", "tsutils": "^3.17.1" }, "dependencies": { @@ -2550,9 +2550,9 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true } } @@ -4113,6 +4113,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true } } }, @@ -9509,9 +9515,9 @@ } }, "eslint-plugin-jest": { - "version": "23.8.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.8.2.tgz", - "integrity": "sha512-xwbnvOsotSV27MtAe7s8uGWOori0nUsrXh2f1EnpmXua8sDfY6VZhHAhHg2sqK7HBNycRQExF074XSZ7DvfoFg==", + "version": "23.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.11.0.tgz", + "integrity": "sha512-qedvh6mcMgoLFHjITtG40yKOCu5Fa1GMYesDOclU30ZvtVkf+DaH0fnCn1ysOX/QMdk2SGhQvxvYLowcLaM0GA==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^2.5.0" @@ -18106,12 +18112,6 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", diff --git a/package.json b/package.json index 3b95da869b2..b9da7673096 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "eslint": "7.0.0", "eslint-plugin-eslint-comments": "3.1.2", "eslint-plugin-import": "2.20.2", - "eslint-plugin-jest": "23.8.2", + "eslint-plugin-jest": "23.11.0", "eslint-plugin-react": "7.20.0", "grunt": "1.1.0", "grunt-contrib-clean": "2.0.0", From 0a8f249c30b2dda704af3f1fb2f64df1e933a9f5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 14 May 2020 14:33:56 +0000 Subject: [PATCH 17/19] Update dependency webpack to v4.43.0 --- package-lock.json | 28 ++++++++++++++-------------- package.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6343addbdbe..35dc65a7f3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4113,6 +4113,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true } } }, @@ -11438,9 +11444,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true } } @@ -18106,12 +18112,6 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -22231,16 +22231,16 @@ "dev": true }, "webpack": { - "version": "4.42.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.1.tgz", - "integrity": "sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg==", + "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.9.0", "@webassemblyjs/helper-module-context": "1.9.0", "@webassemblyjs/wasm-edit": "1.9.0", "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.2.1", + "acorn": "^6.4.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", @@ -22257,7 +22257,7 @@ "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.0", + "watchpack": "^1.6.1", "webpack-sources": "^1.4.1" }, "dependencies": { diff --git a/package.json b/package.json index 3b95da869b2..0c44bcc11dd 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "terser-webpack-plugin": "2.3.6", "travis-size-report": "1.1.0", "uuid": "7.0.3", - "webpack": "4.42.1", + "webpack": "4.43.0", "webpack-cli": "3.3.11", "webpackbar": "4.0.0" }, From 9bd3fce9d114f03e204a89ca48cbbe2c4bf96c1a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 14 May 2020 14:48:18 +0000 Subject: [PATCH 18/19] Update dependency uuid to v8 --- package-lock.json | 98 ++++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 90 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index bee97939062..a09302d0135 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2898,6 +2898,14 @@ "simple-html-tokenizer": "^0.5.7", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/components": { @@ -2939,6 +2947,14 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -3101,6 +3117,14 @@ "simple-html-tokenizer": "^0.5.7", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/components": { @@ -3142,6 +3166,14 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -3285,6 +3317,14 @@ "simple-html-tokenizer": "^0.5.7", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/components": { @@ -3326,6 +3366,14 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -3594,6 +3642,14 @@ "simple-html-tokenizer": "^0.5.7", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -3946,6 +4002,14 @@ "simple-html-tokenizer": "^0.5.7", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/components": { @@ -3987,6 +4051,14 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -4113,12 +4185,6 @@ "requires": { "type-fest": "^0.8.1" } - }, - "prettier": { - "version": "npm:wp-prettier@1.19.1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", - "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", - "dev": true } } }, @@ -5052,6 +5118,14 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.1", "uuid": "^7.0.2" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + } } }, "@wordpress/compose": { @@ -18112,6 +18186,12 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, + "prettier": { + "version": "npm:wp-prettier@1.19.1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz", + "integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==", + "dev": true + }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -22025,9 +22105,9 @@ "dev": true }, "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", "dev": true }, "v8-compile-cache": { diff --git a/package.json b/package.json index 4c84d8b1193..c09b96a4ccf 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "svg-inline-loader": "0.8.2", "terser-webpack-plugin": "2.3.6", "travis-size-report": "1.1.0", - "uuid": "7.0.3", + "uuid": "8.0.0", "webpack": "4.43.0", "webpack-cli": "3.3.11", "webpackbar": "4.0.0" From 83d796443ddfdbee9cc6ebdf8d30d706c944e1cd Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 15 May 2020 06:08:24 +0200 Subject: [PATCH 19/19] Raise PHPStan level to 4 in lib/common (#4686) * Bump level to 4 * Add additional null typehint * Add additional null typehint * Fix bug with status code comparison * Rewrite logic and add exception for false positive when checking libxml version --- lib/common/phpstan.neon.dist | 6 ++- lib/common/src/Dom/Document.php | 38 +++++++++---------- .../Exception/FailedToGetFromRemoteUrl.php | 2 +- lib/common/src/RuntimeVersion.php | 2 +- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lib/common/phpstan.neon.dist b/lib/common/phpstan.neon.dist index fb2b62bf871..841272db310 100644 --- a/lib/common/phpstan.neon.dist +++ b/lib/common/phpstan.neon.dist @@ -2,7 +2,7 @@ includes: # @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon - phar://phpstan.phar/conf/bleedingEdge.neon parameters: - level: 3 + level: 4 inferPrivatePropertyTypeFromConstructor: true paths: - %currentWorkingDirectory%/src/ @@ -10,3 +10,7 @@ parameters: - %currentWorkingDirectory%/vendor/autoload.php ignoreErrors: - '#^PHPDoc tag @throws with type AmpProject\\Exception\\FailedRemoteRequest is not subtype of Throwable$#' + - + message: '#^If condition is always false\.$#' + path: 'src/Dom/Document.php' + # See https://github.com/phpstan/phpstan/issues/3291 diff --git a/lib/common/src/Dom/Document.php b/lib/common/src/Dom/Document.php index 428e9c6f472..4ffc1c079b1 100644 --- a/lib/common/src/Dom/Document.php +++ b/lib/common/src/Dom/Document.php @@ -847,26 +847,26 @@ private function restoreSelfClosingTags($html) */ private function maybeReplaceNoscriptElements($html) { - if (! version_compare(LIBXML_DOTTED_VERSION, '2.8', '<')) { - return $html; + if (version_compare(LIBXML_DOTTED_VERSION, '2.8', '<')) { + $html = preg_replace_callback( + '#^.+?(?=]*>.*?#si', + function ($noscriptMatches) { + $placeholder = sprintf('', (string)$this->rand()); + + $this->noscriptPlaceholderComments[$placeholder] = $noscriptMatches[0]; + return $placeholder; + }, + $headMatches[0] + ); + }, + $html + ); } - return preg_replace_callback( - '#^.+?(?=]*>.*?#si', - function ($noscriptMatches) { - $placeholder = sprintf('', (string)$this->rand()); - - $this->noscriptPlaceholderComments[$placeholder] = $noscriptMatches[0]; - return $placeholder; - }, - $headMatches[0] - ); - }, - $html - ); + return $html; } /** @@ -1420,7 +1420,7 @@ public function deduplicateTag($tagName) /** * Main tag to keep. * - * @var DOMElement $mainTag + * @var DOMElement|null $mainTag */ $mainTag = $tags->item(0); diff --git a/lib/common/src/Exception/FailedToGetFromRemoteUrl.php b/lib/common/src/Exception/FailedToGetFromRemoteUrl.php index 015d1dca6b6..d05ae7f6767 100644 --- a/lib/common/src/Exception/FailedToGetFromRemoteUrl.php +++ b/lib/common/src/Exception/FailedToGetFromRemoteUrl.php @@ -18,7 +18,7 @@ final class FailedToGetFromRemoteUrl extends RuntimeException implements FailedR * * This is not always set. * - * @var int + * @var int|null */ private $statusCode; diff --git a/lib/common/src/RuntimeVersion.php b/lib/common/src/RuntimeVersion.php index 9b359aea653..96db846fe59 100644 --- a/lib/common/src/RuntimeVersion.php +++ b/lib/common/src/RuntimeVersion.php @@ -78,7 +78,7 @@ public function currentVersion($options = []) $response = $this->remoteRequest->get(self::RUNTIME_METADATA_ENDPOINT); $statusCode = $response->getStatusCode(); - if (200 < $statusCode || $statusCode >= 300) { + if ($statusCode < 200 || $statusCode >= 300) { return '0'; }