From 752ecee407d38e59dd4c80758247bc27036db7c9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2020 11:51:18 +0000 Subject: [PATCH 0001/4002] build(deps-dev): bump jest from 26.4.2 to 26.5.0 (#2301) --- yarn.lock | 770 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 405 insertions(+), 365 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0635e33d81b..c201bba62e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -400,93 +400,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.3.0.tgz#ed04063efb280c88ba87388b6f16427c0a85c856" - integrity sha512-/5Pn6sJev0nPUcAdpJHMVIsA8sKizL2ZkcKPE5+dJrCccks7tcM7c9wbgHudBJbxXLoTbqsHkG1Dofoem4F09w== +"@jest/console@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.5.0.tgz#89a1c5ae8329907fda842ebc5b475d5c9f935766" + integrity sha512-oh59scth4yf8XUgMJb8ruY7BHm0X5JZDNgGGsVnlOt2XQuq9s2NMllIrN4n70Yds+++bjrTGZ9EoOKraaPKPlg== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.3.0" - jest-util "^26.3.0" + jest-message-util "^26.5.0" + jest-util "^26.5.0" slash "^3.0.0" -"@jest/core@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.4.2.tgz#85d0894f31ac29b5bab07aa86806d03dd3d33edc" - integrity sha512-sDva7YkeNprxJfepOctzS8cAk9TOekldh+5FhVuXS40+94SHbiicRO1VV2tSoRtgIo+POs/Cdyf8p76vPTd6dg== +"@jest/core@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.5.0.tgz#32d7caf46a49d4a14cbbd3a2eb3ef39f149e984d" + integrity sha512-hDtgfzYxnrQn54+0JlbqpXM4+bqDfK0ooMlNE4Nn3VBsB4RbmytAn4/kVVIcMa+aYwRr/fwzWuGJwBETVg1sDw== dependencies: - "@jest/console" "^26.3.0" - "@jest/reporters" "^26.4.1" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.5.0" + "@jest/reporters" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/transform" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.3.0" - jest-config "^26.4.2" - jest-haste-map "^26.3.0" - jest-message-util "^26.3.0" + jest-changed-files "^26.5.0" + jest-config "^26.5.0" + jest-haste-map "^26.5.0" + jest-message-util "^26.5.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-resolve-dependencies "^26.4.2" - jest-runner "^26.4.2" - jest-runtime "^26.4.2" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" - jest-watcher "^26.3.0" + jest-resolve "^26.5.0" + jest-resolve-dependencies "^26.5.0" + jest-runner "^26.5.0" + jest-runtime "^26.5.0" + jest-snapshot "^26.5.0" + jest-util "^26.5.0" + jest-validate "^26.5.0" + jest-watcher "^26.5.0" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.3.0.tgz#e6953ab711ae3e44754a025f838bde1a7fd236a0" - integrity sha512-EW+MFEo0DGHahf83RAaiqQx688qpXgl99wdb8Fy67ybyzHwR1a58LHcO376xQJHfmoXTu89M09dH3J509cx2AA== +"@jest/environment@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.5.0.tgz#4381b6b2fc291dcff51e248780196bc035da7190" + integrity sha512-0F3G9EyZU2NAP0/c/5EqVx4DmldQtRxj0gMl3p3ciSCdyMiCyDmpdE7O0mKTSiFDyl1kU4TfgEVf0r0vMkmYcw== dependencies: - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/fake-timers" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" - jest-mock "^26.3.0" + jest-mock "^26.5.0" -"@jest/fake-timers@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.3.0.tgz#f515d4667a6770f60ae06ae050f4e001126c666a" - integrity sha512-ZL9ytUiRwVP8ujfRepffokBvD2KbxbqMhrXSBhSdAhISCw3gOkuntisiSFv+A6HN0n0fF4cxzICEKZENLmW+1A== +"@jest/fake-timers@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.5.0.tgz#107ceeb580bc42dd6e0843df5bbc92cb4fe9cb00" + integrity sha512-sQK6xUembaZ0qLnZpSjJJuJiKvyrjCJhaYjbmatFpj5+cM8h2D7YEkeEBC26BMzvF1O3tNM9OL7roqyBmom0KA== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.3.0" - jest-mock "^26.3.0" - jest-util "^26.3.0" + jest-message-util "^26.5.0" + jest-mock "^26.5.0" + jest-util "^26.5.0" -"@jest/globals@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.4.2.tgz#73c2a862ac691d998889a241beb3dc9cada40d4a" - integrity sha512-Ot5ouAlehhHLRhc+sDz2/9bmNv9p5ZWZ9LE1pXGGTCXBasmi5jnYjlgYcYt03FBwLmZXCZ7GrL29c33/XRQiow== +"@jest/globals@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.5.0.tgz#b9b7d05ee6722c894ce67aff216ed6b04d3fe187" + integrity sha512-TCKx3XWR9h/yyhQbz0C1sXkK2e8WJOnkP40T9bewNpf2Ahr1UEyKXnCoQO0JCpXFkWGTXBNo1QAgTQ3+LhXfcA== dependencies: - "@jest/environment" "^26.3.0" - "@jest/types" "^26.3.0" - expect "^26.4.2" + "@jest/environment" "^26.5.0" + "@jest/types" "^26.5.0" + expect "^26.5.0" -"@jest/reporters@^26.4.1": - version "26.4.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.4.1.tgz#3b4d6faf28650f3965f8b97bc3d114077fb71795" - integrity sha512-aROTkCLU8++yiRGVxLsuDmZsQEKO6LprlrxtAuzvtpbIFl3eIjgIf3EUxDKgomkS25R9ZzwGEdB5weCcBZlrpQ== +"@jest/reporters@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.5.0.tgz#07c7742993db9d680bcc6cda58106e8d283d2111" + integrity sha512-lUl5bbTHflDO9dQa85ZTHasPBVsyC48t9sg/VN2wC3OJryclFNqN4Xfo2FgnNl/pzCnzO2MVgMyIij5aNkod2w== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/transform" "^26.5.0" + "@jest/types" "^26.5.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -497,10 +497,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.3.0" - jest-resolve "^26.4.0" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-haste-map "^26.5.0" + jest-resolve "^26.5.0" + jest-util "^26.5.0" + jest-worker "^26.5.0" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -509,51 +509,51 @@ optionalDependencies: node-notifier "^8.0.0" -"@jest/source-map@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.3.0.tgz#0e646e519883c14c551f7b5ae4ff5f1bfe4fc3d9" - integrity sha512-hWX5IHmMDWe1kyrKl7IhFwqOuAreIwHhbe44+XH2ZRHjrKIh0LO5eLQ/vxHFeAfRwJapmxuqlGAEYLadDq6ZGQ== +"@jest/source-map@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.5.0.tgz#98792457c85bdd902365cd2847b58fff05d96367" + integrity sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.3.0.tgz#46cde01fa10c0aaeb7431bf71e4a20d885bc7fdb" - integrity sha512-a8rbLqzW/q7HWheFVMtghXV79Xk+GWwOK1FrtimpI5n1la2SY0qHri3/b0/1F0Ve0/yJmV8pEhxDfVwiUBGtgg== +"@jest/test-result@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.5.0.tgz#d5bdf2eaf12ceddd359c2506fe806afafecc9a9e" + integrity sha512-CaVXxDQi31LPOsz5/+iajNHQlA1Je/jQ8uYH/lCa6Y/UrkO+sDHeEH3x/inbx06PctVDnTwIlCcBvNNbC4FCvQ== dependencies: - "@jest/console" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.5.0" + "@jest/types" "^26.5.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.4.2": - version "26.4.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.4.2.tgz#58a3760a61eec758a2ce6080201424580d97cbba" - integrity sha512-83DRD8N3M0tOhz9h0bn6Kl6dSp+US6DazuVF8J9m21WAp5x7CqSMaNycMP0aemC/SH/pDQQddbsfHRTBXVUgog== +"@jest/test-sequencer@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.5.0.tgz#617808a1fa869c5181e43a5b841db084746b667e" + integrity sha512-23oofRXqPEy37HyHWIYf7lzzOqtGBkai5erZiL6RgxlyXE7a0lCihf6b5DfAvcD3yUtbXmh3EzpjJDVH57zQrg== dependencies: - "@jest/test-result" "^26.3.0" + "@jest/test-result" "^26.5.0" graceful-fs "^4.2.4" - jest-haste-map "^26.3.0" - jest-runner "^26.4.2" - jest-runtime "^26.4.2" + jest-haste-map "^26.5.0" + jest-runner "^26.5.0" + jest-runtime "^26.5.0" -"@jest/transform@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.3.0.tgz#c393e0e01459da8a8bfc6d2a7c2ece1a13e8ba55" - integrity sha512-Isj6NB68QorGoFWvcOjlUhpkT56PqNIsXKR7XfvoDlCANn/IANlh8DrKAA2l2JKC3yWSMH5wS0GwuQM20w3b2A== +"@jest/transform@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.5.0.tgz#16404eaddf6034fe713da37b236756fc6b956db0" + integrity sha512-Kt4WciOruTyTkJ2DZ+xtZiejRj3v22BrXCYZoGRbI0N6Q6tt2HdsWrrEtn6nlK24QWKC389xKkVk4Xr2gWBZQA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" 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.3.0" + jest-haste-map "^26.5.0" jest-regex-util "^26.0.0" - jest-util "^26.3.0" + jest-util "^26.5.0" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -581,6 +581,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.5.0.tgz#163f6e00c5ac9bb6fc91c3802eaa9d0dd6e1474a" + integrity sha512-nH9DFLqaIhB+RVgjivemvMiFSWw/BKwbZGxBAMv8CCTvUyFoK8RwHhAlmlXIvMBrf5Z3YQ4p9cq3Qh9EDctGvA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@ls-lint/ls-lint@^1.9.2": version "1.9.2" resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" @@ -788,6 +799,13 @@ dependencies: "@babel/types" "^7.3.0" +"@types/babel__traverse@^7.0.4": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.15.tgz#db9e4238931eb69ef8aab0ad6523d4d4caa39d03" + integrity sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A== + dependencies: + "@babel/types" "^7.3.0" + "@types/babylon@^6.16.2": version "6.16.5" resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.5.tgz#1c5641db69eb8cdf378edd25b4be7754beeb48b4" @@ -919,10 +937,10 @@ dependencies: "@types/node" "*" -"@types/stack-utils@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" - integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/stack-utils@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" + integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== "@types/yargs-parser@*": version "13.0.0" @@ -1309,16 +1327,16 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-jest@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.3.0.tgz#10d0ca4b529ca3e7d1417855ef7d7bd6fc0c3463" - integrity sha512-sxPnQGEyHAOPF8NcUsD0g7hDCnvLL2XyblRBcgrzTWBB/mAIpWow3n1bEL+VghnnZfreLhFSBsFluRoK2tRK4g== +babel-jest@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.5.0.tgz#afe11a083b4e584f63e9de29d2075cb96f42d2a4" + integrity sha512-Cy16ZJrds81C+JASaOIGNlpCeqW3PTOq36owv+Zzwde5NiWz+zNduwxUNF57vxc/3SnIWo8HHqTczhN8GLoXTw== dependencies: - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/transform" "^26.5.0" + "@jest/types" "^26.5.0" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.3.0" + babel-preset-jest "^26.5.0" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -1334,10 +1352,10 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^26.2.0: - version "26.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.2.0.tgz#bdd0011df0d3d513e5e95f76bd53b51147aca2dd" - integrity sha512-B/hVMRv8Nh1sQ1a3EY8I0n4Y1Wty3NrR5ebOyVT302op+DOAau+xNEImGMsUWOC3++ZlMooCytKz+NgN8aKGbA== +babel-plugin-jest-hoist@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz#3916b3a28129c29528de91e5784a44680db46385" + integrity sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -1361,12 +1379,12 @@ babel-preset-current-node-syntax@^0.1.3: "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -babel-preset-jest@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.3.0.tgz#ed6344506225c065fd8a0b53e191986f74890776" - integrity sha512-5WPdf7nyYi2/eRxCbVrE1kKCWxgWY4RsPEbdJWFm7QsesFGqjdkyLeu1zRkwM1cxK6EPIlNd6d2AxLk7J+t4pw== +babel-preset-jest@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz#f1b166045cd21437d1188d29f7fba470d5bdb0e7" + integrity sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA== dependencies: - babel-plugin-jest-hoist "^26.2.0" + babel-plugin-jest-hoist "^26.5.0" babel-preset-current-node-syntax "^0.1.3" babel-runtime@^6.26.0: @@ -1844,14 +1862,14 @@ cliui@^2.1.0: right-align "^0.1.1" wordwrap "0.0.2" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== +cliui@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.1.tgz#a4cb67aad45cd83d8d05128fc9f4d8fbb887e6b3" + integrity sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + wrap-ansi "^7.0.0" clone@~0.1.9: version "0.1.19" @@ -2462,10 +2480,10 @@ diff-sequences@^25.2.6: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== -diff-sequences@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.3.0.tgz#62a59b1b29ab7fd27cef2a33ae52abe73042d0a2" - integrity sha512-5j5vdRcw3CNctePNYN0Wy2e/JbWT6cAYnXv5OuqPhDpyCGc0uLu2TK0zOCJWNB9kOIfYMSpIulRaDgIi4HJ6Ig== +diff-sequences@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" + integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== diffie-hellman@^5.0.0: version "5.0.3" @@ -2604,6 +2622,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.0.2, escalade@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e" + integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2852,16 +2875,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.4.2.tgz#36db120928a5a2d7d9736643032de32f24e1b2a1" - integrity sha512-IlJ3X52Z0lDHm7gjEp+m76uX46ldH5VpqmU0006vqDju/285twh7zaWMRhs67VpQhBwjjMchk+p5aA0VkERCAA== +expect@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.5.0.tgz#089c0cc4d6c545c7388ddefffa0f1e2e8e38d282" + integrity sha512-oIOy3mHWjnF5ZICuaui5kdtJZQ+D7XHWyUQDxk1WhIRCkcIYc24X23bOfikgCNU6i9wcSqLQhwPOqeRp09naxg== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" + jest-matcher-utils "^26.5.0" + jest-message-util "^26.5.0" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -3153,7 +3176,7 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -3949,57 +3972,57 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.3.0.tgz#68fb2a7eb125f50839dab1f5a17db3607fe195b1" - integrity sha512-1C4R4nijgPltX6fugKxM4oQ18zimS7LqQ+zTTY8lMCMFPrxqBFb7KJH0Z2fRQJvw2Slbaipsqq7s1mgX5Iot+g== +jest-changed-files@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.5.0.tgz#181b901368decb4fc21d3cace9b4c4819232b667" + integrity sha512-RAHoXqxa7gO1rZz88qpsLpzJ2mQU12UaFWadacKHuMbBZwFK+yl0j9YoD9Y/wBpv1ILG2SdCuxFHggX+9VU7qA== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.4.2.tgz#24afc6e4dfc25cde4c7ec4226fb7db5f157c21da" - integrity sha512-zb+lGd/SfrPvoRSC/0LWdaWCnscXc1mGYW//NP4/tmBvRPT3VntZ2jtKUONsRi59zc5JqmsSajA9ewJKFYp8Cw== +jest-cli@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.5.0.tgz#4404fb5cbdfb250946160374d5e3fc9655f9b57f" + integrity sha512-bI0h6GQGbyN0SSZu3nPilwrkrZ8dBC93erwTiEoJ+kGjtNuXsB183hTZ0HCiHLzf88oE0SQB1hYp8RgyytH+Bg== dependencies: - "@jest/core" "^26.4.2" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/core" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/types" "^26.5.0" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-config "^26.5.0" + jest-util "^26.5.0" + jest-validate "^26.5.0" prompts "^2.0.1" - yargs "^15.3.1" + yargs "^16.0.3" -jest-config@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.4.2.tgz#da0cbb7dc2c131ffe831f0f7f2a36256e6086558" - integrity sha512-QBf7YGLuToiM8PmTnJEdRxyYy3mHWLh24LJZKVdXZ2PNdizSe1B/E8bVm+HYcjbEzGuVXDv/di+EzdO/6Gq80A== +jest-config@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.5.0.tgz#3959e47223496e2ae2605e073578a359cab99445" + integrity sha512-OM6eXIEmQXAuonCk8aNPMRjPFcKWa3IIoSlq5BPgIflmQBzM/COcI7XsWSIEPWPa9WcYTJBWj8kNqEYjczmIFw== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.4.2" - "@jest/types" "^26.3.0" - babel-jest "^26.3.0" + "@jest/test-sequencer" "^26.5.0" + "@jest/types" "^26.5.0" + babel-jest "^26.5.0" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.3.0" - jest-environment-node "^26.3.0" + jest-environment-jsdom "^26.5.0" + jest-environment-node "^26.5.0" jest-get-type "^26.3.0" - jest-jasmine2 "^26.4.2" + jest-jasmine2 "^26.5.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-resolve "^26.5.0" + jest-util "^26.5.0" + jest-validate "^26.5.0" micromatch "^4.0.2" - pretty-format "^26.4.2" + pretty-format "^26.5.0" jest-diff@^25.2.1: version "25.5.0" @@ -4011,15 +4034,15 @@ jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.4.2.tgz#a1b7b303bcc534aabdb3bd4a7caf594ac059f5aa" - integrity sha512-6T1XQY8U28WH0Z5rGpQ+VqZSZz8EN8rZcBtfvXaOkbwxIEeRre6qnuZQlbY1AJ4MKDxQF8EkrCvK+hL/VkyYLQ== +jest-diff@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.5.0.tgz#bd01cef2d00b2668a0207ef47ab8eb1e33613253" + integrity sha512-CmDMMPkVMxrrh0Dv/4M9kh1tsYsZnYTQMMTvIFpePBSk9wMVfcyfg30TCq+oR9AzGbw8vsI50Gk1HmlMMlhoJg== dependencies: chalk "^4.0.0" - diff-sequences "^26.3.0" + diff-sequences "^26.5.0" jest-get-type "^26.3.0" - pretty-format "^26.4.2" + pretty-format "^26.5.0" jest-docblock@^26.0.0: version "26.0.0" @@ -4028,41 +4051,41 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.4.2.tgz#bb14f7f4304f2bb2e2b81f783f989449b8b6ffae" - integrity sha512-p15rt8r8cUcRY0Mvo1fpkOGYm7iI8S6ySxgIdfh3oOIv+gHwrHTy5VWCGOecWUhDsit4Nz8avJWdT07WLpbwDA== +jest-each@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.5.0.tgz#39197a9d1abdd32ff5b8a9931507ab117c551c02" + integrity sha512-+oO3ykDgypHSyyK2xOsh8XDUwMtg3HoJ4wMNFNHxhcACFbUgaCOfLy+eTCn5pIKhtigU3BmkYt7k3MtTb5pJOQ== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.3.0" - pretty-format "^26.4.2" + jest-util "^26.5.0" + pretty-format "^26.5.0" -jest-environment-jsdom@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.3.0.tgz#3b749ba0f3a78e92ba2c9ce519e16e5dd515220c" - integrity sha512-zra8He2btIMJkAzvLaiZ9QwEPGEetbxqmjEBQwhH3CA+Hhhu0jSiEJxnJMbX28TGUvPLxBt/zyaTLrOPF4yMJA== +jest-environment-jsdom@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.5.0.tgz#f9a6726402fde787632a69df5ff3390ab04337a3" + integrity sha512-Xuqh3bx8egymaJR566ECkiztIIVOIWWPGIxo++ziWyCOqQChUguRCH1hRXBbfINPbb/SRFe7GCD+SunaUgTmCw== dependencies: - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/environment" "^26.5.0" + "@jest/fake-timers" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" - jest-mock "^26.3.0" - jest-util "^26.3.0" - jsdom "^16.2.2" - -jest-environment-node@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.3.0.tgz#56c6cfb506d1597f94ee8d717072bda7228df849" - integrity sha512-c9BvYoo+FGcMj5FunbBgtBnbR5qk3uky8PKyRVpSfe2/8+LrNQMiXX53z6q2kY+j15SkjQCOSL/6LHnCPLVHNw== - dependencies: - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/types" "^26.3.0" + jest-mock "^26.5.0" + jest-util "^26.5.0" + jsdom "^16.4.0" + +jest-environment-node@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.5.0.tgz#3f49ba40abe87209df96f7991015cac996e04563" + integrity sha512-LaYl/ek5mb1VDP1/+jMH2N1Ec4fFUhSYmc8EZqigBgMov/2US8U5l7D3IlOf78e+wARUxPxUpTcybVVzAOu3jg== + dependencies: + "@jest/environment" "^26.5.0" + "@jest/fake-timers" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" - jest-mock "^26.3.0" - jest-util "^26.3.0" + jest-mock "^26.5.0" + jest-util "^26.5.0" jest-get-type@^25.2.6: version "25.2.6" @@ -4074,89 +4097,89 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.3.0.tgz#c51a3b40100d53ab777bfdad382d2e7a00e5c726" - integrity sha512-DHWBpTJgJhLLGwE5Z1ZaqLTYqeODQIZpby0zMBsCU9iRFHYyhklYqP4EiG73j5dkbaAdSZhgB938mL51Q5LeZA== +jest-haste-map@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.5.0.tgz#ba4c48dbf69e0529709bd0d76660d87eefce820a" + integrity sha512-AjB1b53uqN7Cf2VN80x0wJajVZ+BMZC+G2CmWoG143faaMw7IhIcs3FTPuSgOx7cn3/bag7lgCq93naAvLO6EQ== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" jest-regex-util "^26.0.0" - jest-serializer "^26.3.0" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-serializer "^26.5.0" + jest-util "^26.5.0" + jest-worker "^26.5.0" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.4.2.tgz#18a9d5bec30904267ac5e9797570932aec1e2257" - integrity sha512-z7H4EpCldHN1J8fNgsja58QftxBSL+JcwZmaXIvV9WKIM+x49F4GLHu/+BQh2kzRKHAgaN/E82od+8rTOBPyPA== +jest-jasmine2@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.5.0.tgz#49d57db63f49a183813263b41e61e2a5f988e6a3" + integrity sha512-NOA6PLORHTRTROOp5VysKCUVpFAjMMXUS1Xw7FvTMeYK5Ewx4rpxhFqiJ7JT4pENap9g9OuXo4cWR/MwCDTEeQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.3.0" - "@jest/source-map" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/environment" "^26.5.0" + "@jest/source-map" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.4.2" + expect "^26.5.0" is-generator-fn "^2.0.0" - jest-each "^26.4.2" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" - jest-runtime "^26.4.2" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - pretty-format "^26.4.2" + jest-each "^26.5.0" + jest-matcher-utils "^26.5.0" + jest-message-util "^26.5.0" + jest-runtime "^26.5.0" + jest-snapshot "^26.5.0" + jest-util "^26.5.0" + pretty-format "^26.5.0" throat "^5.0.0" -jest-leak-detector@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.4.2.tgz#c73e2fa8757bf905f6f66fb9e0070b70fa0f573f" - integrity sha512-akzGcxwxtE+9ZJZRW+M2o+nTNnmQZxrHJxX/HjgDaU5+PLmY1qnQPnMjgADPGCRPhB+Yawe1iij0REe+k/aHoA== +jest-leak-detector@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.5.0.tgz#a5671ffbc6308e45ad31b42cb2ef0722488a4e57" + integrity sha512-xZHvvTBbj3gUTtunLjPqP594BT6IUEpwA0AQpEQjVR8eBq8+R3qgU/KhoAcVcV0iqRM6pXtX7hKPZ5mLdynVSQ== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.4.2" + pretty-format "^26.5.0" -jest-matcher-utils@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.4.2.tgz#fa81f3693f7cb67e5fc1537317525ef3b85f4b06" - integrity sha512-KcbNqWfWUG24R7tu9WcAOKKdiXiXCbMvQYT6iodZ9k1f7065k0keUOW6XpJMMvah+hTfqkhJhRXmA3r3zMAg0Q== +jest-matcher-utils@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.5.0.tgz#1195d6a35c4c710ad286b775b966f3fdb7a2102d" + integrity sha512-QgbbxqFT8wiTi4o/7MWj2vHlcmMjACG8vnJ9pJ7svVDmkzEnTUGdHXWLKB1aZhbnyXetMNRF+TSMcDS9aGfuzA== dependencies: chalk "^4.0.0" - jest-diff "^26.4.2" + jest-diff "^26.5.0" jest-get-type "^26.3.0" - pretty-format "^26.4.2" + pretty-format "^26.5.0" -jest-message-util@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.3.0.tgz#3bdb538af27bb417f2d4d16557606fd082d5841a" - integrity sha512-xIavRYqr4/otGOiLxLZGj3ieMmjcNE73Ui+LdSW/Y790j5acqCsAdDiLIbzHCZMpN07JOENRWX5DcU+OQ+TjTA== +jest-message-util@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.5.0.tgz#87f8c440dace55095d247442638c70b892836895" + integrity sha512-UEOqdoTfX0AFyReL4q5N3CfDBWt+AtQzeszZuuGapU39vwEk90rTSBghCA/3FFEZzvGfH2LE4+0NaBI81Cu2Ow== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.3.0" - "@types/stack-utils" "^1.0.1" + "@jest/types" "^26.5.0" + "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.2" slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.3.0.tgz#ee62207c3c5ebe5f35b760e1267fee19a1cfdeba" - integrity sha512-PeaRrg8Dc6mnS35gOo/CbZovoDPKAeB1FICZiuagAgGvbWdNNyjQjkOaGUa/3N3JtpQ/Mh9P4A2D4Fv51NnP8Q== +jest-mock@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.5.0.tgz#56efcea2dfd550b77ceb5ef280cf8c6114ef32db" + integrity sha512-8D1UmbnmjdkvTdYygTW26KZr95Aw0/3gEmMZQWkxIEAgEESVDbwDG8ygRlXSY214x9hFjtKezvfQUp36Ogl75w== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4169,117 +4192,118 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.2.tgz#739bdb027c14befb2fe5aabbd03f7bab355f1dc5" - integrity sha512-ADHaOwqEcVc71uTfySzSowA/RdxUpCxhxa2FNLiin9vWLB1uLPad3we+JSSROq5+SrL9iYPdZZF8bdKM7XABTQ== +jest-resolve-dependencies@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.0.tgz#6c4a863685e6c63b225e903c6006a70fb8ecac0a" + integrity sha512-2e3YdS+dlTY00s0CEiMAa7Ap/mPfPaQV7d6Fzp7BQqHXO/2QhXn/yVTxnxR+dOIo/NOh7pqXZTQSn+2iWwPQQA== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" jest-regex-util "^26.0.0" - jest-snapshot "^26.4.2" + jest-snapshot "^26.5.0" -jest-resolve@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.4.0.tgz#6dc0af7fb93e65b73fec0368ca2b76f3eb59a6d7" - integrity sha512-bn/JoZTEXRSlEx3+SfgZcJAVuTMOksYq9xe9O6s4Ekg84aKBObEaVXKOEilULRqviSLAYJldnoWV9c07kwtiCg== +jest-resolve@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.5.0.tgz#31f68344dd88af70f00bc8bb531de6687565c680" + integrity sha512-c34L8Lrw4fFzRiCLzwePziKRfHitjsAnY15ID0e9Se4ISikmZ5T9icLEFAGHnfaxfb+9r8EKdrbg89gjRdrQvw== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" chalk "^4.0.0" + escalade "^3.1.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.3.0" - read-pkg-up "^7.0.1" + jest-util "^26.5.0" resolve "^1.17.0" slash "^3.0.0" -jest-runner@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.4.2.tgz#c3ec5482c8edd31973bd3935df5a449a45b5b853" - integrity sha512-FgjDHeVknDjw1gRAYaoUoShe1K3XUuFMkIaXbdhEys+1O4bEJS8Avmn4lBwoMfL8O5oFTdWYKcf3tEJyyYyk8g== +jest-runner@^26.5.0: + version "26.5.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.5.1.tgz#a56c1e1fbed7470ae69ebd5456ba4d4443c8701f" + integrity sha512-gFHXehvMZD8qwNzaIl2MDFFI99m4kKk06H2xh2u4IkC+tHYIJjE5J175l9cbL3RuU2slfS2m57KZgcPZfbTavQ== dependencies: - "@jest/console" "^26.3.0" - "@jest/environment" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/console" "^26.5.0" + "@jest/environment" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.4.2" + jest-config "^26.5.0" jest-docblock "^26.0.0" - jest-haste-map "^26.3.0" - jest-leak-detector "^26.4.2" - jest-message-util "^26.3.0" - jest-resolve "^26.4.0" - jest-runtime "^26.4.2" - jest-util "^26.3.0" - jest-worker "^26.3.0" + jest-haste-map "^26.5.0" + jest-leak-detector "^26.5.0" + jest-message-util "^26.5.0" + jest-resolve "^26.5.0" + jest-runtime "^26.5.0" + jest-util "^26.5.0" + jest-worker "^26.5.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.4.2.tgz#94ce17890353c92e4206580c73a8f0c024c33c42" - integrity sha512-4Pe7Uk5a80FnbHwSOk7ojNCJvz3Ks2CNQWT5Z7MJo4tX0jb3V/LThKvD9tKPNVNyeMH98J/nzGlcwc00R2dSHQ== - dependencies: - "@jest/console" "^26.3.0" - "@jest/environment" "^26.3.0" - "@jest/fake-timers" "^26.3.0" - "@jest/globals" "^26.4.2" - "@jest/source-map" "^26.3.0" - "@jest/test-result" "^26.3.0" - "@jest/transform" "^26.3.0" - "@jest/types" "^26.3.0" +jest-runtime@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.5.0.tgz#c9b3eeb5ead70710ea17f6058df405cac31bb926" + integrity sha512-CujjQWpMcsvSg0L+G3iEz6s7Th5IbiZseAaw/5R7Eb+IfnJdyPdjJ+EoXNV8n07snvW5nZTwV9QIfy6Vjris8A== + dependencies: + "@jest/console" "^26.5.0" + "@jest/environment" "^26.5.0" + "@jest/fake-timers" "^26.5.0" + "@jest/globals" "^26.5.0" + "@jest/source-map" "^26.5.0" + "@jest/test-result" "^26.5.0" + "@jest/transform" "^26.5.0" + "@jest/types" "^26.5.0" "@types/yargs" "^15.0.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.4.2" - jest-haste-map "^26.3.0" - jest-message-util "^26.3.0" - jest-mock "^26.3.0" + jest-config "^26.5.0" + jest-haste-map "^26.5.0" + jest-message-util "^26.5.0" + jest-mock "^26.5.0" jest-regex-util "^26.0.0" - jest-resolve "^26.4.0" - jest-snapshot "^26.4.2" - jest-util "^26.3.0" - jest-validate "^26.4.2" + jest-resolve "^26.5.0" + jest-snapshot "^26.5.0" + jest-util "^26.5.0" + jest-validate "^26.5.0" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^15.3.1" + yargs "^16.0.3" -jest-serializer@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.3.0.tgz#1c9d5e1b74d6e5f7e7f9627080fa205d976c33ef" - integrity sha512-IDRBQBLPlKa4flg77fqg0n/pH87tcRKwe8zxOVTWISxGpPHYkRZ1dXKyh04JOja7gppc60+soKVZ791mruVdow== +jest-serializer@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.5.0.tgz#f5425cc4c5f6b4b355f854b5f0f23ec6b962bc13" + integrity sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.4.2.tgz#87d3ac2f2bd87ea8003602fbebd8fcb9e94104f6" - integrity sha512-N6Uub8FccKlf5SBFnL2Ri/xofbaA68Cc3MGjP/NuwgnsvWh+9hLIR/DhrxbSiKXMY9vUW5dI6EW1eHaDHqe9sg== +jest-snapshot@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.5.0.tgz#2b76366e2d621775f39733e5764492b2e44b0bcd" + integrity sha512-WTNJef67o7cCvwAe5foVCNqG3MzIW/CyU4FZvMrhBPZsJeXwfBY7kfOlydZigxtcytnvmNE2pqznOfD5EcQgrQ== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" + "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.4.2" + expect "^26.5.0" graceful-fs "^4.2.4" - jest-diff "^26.4.2" + jest-diff "^26.5.0" jest-get-type "^26.3.0" - jest-haste-map "^26.3.0" - jest-matcher-utils "^26.4.2" - jest-message-util "^26.3.0" - jest-resolve "^26.4.0" + jest-haste-map "^26.5.0" + jest-matcher-utils "^26.5.0" + jest-message-util "^26.5.0" + jest-resolve "^26.5.0" natural-compare "^1.4.0" - pretty-format "^26.4.2" + pretty-format "^26.5.0" semver "^7.3.2" -jest-util@^26.1.0, jest-util@^26.3.0: +jest-util@^26.1.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== @@ -4291,32 +4315,44 @@ jest-util@^26.1.0, jest-util@^26.3.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.4.2.tgz#e871b0dfe97747133014dcf6445ee8018398f39c" - integrity sha512-blft+xDX7XXghfhY0mrsBCYhX365n8K5wNDC4XAcNKqqjEzsRUSXP44m6PL0QJEW2crxQFLLztVnJ4j7oPlQrQ== +jest-util@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.5.0.tgz#f4e0fb80cf82db127d68c7c5b2749a427a80b450" + integrity sha512-CSQ0uzE7JdHDCQo3K8jlyWRIF2xNLdpu9nbjo8okGDanaNsF7WonhusFvjOg7QiWn1SThe7wFRh8Jx2ls1Gx4Q== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.5.0.tgz#6e417ec5066e315752da1350797a89fc5907f97a" + integrity sha512-603+CHUJD4nAZ+tY/A+wu3g8KEcBey2a7YOMU9W8e4u7mCezhaDasw20ITaZHoR2R2MZhThL6jApPSj0GvezrQ== + dependencies: + "@jest/types" "^26.5.0" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.4.2" + pretty-format "^26.5.0" -jest-watcher@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.3.0.tgz#f8ef3068ddb8af160ef868400318dc4a898eed08" - integrity sha512-XnLdKmyCGJ3VoF6G/p5ohbJ04q/vv5aH9ENI+i6BL0uu9WWB6Z7Z2lhQQk0d2AVZcRGp1yW+/TsoToMhBFPRdQ== +jest-watcher@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.5.0.tgz#3aedd339ee3dfb5801e71ae9a00da08369679317" + integrity sha512-INLKhpc9QbO5zy2HkS1CJUncByrCLFDZQOY30d9ojiuGO02ofL1BygDRDRtFvT/oWSZ8Y0fbkrr1oXU2ay/MqA== dependencies: - "@jest/test-result" "^26.3.0" - "@jest/types" "^26.3.0" + "@jest/test-result" "^26.5.0" + "@jest/types" "^26.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.3.0" + jest-util "^26.5.0" string-length "^4.0.1" -jest-worker@^26.2.1, jest-worker@^26.3.0: +jest-worker@^26.2.1: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.3.0.tgz#7c8a97e4f4364b4f05ed8bca8ca0c24de091871f" integrity sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw== @@ -4325,14 +4361,23 @@ jest-worker@^26.2.1, jest-worker@^26.3.0: merge-stream "^2.0.0" supports-color "^7.0.0" +jest-worker@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" + integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest@^26.0.1: - version "26.4.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.4.2.tgz#7e8bfb348ec33f5459adeaffc1a25d5752d9d312" - integrity sha512-LLCjPrUh98Ik8CzW8LLVnSCfLaiY+wbK53U7VxnFSX7Q+kWC4noVeDvGWIFw0Amfq1lq2VfGm7YHWSLBV62MJw== + version "26.5.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.5.0.tgz#d973c13a3843587b89b02dab1fbcd1f3bf111f09" + integrity sha512-yW1QTkdpxVWTV2M5cOwVdEww8dRGqL5bb7FOG3YQoMtf7oReCEawmU0+tOKkZUSfcOymbXmCfdBQLzuwOLCx0w== dependencies: - "@jest/core" "^26.4.2" + "@jest/core" "^26.5.0" import-local "^3.0.2" - jest-cli "^26.4.2" + jest-cli "^26.5.0" jju@~1.4.0: version "1.4.0" @@ -4362,10 +4407,10 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^16.2.2: - version "16.2.2" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" - integrity sha512-pDFQbcYtKBHxRaP55zGXCJWgFHkDAYbKcsXEK/3Icu9nKYZkutUXfLBwbD+09XDutkYSHcgfQLZ0qvpAAm9mvg== +jsdom@^16.4.0: + version "16.4.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" + integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== dependencies: abab "^2.0.3" acorn "^7.1.1" @@ -4387,7 +4432,7 @@ jsdom@^16.2.2: tough-cookie "^3.0.1" w3c-hr-time "^1.0.2" w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.0.0" + webidl-conversions "^6.1.0" whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" @@ -5740,12 +5785,12 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.2.tgz#d081d032b398e801e2012af2df1214ef75a81237" - integrity sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA== +pretty-format@^26.5.0: + version "26.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.5.0.tgz#3320e4952f8e6918fc8c26c6df7aad9734818ac2" + integrity sha512-NcgRuuTutUJ9+Br4P19DFThpJYnYBiugfRmZEA6pXrUeG+IcMSmppb88rU+iPA+XAJcjTYlCb5Ed6miHg/Qqqw== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.5.0" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" @@ -6246,11 +6291,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -6520,11 +6560,6 @@ serve@^11.3.0: serve-handler "6.1.3" update-check "1.5.2" -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -7507,7 +7542,7 @@ webidl-conversions@^5.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== -webidl-conversions@^6.0.0: +webidl-conversions@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== @@ -7533,11 +7568,6 @@ whatwg-url@^8.0.0: tr46 "^2.0.2" webidl-conversions "^5.0.0" -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -7603,6 +7633,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7677,10 +7716,10 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +y18n@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.2.tgz#48218df5da2731b4403115c39a1af709c873f829" + integrity sha512-CkwaeZw6dQgqgPGeTWKMXCRmMcBgETFlTml1+ZOO+q7kGst8NREJ+eWwFNPVUQ4QGdAaklbqCZHH6Zuep1RjiA== yallist@^2.1.2: version "2.1.2" @@ -7702,7 +7741,7 @@ yargs-parser@20.x: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.0.tgz#944791ca2be2e08ddadd3d87e9de4c6484338605" integrity sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A== -yargs-parser@^18.1.1, yargs-parser@^18.1.3: +yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -7710,22 +7749,23 @@ yargs-parser@^18.1.1, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^15.3.1: - version "15.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" - integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== +yargs-parser@^20.0.0: + version "20.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.1.tgz#28f3773c546cdd8a69ddae68116b48a5da328e77" + integrity sha512-yYsjuSkjbLMBp16eaOt7/siKTjNVjMm3SoJnIg3sEh/JsvqVVDyjRKmaJV4cl+lNIgq6QEco2i3gDebJl7/vLA== + +yargs@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c" + integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA== dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" + cliui "^7.0.0" + escalade "^3.0.2" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.1" + y18n "^5.0.1" + yargs-parser "^20.0.0" yargs@~3.10.0: version "3.10.0" From 94998715822589f6f10443b6dba75f193467845d Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Mon, 5 Oct 2020 23:58:37 +0800 Subject: [PATCH 0002/4002] fix(compiler-core): make v-once work with v-if/else-if/else (#2182) Partial fix for #2035 --- .../__tests__/transforms/vOnce.spec.ts | 19 ++++++++++--- packages/compiler-core/src/ast.ts | 2 +- packages/compiler-core/src/transforms/vIf.ts | 27 +++++++++++++------ 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/vOnce.spec.ts b/packages/compiler-core/__tests__/transforms/vOnce.spec.ts index 3983aa9605a..a18a0947d00 100644 --- a/packages/compiler-core/__tests__/transforms/vOnce.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vOnce.spec.ts @@ -99,15 +99,26 @@ describe('compiler: v-once transform', () => { expect(generate(root).code).toMatchSnapshot() }) - test('with v-if', () => { - const root = transformWithOnce(`
`) + test('with v-if/else', () => { + const root = transformWithOnce(`

`) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect(root.children[0]).toMatchObject({ type: NodeTypes.IF, - // should cache the entire v-if expression, not just a single branch + // should cache the entire v-if/else-if/else expression, not just a single branch codegenNode: { - type: NodeTypes.JS_CACHE_EXPRESSION + type: NodeTypes.JS_CACHE_EXPRESSION, + value: { + type: NodeTypes.JS_CONDITIONAL_EXPRESSION, + consequent: { + type: NodeTypes.VNODE_CALL, + tag: `"div"` + }, + alternate: { + type: NodeTypes.VNODE_CALL, + tag: `"p"` + } + } } }) }) diff --git a/packages/compiler-core/src/ast.ts b/packages/compiler-core/src/ast.ts index 42c93402616..35849833c66 100644 --- a/packages/compiler-core/src/ast.ts +++ b/packages/compiler-core/src/ast.ts @@ -236,7 +236,7 @@ export interface CompoundExpressionNode extends Node { export interface IfNode extends Node { type: NodeTypes.IF branches: IfBranchNode[] - codegenNode?: IfConditionalExpression + codegenNode?: IfConditionalExpression | CacheExpression //

} export interface IfBranchNode extends Node { diff --git a/packages/compiler-core/src/transforms/vIf.ts b/packages/compiler-core/src/transforms/vIf.ts index 2c00349254d..00832a9acec 100644 --- a/packages/compiler-core/src/transforms/vIf.ts +++ b/packages/compiler-core/src/transforms/vIf.ts @@ -20,7 +20,8 @@ import { IfNode, createVNodeCall, AttributeNode, - locStub + locStub, + CacheExpression } from '../ast' import { createCompilerError, ErrorCodes } from '../errors' import { processExpression } from './transformExpression' @@ -62,13 +63,7 @@ export const transformIf = createStructuralDirectiveTransform( ) as IfConditionalExpression } else { // attach this branch's codegen node to the v-if root. - let parentCondition = ifNode.codegenNode! - while ( - parentCondition.alternate.type === - NodeTypes.JS_CONDITIONAL_EXPRESSION - ) { - parentCondition = parentCondition.alternate - } + const parentCondition = getParentCondition(ifNode.codegenNode!) parentCondition.alternate = createCodegenNodeForBranch( branch, key + ifNode.branches.length - 1, @@ -293,3 +288,19 @@ function isSameKey( } return true } + +function getParentCondition( + node: IfConditionalExpression | CacheExpression +): IfConditionalExpression { + while (true) { + if (node.type === NodeTypes.JS_CONDITIONAL_EXPRESSION) { + if (node.alternate.type === NodeTypes.JS_CONDITIONAL_EXPRESSION) { + node = node.alternate + } else { + return node + } + } else if (node.type === NodeTypes.JS_CACHE_EXPRESSION) { + node = node.value as IfConditionalExpression + } + } +} From 60da878d586040a6ebd99a385c506da78955e91c Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 5 Oct 2020 12:00:41 -0400 Subject: [PATCH 0003/4002] chore: add github sponsors to funding.yml [ci skip] --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index e9e118a4422..4a8f6fd424f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ open_collective: vuejs patreon: evanyou +github: yyx990803 From db6c2df24b8ba8117db0102fa186b2d3f7b10b57 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 5 Oct 2020 12:02:01 -0400 Subject: [PATCH 0004/4002] chore(readme): update eslint-plugin-vue status [ci skip] --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc287c38d25..59db1b733eb 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ It is recommended to use [VSCode](https://code.visualstudio.com/) with our offic | Project | NPM | Repo | | --------------------- | ----------------------------- | -------------------- | | @vue/babel-plugin-jsx | [![rc][jsx-badge]][jsx-npm] | [[Github][jsx-code]] | -| eslint-plugin-vue | [![beta][epv-badge]][epv-npm] | [[Github][epv-code]] | +| eslint-plugin-vue | [![stable][epv-badge]][epv-npm] | [[Github][epv-code]] | | @vue/test-utils | [![beta][vtu-badge]][vtu-npm] | [[Github][vtu-code]] | | vue-class-component | [![beta][vcc-badge]][vcc-npm] | [[Github][vcc-code]] | | vue-loader | [![beta][vl-badge]][vl-npm] | [[Github][vl-code]] | @@ -80,8 +80,8 @@ It is recommended to use [VSCode](https://code.visualstudio.com/) with our offic [vd-badge]: https://img.shields.io/npm/v/@vue/devtools/beta.svg [vd-npm]: https://www.npmjs.com/package/@vue/devtools/v/beta [vd-code]: https://github.com/vuejs/vue-devtools/tree/next -[epv-badge]: https://img.shields.io/npm/v/eslint-plugin-vue/next.svg -[epv-npm]: https://www.npmjs.com/package/eslint-plugin-vue/v/next +[epv-badge]: https://img.shields.io/npm/v/eslint-plugin-vue.svg +[epv-npm]: https://www.npmjs.com/package/eslint-plugin-vue [epv-code]: https://github.com/vuejs/eslint-plugin-vue [vtu-badge]: https://img.shields.io/npm/v/@vue/test-utils/next.svg [vtu-npm]: https://www.npmjs.com/package/@vue/test-utils/v/next From 28d5fd7a2871c10df3427dfbbe0e203c2a976cb4 Mon Sep 17 00:00:00 2001 From: Philipp Rudloff Date: Mon, 5 Oct 2020 22:05:43 +0200 Subject: [PATCH 0005/4002] fix(runtime-core): vnode.el is null in watcher after rerendering (#2295) fix #2170 --- .../__tests__/rendererComponent.spec.ts | 79 +++++++++++++++++++ packages/runtime-core/src/renderer.ts | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/rendererComponent.spec.ts b/packages/runtime-core/__tests__/rendererComponent.spec.ts index 4253779d4cf..d178c21e82c 100644 --- a/packages/runtime-core/__tests__/rendererComponent.spec.ts +++ b/packages/runtime-core/__tests__/rendererComponent.spec.ts @@ -137,4 +137,83 @@ describe('renderer: component', () => { await nextTick() expect(serializeInner(root)).toBe(`
1
1
`) }) + + // #2170 + test('should have access to instance’s “$el” property in watcher when setting instance data', async () => { + function returnThis(this: any) { + return this + } + const dataWatchSpy = jest.fn(returnThis) + let instance: any + const Comp = { + data() { + return { + testData: undefined + } + }, + + watch: { + testData() { + // @ts-ignore + dataWatchSpy(this.$el) + } + }, + + created() { + instance = this + }, + + render() { + return h('div') + } + } + + const root = nodeOps.createElement('div') + render(h(Comp), root) + + expect(dataWatchSpy).not.toHaveBeenCalled() + instance.testData = 'data' + + await nextTick() + expect(dataWatchSpy).toHaveBeenCalledWith(instance.$el) + }) + + // #2170 + test('should have access to instance’s “$el” property in watcher when rendereing with watched prop', async () => { + function returnThis(this: any) { + return this + } + const propWatchSpy = jest.fn(returnThis) + let instance: any + const Comp = { + props: { + testProp: String + }, + + watch: { + testProp() { + // @ts-ignore + propWatchSpy(this.$el) + } + }, + + created() { + instance = this + }, + + render() { + return h('div') + } + } + + const root = nodeOps.createElement('div') + + render(h(Comp), root) + await nextTick() + expect(propWatchSpy).not.toHaveBeenCalled() + + render(h(Comp, { testProp: 'prop ' }), root) + await nextTick() + expect(propWatchSpy).toHaveBeenCalledWith(instance.$el) + }) }) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index bb3129bd7af..217e9a4c209 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1425,11 +1425,11 @@ function baseCreateRenderer( } if (next) { + next.el = vnode.el updateComponentPreRender(instance, next, optimized) } else { next = vnode } - next.el = vnode.el // beforeUpdate hook if (bu) { From ea1f87eabf2deab2e586af7ebd2d74bb58f72b87 Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Tue, 6 Oct 2020 04:36:02 +0800 Subject: [PATCH 0006/4002] fix(reactivity): should add allowRecurse to the effect (#2213) So that the scheduler also respects effect's allowRecurse option. fix #2200 --- packages/reactivity/src/effect.ts | 4 +- .../__tests__/rendererComponent.spec.ts | 80 +++++++++---------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index 2d2b4d2a1be..683f8fa9e3c 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -17,6 +17,7 @@ export interface ReactiveEffect { raw: () => T deps: Array options: ReactiveEffectOptions + allowRecurse: boolean } export interface ReactiveEffectOptions { @@ -100,6 +101,7 @@ function createReactiveEffect( } } as ReactiveEffect effect.id = uid++ + effect.allowRecurse = !!options.allowRecurse effect._isEffect = true effect.active = true effect.raw = fn @@ -180,7 +182,7 @@ export function trigger( const add = (effectsToAdd: Set | undefined) => { if (effectsToAdd) { effectsToAdd.forEach(effect => { - if (effect !== activeEffect || effect.options.allowRecurse) { + if (effect !== activeEffect || effect.allowRecurse) { effects.add(effect) } }) diff --git a/packages/runtime-core/__tests__/rendererComponent.spec.ts b/packages/runtime-core/__tests__/rendererComponent.spec.ts index d178c21e82c..402a6732dda 100644 --- a/packages/runtime-core/__tests__/rendererComponent.spec.ts +++ b/packages/runtime-core/__tests__/rendererComponent.spec.ts @@ -8,7 +8,9 @@ import { VNode, provide, inject, - Ref + Ref, + watch, + SetupContext } from '@vue/runtime-test' describe('renderer: component', () => { @@ -139,23 +141,21 @@ describe('renderer: component', () => { }) // #2170 - test('should have access to instance’s “$el” property in watcher when setting instance data', async () => { + test('should have access to instance’s “$el” property in watcher when rendereing with watched prop', async () => { function returnThis(this: any) { return this } - const dataWatchSpy = jest.fn(returnThis) + const propWatchSpy = jest.fn(returnThis) let instance: any const Comp = { - data() { - return { - testData: undefined - } + props: { + testProp: String }, watch: { - testData() { + testProp() { // @ts-ignore - dataWatchSpy(this.$el) + propWatchSpy(this.$el) } }, @@ -170,50 +170,50 @@ describe('renderer: component', () => { const root = nodeOps.createElement('div') render(h(Comp), root) + await nextTick() + expect(propWatchSpy).not.toHaveBeenCalled() - expect(dataWatchSpy).not.toHaveBeenCalled() - instance.testData = 'data' - + render(h(Comp, { testProp: 'prop ' }), root) await nextTick() - expect(dataWatchSpy).toHaveBeenCalledWith(instance.$el) + expect(propWatchSpy).toHaveBeenCalledWith(instance.$el) }) - // #2170 - test('should have access to instance’s “$el” property in watcher when rendereing with watched prop', async () => { - function returnThis(this: any) { - return this - } - const propWatchSpy = jest.fn(returnThis) - let instance: any - const Comp = { - props: { - testProp: String - }, + // #2200 + test('component child updating parent state in pre-flush should trigger parent re-render', async () => { + const outer = ref(0) + const App = { + setup() { + const inner = ref(0) - watch: { - testProp() { - // @ts-ignore - propWatchSpy(this.$el) + return () => { + return [ + h('div', inner.value), + h(Child, { + value: outer.value, + onUpdate: (val: number) => (inner.value = val) + }) + ] } - }, + } + } - created() { - instance = this - }, + const Child = { + props: ['value'], + setup(props: any, { emit }: SetupContext) { + watch(() => props.value, (val: number) => emit('update', val)) - render() { - return h('div') + return () => { + return h('div', props.value) + } } } const root = nodeOps.createElement('div') + render(h(App), root) + expect(serializeInner(root)).toBe(`
0
0
`) - render(h(Comp), root) - await nextTick() - expect(propWatchSpy).not.toHaveBeenCalled() - - render(h(Comp, { testProp: 'prop ' }), root) + outer.value++ await nextTick() - expect(propWatchSpy).toHaveBeenCalledWith(instance.$el) + expect(serializeInner(root)).toBe(`
1
1
`) }) }) From 4d20ac8173f84c87288255dcc03c62a6ee862a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=9C=C9=B4=D0=B2=CA=8F=D1=82=E1=B4=87?= Date: Tue, 6 Oct 2020 05:37:26 +0800 Subject: [PATCH 0007/4002] fix(runtime-core): make errorCaptured return value handling consistent with Vue 2 (#2289) fix #2267 --- .../__tests__/components/Suspense.spec.ts | 2 +- .../__tests__/errorHandling.spec.ts | 30 +++++++++---------- packages/runtime-core/src/errorHandling.ts | 4 ++- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/runtime-core/__tests__/components/Suspense.spec.ts b/packages/runtime-core/__tests__/components/Suspense.spec.ts index c6ab0f3fa32..5602b4a7f14 100644 --- a/packages/runtime-core/__tests__/components/Suspense.spec.ts +++ b/packages/runtime-core/__tests__/components/Suspense.spec.ts @@ -609,7 +609,7 @@ describe('Suspense', () => { err instanceof Error ? err.message : `A non-Error value thrown: ${err}` - return true + return false }) return () => diff --git a/packages/runtime-core/__tests__/errorHandling.spec.ts b/packages/runtime-core/__tests__/errorHandling.spec.ts index 47d6c489262..eed67913633 100644 --- a/packages/runtime-core/__tests__/errorHandling.spec.ts +++ b/packages/runtime-core/__tests__/errorHandling.spec.ts @@ -20,7 +20,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'root') - return true + return false }) return () => h(Child) } @@ -58,7 +58,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'root') - return true + return false }) return () => h(Child) } @@ -68,7 +68,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'child') - return true + return false }) return () => h(GrandChild) } @@ -96,7 +96,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -126,7 +126,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -164,7 +164,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -189,7 +189,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -218,7 +218,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -238,7 +238,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -265,7 +265,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -295,7 +295,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -330,7 +330,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -363,7 +363,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { @@ -393,7 +393,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { @@ -431,7 +431,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { diff --git a/packages/runtime-core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts index 1823f6b729c..fedb0f83f01 100644 --- a/packages/runtime-core/src/errorHandling.ts +++ b/packages/runtime-core/src/errorHandling.ts @@ -113,7 +113,9 @@ export function handleError( const errorCapturedHooks = cur.ec if (errorCapturedHooks) { for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo)) { + if ( + errorCapturedHooks[i](err, exposedInstance, errorInfo) === false + ) { return } } From f4119249f2d3f394469028ad9664f61830540ff9 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 5 Oct 2020 17:53:17 -0400 Subject: [PATCH 0008/4002] fix(compiler-core): consistently remove comment nodes for pre tags in production close #2217 --- .../compiler-core/__tests__/parse.spec.ts | 19 +++++ packages/compiler-core/src/parse.ts | 76 +++++++++---------- 2 files changed, 57 insertions(+), 38 deletions(-) diff --git a/packages/compiler-core/__tests__/parse.spec.ts b/packages/compiler-core/__tests__/parse.spec.ts index eabbbcaec24..b73609ee194 100644 --- a/packages/compiler-core/__tests__/parse.spec.ts +++ b/packages/compiler-core/__tests__/parse.spec.ts @@ -384,6 +384,25 @@ describe('compiler: parse', () => { expect(astNoComment.children).toHaveLength(0) expect(astWithComments.children).toHaveLength(1) }) + + // #2217 + test('comments in the
 tag should be removed in production mode', () => {
+      __DEV__ = false
+      const rawText = `

` + const ast = baseParse(`

${rawText}
`) + __DEV__ = true + + expect((ast.children[0] as ElementNode).children).toMatchObject([ + { + type: NodeTypes.ELEMENT, + tag: 'p' + }, + { + type: NodeTypes.ELEMENT, + tag: 'p' + } + ]) + }) }) describe('Element', () => { diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 60d6042713c..2d66e84ae5b 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -198,48 +198,48 @@ function parseChildren( // (same as v2 whitespace: 'condense') let removedWhitespace = false if (mode !== TextModes.RAWTEXT) { - if (!context.inPre) { - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i] - if (node.type === NodeTypes.TEXT) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1] - const next = nodes[i + 1] - // If: - // - the whitespace is the first or last node, or: - // - the whitespace is adjacent to a comment, or: - // - the whitespace is between two elements AND contains newline - // Then the whitespace is ignored. - if ( - !prev || - !next || - prev.type === NodeTypes.COMMENT || - next.type === NodeTypes.COMMENT || - (prev.type === NodeTypes.ELEMENT && - next.type === NodeTypes.ELEMENT && - /[\r\n]/.test(node.content)) - ) { - removedWhitespace = true - nodes[i] = null as any - } else { - // Otherwise, condensed consecutive whitespace inside the text - // down to a single space - node.content = ' ' - } + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i] + if (!context.inPre && node.type === NodeTypes.TEXT) { + if (!/[^\t\r\n\f ]/.test(node.content)) { + const prev = nodes[i - 1] + const next = nodes[i + 1] + // If: + // - the whitespace is the first or last node, or: + // - the whitespace is adjacent to a comment, or: + // - the whitespace is between two elements AND contains newline + // Then the whitespace is ignored. + if ( + !prev || + !next || + prev.type === NodeTypes.COMMENT || + next.type === NodeTypes.COMMENT || + (prev.type === NodeTypes.ELEMENT && + next.type === NodeTypes.ELEMENT && + /[\r\n]/.test(node.content)) + ) { + removedWhitespace = true + nodes[i] = null as any } else { - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' ') + // Otherwise, condensed consecutive whitespace inside the text + // down to a single space + node.content = ' ' } - } else if ( - !__DEV__ && - node.type === NodeTypes.COMMENT && - !context.options.comments - ) { - // remove comment nodes in prod by default - removedWhitespace = true - nodes[i] = null as any + } else { + node.content = node.content.replace(/[\t\r\n\f ]+/g, ' ') } } - } else if (parent && context.options.isPreTag(parent.tag)) { + // also remove comment nodes in prod by default + if ( + !__DEV__ && + node.type === NodeTypes.COMMENT && + !context.options.comments + ) { + removedWhitespace = true + nodes[i] = null as any + } + } + if (context.inPre && parent && context.options.isPreTag(parent.tag)) { // remove leading newline per html spec // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element const first = nodes[0] From 5c3e8e984029711c97ca671fa098cf66483dd571 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 5 Oct 2020 18:18:38 -0400 Subject: [PATCH 0009/4002] fix(runtime-core): ensure this context for $nextTick callback fix #2282 --- packages/runtime-core/__tests__/componentProxy.spec.ts | 7 ++++++- packages/runtime-core/src/componentPublicInstance.ts | 2 +- packages/runtime-core/src/scheduler.ts | 8 ++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/runtime-core/__tests__/componentProxy.spec.ts b/packages/runtime-core/__tests__/componentProxy.spec.ts index f37bfe3d9d8..4a4b56a8473 100644 --- a/packages/runtime-core/__tests__/componentProxy.spec.ts +++ b/packages/runtime-core/__tests__/componentProxy.spec.ts @@ -69,7 +69,7 @@ describe('component: proxy', () => { expect('count' in instanceProxy).toBe(false) }) - test('public properties', () => { + test('public properties', async () => { let instance: ComponentInternalInstance let instanceProxy: any const Comp = { @@ -96,6 +96,11 @@ describe('component: proxy', () => { expect(instanceProxy.$options).toBe(instance!.type) expect(() => (instanceProxy.$data = {})).toThrow(TypeError) expect(`Attempting to mutate public property "$data"`).toHaveBeenWarned() + + const nextTickThis = await instanceProxy.$nextTick(function(this: any) { + return this + }) + expect(nextTickThis).toBe(instanceProxy) }) test('user attached properties', async () => { diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index e0e239a7997..e45fd7755f4 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -213,7 +213,7 @@ const publicPropertiesMap: PublicPropertiesMap = extend(Object.create(null), { $emit: i => i.emit, $options: i => (__FEATURE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type), $forceUpdate: i => () => queueJob(i.update), - $nextTick: () => nextTick, + $nextTick: i => nextTick.bind(i.proxy!), $watch: i => (__FEATURE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP) } as PublicPropertiesMap) diff --git a/packages/runtime-core/src/scheduler.ts b/packages/runtime-core/src/scheduler.ts index 9c90f5c53b5..32fce93cc85 100644 --- a/packages/runtime-core/src/scheduler.ts +++ b/packages/runtime-core/src/scheduler.ts @@ -1,5 +1,6 @@ import { ErrorCodes, callWithErrorHandling } from './errorHandling' import { isArray } from '@vue/shared' +import { ComponentPublicInstance } from './componentPublicInstance' export interface SchedulerJob { (): void @@ -48,9 +49,12 @@ let currentPreFlushParentJob: SchedulerJob | null = null const RECURSION_LIMIT = 100 type CountMap = Map -export function nextTick(fn?: () => void): Promise { +export function nextTick( + this: ComponentPublicInstance | void, + fn?: () => void +): Promise { const p = currentFlushPromise || resolvedPromise - return fn ? p.then(fn) : p + return fn ? p.then(this ? fn.bind(this) : fn) : p } export function queueJob(job: SchedulerJob) { From cf2c9f6faa95add4c23b20c4b8a6e477d05ff0ed Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 6 Oct 2020 11:35:51 -0400 Subject: [PATCH 0010/4002] perf: do not enable hmr in non-browser envs --- packages/runtime-core/src/hmr.ts | 2 +- packages/runtime-core/src/renderer.ts | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/runtime-core/src/hmr.ts b/packages/runtime-core/src/hmr.ts index df557313565..faf4cb24e72 100644 --- a/packages/runtime-core/src/hmr.ts +++ b/packages/runtime-core/src/hmr.ts @@ -25,7 +25,7 @@ export interface HMRRuntime { // it easier to be used in toolings like vue-loader // Note: for a component to be eligible for HMR it also needs the __hmrId option // to be set so that its instances can be registered / removed. -if (__DEV__) { +if (__DEV__ && (__BROWSER__ || __TEST__)) { const globalObject: any = typeof global !== 'undefined' ? global diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 217e9a4c209..37f5a2ed7d3 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -885,7 +885,7 @@ function baseCreateRenderer( invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate') } - if (__DEV__ && isHmrUpdating) { + if (__DEV__ && (__BROWSER__ || __TEST__) && isHmrUpdating) { // HMR updated, force full diff patchFlag = 0 optimized = false @@ -986,7 +986,12 @@ function baseCreateRenderer( parentSuspense, areChildrenSVG ) - if (__DEV__ && parentComponent && parentComponent.type.__hmrId) { + if ( + __DEV__ && + (__BROWSER__ || __TEST__) && + parentComponent && + parentComponent.type.__hmrId + ) { traverseStaticChildren(n1, n2) } } else if (!optimized) { @@ -1238,7 +1243,7 @@ function baseCreateRenderer( parentSuspense )) - if (__DEV__ && instance.type.__hmrId) { + if (__DEV__ && (__BROWSER__ || __TEST__) && instance.type.__hmrId) { registerHMR(instance) } @@ -2109,7 +2114,7 @@ function baseCreateRenderer( parentSuspense: SuspenseBoundary | null, doRemove?: boolean ) => { - if (__DEV__ && instance.type.__hmrId) { + if (__DEV__ && (__BROWSER__ || __TEST__) && instance.type.__hmrId) { unregisterHMR(instance) } From a66e53a24f445b688eef6812ecb872dc53cf2702 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 6 Oct 2020 15:31:29 -0400 Subject: [PATCH 0011/4002] fix(runtime-core): fix SSR memoery leak due to props normalization cache fix #2225 The previous props/emits normlaization was caching normalized result per app instance, but during SSR there is a new app instance created for every request. The fix now de-opts props/emits normlaization caching when there are props/emits declared in global mixins - which is a very rare use case. --- packages/runtime-core/src/apiCreateApp.ts | 16 ++++++++++- packages/runtime-core/src/component.ts | 4 +-- packages/runtime-core/src/componentEmits.ts | 11 +++---- packages/runtime-core/src/componentProps.ts | 32 +++++++++------------ 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 2397cdf3379..bcb2fec1c32 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -74,7 +74,16 @@ export interface AppContext { components: Record directives: Record provides: Record - reload?: () => void // HMR only + /** + * Flag for de-optimizing props normalization + * @internal + */ + deopt?: boolean + /** + * HMR only + * @internal + */ + reload?: () => void } type PluginInstallFunction = (app: App, ...options: any[]) => any @@ -169,6 +178,11 @@ export function createAppAPI( if (__FEATURE_OPTIONS_API__) { if (!context.mixins.includes(mixin)) { context.mixins.push(mixin) + // global mixin with props/emits de-optimizes props/emits + // normalization caching. + if (mixin.props || mixin.emits) { + context.deopt = true + } } else if (__DEV__) { warn( 'Mixin has already been applied to target app' + diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 78abad60a8a..19035961c96 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -79,11 +79,11 @@ export interface ComponentInternalOptions { /** * @internal */ - __props?: Record + __props?: NormalizedPropsOptions /** * @internal */ - __emits?: Record + __emits?: ObjectEmitsOptions | null /** * @internal */ diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index daf82b71e30..ac37bc568d8 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -109,11 +109,8 @@ export function normalizeEmitsOptions( appContext: AppContext, asMixin = false ): ObjectEmitsOptions | null { - const appId = appContext.app ? appContext.app._uid : -1 - const cache = comp.__emits || (comp.__emits = {}) - const cached = cache[appId] - if (cached !== undefined) { - return cached + if (!appContext.deopt && comp.__emits !== undefined) { + return comp.__emits } const raw = comp.emits @@ -138,7 +135,7 @@ export function normalizeEmitsOptions( } if (!raw && !hasExtends) { - return (cache[appId] = null) + return (comp.__emits = null) } if (isArray(raw)) { @@ -146,7 +143,7 @@ export function normalizeEmitsOptions( } else { extend(normalized, raw) } - return (cache[appId] = normalized) + return (comp.__emits = normalized) } // Check if an incoming prop key is a declared emit event listener. diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index f977099d806..9fc2ac78b88 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -328,11 +328,8 @@ export function normalizePropsOptions( appContext: AppContext, asMixin = false ): NormalizedPropsOptions { - const appId = appContext.app ? appContext.app._uid : -1 - const cache = comp.__props || (comp.__props = {}) - const cached = cache[appId] - if (cached) { - return cached + if (!appContext.deopt && comp.__props) { + return comp.__props } const raw = comp.props @@ -360,7 +357,7 @@ export function normalizePropsOptions( } if (!raw && !hasExtends) { - return (cache[appId] = EMPTY_ARR) + return (comp.__props = EMPTY_ARR) } if (isArray(raw)) { @@ -398,7 +395,16 @@ export function normalizePropsOptions( } } - return (cache[appId] = [normalized, needCastKeys]) + return (comp.__props = [normalized, needCastKeys]) +} + +function validatePropName(key: string) { + if (key[0] !== '$') { + return true + } else if (__DEV__) { + warn(`Invalid prop name: "${key}" is a reserved property.`) + } + return false } // use function string name to check type constructors @@ -441,18 +447,6 @@ function validateProps(props: Data, instance: ComponentInternalInstance) { } } -/** - * dev only - */ -function validatePropName(key: string) { - if (key[0] !== '$') { - return true - } else if (__DEV__) { - warn(`Invalid prop name: "${key}" is a reserved property.`) - } - return false -} - /** * dev only */ From 390589ec6d977675c5cef2807fbf3e930a25eef0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 6 Oct 2020 18:16:20 -0400 Subject: [PATCH 0012/4002] fix(reactivity): should not trigger watch on computed ref when value is unchanged fix #2231 --- packages/reactivity/src/ref.ts | 10 +++++++--- .../runtime-core/__tests__/apiWatch.spec.ts | 20 ++++++++++++++++--- packages/runtime-core/src/apiWatch.ts | 7 ++++--- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 6596ecddb01..04464fdff43 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -7,13 +7,17 @@ import { CollectionTypes } from './collectionHandlers' declare const RefSymbol: unique symbol export interface Ref { + value: T /** * Type differentiator only. * We need this to be in public d.ts but don't want it to show up in IDE * autocomplete, so we use a private Symbol instead. */ [RefSymbol]: true - value: T + /** + * @internal + */ + _shallow?: boolean } export type ToRefs = { [K in keyof T]: Ref } @@ -49,7 +53,7 @@ class RefImpl { public readonly __v_isRef = true - constructor(private _rawValue: T, private readonly _shallow = false) { + constructor(private _rawValue: T, public readonly _shallow = false) { this._value = _shallow ? _rawValue : convert(_rawValue) } @@ -75,7 +79,7 @@ function createRef(rawValue: unknown, shallow = false) { } export function triggerRef(ref: Ref) { - trigger(ref, TriggerOpTypes.SET, 'value', __DEV__ ? ref.value : void 0) + trigger(toRaw(ref), TriggerOpTypes.SET, 'value', __DEV__ ? ref.value : void 0) } export function unref(ref: T): T extends Ref ? V : T { diff --git a/packages/runtime-core/__tests__/apiWatch.spec.ts b/packages/runtime-core/__tests__/apiWatch.spec.ts index 31bca6bed3f..c96db41fce4 100644 --- a/packages/runtime-core/__tests__/apiWatch.spec.ts +++ b/packages/runtime-core/__tests__/apiWatch.spec.ts @@ -13,7 +13,8 @@ import { DebuggerEvent, TrackOpTypes, TriggerOpTypes, - triggerRef + triggerRef, + shallowRef } from '@vue/reactivity' // reference: https://vue-composition-api-rfc.netlify.com/api.html#watch @@ -750,8 +751,8 @@ describe('api: watch', () => { expect(calls).toBe(1) }) - test('should force trigger on triggerRef when watching a ref', async () => { - const v = ref({ a: 1 }) + test('should force trigger on triggerRef when watching a shallow ref', async () => { + const v = shallowRef({ a: 1 }) let sideEffect = 0 watch(v, obj => { sideEffect = obj.a @@ -785,4 +786,17 @@ describe('api: watch', () => { await nextTick() expect(spy).toHaveBeenCalledTimes(1) }) + + // #2231 + test('computed refs should not trigger watch if value has no change', async () => { + const spy = jest.fn() + const source = ref(0) + const price = computed(() => source.value === 0) + watch(price, spy) + source.value++ + await nextTick() + source.value++ + await nextTick() + expect(spy).toHaveBeenCalledTimes(1) + }) }) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 14253a2a403..1e5a44f55ab 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -161,9 +161,10 @@ function doWatch( } let getter: () => any - const isRefSource = isRef(source) - if (isRefSource) { + let forceTrigger = false + if (isRef(source)) { getter = () => (source as Ref).value + forceTrigger = !!(source as Ref)._shallow } else if (isReactive(source)) { getter = () => source deep = true @@ -242,7 +243,7 @@ function doWatch( if (cb) { // watch(source, cb) const newValue = runner() - if (deep || isRefSource || hasChanged(newValue, oldValue)) { + if (deep || forceTrigger || hasChanged(newValue, oldValue)) { // cleanup before running cb again if (cleanup) { cleanup() From 62f26173ba715fd8bf2b131e19d94275106e830d Mon Sep 17 00:00:00 2001 From: shadowings-zy Date: Wed, 7 Oct 2020 06:28:56 +0800 Subject: [PATCH 0013/4002] fix(runtime-core): use consistent camelCase event casing for render functions (#2278) close #2249 --- packages/compiler-core/src/transforms/vOn.ts | 6 ++--- .../__tests__/componentEmits.spec.ts | 18 +++++++++++++ packages/runtime-core/src/componentEmits.ts | 25 ++++++++++++++++--- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/packages/compiler-core/src/transforms/vOn.ts b/packages/compiler-core/src/transforms/vOn.ts index 9bd5b2a46e0..31dd16a0bde 100644 --- a/packages/compiler-core/src/transforms/vOn.ts +++ b/packages/compiler-core/src/transforms/vOn.ts @@ -42,10 +42,8 @@ export const transformOn: DirectiveTransform = ( if (arg.type === NodeTypes.SIMPLE_EXPRESSION) { if (arg.isStatic) { const rawName = arg.content - // for @vnode-xxx event listeners, auto convert it to camelCase - const normalizedName = rawName.startsWith(`vnode`) - ? capitalize(camelize(rawName)) - : capitalize(rawName) + // for all event listeners, auto convert it to camelCase. See issue #2249 + const normalizedName = capitalize(camelize(rawName)) eventName = createSimpleExpression(`on${normalizedName}`, true, arg.loc) } else { eventName = createCompoundExpression([ diff --git a/packages/runtime-core/__tests__/componentEmits.spec.ts b/packages/runtime-core/__tests__/componentEmits.spec.ts index 973099545e0..317b36f8ccb 100644 --- a/packages/runtime-core/__tests__/componentEmits.spec.ts +++ b/packages/runtime-core/__tests__/componentEmits.spec.ts @@ -28,6 +28,24 @@ describe('component: emit', () => { expect(onBaz).toHaveBeenCalled() }) + test('trigger camelize event', () => { + const Foo = defineComponent({ + render() {}, + created() { + this.$emit('test-event') + } + }) + + const fooSpy = jest.fn() + const Comp = () => + h(Foo, { + onTestEvent: fooSpy + }) + render(h(Comp), nodeOps.createElement('div')) + + expect(fooSpy).toHaveBeenCalled() + }) + // for v-model:foo-bar usage in DOM templates test('trigger hyphenated events for update:xxx events', () => { const Foo = defineComponent({ diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index ac37bc568d8..d8578589c4e 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -6,12 +6,14 @@ import { capitalize, hyphenate, isFunction, - extend + extend, + camelize } from '@vue/shared' import { ComponentInternalInstance, ComponentOptions, - ConcreteComponent + ConcreteComponent, + formatComponentName } from './component' import { callWithAsyncErrorHandling, ErrorCodes } from './errorHandling' import { warn } from './warning' @@ -78,7 +80,24 @@ export function emit( devtoolsComponentEmit(instance, event, args) } - let handlerName = `on${capitalize(event)}` + if (__DEV__) { + const lowerCaseEvent = event.toLowerCase() + if (lowerCaseEvent !== event && props[`on` + capitalize(lowerCaseEvent)]) { + warn( + `Event "${lowerCaseEvent}" is emitted in component ` + + `${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". ` + + `Note that HTML attributes are case-insensitive and you cannot use ` + + `v-on to listen to camelCase events when using in-DOM templates. ` + + `You should probably use "${hyphenate(event)}" instead of "${event}".` + ) + } + } + + // convert handler name to camelCase. See issue #2249 + let handlerName = `on${capitalize(camelize(event))}` let handler = props[handlerName] // for v-model update:xxx events, also trigger kebab-case equivalent // for props passed via kebab-case From f9566f00df536b8743ab45e74eddbe65968e689c Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 6 Oct 2020 18:31:04 -0400 Subject: [PATCH 0014/4002] test(compiler-core): add test case for v-on event case conversion --- .../__tests__/transforms/vOn.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/compiler-core/__tests__/transforms/vOn.spec.ts b/packages/compiler-core/__tests__/transforms/vOn.spec.ts index 19c44c3daee..4f7cd6c17c4 100644 --- a/packages/compiler-core/__tests__/transforms/vOn.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vOn.spec.ts @@ -406,6 +406,22 @@ describe('compiler: transform v-on', () => { expect(onError).not.toHaveBeenCalled() }) + test('case conversion for kebab-case events', () => { + const { node } = parseWithVOn(`
`) + expect((node.codegenNode as VNodeCall).props).toMatchObject({ + properties: [ + { + key: { + content: `onFooBar` + }, + value: { + content: `onMount` + } + } + ] + }) + }) + test('case conversion for vnode hooks', () => { const { node } = parseWithVOn(`
`) expect((node.codegenNode as VNodeCall).props).toMatchObject({ From 1902af319aea0b98442d6cf1ac186ac29037d491 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2020 02:59:59 +0000 Subject: [PATCH 0015/4002] build(deps-dev): bump @typescript-eslint/parser from 4.3.0 to 4.4.0 (#2317) --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index c201bba62e1..b6a2b8e9501 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,35 +955,35 @@ "@types/yargs-parser" "*" "@typescript-eslint/parser@^4.1.1": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.3.0.tgz#684fc0be6551a2bfcb253991eec3c786a8c063a3" - integrity sha512-JyfRnd72qRuUwItDZ00JNowsSlpQGeKfl9jxwO0FHK1qQ7FbYdoy5S7P+5wh1ISkT2QyAvr2pc9dAemDxzt75g== + version "4.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.4.0.tgz#65974db9a75f23b036f17b37e959b5f99b659ec0" + integrity sha512-yc14iEItCxoGb7W4Nx30FlTyGpU9r+j+n1LUK/exlq2eJeFxczrz/xFRZUk2f6yzWfK+pr1DOTyQnmDkcC4TnA== dependencies: - "@typescript-eslint/scope-manager" "4.3.0" - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/typescript-estree" "4.3.0" + "@typescript-eslint/scope-manager" "4.4.0" + "@typescript-eslint/types" "4.4.0" + "@typescript-eslint/typescript-estree" "4.4.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz#c743227e087545968080d2362cfb1273842cb6a7" - integrity sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig== +"@typescript-eslint/scope-manager@4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.4.0.tgz#2f3dd27692a12cc9a046a90ba6a9d8cb7731190a" + integrity sha512-r2FIeeU1lmW4K3CxgOAt8djI5c6Q/5ULAgdVo9AF3hPMpu0B14WznBAtxrmB/qFVbVIB6fSx2a+EVXuhSVMEyA== dependencies: - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/visitor-keys" "4.3.0" + "@typescript-eslint/types" "4.4.0" + "@typescript-eslint/visitor-keys" "4.4.0" -"@typescript-eslint/types@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.3.0.tgz#1f0b2d5e140543e2614f06d48fb3ae95193c6ddf" - integrity sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw== +"@typescript-eslint/types@4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.0.tgz#63440ef87a54da7399a13bdd4b82060776e9e621" + integrity sha512-nU0VUpzanFw3jjX+50OTQy6MehVvf8pkqFcURPAE06xFNFenMj1GPEI6IESvp7UOHAnq+n/brMirZdR+7rCrlA== -"@typescript-eslint/typescript-estree@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz#0edc1068e6b2e4c7fdc54d61e329fce76241cee8" - integrity sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw== +"@typescript-eslint/typescript-estree@4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.0.tgz#16a2df7c16710ddd5406b32b86b9c1124b1ca526" + integrity sha512-Fh85feshKXwki4nZ1uhCJHmqKJqCMba+8ZicQIhNi5d5jSQFteWiGeF96DTjO8br7fn+prTP+t3Cz/a/3yOKqw== dependencies: - "@typescript-eslint/types" "4.3.0" - "@typescript-eslint/visitor-keys" "4.3.0" + "@typescript-eslint/types" "4.4.0" + "@typescript-eslint/visitor-keys" "4.4.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -991,12 +991,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz#0e5ab0a09552903edeae205982e8521e17635ae0" - integrity sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw== +"@typescript-eslint/visitor-keys@4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.0.tgz#0a9118344082f14c0f051342a74b42dfdb012640" + integrity sha512-oBWeroUZCVsHLiWRdcTXJB7s1nB3taFY8WGvS23tiAlT6jXVvsdAV4rs581bgdEjOhn43q6ro7NkOiLKu6kFqA== dependencies: - "@typescript-eslint/types" "4.3.0" + "@typescript-eslint/types" "4.4.0" eslint-visitor-keys "^2.0.0" "@zeit/schemas@2.6.0": From f09e1845268fd24f9fe3ef4a45c94285033ad321 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2020 03:01:56 +0000 Subject: [PATCH 0016/4002] build(deps-dev): bump jest from 26.5.0 to 26.5.2 (#2318) --- yarn.lock | 658 +++++++++++++++++++++++++++--------------------------- 1 file changed, 329 insertions(+), 329 deletions(-) diff --git a/yarn.lock b/yarn.lock index b6a2b8e9501..8a731a5e326 100644 --- a/yarn.lock +++ b/yarn.lock @@ -400,93 +400,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.5.0.tgz#89a1c5ae8329907fda842ebc5b475d5c9f935766" - integrity sha512-oh59scth4yf8XUgMJb8ruY7BHm0X5JZDNgGGsVnlOt2XQuq9s2NMllIrN4n70Yds+++bjrTGZ9EoOKraaPKPlg== +"@jest/console@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.5.2.tgz#94fc4865b1abed7c352b5e21e6c57be4b95604a6" + integrity sha512-lJELzKINpF1v74DXHbCRIkQ/+nUV1M+ntj+X1J8LxCgpmJZjfLmhFejiMSbjjD66fayxl5Z06tbs3HMyuik6rw== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.5.0" - jest-util "^26.5.0" + jest-message-util "^26.5.2" + jest-util "^26.5.2" slash "^3.0.0" -"@jest/core@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.5.0.tgz#32d7caf46a49d4a14cbbd3a2eb3ef39f149e984d" - integrity sha512-hDtgfzYxnrQn54+0JlbqpXM4+bqDfK0ooMlNE4Nn3VBsB4RbmytAn4/kVVIcMa+aYwRr/fwzWuGJwBETVg1sDw== - dependencies: - "@jest/console" "^26.5.0" - "@jest/reporters" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/transform" "^26.5.0" - "@jest/types" "^26.5.0" +"@jest/core@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.5.2.tgz#e39f14676f4ba4632ecabfdc374071ab22131f22" + integrity sha512-LLTo1LQMg7eJjG/+P1NYqFof2B25EV1EqzD5FonklihG4UJKiK2JBIvWonunws6W7e+DhNLoFD+g05tCY03eyA== + dependencies: + "@jest/console" "^26.5.2" + "@jest/reporters" "^26.5.2" + "@jest/test-result" "^26.5.2" + "@jest/transform" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.5.0" - jest-config "^26.5.0" - jest-haste-map "^26.5.0" - jest-message-util "^26.5.0" + jest-changed-files "^26.5.2" + jest-config "^26.5.2" + jest-haste-map "^26.5.2" + jest-message-util "^26.5.2" jest-regex-util "^26.0.0" - jest-resolve "^26.5.0" - jest-resolve-dependencies "^26.5.0" - jest-runner "^26.5.0" - jest-runtime "^26.5.0" - jest-snapshot "^26.5.0" - jest-util "^26.5.0" - jest-validate "^26.5.0" - jest-watcher "^26.5.0" + jest-resolve "^26.5.2" + jest-resolve-dependencies "^26.5.2" + jest-runner "^26.5.2" + jest-runtime "^26.5.2" + jest-snapshot "^26.5.2" + jest-util "^26.5.2" + jest-validate "^26.5.2" + jest-watcher "^26.5.2" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.5.0.tgz#4381b6b2fc291dcff51e248780196bc035da7190" - integrity sha512-0F3G9EyZU2NAP0/c/5EqVx4DmldQtRxj0gMl3p3ciSCdyMiCyDmpdE7O0mKTSiFDyl1kU4TfgEVf0r0vMkmYcw== +"@jest/environment@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.5.2.tgz#eba3cfc698f6e03739628f699c28e8a07f5e65fe" + integrity sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw== dependencies: - "@jest/fake-timers" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/fake-timers" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" - jest-mock "^26.5.0" + jest-mock "^26.5.2" -"@jest/fake-timers@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.5.0.tgz#107ceeb580bc42dd6e0843df5bbc92cb4fe9cb00" - integrity sha512-sQK6xUembaZ0qLnZpSjJJuJiKvyrjCJhaYjbmatFpj5+cM8h2D7YEkeEBC26BMzvF1O3tNM9OL7roqyBmom0KA== +"@jest/fake-timers@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.5.2.tgz#1291ac81680ceb0dc7daa1f92c059307eea6400a" + integrity sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.5.0" - jest-mock "^26.5.0" - jest-util "^26.5.0" + jest-message-util "^26.5.2" + jest-mock "^26.5.2" + jest-util "^26.5.2" -"@jest/globals@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.5.0.tgz#b9b7d05ee6722c894ce67aff216ed6b04d3fe187" - integrity sha512-TCKx3XWR9h/yyhQbz0C1sXkK2e8WJOnkP40T9bewNpf2Ahr1UEyKXnCoQO0JCpXFkWGTXBNo1QAgTQ3+LhXfcA== +"@jest/globals@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.5.2.tgz#c333f82c29e19ecb609a75d1a532915a5c956c59" + integrity sha512-9PmnFsAUJxpPt1s/stq02acS1YHliVBDNfAWMe1bwdRr1iTCfhbNt3ERQXrO/ZfZSweftoA26Q/2yhSVSWQ3sw== dependencies: - "@jest/environment" "^26.5.0" - "@jest/types" "^26.5.0" - expect "^26.5.0" + "@jest/environment" "^26.5.2" + "@jest/types" "^26.5.2" + expect "^26.5.2" -"@jest/reporters@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.5.0.tgz#07c7742993db9d680bcc6cda58106e8d283d2111" - integrity sha512-lUl5bbTHflDO9dQa85ZTHasPBVsyC48t9sg/VN2wC3OJryclFNqN4Xfo2FgnNl/pzCnzO2MVgMyIij5aNkod2w== +"@jest/reporters@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.5.2.tgz#0f1c900c6af712b46853d9d486c9c0382e4050f6" + integrity sha512-zvq6Wvy6MmJq/0QY0YfOPb49CXKSf42wkJbrBPkeypVa8I+XDxijvFuywo6TJBX/ILPrdrlE/FW9vJZh6Rf9vA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/transform" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/console" "^26.5.2" + "@jest/test-result" "^26.5.2" + "@jest/transform" "^26.5.2" + "@jest/types" "^26.5.2" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -497,9 +497,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.5.0" - jest-resolve "^26.5.0" - jest-util "^26.5.0" + jest-haste-map "^26.5.2" + jest-resolve "^26.5.2" + jest-util "^26.5.2" jest-worker "^26.5.0" slash "^3.0.0" source-map "^0.6.0" @@ -518,42 +518,42 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.5.0.tgz#d5bdf2eaf12ceddd359c2506fe806afafecc9a9e" - integrity sha512-CaVXxDQi31LPOsz5/+iajNHQlA1Je/jQ8uYH/lCa6Y/UrkO+sDHeEH3x/inbx06PctVDnTwIlCcBvNNbC4FCvQ== +"@jest/test-result@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.5.2.tgz#cc1a44cfd4db2ecee3fb0bc4e9fe087aa54b5230" + integrity sha512-E/Zp6LURJEGSCWpoMGmCFuuEI1OWuI3hmZwmULV0GsgJBh7u0rwqioxhRU95euUuviqBDN8ruX/vP/4bwYolXw== dependencies: - "@jest/console" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/console" "^26.5.2" + "@jest/types" "^26.5.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.5.0.tgz#617808a1fa869c5181e43a5b841db084746b667e" - integrity sha512-23oofRXqPEy37HyHWIYf7lzzOqtGBkai5erZiL6RgxlyXE7a0lCihf6b5DfAvcD3yUtbXmh3EzpjJDVH57zQrg== +"@jest/test-sequencer@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.5.2.tgz#c4559c7e134b27b020317303ee5399bf62917a4b" + integrity sha512-XmGEh7hh07H2B8mHLFCIgr7gA5Y6Hw1ZATIsbz2fOhpnQ5AnQtZk0gmP0Q5/+mVB2xygO64tVFQxOajzoptkNA== dependencies: - "@jest/test-result" "^26.5.0" + "@jest/test-result" "^26.5.2" graceful-fs "^4.2.4" - jest-haste-map "^26.5.0" - jest-runner "^26.5.0" - jest-runtime "^26.5.0" + jest-haste-map "^26.5.2" + jest-runner "^26.5.2" + jest-runtime "^26.5.2" -"@jest/transform@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.5.0.tgz#16404eaddf6034fe713da37b236756fc6b956db0" - integrity sha512-Kt4WciOruTyTkJ2DZ+xtZiejRj3v22BrXCYZoGRbI0N6Q6tt2HdsWrrEtn6nlK24QWKC389xKkVk4Xr2gWBZQA== +"@jest/transform@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.5.2.tgz#6a0033a1d24316a1c75184d010d864f2c681bef5" + integrity sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.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.2.4" - jest-haste-map "^26.5.0" + jest-haste-map "^26.5.2" jest-regex-util "^26.0.0" - jest-util "^26.5.0" + jest-util "^26.5.2" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -581,10 +581,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.5.0.tgz#163f6e00c5ac9bb6fc91c3802eaa9d0dd6e1474a" - integrity sha512-nH9DFLqaIhB+RVgjivemvMiFSWw/BKwbZGxBAMv8CCTvUyFoK8RwHhAlmlXIvMBrf5Z3YQ4p9cq3Qh9EDctGvA== +"@jest/types@^26.5.2": + version "26.5.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.5.2.tgz#44c24f30c8ee6c7f492ead9ec3f3c62a5289756d" + integrity sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1327,13 +1327,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-jest@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.5.0.tgz#afe11a083b4e584f63e9de29d2075cb96f42d2a4" - integrity sha512-Cy16ZJrds81C+JASaOIGNlpCeqW3PTOq36owv+Zzwde5NiWz+zNduwxUNF57vxc/3SnIWo8HHqTczhN8GLoXTw== +babel-jest@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.5.2.tgz#164f367a35946c6cf54eaccde8762dec50422250" + integrity sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A== dependencies: - "@jest/transform" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/transform" "^26.5.2" + "@jest/types" "^26.5.2" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^26.5.0" @@ -1862,14 +1862,14 @@ cliui@^2.1.0: right-align "^0.1.1" wordwrap "0.0.2" -cliui@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.1.tgz#a4cb67aad45cd83d8d05128fc9f4d8fbb887e6b3" - integrity sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ== +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" + wrap-ansi "^6.2.0" clone@~0.1.9: version "0.1.19" @@ -2622,11 +2622,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escalade@^3.0.2, escalade@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e" - integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2875,16 +2870,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.5.0.tgz#089c0cc4d6c545c7388ddefffa0f1e2e8e38d282" - integrity sha512-oIOy3mHWjnF5ZICuaui5kdtJZQ+D7XHWyUQDxk1WhIRCkcIYc24X23bOfikgCNU6i9wcSqLQhwPOqeRp09naxg== +expect@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.5.2.tgz#3e0631c4a657a83dbec769ad246a2998953a55a6" + integrity sha512-ccTGrXZd8DZCcvCz4htGXTkd/LOoy6OEtiDS38x3/VVf6E4AQL0QoeksBiw7BtGR5xDNiRYPB8GN6pfbuTOi7w== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.5.0" - jest-message-util "^26.5.0" + jest-matcher-utils "^26.5.2" + jest-message-util "^26.5.2" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -3176,7 +3171,7 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -get-caller-file@^2.0.5: +get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -3972,57 +3967,57 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.5.0.tgz#181b901368decb4fc21d3cace9b4c4819232b667" - integrity sha512-RAHoXqxa7gO1rZz88qpsLpzJ2mQU12UaFWadacKHuMbBZwFK+yl0j9YoD9Y/wBpv1ILG2SdCuxFHggX+9VU7qA== +jest-changed-files@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.5.2.tgz#330232c6a5c09a7f040a5870e8f0a9c6abcdbed5" + integrity sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.5.0.tgz#4404fb5cbdfb250946160374d5e3fc9655f9b57f" - integrity sha512-bI0h6GQGbyN0SSZu3nPilwrkrZ8dBC93erwTiEoJ+kGjtNuXsB183hTZ0HCiHLzf88oE0SQB1hYp8RgyytH+Bg== +jest-cli@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.5.2.tgz#0df114399b4036a3f046f0a9f25c50372c76b3a2" + integrity sha512-usm48COuUvRp8YEG5OWOaxbSM0my7eHn3QeBWxiGUuFhvkGVBvl1fic4UjC02EAEQtDv8KrNQUXdQTV6ZZBsoA== dependencies: - "@jest/core" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/core" "^26.5.2" + "@jest/test-result" "^26.5.2" + "@jest/types" "^26.5.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.5.0" - jest-util "^26.5.0" - jest-validate "^26.5.0" + jest-config "^26.5.2" + jest-util "^26.5.2" + jest-validate "^26.5.2" prompts "^2.0.1" - yargs "^16.0.3" + yargs "^15.4.1" -jest-config@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.5.0.tgz#3959e47223496e2ae2605e073578a359cab99445" - integrity sha512-OM6eXIEmQXAuonCk8aNPMRjPFcKWa3IIoSlq5BPgIflmQBzM/COcI7XsWSIEPWPa9WcYTJBWj8kNqEYjczmIFw== +jest-config@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.5.2.tgz#6e828e25f10124433dd008fbd83348636de0972a" + integrity sha512-dqJOnSegNdE5yDiuGHsjTM5gec7Z4AcAMHiW+YscbOYJAlb3LEtDSobXCq0or9EmGQI5SFmKy4T7P1FxetJOfg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.5.0" - "@jest/types" "^26.5.0" - babel-jest "^26.5.0" + "@jest/test-sequencer" "^26.5.2" + "@jest/types" "^26.5.2" + babel-jest "^26.5.2" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.5.0" - jest-environment-node "^26.5.0" + jest-environment-jsdom "^26.5.2" + jest-environment-node "^26.5.2" jest-get-type "^26.3.0" - jest-jasmine2 "^26.5.0" + jest-jasmine2 "^26.5.2" jest-regex-util "^26.0.0" - jest-resolve "^26.5.0" - jest-util "^26.5.0" - jest-validate "^26.5.0" + jest-resolve "^26.5.2" + jest-util "^26.5.2" + jest-validate "^26.5.2" micromatch "^4.0.2" - pretty-format "^26.5.0" + pretty-format "^26.5.2" jest-diff@^25.2.1: version "25.5.0" @@ -4034,15 +4029,15 @@ jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.5.0.tgz#bd01cef2d00b2668a0207ef47ab8eb1e33613253" - integrity sha512-CmDMMPkVMxrrh0Dv/4M9kh1tsYsZnYTQMMTvIFpePBSk9wMVfcyfg30TCq+oR9AzGbw8vsI50Gk1HmlMMlhoJg== +jest-diff@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.5.2.tgz#8e26cb32dc598e8b8a1b9deff55316f8313c8053" + integrity sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA== dependencies: chalk "^4.0.0" diff-sequences "^26.5.0" jest-get-type "^26.3.0" - pretty-format "^26.5.0" + pretty-format "^26.5.2" jest-docblock@^26.0.0: version "26.0.0" @@ -4051,41 +4046,41 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.5.0.tgz#39197a9d1abdd32ff5b8a9931507ab117c551c02" - integrity sha512-+oO3ykDgypHSyyK2xOsh8XDUwMtg3HoJ4wMNFNHxhcACFbUgaCOfLy+eTCn5pIKhtigU3BmkYt7k3MtTb5pJOQ== +jest-each@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.5.2.tgz#35e68d6906a7f826d3ca5803cfe91d17a5a34c31" + integrity sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.5.0" - pretty-format "^26.5.0" + jest-util "^26.5.2" + pretty-format "^26.5.2" -jest-environment-jsdom@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.5.0.tgz#f9a6726402fde787632a69df5ff3390ab04337a3" - integrity sha512-Xuqh3bx8egymaJR566ECkiztIIVOIWWPGIxo++ziWyCOqQChUguRCH1hRXBbfINPbb/SRFe7GCD+SunaUgTmCw== +jest-environment-jsdom@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz#5feab05b828fd3e4b96bee5e0493464ddd2bb4bc" + integrity sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw== dependencies: - "@jest/environment" "^26.5.0" - "@jest/fake-timers" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/environment" "^26.5.2" + "@jest/fake-timers" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" - jest-mock "^26.5.0" - jest-util "^26.5.0" + jest-mock "^26.5.2" + jest-util "^26.5.2" jsdom "^16.4.0" -jest-environment-node@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.5.0.tgz#3f49ba40abe87209df96f7991015cac996e04563" - integrity sha512-LaYl/ek5mb1VDP1/+jMH2N1Ec4fFUhSYmc8EZqigBgMov/2US8U5l7D3IlOf78e+wARUxPxUpTcybVVzAOu3jg== +jest-environment-node@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.5.2.tgz#275a0f01b5e47447056f1541a15ed4da14acca03" + integrity sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA== dependencies: - "@jest/environment" "^26.5.0" - "@jest/fake-timers" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/environment" "^26.5.2" + "@jest/fake-timers" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" - jest-mock "^26.5.0" - jest-util "^26.5.0" + jest-mock "^26.5.2" + jest-util "^26.5.2" jest-get-type@^25.2.6: version "25.2.6" @@ -4097,12 +4092,12 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.5.0.tgz#ba4c48dbf69e0529709bd0d76660d87eefce820a" - integrity sha512-AjB1b53uqN7Cf2VN80x0wJajVZ+BMZC+G2CmWoG143faaMw7IhIcs3FTPuSgOx7cn3/bag7lgCq93naAvLO6EQ== +jest-haste-map@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.5.2.tgz#a15008abfc502c18aa56e4919ed8c96304ceb23d" + integrity sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -4110,7 +4105,7 @@ jest-haste-map@^26.5.0: graceful-fs "^4.2.4" jest-regex-util "^26.0.0" jest-serializer "^26.5.0" - jest-util "^26.5.0" + jest-util "^26.5.2" jest-worker "^26.5.0" micromatch "^4.0.2" sane "^4.0.3" @@ -4118,55 +4113,55 @@ jest-haste-map@^26.5.0: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.5.0.tgz#49d57db63f49a183813263b41e61e2a5f988e6a3" - integrity sha512-NOA6PLORHTRTROOp5VysKCUVpFAjMMXUS1Xw7FvTMeYK5Ewx4rpxhFqiJ7JT4pENap9g9OuXo4cWR/MwCDTEeQ== +jest-jasmine2@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.5.2.tgz#0e33819d31b1f2aab5efd1e02ce502209c0e64a2" + integrity sha512-2J+GYcgLVPTkpmvHEj0/IDTIAuyblGNGlyGe4fLfDT2aktEPBYvoxUwFiOmDDxxzuuEAD2uxcYXr0+1Yw4tjFA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.5.0" + "@jest/environment" "^26.5.2" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/test-result" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.5.0" + expect "^26.5.2" is-generator-fn "^2.0.0" - jest-each "^26.5.0" - jest-matcher-utils "^26.5.0" - jest-message-util "^26.5.0" - jest-runtime "^26.5.0" - jest-snapshot "^26.5.0" - jest-util "^26.5.0" - pretty-format "^26.5.0" + jest-each "^26.5.2" + jest-matcher-utils "^26.5.2" + jest-message-util "^26.5.2" + jest-runtime "^26.5.2" + jest-snapshot "^26.5.2" + jest-util "^26.5.2" + pretty-format "^26.5.2" throat "^5.0.0" -jest-leak-detector@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.5.0.tgz#a5671ffbc6308e45ad31b42cb2ef0722488a4e57" - integrity sha512-xZHvvTBbj3gUTtunLjPqP594BT6IUEpwA0AQpEQjVR8eBq8+R3qgU/KhoAcVcV0iqRM6pXtX7hKPZ5mLdynVSQ== +jest-leak-detector@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz#83fcf9a4a6ef157549552cb4f32ca1d6221eea69" + integrity sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.5.0" + pretty-format "^26.5.2" -jest-matcher-utils@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.5.0.tgz#1195d6a35c4c710ad286b775b966f3fdb7a2102d" - integrity sha512-QgbbxqFT8wiTi4o/7MWj2vHlcmMjACG8vnJ9pJ7svVDmkzEnTUGdHXWLKB1aZhbnyXetMNRF+TSMcDS9aGfuzA== +jest-matcher-utils@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz#6aa2c76ce8b9c33e66f8856ff3a52bab59e6c85a" + integrity sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA== dependencies: chalk "^4.0.0" - jest-diff "^26.5.0" + jest-diff "^26.5.2" jest-get-type "^26.3.0" - pretty-format "^26.5.0" + pretty-format "^26.5.2" -jest-message-util@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.5.0.tgz#87f8c440dace55095d247442638c70b892836895" - integrity sha512-UEOqdoTfX0AFyReL4q5N3CfDBWt+AtQzeszZuuGapU39vwEk90rTSBghCA/3FFEZzvGfH2LE4+0NaBI81Cu2Ow== +jest-message-util@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.5.2.tgz#6c4c4c46dcfbabb47cd1ba2f6351559729bc11bb" + integrity sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -4174,12 +4169,12 @@ jest-message-util@^26.5.0: slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.5.0.tgz#56efcea2dfd550b77ceb5ef280cf8c6114ef32db" - integrity sha512-8D1UmbnmjdkvTdYygTW26KZr95Aw0/3gEmMZQWkxIEAgEESVDbwDG8ygRlXSY214x9hFjtKezvfQUp36Ogl75w== +jest-mock@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.5.2.tgz#c9302e8ef807f2bfc749ee52e65ad11166a1b6a1" + integrity sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4192,86 +4187,86 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.0.tgz#6c4a863685e6c63b225e903c6006a70fb8ecac0a" - integrity sha512-2e3YdS+dlTY00s0CEiMAa7Ap/mPfPaQV7d6Fzp7BQqHXO/2QhXn/yVTxnxR+dOIo/NOh7pqXZTQSn+2iWwPQQA== +jest-resolve-dependencies@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.2.tgz#ee30b7cfea81c81bf5e195a9287d7ec07f893170" + integrity sha512-LLkc8LuRtxqOx0AtX/Npa2C4I23WcIrwUgNtHYXg4owYF/ZDQShcwBAHjYZIFR06+HpQcZ43+kCTMlQ3aDCYTg== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" jest-regex-util "^26.0.0" - jest-snapshot "^26.5.0" + jest-snapshot "^26.5.2" -jest-resolve@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.5.0.tgz#31f68344dd88af70f00bc8bb531de6687565c680" - integrity sha512-c34L8Lrw4fFzRiCLzwePziKRfHitjsAnY15ID0e9Se4ISikmZ5T9icLEFAGHnfaxfb+9r8EKdrbg89gjRdrQvw== +jest-resolve@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.5.2.tgz#0d719144f61944a428657b755a0e5c6af4fc8602" + integrity sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" chalk "^4.0.0" - escalade "^3.1.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.5.0" + jest-util "^26.5.2" + read-pkg-up "^7.0.1" resolve "^1.17.0" slash "^3.0.0" -jest-runner@^26.5.0: - version "26.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.5.1.tgz#a56c1e1fbed7470ae69ebd5456ba4d4443c8701f" - integrity sha512-gFHXehvMZD8qwNzaIl2MDFFI99m4kKk06H2xh2u4IkC+tHYIJjE5J175l9cbL3RuU2slfS2m57KZgcPZfbTavQ== +jest-runner@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.5.2.tgz#4f9e6b0bb7eb4710c209a9e145b8a10894f4c19f" + integrity sha512-GKhYxtSX5+tXZsd2QwfkDqPIj5C2HqOdXLRc2x2qYqWE26OJh17xo58/fN/mLhRkO4y6o60ZVloan7Kk5YA6hg== dependencies: - "@jest/console" "^26.5.0" - "@jest/environment" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/console" "^26.5.2" + "@jest/environment" "^26.5.2" + "@jest/test-result" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.5.0" + jest-config "^26.5.2" jest-docblock "^26.0.0" - jest-haste-map "^26.5.0" - jest-leak-detector "^26.5.0" - jest-message-util "^26.5.0" - jest-resolve "^26.5.0" - jest-runtime "^26.5.0" - jest-util "^26.5.0" + jest-haste-map "^26.5.2" + jest-leak-detector "^26.5.2" + jest-message-util "^26.5.2" + jest-resolve "^26.5.2" + jest-runtime "^26.5.2" + jest-util "^26.5.2" jest-worker "^26.5.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.5.0.tgz#c9b3eeb5ead70710ea17f6058df405cac31bb926" - integrity sha512-CujjQWpMcsvSg0L+G3iEz6s7Th5IbiZseAaw/5R7Eb+IfnJdyPdjJ+EoXNV8n07snvW5nZTwV9QIfy6Vjris8A== +jest-runtime@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.5.2.tgz#b72f5f79eb2fe0c46bfef4cdb9c1e01d1c69ba41" + integrity sha512-zArr4DatX/Sn0wswX/AnAuJgmwgAR5rNtrUz36HR8BfMuysHYNq5sDbYHuLC4ICyRdy5ae/KQ+sczxyS9G6Qvw== dependencies: - "@jest/console" "^26.5.0" - "@jest/environment" "^26.5.0" - "@jest/fake-timers" "^26.5.0" - "@jest/globals" "^26.5.0" + "@jest/console" "^26.5.2" + "@jest/environment" "^26.5.2" + "@jest/fake-timers" "^26.5.2" + "@jest/globals" "^26.5.2" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.0" - "@jest/transform" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/test-result" "^26.5.2" + "@jest/transform" "^26.5.2" + "@jest/types" "^26.5.2" "@types/yargs" "^15.0.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.5.0" - jest-haste-map "^26.5.0" - jest-message-util "^26.5.0" - jest-mock "^26.5.0" + jest-config "^26.5.2" + jest-haste-map "^26.5.2" + jest-message-util "^26.5.2" + jest-mock "^26.5.2" jest-regex-util "^26.0.0" - jest-resolve "^26.5.0" - jest-snapshot "^26.5.0" - jest-util "^26.5.0" - jest-validate "^26.5.0" + jest-resolve "^26.5.2" + jest-snapshot "^26.5.2" + jest-util "^26.5.2" + jest-validate "^26.5.2" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^16.0.3" + yargs "^15.4.1" jest-serializer@^26.5.0: version "26.5.0" @@ -4281,26 +4276,26 @@ jest-serializer@^26.5.0: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.5.0.tgz#2b76366e2d621775f39733e5764492b2e44b0bcd" - integrity sha512-WTNJef67o7cCvwAe5foVCNqG3MzIW/CyU4FZvMrhBPZsJeXwfBY7kfOlydZigxtcytnvmNE2pqznOfD5EcQgrQ== +jest-snapshot@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.5.2.tgz#0cf7642eaf8e8d2736bd443f619959bf237f9ccf" + integrity sha512-MkXIDvEefzDubI/WaDVSRH4xnkuirP/Pz8LhAIDXcVQTmcEfwxywj5LGwBmhz+kAAIldA7XM4l96vbpzltSjqg== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.5.0" + expect "^26.5.2" graceful-fs "^4.2.4" - jest-diff "^26.5.0" + jest-diff "^26.5.2" jest-get-type "^26.3.0" - jest-haste-map "^26.5.0" - jest-matcher-utils "^26.5.0" - jest-message-util "^26.5.0" - jest-resolve "^26.5.0" + jest-haste-map "^26.5.2" + jest-matcher-utils "^26.5.2" + jest-message-util "^26.5.2" + jest-resolve "^26.5.2" natural-compare "^1.4.0" - pretty-format "^26.5.0" + pretty-format "^26.5.2" semver "^7.3.2" jest-util@^26.1.0: @@ -4315,41 +4310,41 @@ jest-util@^26.1.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-util@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.5.0.tgz#f4e0fb80cf82db127d68c7c5b2749a427a80b450" - integrity sha512-CSQ0uzE7JdHDCQo3K8jlyWRIF2xNLdpu9nbjo8okGDanaNsF7WonhusFvjOg7QiWn1SThe7wFRh8Jx2ls1Gx4Q== +jest-util@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.5.2.tgz#8403f75677902cc52a1b2140f568e91f8ed4f4d7" + integrity sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.5.0.tgz#6e417ec5066e315752da1350797a89fc5907f97a" - integrity sha512-603+CHUJD4nAZ+tY/A+wu3g8KEcBey2a7YOMU9W8e4u7mCezhaDasw20ITaZHoR2R2MZhThL6jApPSj0GvezrQ== +jest-validate@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.5.2.tgz#7ea266700b64234cd1c0cee982490c5a80e9b0f0" + integrity sha512-FmJks0zY36mp6Af/5sqO6CTL9bNMU45yKCJk3hrz8d2aIqQIlN1pr9HPIwZE8blLaewOla134nt5+xAmWsx3SQ== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.5.0" + pretty-format "^26.5.2" -jest-watcher@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.5.0.tgz#3aedd339ee3dfb5801e71ae9a00da08369679317" - integrity sha512-INLKhpc9QbO5zy2HkS1CJUncByrCLFDZQOY30d9ojiuGO02ofL1BygDRDRtFvT/oWSZ8Y0fbkrr1oXU2ay/MqA== +jest-watcher@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.5.2.tgz#2957f4461007e0769d74b537379ecf6b7c696916" + integrity sha512-i3m1NtWzF+FXfJ3ljLBB/WQEp4uaNhX7QcQUWMokcifFTUQBDFyUMEwk0JkJ1kopHbx7Een3KX0Q7+9koGM/Pw== dependencies: - "@jest/test-result" "^26.5.0" - "@jest/types" "^26.5.0" + "@jest/test-result" "^26.5.2" + "@jest/types" "^26.5.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.5.0" + jest-util "^26.5.2" string-length "^4.0.1" jest-worker@^26.2.1: @@ -4371,13 +4366,13 @@ jest-worker@^26.5.0: supports-color "^7.0.0" jest@^26.0.1: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.5.0.tgz#d973c13a3843587b89b02dab1fbcd1f3bf111f09" - integrity sha512-yW1QTkdpxVWTV2M5cOwVdEww8dRGqL5bb7FOG3YQoMtf7oReCEawmU0+tOKkZUSfcOymbXmCfdBQLzuwOLCx0w== + version "26.5.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.5.2.tgz#c6791642b331fe7abd2f993b0a74aa546f7be0fb" + integrity sha512-4HFabJVwsgDwul/7rhXJ3yFAF/aUkVIXiJWmgFxb+WMdZG39fVvOwYAs8/3r4AlFPc4m/n5sTMtuMbOL3kNtrQ== dependencies: - "@jest/core" "^26.5.0" + "@jest/core" "^26.5.2" import-local "^3.0.2" - jest-cli "^26.5.0" + jest-cli "^26.5.2" jju@~1.4.0: version "1.4.0" @@ -5785,12 +5780,12 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.5.0.tgz#3320e4952f8e6918fc8c26c6df7aad9734818ac2" - integrity sha512-NcgRuuTutUJ9+Br4P19DFThpJYnYBiugfRmZEA6pXrUeG+IcMSmppb88rU+iPA+XAJcjTYlCb5Ed6miHg/Qqqw== +pretty-format@^26.5.2: + version "26.5.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.5.2.tgz#5d896acfdaa09210683d34b6dc0e6e21423cd3e1" + integrity sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og== dependencies: - "@jest/types" "^26.5.0" + "@jest/types" "^26.5.2" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" @@ -6291,6 +6286,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -6560,6 +6560,11 @@ serve@^11.3.0: serve-handler "6.1.3" update-check "1.5.2" +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -7568,6 +7573,11 @@ whatwg-url@^8.0.0: tr46 "^2.0.2" webidl-conversions "^5.0.0" +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -7633,15 +7643,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7716,10 +7717,10 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^5.0.1: - version "5.0.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.2.tgz#48218df5da2731b4403115c39a1af709c873f829" - integrity sha512-CkwaeZw6dQgqgPGeTWKMXCRmMcBgETFlTml1+ZOO+q7kGst8NREJ+eWwFNPVUQ4QGdAaklbqCZHH6Zuep1RjiA== +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== yallist@^2.1.2: version "2.1.2" @@ -7741,7 +7742,7 @@ yargs-parser@20.x: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.0.tgz#944791ca2be2e08ddadd3d87e9de4c6484338605" integrity sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A== -yargs-parser@^18.1.3: +yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -7749,23 +7750,22 @@ yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.0.0: - version "20.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.1.tgz#28f3773c546cdd8a69ddae68116b48a5da328e77" - integrity sha512-yYsjuSkjbLMBp16eaOt7/siKTjNVjMm3SoJnIg3sEh/JsvqVVDyjRKmaJV4cl+lNIgq6QEco2i3gDebJl7/vLA== - -yargs@^16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c" - integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA== +yargs@^15.4.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^7.0.0" - escalade "^3.0.2" - get-caller-file "^2.0.5" + 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 "^4.2.0" - y18n "^5.0.1" - yargs-parser "^20.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" yargs@~3.10.0: version "3.10.0" From f16338b8f6bf1db6491e34cd6c5d23e5c1e2868a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2020 03:05:18 +0000 Subject: [PATCH 0017/4002] build(deps-dev): bump @microsoft/api-extractor from 7.10.1 to 7.10.4 (#2320) --- yarn.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8a731a5e326..c3fb6f66259 100644 --- a/yarn.lock +++ b/yarn.lock @@ -597,24 +597,24 @@ resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" integrity sha512-sugEjWjSSy9OHF6t1ZBLZCAROj52cZthB9dIePmzZzzMwmWwy3qAEMSdJheHeS1FOwDZI7Ipm1H/bWgzJNnSAw== -"@microsoft/api-extractor-model@7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.1.tgz#7e86fa5507f03951482239baa9fd761e9767837b" - integrity sha512-9LpG6ICn7yfFMALOL0BjPwG8o7itb4MnIDn5OYYYU2qQOmMsX+B9ZcJ+VfUIUdCqhvEjoAiIO6qGT6xUFOazBA== +"@microsoft/api-extractor-model@7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.3.tgz#f687f324e940bd71e3e73b5b262a54594b0ea61c" + integrity sha512-etP4NbZpj+zPCuO3YYigIYXkXq5zYhfE3vo/hrCj1OOd/159HDbSHnEQrNWRVy5TR79RAzHvkYAwtLYKeYP8Ag== dependencies: "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.34.1" + "@rushstack/node-core-library" "3.34.3" "@microsoft/api-extractor@^7.9.15": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.10.1.tgz#6b5b293c59a94b5b4516a8e3c8fb8ac31fb0e4fd" - integrity sha512-hJfwdaLXI/Crq4gH9yzLFwOY/uCwdXerqp3cBq27zxb773LXv88mhnhCehnce7eHMqhKXgPSPgVBf/Zfla9skw== + version "7.10.4" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.10.4.tgz#9055fab0a702d2d74eba05ff369c50012cf41176" + integrity sha512-vod9Y8IHhBtB3hcKiOe4OLi/hNeWtgRh/mxGrye5SeHaJpu5urAAA9CxLxBT8fDe+pyr1ipzlaiM/eMm2vXKgw== dependencies: - "@microsoft/api-extractor-model" "7.10.1" + "@microsoft/api-extractor-model" "7.10.3" "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.34.1" - "@rushstack/rig-package" "0.2.1" - "@rushstack/ts-command-line" "4.7.1" + "@rushstack/node-core-library" "3.34.3" + "@rushstack/rig-package" "0.2.4" + "@rushstack/ts-command-line" "4.7.3" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" @@ -697,10 +697,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.34.1": - version "3.34.1" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.34.1.tgz#36368179bb7a80afced4c3bb68387b7fc5381b3a" - integrity sha512-DX1xB9E2Xmi5auFxacftUXVuI2DUUyKrlGaecjesiS2YmV6pBnKzHHAaxWOQF2ajFNhXY2I1cGvDp45z3aJv5g== +"@rushstack/node-core-library@3.34.3": + version "3.34.3" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.34.3.tgz#a59a1e452dcc79bd4e5f0840b4e9603551668f85" + integrity sha512-WNXHEk5/uoZsbrKzGpYUzDDymJvZarRkByab4uS1fbEcTSDFSVB9e0rREzCkU9yDAQlRutbFwiTXLu3LVR5F6w== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -712,19 +712,19 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.1.tgz#45437a88444eb65a825f9cc93f3cd228d4b47934" - integrity sha512-B1JQ6lF8mg8MfRCki8XML6bs2qPCS0AX83enEZ3lSZdI8nVdFe7PumS03dpN3MXElbNiuqlJpECXo9sSKEzcyg== +"@rushstack/rig-package@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.4.tgz#259feb6637bedbfdc130d3a188ce85370e048743" + integrity sha512-/UXb6N0m0l+5kU4mLmRxyw3we+/w1fesgvfg96xllty5LyQxKDvkscmjlvCU/Yx55WO1tVxN4/7YlNEB2DcHyA== dependencies: "@types/node" "10.17.13" resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.7.1": - version "4.7.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.1.tgz#05ca90825239029065304efaf340c89e076a19c9" - integrity sha512-bpBByIKH1t3g2uCXspr5wsA2/XGA9qAaKVYkUnSVheAyH9OmAiUzgpcVswTnYrM3zEhIxGmo9Giqx/FCKubW0g== +"@rushstack/ts-command-line@4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.3.tgz#fa72c637d70aa29c201f8f016f7db626f2d23a2c" + integrity sha512-8FNrUSbMgKLgRVcsg1STsIC2xAdyes7qJtVwg36hSnBAMZgCCIM+Z36nnxyrnYTS/6qwiXv7fwVaUxXH+SyiAQ== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" From 3d3323f4521b7d684f18a9c737fbf13ff32852be Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2020 03:12:21 +0000 Subject: [PATCH 0018/4002] build(deps-dev): bump @types/node from 14.11.2 to 14.11.5 (#2319) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c3fb6f66259..48b26086a23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -899,9 +899,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@^14.10.1": - version "14.11.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256" - integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA== + version "14.11.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.5.tgz#fecad41c041cae7f2404ad4b2d0742fdb628b305" + integrity sha512-jVFzDV6NTbrLMxm4xDSIW/gKnk8rQLF9wAzLWIOg+5nU6ACrIMndeBdXci0FGtqJbP9tQvm6V39eshc96TO2wQ== "@types/node@10.17.13": version "10.17.13" From d744b8a2dc7653c3e5e43e5379dbf72cf4c9ff2c Mon Sep 17 00:00:00 2001 From: edison Date: Thu, 8 Oct 2020 03:06:41 +0800 Subject: [PATCH 0019/4002] fix(runtime-dom): v-model should support number modifier with select tag (#2308) close #2252 --- .../__tests__/directives/vModel.spec.ts | 102 ++++++++++++++++++ packages/runtime-dom/src/directives/vModel.ts | 7 +- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/packages/runtime-dom/__tests__/directives/vModel.spec.ts b/packages/runtime-dom/__tests__/directives/vModel.spec.ts index 33d48e5fc6c..140ef08d8cd 100644 --- a/packages/runtime-dom/__tests__/directives/vModel.spec.ts +++ b/packages/runtime-dom/__tests__/directives/vModel.spec.ts @@ -681,6 +681,108 @@ describe('vModel', () => { expect(bar.selected).toEqual(true) }) + it('v-model.number should work with select tag', async () => { + const component = defineComponent({ + data() { + return { value: null } + }, + render() { + return [ + withVModel( + h( + 'select', + { + value: null, + 'onUpdate:modelValue': setValue.bind(this) + }, + [h('option', { value: '1' }), h('option', { value: '2' })] + ), + this.value, + { + number: true + } + ) + ] + } + }) + render(h(component), root) + + const input = root.querySelector('select') + const one = root.querySelector('option[value="1"]') + const data = root._vnode.component.data + + one.selected = true + triggerEvent('change', input) + await nextTick() + expect(typeof data.value).toEqual('number') + expect(data.value).toEqual(1) + }) + + it('v-model.number should work with multiple select', async () => { + const component = defineComponent({ + data() { + return { value: [] } + }, + render() { + return [ + withVModel( + h( + 'select', + { + value: null, + multiple: true, + 'onUpdate:modelValue': setValue.bind(this) + }, + [h('option', { value: '1' }), h('option', { value: '2' })] + ), + this.value, + { + number: true + } + ) + ] + } + }) + render(h(component), root) + + const input = root.querySelector('select') + const one = root.querySelector('option[value="1"]') + const two = root.querySelector('option[value="2"]') + const data = root._vnode.component.data + + one.selected = true + two.selected = false + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([1]) + + one.selected = false + two.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([2]) + + one.selected = true + two.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([1, 2]) + + one.selected = false + two.selected = false + data.value = [1] + await nextTick() + expect(one.selected).toEqual(true) + expect(two.selected).toEqual(false) + + one.selected = false + two.selected = false + data.value = [1, 2] + await nextTick() + expect(one.selected).toEqual(true) + expect(two.selected).toEqual(true) + }) + it('should work with composition session', async () => { const component = defineComponent({ data() { diff --git a/packages/runtime-dom/src/directives/vModel.ts b/packages/runtime-dom/src/directives/vModel.ts index ea1098dd19b..c7dfa40c205 100644 --- a/packages/runtime-dom/src/directives/vModel.ts +++ b/packages/runtime-dom/src/directives/vModel.ts @@ -166,11 +166,14 @@ export const vModelRadio: ModelDirective = { } export const vModelSelect: ModelDirective = { - created(el, binding, vnode) { + created(el, { modifiers: { number } }, vnode) { addEventListener(el, 'change', () => { const selectedVal = Array.prototype.filter .call(el.options, (o: HTMLOptionElement) => o.selected) - .map(getValue) + .map( + (o: HTMLOptionElement) => + number ? toNumber(getValue(o)) : getValue(o) + ) el._assign(el.multiple ? selectedVal : selectedVal[0]) }) el._assign = getModelAssigner(vnode) From b392fe419c7486de62fac8f25640fe0836bef02e Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 7 Oct 2020 16:58:19 -0400 Subject: [PATCH 0020/4002] fix(runtime-core): error handling for created/beforeCreate hooks fix #2268 --- .../__tests__/errorHandling.spec.ts | 35 ++++++++++++++ packages/runtime-core/src/componentOptions.ts | 46 +++++++++++++------ 2 files changed, 66 insertions(+), 15 deletions(-) diff --git a/packages/runtime-core/__tests__/errorHandling.spec.ts b/packages/runtime-core/__tests__/errorHandling.spec.ts index eed67913633..36e3f6fcd6c 100644 --- a/packages/runtime-core/__tests__/errorHandling.spec.ts +++ b/packages/runtime-core/__tests__/errorHandling.spec.ts @@ -181,6 +181,41 @@ describe('error handling', () => { expect(fn).toHaveBeenCalledWith(err, 'setup function') }) + // unlike other lifecycle hooks, created/beforeCreate are called as part of + // the options API initiualization process instead of by the renderer. + test('in created/beforeCreate hook', () => { + const err = new Error('foo') + const fn = jest.fn() + + const Comp = { + setup() { + onErrorCaptured((err, instance, info) => { + fn(err, info) + return false + }) + return () => [h(Child1), h(Child2)] + } + } + + const Child1 = { + created() { + throw err + }, + render() {} + } + + const Child2 = { + beforeCreate() { + throw err + }, + render() {} + } + + render(h(Comp), nodeOps.createElement('div')) + expect(fn).toHaveBeenCalledWith(err, 'created hook') + expect(fn).toHaveBeenCalledWith(err, 'beforeCreate hook') + }) + test('in render function', () => { const err = new Error('foo') const fn = jest.fn() diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index 69f1f2afd1e..57bd57e3d85 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -5,7 +5,8 @@ import { ComponentInternalOptions, Component, ConcreteComponent, - InternalRenderFunction + InternalRenderFunction, + LifecycleHooks } from './component' import { isFunction, @@ -55,6 +56,7 @@ import { } from './componentPublicInstance' import { warn } from './warning' import { VNodeChild } from './vnode' +import { callWithAsyncErrorHandling } from './errorHandling' /** * Interface for declaring custom options. @@ -472,7 +474,13 @@ export function applyOptions( // applyOptions is called non-as-mixin once per instance if (!asMixin) { isInBeforeCreate = true - callSyncHook('beforeCreate', options, publicThis, globalMixins) + callSyncHook( + 'beforeCreate', + LifecycleHooks.BEFORE_CREATE, + options, + instance, + globalMixins + ) isInBeforeCreate = false // global mixins are applied first applyMixins(instance, globalMixins, deferredData, deferredWatch) @@ -662,7 +670,13 @@ export function applyOptions( // lifecycle options if (!asMixin) { - callSyncHook('created', options, publicThis, globalMixins) + callSyncHook( + 'created', + LifecycleHooks.CREATED, + options, + instance, + globalMixins + ) } if (beforeMount) { onBeforeMount(beforeMount.bind(publicThis)) @@ -707,52 +721,54 @@ export function applyOptions( function callSyncHook( name: 'beforeCreate' | 'created', + type: LifecycleHooks, options: ComponentOptions, - ctx: ComponentPublicInstance, + instance: ComponentInternalInstance, globalMixins: ComponentOptions[] ) { - callHookFromMixins(name, globalMixins, ctx) - + callHookFromMixins(name, type, globalMixins, instance) const { extends: base, mixins } = options if (base) { - callHookFromExtends(name, base, ctx) + callHookFromExtends(name, type, base, instance) } if (mixins) { - callHookFromMixins(name, mixins, ctx) + callHookFromMixins(name, type, mixins, instance) } const selfHook = options[name] if (selfHook) { - selfHook.call(ctx) + callWithAsyncErrorHandling(selfHook.bind(instance.proxy!), instance, type) } } function callHookFromExtends( name: 'beforeCreate' | 'created', + type: LifecycleHooks, base: ComponentOptions, - ctx: ComponentPublicInstance + instance: ComponentInternalInstance ) { if (base.extends) { - callHookFromExtends(name, base.extends, ctx) + callHookFromExtends(name, type, base.extends, instance) } const baseHook = base[name] if (baseHook) { - baseHook.call(ctx) + callWithAsyncErrorHandling(baseHook.bind(instance.proxy!), instance, type) } } function callHookFromMixins( name: 'beforeCreate' | 'created', + type: LifecycleHooks, mixins: ComponentOptions[], - ctx: ComponentPublicInstance + instance: ComponentInternalInstance ) { for (let i = 0; i < mixins.length; i++) { const chainedMixins = mixins[i].mixins if (chainedMixins) { - callHookFromMixins(name, chainedMixins, ctx) + callHookFromMixins(name, type, chainedMixins, instance) } const fn = mixins[i][name] if (fn) { - fn.call(ctx) + callWithAsyncErrorHandling(fn.bind(instance.proxy!), instance, type) } } } From 25d53f09bbf55412a003eabb7a390dc8434f8987 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 7 Oct 2020 17:49:03 -0400 Subject: [PATCH 0021/4002] fix(runtime-core/template-refs): do not reset refs object before updates fix #2283 --- packages/runtime-core/src/renderer.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 37f5a2ed7d3..3baea539a87 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1456,11 +1456,6 @@ function baseCreateRenderer( const prevTree = instance.subTree instance.subTree = nextTree - // reset refs - // only needed if previous patch had refs - if (instance.refs !== EMPTY_OBJ) { - instance.refs = {} - } if (__DEV__) { startMeasure(instance, `patch`) } From 89c5909a6f063dddcdf61650a6ed08f8be138521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=9C=C9=B4=D0=B2=CA=8F=D1=82=E1=B4=87?= Date: Thu, 8 Oct 2020 08:57:17 +0800 Subject: [PATCH 0022/4002] fix(compiler-core): allow spaces between if-else branches (#2305) fix #2299 --- .../__tests__/transforms/vIf.spec.ts | 21 +++++++++++++++++++ packages/compiler-core/src/transforms/vIf.ts | 10 +++++++++ 2 files changed, 31 insertions(+) diff --git a/packages/compiler-core/__tests__/transforms/vIf.spec.ts b/packages/compiler-core/__tests__/transforms/vIf.spec.ts index 315497a590c..a21ab1f019b 100644 --- a/packages/compiler-core/__tests__/transforms/vIf.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vIf.spec.ts @@ -606,6 +606,27 @@ describe('compiler: v-if', () => { expect(branch1.props).toMatchObject(createObjectMatcher({ key: `[0]` })) }) + test('with spaces between branches', () => { + const { + node: { codegenNode } + } = parseWithIfTransform( + `
` + ) + expect(codegenNode.consequent).toMatchObject({ + tag: `"div"`, + props: createObjectMatcher({ key: `[0]` }) + }) + const branch = codegenNode.alternate as ConditionalExpression + expect(branch.consequent).toMatchObject({ + tag: `"div"`, + props: createObjectMatcher({ key: `[1]` }) + }) + expect(branch.alternate).toMatchObject({ + tag: `"div"`, + props: createObjectMatcher({ key: `[2]` }) + }) + }) + test('with comments', () => { const { node } = parseWithIfTransform(` 1`] = ` +Object { + "cached": 0, + "children": Array [ + Object { + "children": Array [ + Object { + "content": "a", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "codegenNode": undefined, + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "props": Array [], + "tag": "template", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "components": Array [], + "directives": Array [], + "helpers": Array [], + "hoists": Array [], + "imports": Array [], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "temps": 0, + "type": 0, +} +`; + exports[`compiler: parse Errors NESTED_COMMENT 1`] = ` Object { "cached": 0, diff --git a/packages/compiler-core/__tests__/parse.spec.ts b/packages/compiler-core/__tests__/parse.spec.ts index b73609ee194..3fdb3d950ad 100644 --- a/packages/compiler-core/__tests__/parse.spec.ts +++ b/packages/compiler-core/__tests__/parse.spec.ts @@ -377,10 +377,12 @@ describe('compiler: parse', () => { test('comments option', () => { __DEV__ = false - const astNoComment = baseParse('') + const astDefaultComment = baseParse('') + const astNoComment = baseParse('', { comments: false }) const astWithComments = baseParse('', { comments: true }) __DEV__ = true + expect(astDefaultComment.children).toHaveLength(0) expect(astNoComment.children).toHaveLength(0) expect(astWithComments.children).toHaveLength(1) }) @@ -636,6 +638,40 @@ describe('compiler: parse', () => { }) }) + test('built-in component', () => { + const ast = baseParse('
', { + isBuiltInComponent: tag => (tag === 'comp' ? Symbol() : void 0) + }) + + expect(ast.children[0]).toMatchObject({ + type: NodeTypes.ELEMENT, + tag: 'div', + tagType: ElementTypes.ELEMENT + }) + + expect(ast.children[1]).toMatchObject({ + type: NodeTypes.ELEMENT, + tag: 'comp', + tagType: ElementTypes.COMPONENT + }) + }) + + test('slot element', () => { + const ast = baseParse('') + + expect(ast.children[0]).toMatchObject({ + type: NodeTypes.ELEMENT, + tag: 'slot', + tagType: ElementTypes.SLOT + }) + + expect(ast.children[1]).toMatchObject({ + type: NodeTypes.ELEMENT, + tag: 'Comp', + tagType: ElementTypes.COMPONENT + }) + }) + test('attribute with no value', () => { const ast = baseParse('
') const element = ast.children[0] as ElementNode @@ -1679,6 +1715,14 @@ foo }) describe('decodeEntities option', () => { + test('use default map', () => { + const ast: any = baseParse('><&'"&foo;') + + expect(ast.children.length).toBe(1) + expect(ast.children[0].type).toBe(NodeTypes.TEXT) + expect(ast.children[0].content).toBe('><&\'"&foo;') + }) + test('use the given map', () => { const ast: any = baseParse('&∪︀', { decodeEntities: text => text.replace('∪︀', '\u222A\uFE00'), @@ -1746,6 +1790,27 @@ foo const ast = baseParse(` foo \n bar baz `) expect((ast.children[0] as TextNode).content).toBe(` foo bar baz `) }) + + it('should remove leading newline character immediately following the pre element start tag', () => { + const ast = baseParse(`
\n  foo  bar  
`, { + isPreTag: tag => tag === 'pre' + }) + expect(ast.children).toHaveLength(1) + const preElement = ast.children[0] as ElementNode + expect(preElement.children).toHaveLength(1) + expect((preElement.children[0] as TextNode).content).toBe(` foo bar `) + }) + + it('should NOT remove leading newline character immediately following child-tag of pre element', () => { + const ast = baseParse(`
\n  foo  bar  
`, { + isPreTag: tag => tag === 'pre' + }) + const preElement = ast.children[0] as ElementNode + expect(preElement.children).toHaveLength(2) + expect((preElement.children[1] as TextNode).content).toBe( + `\n foo bar ` + ) + }) }) describe('Errors', () => { @@ -2222,6 +2287,15 @@ foo loc: { offset: 0, line: 1, column: 1 } } ] + }, + { + code: '
', + errors: [ + { + type: ErrorCodes.NESTED_COMMENT, + loc: { offset: 15, line: 1, column: 16 } + } + ] + }, { code: '', errors: [] From 9b34f915ab3211b099f71472e450a39b0d149b57 Mon Sep 17 00:00:00 2001 From: Pick Date: Wed, 14 Oct 2020 04:06:36 +0800 Subject: [PATCH 0045/4002] refactor(runtime-core): simplify deep watch traverse (#2212) --- packages/runtime-core/src/apiWatch.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 30a76b0f1a7..62592d3938c 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -333,13 +333,8 @@ function traverse(value: unknown, seen: Set = new Set()) { for (let i = 0; i < value.length; i++) { traverse(value[i], seen) } - } else if (isMap(value)) { - value.forEach((_, key) => { - // to register mutation dep for existing keys - traverse(value.get(key), seen) - }) - } else if (isSet(value)) { - value.forEach(v => { + } else if (isSet(value) || isMap(value)) { + value.forEach((v: any) => { traverse(v, seen) }) } else { From af1f5d33aa71083e570a54af75ba34e93041f958 Mon Sep 17 00:00:00 2001 From: edison Date: Wed, 14 Oct 2020 04:17:52 +0800 Subject: [PATCH 0046/4002] refactor(reactivity): remove `keyIsSymbol` (#2262) --- packages/reactivity/src/baseHandlers.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 703c5a6e84f..3d5ee55f621 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -89,9 +89,8 @@ function createGetter(isReadonly = false, shallow = false) { const res = Reflect.get(target, key, receiver) - const keyIsSymbol = isSymbol(key) if ( - keyIsSymbol + isSymbol(key) ? builtInSymbols.has(key as symbol) : key === `__proto__` || key === `__v_isRef` ) { From 6b8cf998c458afeaee69ce9dc77a0d9abe8bf9a9 Mon Sep 17 00:00:00 2001 From: Lory Lee <27952106@qq.com> Date: Wed, 14 Oct 2020 04:18:22 +0800 Subject: [PATCH 0047/4002] chore: add missing space in warning message (#2266) [ci skip] --- packages/reactivity/src/collectionHandlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/reactivity/src/collectionHandlers.ts b/packages/reactivity/src/collectionHandlers.ts index 93d09770c9a..913cd71f82b 100644 --- a/packages/reactivity/src/collectionHandlers.ts +++ b/packages/reactivity/src/collectionHandlers.ts @@ -350,7 +350,7 @@ function checkIdentityKeys( const type = toRawType(target) console.warn( `Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? `as keys` : ``}, ` + + `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + `which can lead to inconsistencies. ` + `Avoid differentiating between the raw and reactive versions ` + `of an object and only use the reactive version if possible.` From 6a554feb13487132ed7631f80a1efe8c41991346 Mon Sep 17 00:00:00 2001 From: Pick Date: Wed, 14 Oct 2020 04:20:05 +0800 Subject: [PATCH 0048/4002] perf(runtime-dom/vModel): remove looseHas if model is Set (#2236) --- .../__tests__/directives/vModel.spec.ts | 202 +++++++++++++++++- packages/runtime-dom/src/directives/vModel.ts | 17 +- packages/shared/src/looseEqual.ts | 7 - 3 files changed, 208 insertions(+), 18 deletions(-) diff --git a/packages/runtime-dom/__tests__/directives/vModel.spec.ts b/packages/runtime-dom/__tests__/directives/vModel.spec.ts index 140ef08d8cd..a1d729be48c 100644 --- a/packages/runtime-dom/__tests__/directives/vModel.spec.ts +++ b/packages/runtime-dom/__tests__/directives/vModel.spec.ts @@ -619,7 +619,7 @@ describe('vModel', () => { expect(bar.selected).toEqual(true) }) - it('should work with multiple select', async () => { + it('multiple select (model is Array)', async () => { const component = defineComponent({ data() { return { value: [] } @@ -783,6 +783,206 @@ describe('vModel', () => { expect(two.selected).toEqual(true) }) + it('multiple select (model is Array, option value is object)', async () => { + const fooValue = { foo: 1 } + const barValue = { bar: 1 } + + const component = defineComponent({ + data() { + return { value: [] } + }, + render() { + return [ + withVModel( + h( + 'select', + { + value: null, + multiple: true, + 'onUpdate:modelValue': setValue.bind(this) + }, + [ + h('option', { value: fooValue }), + h('option', { value: barValue }) + ] + ), + this.value + ) + ] + } + }) + render(h(component), root) + + await nextTick() + + const input = root.querySelector('select') + const [foo, bar] = root.querySelectorAll('option') + const data = root._vnode.component.data + + foo.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([fooValue]) + + foo.selected = false + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([barValue]) + + foo.selected = true + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject([fooValue, barValue]) + + foo.selected = false + bar.selected = false + data.value = [fooValue, barValue] + await nextTick() + expect(foo.selected).toEqual(true) + expect(bar.selected).toEqual(true) + + foo.selected = false + bar.selected = false + data.value = [{ foo: 1 }, { bar: 1 }] + await nextTick() + // looseEqual + expect(foo.selected).toEqual(true) + expect(bar.selected).toEqual(true) + }) + + it('multiple select (model is Set)', async () => { + const component = defineComponent({ + data() { + return { value: new Set() } + }, + render() { + return [ + withVModel( + h( + 'select', + { + value: null, + multiple: true, + 'onUpdate:modelValue': setValue.bind(this) + }, + [h('option', { value: 'foo' }), h('option', { value: 'bar' })] + ), + this.value + ) + ] + } + }) + render(h(component), root) + + const input = root.querySelector('select') + const foo = root.querySelector('option[value=foo]') + const bar = root.querySelector('option[value=bar]') + const data = root._vnode.component.data + + foo.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set(['foo'])) + + foo.selected = false + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set(['bar'])) + + foo.selected = true + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set(['foo', 'bar'])) + + foo.selected = false + bar.selected = false + data.value = new Set(['foo']) + await nextTick() + expect(input.value).toEqual('foo') + expect(foo.selected).toEqual(true) + expect(bar.selected).toEqual(false) + + foo.selected = false + bar.selected = false + data.value = new Set(['foo', 'bar']) + await nextTick() + expect(foo.selected).toEqual(true) + expect(bar.selected).toEqual(true) + }) + + it('multiple select (model is Set, option value is object)', async () => { + const fooValue = { foo: 1 } + const barValue = { bar: 1 } + + const component = defineComponent({ + data() { + return { value: new Set() } + }, + render() { + return [ + withVModel( + h( + 'select', + { + value: null, + multiple: true, + 'onUpdate:modelValue': setValue.bind(this) + }, + [ + h('option', { value: fooValue }), + h('option', { value: barValue }) + ] + ), + this.value + ) + ] + } + }) + render(h(component), root) + + await nextTick() + + const input = root.querySelector('select') + const [foo, bar] = root.querySelectorAll('option') + const data = root._vnode.component.data + + foo.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set([fooValue])) + + foo.selected = false + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set([barValue])) + + foo.selected = true + bar.selected = true + triggerEvent('change', input) + await nextTick() + expect(data.value).toMatchObject(new Set([fooValue, barValue])) + + foo.selected = false + bar.selected = false + data.value = new Set([fooValue, barValue]) + await nextTick() + expect(foo.selected).toEqual(true) + expect(bar.selected).toEqual(true) + + foo.selected = false + bar.selected = false + data.value = new Set([{ foo: 1 }, { bar: 1 }]) + await nextTick() + // whithout looseEqual, here is different from Array + expect(foo.selected).toEqual(false) + expect(bar.selected).toEqual(false) + }) + it('should work with composition session', async () => { const component = defineComponent({ data() { diff --git a/packages/runtime-dom/src/directives/vModel.ts b/packages/runtime-dom/src/directives/vModel.ts index e18e97ee575..78a5b130f93 100644 --- a/packages/runtime-dom/src/directives/vModel.ts +++ b/packages/runtime-dom/src/directives/vModel.ts @@ -12,8 +12,7 @@ import { looseIndexOf, invokeArrayFns, toNumber, - isSet, - looseHas + isSet } from '@vue/shared' type AssignerFn = (value: any) => void @@ -119,12 +118,10 @@ export const vModelCheckbox: ModelDirective = { assign(filtered) } } else if (isSet(modelValue)) { - const found = modelValue.has(elementValue) - if (checked && !found) { - assign(modelValue.add(elementValue)) - } else if (!checked && found) { + if (checked) { + modelValue.add(elementValue) + } else { modelValue.delete(elementValue) - assign(modelValue) } } else { assign(getCheckboxValue(el, checked)) @@ -148,7 +145,7 @@ function setChecked( if (isArray(value)) { el.checked = looseIndexOf(value, vnode.props!.value) > -1 } else if (isSet(value)) { - el.checked = looseHas(value, vnode.props!.value) + el.checked = value.has(vnode.props!.value) } else if (value !== oldValue) { el.checked = looseEqual(value, getCheckboxValue(el, true)) } @@ -213,7 +210,7 @@ function setSelected(el: HTMLSelectElement, value: any) { if (isArray(value)) { option.selected = looseIndexOf(value, optionValue) > -1 } else { - option.selected = looseHas(value, optionValue) + option.selected = value.has(optionValue) } } else { if (looseEqual(getValue(option), value)) { @@ -305,7 +302,7 @@ if (__NODE_JS__) { return { checked: true } } } else if (isSet(value)) { - if (vnode.props && looseHas(value, vnode.props.value)) { + if (vnode.props && value.has(vnode.props.value)) { return { checked: true } } } else if (value) { diff --git a/packages/shared/src/looseEqual.ts b/packages/shared/src/looseEqual.ts index 076ea7b5569..030f0338b30 100644 --- a/packages/shared/src/looseEqual.ts +++ b/packages/shared/src/looseEqual.ts @@ -51,10 +51,3 @@ export function looseEqual(a: any, b: any): boolean { export function looseIndexOf(arr: any[], val: any): number { return arr.findIndex(item => looseEqual(item, val)) } - -export function looseHas(set: Set, val: any): boolean { - for (let item of set) { - if (looseEqual(item, val)) return true - } - return false -} From 8539c0bf32e86fb16349a210f878681579fb7976 Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Tue, 13 Oct 2020 22:25:15 +0200 Subject: [PATCH 0049/4002] fix(compiler-ssr): fix SSR issue when dynamic and static class co-exist (#2354) --- .../compiler-ssr/__tests__/ssrElement.spec.ts | 9 +++++++++ .../src/transforms/ssrInjectCssVars.ts | 4 ++-- .../src/transforms/ssrTransformElement.ts | 7 ++++--- .../__tests__/renderToString.spec.ts | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/compiler-ssr/__tests__/ssrElement.spec.ts b/packages/compiler-ssr/__tests__/ssrElement.spec.ts index 55eaa50647c..30e75e36f2b 100644 --- a/packages/compiler-ssr/__tests__/ssrElement.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrElement.spec.ts @@ -112,6 +112,15 @@ describe('ssr: element', () => { `) }) + test('v-bind:class + static class', () => { + expect(getCompiledString(`
`)) + .toMatchInlineSnapshot(` + "\`
\`" + `) + }) + test('v-bind:style', () => { expect(getCompiledString(`
`)) .toMatchInlineSnapshot(` diff --git a/packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts b/packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts index 0e6540c3b66..c848598a286 100644 --- a/packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts +++ b/packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts @@ -15,8 +15,8 @@ export const ssrInjectCssVars: NodeTransform = (node, context) => { return } - // _cssVars is initailized once per render function - // the code is injected in ssrCodegenTrasnform when creating the + // _cssVars is initialized once per render function + // the code is injected in ssrCodegenTransform when creating the // ssr transform context if (node.type === NodeTypes.ROOT) { context.identifiers._cssVars = 1 diff --git a/packages/compiler-ssr/src/transforms/ssrTransformElement.ts b/packages/compiler-ssr/src/transforms/ssrTransformElement.ts index e2f2ed8de84..e036671fcda 100644 --- a/packages/compiler-ssr/src/transforms/ssrTransformElement.ts +++ b/packages/compiler-ssr/src/transforms/ssrTransformElement.ts @@ -324,9 +324,10 @@ function removeStaticBinding( tag: TemplateLiteral['elements'], binding: string ) { - const i = tag.findIndex( - e => typeof e === 'string' && e.startsWith(` ${binding}=`) - ) + const regExp = new RegExp(`^ ${binding}=".+"$`) + + const i = tag.findIndex(e => typeof e === 'string' && regExp.test(e)) + if (i > -1) { tag.splice(i, 1) } diff --git a/packages/server-renderer/__tests__/renderToString.spec.ts b/packages/server-renderer/__tests__/renderToString.spec.ts index 25704eeee46..a7756a89e6b 100644 --- a/packages/server-renderer/__tests__/renderToString.spec.ts +++ b/packages/server-renderer/__tests__/renderToString.spec.ts @@ -142,6 +142,24 @@ describe('ssr: renderToString', () => { ) }) + test('template components with dynamic class attribute after static', async () => { + const app = createApp({ + template: `
` + }) + expect(await renderToString(app)).toBe( + `
` + ) + }) + + test('template components with dynamic class attribute before static', async () => { + const app = createApp({ + template: `
` + }) + expect(await renderToString(app)).toBe( + `
` + ) + }) + test('mixing optimized / vnode / template components', async () => { const OptimizedChild = { props: ['msg'], From 02f355eb69df32a03e942e01ac1de654d26916a1 Mon Sep 17 00:00:00 2001 From: underfin Date: Wed, 14 Oct 2020 04:28:24 +0800 Subject: [PATCH 0050/4002] fix(v-for): handle and warn when `v-for` receives non-integer range number (#2247) close #2245 --- packages/runtime-core/__tests__/helpers/renderList.spec.ts | 7 +++++++ packages/runtime-core/src/helpers/renderList.ts | 5 +++++ packages/server-renderer/__tests__/ssrRenderList.spec.ts | 7 +++++++ packages/server-renderer/src/helpers/ssrRenderList.ts | 5 +++++ 4 files changed, 24 insertions(+) diff --git a/packages/runtime-core/__tests__/helpers/renderList.spec.ts b/packages/runtime-core/__tests__/helpers/renderList.spec.ts index e28c6a004ce..48b2930c11f 100644 --- a/packages/runtime-core/__tests__/helpers/renderList.spec.ts +++ b/packages/runtime-core/__tests__/helpers/renderList.spec.ts @@ -21,6 +21,13 @@ describe('renderList', () => { ]) }) + it('should warn when given a non-integer N', () => { + renderList(3.1, () => {}) + expect( + `The v-for range expect an integer value but got 3.1.` + ).toHaveBeenWarned() + }) + it('should render properties in an object', () => { expect( renderList( diff --git a/packages/runtime-core/src/helpers/renderList.ts b/packages/runtime-core/src/helpers/renderList.ts index f8238a46a16..de4ab8afa7f 100644 --- a/packages/runtime-core/src/helpers/renderList.ts +++ b/packages/runtime-core/src/helpers/renderList.ts @@ -1,5 +1,6 @@ import { VNodeChild } from '../vnode' import { isArray, isString, isObject } from '@vue/shared' +import { warn } from '../warning' /** * v-for string @@ -60,6 +61,10 @@ export function renderList( ret[i] = renderItem(source[i], i) } } else if (typeof source === 'number') { + if (__DEV__ && !Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`) + return [] + } ret = new Array(source) for (let i = 0; i < source; i++) { ret[i] = renderItem(i + 1, i) diff --git a/packages/server-renderer/__tests__/ssrRenderList.spec.ts b/packages/server-renderer/__tests__/ssrRenderList.spec.ts index e0dab83117b..59b5d2ddf27 100644 --- a/packages/server-renderer/__tests__/ssrRenderList.spec.ts +++ b/packages/server-renderer/__tests__/ssrRenderList.spec.ts @@ -24,6 +24,13 @@ describe('ssr: renderList', () => { expect(stack).toEqual(['node 0: 1', 'node 1: 2', 'node 2: 3']) }) + it('should warn when given a non-integer N', () => { + ssrRenderList(3.1, () => {}) + expect( + `The v-for range expect an integer value but got 3.1.` + ).toHaveBeenWarned() + }) + it('should render properties in an object', () => { ssrRenderList({ a: 1, b: 2, c: 3 }, (item, key, index) => stack.push(`node ${index}/${key}: ${item}`) diff --git a/packages/server-renderer/src/helpers/ssrRenderList.ts b/packages/server-renderer/src/helpers/ssrRenderList.ts index 67c27294358..bde28f25759 100644 --- a/packages/server-renderer/src/helpers/ssrRenderList.ts +++ b/packages/server-renderer/src/helpers/ssrRenderList.ts @@ -1,4 +1,5 @@ import { isArray, isString, isObject } from '@vue/shared' +import { warn } from '@vue/runtime-core' export function ssrRenderList( source: unknown, @@ -9,6 +10,10 @@ export function ssrRenderList( renderItem(source[i], i) } } else if (typeof source === 'number') { + if (__DEV__ && !Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`) + return + } for (let i = 0; i < source; i++) { renderItem(i + 1, i) } From 6df367554803e62b07d44d8ec253ea58a0861eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=9C=C9=B4=D0=B2=CA=8F=D1=82=E1=B4=87?= Date: Wed, 14 Oct 2020 04:29:23 +0800 Subject: [PATCH 0051/4002] test(runtime-core): improve test for #2295 (#2309) --- .../__tests__/rendererComponent.spec.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/rendererComponent.spec.ts b/packages/runtime-core/__tests__/rendererComponent.spec.ts index 402a6732dda..5616c22a1b0 100644 --- a/packages/runtime-core/__tests__/rendererComponent.spec.ts +++ b/packages/runtime-core/__tests__/rendererComponent.spec.ts @@ -141,21 +141,32 @@ describe('renderer: component', () => { }) // #2170 - test('should have access to instance’s “$el” property in watcher when rendereing with watched prop', async () => { + test('instance.$el should be exposed to watch options', async () => { function returnThis(this: any) { return this } const propWatchSpy = jest.fn(returnThis) + const dataWatchSpy = jest.fn(returnThis) let instance: any const Comp = { props: { testProp: String }, + data() { + return { + testData: undefined + } + }, + watch: { testProp() { // @ts-ignore propWatchSpy(this.$el) + }, + testData() { + // @ts-ignore + dataWatchSpy(this.$el) } }, @@ -172,10 +183,15 @@ describe('renderer: component', () => { render(h(Comp), root) await nextTick() expect(propWatchSpy).not.toHaveBeenCalled() + expect(dataWatchSpy).not.toHaveBeenCalled() render(h(Comp, { testProp: 'prop ' }), root) await nextTick() expect(propWatchSpy).toHaveBeenCalledWith(instance.$el) + + instance.testData = 1 + await nextTick() + expect(dataWatchSpy).toHaveBeenCalledWith(instance.$el) }) // #2200 From 962af852207b56239fcb0d2f8e68549ad59fb8d4 Mon Sep 17 00:00:00 2001 From: Hunter Date: Wed, 14 Oct 2020 04:31:13 +0800 Subject: [PATCH 0052/4002] test(runtime-core): inject from closest ancestor (#2329) --- .../runtime-core/__tests__/apiOptions.spec.ts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/packages/runtime-core/__tests__/apiOptions.spec.ts b/packages/runtime-core/__tests__/apiOptions.spec.ts index ad2c7106a80..ab60ac7ca82 100644 --- a/packages/runtime-core/__tests__/apiOptions.spec.ts +++ b/packages/runtime-core/__tests__/apiOptions.spec.ts @@ -888,6 +888,56 @@ describe('api: options', () => { expect(watchSpy.mock.calls[0].slice(0, 2)).toEqual(['hello', 'mixin3']) }) + test('injection from closest ancestor', () => { + const Root = defineComponent({ + provide: { + a: 'root' + }, + render() { + return [h(Mid), ' ', h(MidWithProvide), ' ', h(MidWithMixinProvide)] + } + }) + + const Mid = { + render() { + return h(Child) + } + } as any + + const MidWithProvide = { + provide: { + a: 'midWithProvide' + }, + render() { + return h(Child) + } + } as any + + const mixin = { + provide: { + a: 'midWithMixinProvide' + } + } + + const MidWithMixinProvide = { + mixins: [mixin], + render() { + return h(Child) + } + } as any + + const Child = { + inject: ['a'], + render() { + return this.a + } + } as any + + expect(renderToString(h(Root))).toBe( + 'root midWithProvide midWithMixinProvide' + ) + }) + describe('warnings', () => { test('Expected a function as watch handler', () => { const Comp = { From 6e2c79b4f2db16554968f874c7f4bc522ec582e2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2020 23:48:20 +0000 Subject: [PATCH 0053/4002] build(deps-dev): bump rollup from 2.28.2 to 2.30.0 (#2373) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c71419c4449..1e21e0664fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6425,9 +6425,9 @@ rollup-pluginutils@^2.3.1: estree-walker "^0.6.1" rollup@^2.26.11: - version "2.28.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.28.2.tgz#599ec4978144a82d8a8ec3d37670a8440cb04e4b" - integrity sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg== + version "2.30.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.30.0.tgz#316a1eb0389dbda4082ef2d191b31488995e4c41" + integrity sha512-j4K1hUZfgFM03DUpayd3c7kZW+2wDbI6rj7ssQxpCpL1vsGpaM0vSorxBuePFwQDFq9O2DI6AOQbm174Awsq4w== optionalDependencies: fsevents "~2.1.2" From c6443a43c9744d8d40f7129a98792debe07a3a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Wed, 14 Oct 2020 10:23:51 +0200 Subject: [PATCH 0054/4002] test: package exclusion from code coverage (#2377) --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 72e2205febb..e6f315c6de1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -22,7 +22,7 @@ module.exports = { '!packages/template-explorer/**', '!packages/size-check/**', '!packages/runtime-core/src/profiling.ts', - '!packages/runtome-core/src/customFormatter.ts', + '!packages/runtime-core/src/customFormatter.ts', // DOM transitions are tested via e2e so no coverage is collected '!packages/runtime-dom/src/components/Transition*', // only called in browsers From e78915a74045ebcf34e8e99064fff48cd044632c Mon Sep 17 00:00:00 2001 From: underfin Date: Thu, 15 Oct 2020 23:05:12 +0800 Subject: [PATCH 0055/4002] fix(hmr): full diff props for non-sfc component (#2359) close #https://github.com/vitejs/vite/issues/872 --- packages/runtime-core/src/componentProps.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index 9fc2ac78b88..938318d4a9f 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -156,8 +156,14 @@ export function updateProps( const [options] = instance.propsOptions if ( - // always force full diff if hmr is enabled - !(__DEV__ && instance.type.__hmrId) && + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !( + __DEV__ && + (instance.type.__hmrId || + (instance.parent && instance.parent.type.__hmrId)) + ) && (optimized || patchFlag > 0) && !(patchFlag & PatchFlags.FULL_PROPS) ) { From 38c8778c51539b5f286cc7da1b3decdc009575e2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2020 11:05:36 -0400 Subject: [PATCH 0056/4002] build(deps-dev): bump @typescript-eslint/parser from 4.4.0 to 4.4.1 (#2374) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.4.1/packages/parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1e21e0664fd..17b858d29fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,35 +955,35 @@ "@types/yargs-parser" "*" "@typescript-eslint/parser@^4.1.1": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.4.0.tgz#65974db9a75f23b036f17b37e959b5f99b659ec0" - integrity sha512-yc14iEItCxoGb7W4Nx30FlTyGpU9r+j+n1LUK/exlq2eJeFxczrz/xFRZUk2f6yzWfK+pr1DOTyQnmDkcC4TnA== + version "4.4.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.4.1.tgz#25fde9c080611f303f2f33cedb145d2c59915b80" + integrity sha512-S0fuX5lDku28Au9REYUsV+hdJpW/rNW0gWlc4SXzF/kdrRaAVX9YCxKpziH7djeWT/HFAjLZcnY7NJD8xTeUEg== dependencies: - "@typescript-eslint/scope-manager" "4.4.0" - "@typescript-eslint/types" "4.4.0" - "@typescript-eslint/typescript-estree" "4.4.0" + "@typescript-eslint/scope-manager" "4.4.1" + "@typescript-eslint/types" "4.4.1" + "@typescript-eslint/typescript-estree" "4.4.1" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.4.0.tgz#2f3dd27692a12cc9a046a90ba6a9d8cb7731190a" - integrity sha512-r2FIeeU1lmW4K3CxgOAt8djI5c6Q/5ULAgdVo9AF3hPMpu0B14WznBAtxrmB/qFVbVIB6fSx2a+EVXuhSVMEyA== +"@typescript-eslint/scope-manager@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.4.1.tgz#d19447e60db2ce9c425898d62fa03b2cce8ea3f9" + integrity sha512-2oD/ZqD4Gj41UdFeWZxegH3cVEEH/Z6Bhr/XvwTtGv66737XkR4C9IqEkebCuqArqBJQSj4AgNHHiN1okzD/wQ== dependencies: - "@typescript-eslint/types" "4.4.0" - "@typescript-eslint/visitor-keys" "4.4.0" + "@typescript-eslint/types" "4.4.1" + "@typescript-eslint/visitor-keys" "4.4.1" -"@typescript-eslint/types@4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.0.tgz#63440ef87a54da7399a13bdd4b82060776e9e621" - integrity sha512-nU0VUpzanFw3jjX+50OTQy6MehVvf8pkqFcURPAE06xFNFenMj1GPEI6IESvp7UOHAnq+n/brMirZdR+7rCrlA== +"@typescript-eslint/types@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.1.tgz#c507b35cf523bc7ba00aae5f75ee9b810cdabbc1" + integrity sha512-KNDfH2bCyax5db+KKIZT4rfA8rEk5N0EJ8P0T5AJjo5xrV26UAzaiqoJCxeaibqc0c/IvZxp7v2g3difn2Pn3w== -"@typescript-eslint/typescript-estree@4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.0.tgz#16a2df7c16710ddd5406b32b86b9c1124b1ca526" - integrity sha512-Fh85feshKXwki4nZ1uhCJHmqKJqCMba+8ZicQIhNi5d5jSQFteWiGeF96DTjO8br7fn+prTP+t3Cz/a/3yOKqw== +"@typescript-eslint/typescript-estree@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.1.tgz#598f6de488106c2587d47ca2462c60f6e2797cb8" + integrity sha512-wP/V7ScKzgSdtcY1a0pZYBoCxrCstLrgRQ2O9MmCUZDtmgxCO/TCqOTGRVwpP4/2hVfqMz/Vw1ZYrG8cVxvN3g== dependencies: - "@typescript-eslint/types" "4.4.0" - "@typescript-eslint/visitor-keys" "4.4.0" + "@typescript-eslint/types" "4.4.1" + "@typescript-eslint/visitor-keys" "4.4.1" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -991,12 +991,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.0.tgz#0a9118344082f14c0f051342a74b42dfdb012640" - integrity sha512-oBWeroUZCVsHLiWRdcTXJB7s1nB3taFY8WGvS23tiAlT6jXVvsdAV4rs581bgdEjOhn43q6ro7NkOiLKu6kFqA== +"@typescript-eslint/visitor-keys@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.1.tgz#1769dc7a9e2d7d2cfd3318b77ed8249187aed5c3" + integrity sha512-H2JMWhLaJNeaylSnMSQFEhT/S/FsJbebQALmoJxMPMxLtlVAMy2uJP/Z543n9IizhjRayLSqoInehCeNW9rWcw== dependencies: - "@typescript-eslint/types" "4.4.0" + "@typescript-eslint/types" "4.4.1" eslint-visitor-keys "^2.0.0" "@zeit/schemas@2.6.0": From 5c37efeccc87e6c632d43be70be0a9d67ebc7045 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2020 11:05:49 -0400 Subject: [PATCH 0057/4002] build(deps): bump @babel/parser from 7.11.5 to 7.12.0 (#2383) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.11.5 to 7.12.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.12.0/packages/babel-parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 17b858d29fb..059ec2eaf79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -218,9 +218,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.11.5", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037" - integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q== + version "7.12.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.0.tgz#2ad388f3960045b22f9b7d4bf85e80b15a1c9e3a" + integrity sha512-dYmySMYnlus2jwl7JnnajAj11obRStZoW9cG04wh4ZuhozDn11tDUrhHcUZ9iuNHqALAhh60XqNaYXpvuuE/Gg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From 696289646517ee817acff668965b39cb5fcc2dc1 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 15 Oct 2020 17:37:00 +0200 Subject: [PATCH 0058/4002] ci: add size check integration (#2369) --- .circleci/config.yml | 14 ++------------ .github/workflows/size-check.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/size-check.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index de7e22aa312..bb2a2df1752 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,8 +7,8 @@ defaults: &defaults step_restore_cache: &restore_cache restore_cache: keys: - - v1-dependencies-{{ checksum "yarn.lock" }}-1 - - v1-dependencies- + - v1-dependencies-{{ checksum "yarn.lock" }}-1 + - v1-dependencies- step_install_deps: &install_deps run: @@ -45,19 +45,9 @@ jobs: - *save_cache - run: yarn test-dts - check-size: - <<: *defaults - steps: - - checkout - - *restore_cache - - *install_deps - - *save_cache - - run: yarn size - workflows: version: 2 ci: jobs: - test - test-dts - - check-size diff --git a/.github/workflows/size-check.yml b/.github/workflows/size-check.yml new file mode 100644 index 00000000000..bf63447ecd3 --- /dev/null +++ b/.github/workflows/size-check.yml @@ -0,0 +1,19 @@ +name: 'size' +on: + pull_request: + branches: + - master +jobs: + size: + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + steps: + - uses: actions/checkout@v1 + - uses: bahmutov/npm-install@v1 + + - uses: posva/size-check-action@v1.0.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + build_script: size + files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/size-check.global.prod.js From 3aabd59de17f52399ca4fc3a9f70da788499b7cc Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 15 Oct 2020 11:52:30 -0400 Subject: [PATCH 0059/4002] build(deps): bump postcss-selector-parser from 6.0.2 to 6.0.4 --- packages/compiler-sfc/package.json | 2 +- packages/compiler-sfc/src/stylePluginScoped.ts | 17 +++++++++++++---- yarn.lock | 12 +++++++++++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 28ea1145ca6..ae351528fc5 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -49,7 +49,7 @@ "merge-source-map": "^1.1.0", "postcss": "^7.0.32", "postcss-modules": "^3.2.2", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^6.0.4", "source-map": "^0.6.1" }, "devDependencies": { diff --git a/packages/compiler-sfc/src/stylePluginScoped.ts b/packages/compiler-sfc/src/stylePluginScoped.ts index 0c2b02bfc5b..359fdea3d5c 100644 --- a/packages/compiler-sfc/src/stylePluginScoped.ts +++ b/packages/compiler-sfc/src/stylePluginScoped.ts @@ -50,7 +50,11 @@ export default postcss.plugin('vue-scoped', (id: any) => (root: Root) => { if (n.nodes.length) { // .foo ::v-deep(.bar) -> .foo[xxxxxxx] .bar // replace the current node with ::v-deep's inner selector - selector.insertAfter(n, n.nodes[0]) + let last: Selector['nodes'][0] = n + n.nodes[0].each(ss => { + selector.insertAfter(last, ss) + last = ss + }) // insert a space combinator before if it doesn't already have one const prev = selector.at(selector.index(n) - 1) if (!prev || !isSpaceCombinator(prev)) { @@ -82,8 +86,13 @@ export default postcss.plugin('vue-scoped', (id: any) => (root: Root) => { // instead. // ::v-slotted(.foo) -> .foo[xxxxxxx-s] if (value === ':slotted' || value === '::v-slotted') { - rewriteSelector(n.nodes[0] as Selector, true /* slotted */) - selector.insertAfter(n, n.nodes[0]) + rewriteSelector(n.nodes[0], true /* slotted */) + let last: Selector['nodes'][0] = n + n.nodes[0].each(ss => { + selector.insertAfter(last, ss) + last = ss + }) + // selector.insertAfter(n, n.nodes[0]) selector.removeChild(n) // since slotted attribute already scopes the selector there's no // need for the non-slot attribute. @@ -129,7 +138,7 @@ export default postcss.plugin('vue-scoped', (id: any) => (root: Root) => { ) } } - selectors.each(selector => rewriteSelector(selector as Selector)) + selectors.each(selector => rewriteSelector(selector)) }).processSync(node.selector) }) diff --git a/yarn.lock b/yarn.lock index 059ec2eaf79..af373ddf5bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5741,6 +5741,16 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: indexes-of "^1.0.1" uniq "^1.0.1" +postcss-selector-parser@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" + integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== + dependencies: + cssesc "^3.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + util-deprecate "^1.0.2" + postcss-value-parser@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" @@ -7455,7 +7465,7 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= From dbc29c32e34ca3670d2f043770adea4ffa75ee2c Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 15 Oct 2020 12:02:20 -0400 Subject: [PATCH 0060/4002] build(deps): bump @babel/types from 7.11.5 to 7.12.0 --- package.json | 1 + packages/compiler-core/package.json | 4 ++-- packages/compiler-sfc/package.json | 4 ++-- packages/compiler-sfc/src/compileScript.ts | 7 +++++-- yarn.lock | 13 +++++++++++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1f097019ba2..364ec7f76aa 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "node": ">=10.0.0" }, "devDependencies": { + "@babel/types": "^7.12.0", "@ls-lint/ls-lint": "^1.9.2", "@microsoft/api-extractor": "^7.9.15", "@rollup/plugin-commonjs": "^15.0.0", diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 73fbc3c047f..1b73fc6018c 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -32,8 +32,8 @@ "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme", "dependencies": { "@vue/shared": "3.0.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", "estree-walker": "^2.0.1", "source-map": "^0.6.1" } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index ae351528fc5..6c4332508e6 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -35,8 +35,8 @@ "vue": "3.0.0" }, "dependencies": { - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", "@vue/compiler-core": "3.0.0", "@vue/compiler-dom": "3.0.0", "@vue/compiler-ssr": "3.0.0", diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index a17f3babb30..93cc6cc4383 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -160,7 +160,7 @@ export function compileScript( ) } else if (node.type === 'ExportNamedDeclaration' && node.specifiers) { const defaultSpecifier = node.specifiers.find( - s => s.exported.name === 'default' + s => s.exported.type === 'Identifier' && s.exported.name === 'default' ) as ExportSpecifier if (defaultSpecifier) { defaultExport = node @@ -334,7 +334,10 @@ export function compileScript( specifier.exported.start! + startOffset + 7, defaultTempVar ) - } else if (specifier.type === 'ExportSpecifier') { + } else if ( + specifier.type === 'ExportSpecifier' && + specifier.exported.type === 'Identifier' + ) { if (specifier.exported.name === 'default') { checkDuplicateDefaultExport(node) defaultExport = node diff --git a/yarn.lock b/yarn.lock index af373ddf5bd..325f3bbc0a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -217,7 +217,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.11.5", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.0.tgz#2ad388f3960045b22f9b7d4bf85e80b15a1c9e3a" integrity sha512-dYmySMYnlus2jwl7JnnajAj11obRStZoW9cG04wh4ZuhozDn11tDUrhHcUZ9iuNHqALAhh60XqNaYXpvuuE/Gg== @@ -347,7 +347,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.11.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": version "7.11.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q== @@ -356,6 +356,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.0.tgz#b6b49f425ee59043fbc89c61b11a13d5eae7b5c6" + integrity sha512-ggIyFmT2zMaYRheOfPDQ4gz7QqV3B+t2rjqjbttDJxMcb7/LukvWCmlIl1sWcOxrvwpTDd+z0OytzqsbGeb3/g== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" From 966426779323475896ead876d55bb78fd6c97bf4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 15 Oct 2020 12:10:25 -0400 Subject: [PATCH 0061/4002] chore: fix missed type guard from dbc29c32 --- packages/compiler-sfc/src/rewriteDefault.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/compiler-sfc/src/rewriteDefault.ts b/packages/compiler-sfc/src/rewriteDefault.ts index 4bcd57c40c6..6dc52fe4bf4 100644 --- a/packages/compiler-sfc/src/rewriteDefault.ts +++ b/packages/compiler-sfc/src/rewriteDefault.ts @@ -37,6 +37,7 @@ export function rewriteDefault( node.specifiers.forEach(specifier => { if ( specifier.type === 'ExportSpecifier' && + specifier.exported.type === 'Identifier' && specifier.exported.name === 'default' ) { const end = specifier.end! From 2ee2f945a6faca41b34b4427926164b2a1859bfb Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 15 Oct 2020 12:28:40 -0400 Subject: [PATCH 0062/4002] workflow: adjust release script for non-pre-releases --- scripts/release.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index 1db26c3d4a7..0f56307d965 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -7,7 +7,9 @@ const currentVersion = require('../package.json').version const { prompt } = require('enquirer') const execa = require('execa') -const preId = args.preid || semver.prerelease(currentVersion)[0] || 'alpha' +const preId = + args.preid || + (semver.prerelease(currentVersion) && semver.prerelease(currentVersion)[0]) const isDryRun = args.dry const skipTests = args.skipTests const skipBuild = args.skipBuild @@ -21,10 +23,7 @@ const versionIncrements = [ 'patch', 'minor', 'major', - 'prepatch', - 'preminor', - 'premajor', - 'prerelease' + ...(preId ? ['prepatch', 'preminor', 'premajor', 'prerelease'] : []) ] const inc = i => semver.inc(currentVersion, i, preId) From f17f0ddf6867fe442e323c4ec97ac04dc1831854 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 15 Oct 2020 12:37:21 -0400 Subject: [PATCH 0063/4002] release: v3.0.1 --- CHANGELOG.md | 47 +++++++++++++++++++++++++ package.json | 2 +- packages/compiler-core/package.json | 4 +-- packages/compiler-dom/package.json | 6 ++-- packages/compiler-sfc/package.json | 12 +++---- packages/compiler-ssr/package.json | 6 ++-- packages/reactivity/package.json | 4 +-- packages/runtime-core/package.json | 6 ++-- packages/runtime-dom/package.json | 6 ++-- packages/runtime-test/package.json | 6 ++-- packages/server-renderer/package.json | 8 ++--- packages/shared/package.json | 2 +- packages/size-check/package.json | 2 +- packages/template-explorer/package.json | 2 +- packages/vue/package.json | 8 ++--- 15 files changed, 84 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfa25192475..1b19e869acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,50 @@ +## [3.0.1](https://github.com/vuejs/vue-next/compare/v3.0.0...v3.0.1) (2020-10-15) + + +### Bug Fixes + +* **compiler-core:** allow spaces between if-else branches ([#2305](https://github.com/vuejs/vue-next/issues/2305)) ([89c5909](https://github.com/vuejs/vue-next/commit/89c5909a6f063dddcdf61650a6ed08f8be138521)), closes [#2299](https://github.com/vuejs/vue-next/issues/2299) +* **compiler-core:** consistently remove comment nodes for pre tags in production ([f411924](https://github.com/vuejs/vue-next/commit/f4119249f2d3f394469028ad9664f61830540ff9)), closes [#2217](https://github.com/vuejs/vue-next/issues/2217) +* **compiler-core:** fix v-if key injection with v-on object syntax ([#2368](https://github.com/vuejs/vue-next/issues/2368)) ([692197b](https://github.com/vuejs/vue-next/commit/692197be33de8f73a605e3a7f71389be42613ee3)), closes [#2366](https://github.com/vuejs/vue-next/issues/2366) +* **compiler-core:** make v-once work with v-if/else-if/else ([#2182](https://github.com/vuejs/vue-next/issues/2182)) ([9499871](https://github.com/vuejs/vue-next/commit/94998715822589f6f10443b6dba75f193467845d)), closes [#2035](https://github.com/vuejs/vue-next/issues/2035) +* **compiler-ssr:** fix SSR issue when dynamic and static class co-exist ([#2354](https://github.com/vuejs/vue-next/issues/2354)) ([8539c0b](https://github.com/vuejs/vue-next/commit/8539c0bf32e86fb16349a210f878681579fb7976)) +* **hmr:** full diff props for non-sfc component ([#2359](https://github.com/vuejs/vue-next/issues/2359)) ([e78915a](https://github.com/vuejs/vue-next/commit/e78915a74045ebcf34e8e99064fff48cd044632c)) +* **reactivity:** should add allowRecurse to the effect ([#2213](https://github.com/vuejs/vue-next/issues/2213)) ([ea1f87e](https://github.com/vuejs/vue-next/commit/ea1f87eabf2deab2e586af7ebd2d74bb58f72b87)), closes [#2200](https://github.com/vuejs/vue-next/issues/2200) +* **reactivity:** should not trigger watch on computed ref when value is unchanged ([390589e](https://github.com/vuejs/vue-next/commit/390589ec6d977675c5cef2807fbf3e930a25eef0)), closes [#2231](https://github.com/vuejs/vue-next/issues/2231) +* **reactivity:** use resetTracking instead of enableTracking ([#2174](https://github.com/vuejs/vue-next/issues/2174)) ([7cc09ca](https://github.com/vuejs/vue-next/commit/7cc09ca8a581783c2391824885206348e5e99934)) +* **runtime-core:** ensure this context for $nextTick callback ([5c3e8e9](https://github.com/vuejs/vue-next/commit/5c3e8e984029711c97ca671fa098cf66483dd571)), closes [#2282](https://github.com/vuejs/vue-next/issues/2282) +* **runtime-core:** error handling for created/beforeCreate hooks ([b392fe4](https://github.com/vuejs/vue-next/commit/b392fe419c7486de62fac8f25640fe0836bef02e)), closes [#2268](https://github.com/vuejs/vue-next/issues/2268) +* **runtime-core:** fix directive merging on component root ([4d1ebb5](https://github.com/vuejs/vue-next/commit/4d1ebb5deb4c1cb2a02e8482bf8f9cc87197b088)), closes [#2298](https://github.com/vuejs/vue-next/issues/2298) +* **runtime-core:** fix duplicated unmount traversal in optimized mode ([376883d](https://github.com/vuejs/vue-next/commit/376883d1cfea6ed92807cce1f1209f943a04b625)), closes [#2169](https://github.com/vuejs/vue-next/issues/2169) +* **runtime-core:** fix provide function data access in extends/mixins ([f06518a](https://github.com/vuejs/vue-next/commit/f06518a8c9201b4fa2a956595aa9d89a192fcd20)), closes [#2300](https://github.com/vuejs/vue-next/issues/2300) +* **runtime-core:** fix SSR memoery leak due to props normalization cache ([a66e53a](https://github.com/vuejs/vue-next/commit/a66e53a24f445b688eef6812ecb872dc53cf2702)), closes [#2225](https://github.com/vuejs/vue-next/issues/2225) +* **runtime-core:** make errorCaptured return value handling consistent with Vue 2 ([#2289](https://github.com/vuejs/vue-next/issues/2289)) ([4d20ac8](https://github.com/vuejs/vue-next/commit/4d20ac8173f84c87288255dcc03c62a6ee862a23)), closes [#2267](https://github.com/vuejs/vue-next/issues/2267) +* **runtime-core:** use consistent camelCase event casing for render functions ([#2278](https://github.com/vuejs/vue-next/issues/2278)) ([62f2617](https://github.com/vuejs/vue-next/commit/62f26173ba715fd8bf2b131e19d94275106e830d)), closes [#2249](https://github.com/vuejs/vue-next/issues/2249) +* **runtime-core:** vnode.el is null in watcher after rerendering ([#2295](https://github.com/vuejs/vue-next/issues/2295)) ([28d5fd7](https://github.com/vuejs/vue-next/commit/28d5fd7a2871c10df3427dfbbe0e203c2a976cb4)), closes [#2170](https://github.com/vuejs/vue-next/issues/2170) +* **runtime-core/template-refs:** do not reset refs object before updates ([25d53f0](https://github.com/vuejs/vue-next/commit/25d53f09bbf55412a003eabb7a390dc8434f8987)), closes [#2283](https://github.com/vuejs/vue-next/issues/2283) +* **runtime-dom:** v-model should support number modifier with select tag ([#2308](https://github.com/vuejs/vue-next/issues/2308)) ([d744b8a](https://github.com/vuejs/vue-next/commit/d744b8a2dc7653c3e5e43e5379dbf72cf4c9ff2c)), closes [#2252](https://github.com/vuejs/vue-next/issues/2252) +* **sfc/style-vars:** should attach css vars while `subtree` changed ([#2178](https://github.com/vuejs/vue-next/issues/2178)) ([408a8ca](https://github.com/vuejs/vue-next/commit/408a8cad48f5fe0854c83a979ff98f03738fbfba)), closes [#2177](https://github.com/vuejs/vue-next/issues/2177) +* **teleport:** proper children traversal when teleport is block root ([2ae3b26](https://github.com/vuejs/vue-next/commit/2ae3b26679faf2d5393998ba806b99748679195a)), closes [#2324](https://github.com/vuejs/vue-next/issues/2324) +* **teleport:** should only force remove teleport when not disabled ([b0931dc](https://github.com/vuejs/vue-next/commit/b0931dcabaa2858ba76102f49878771ec14fb2e8)), closes [#2323](https://github.com/vuejs/vue-next/issues/2323) +* **types:** avoid DefineComponent defaulting to any ([6aa2256](https://github.com/vuejs/vue-next/commit/6aa2256913bfd097500aba83b78482b87107c101)), closes [#2192](https://github.com/vuejs/vue-next/issues/2192) +* **types:** fix using tuple type as EmitsOptions ([#2160](https://github.com/vuejs/vue-next/issues/2160)) ([5dbd6b3](https://github.com/vuejs/vue-next/commit/5dbd6b36a0666fc6c993115ee5281ef253ba8a68)), closes [#2159](https://github.com/vuejs/vue-next/issues/2159) +* **v-for:** handle and warn when `v-for` receives non-integer range number ([#2247](https://github.com/vuejs/vue-next/issues/2247)) ([02f355e](https://github.com/vuejs/vue-next/commit/02f355eb69df32a03e942e01ac1de654d26916a1)), closes [#2245](https://github.com/vuejs/vue-next/issues/2245) +* **v-model:** avoid clearing IME compose state on updates ([#2304](https://github.com/vuejs/vue-next/issues/2304)) ([fbd198f](https://github.com/vuejs/vue-next/commit/fbd198fbfe2f87c3c15a63d9770d00bf3fc9c142)), closes [#2302](https://github.com/vuejs/vue-next/issues/2302) +* **v-model:** ensure initial value is set after other attributes ([54ed759](https://github.com/vuejs/vue-next/commit/54ed7592e416fc411196e9b767aebcc4f2ca20d8)), closes [#2325](https://github.com/vuejs/vue-next/issues/2325) + + +### Features + +* custom formatters ([6ba7ba4](https://github.com/vuejs/vue-next/commit/6ba7ba47d59288b8cd39c985a2163ebd220607bc)) + + +### Performance Improvements + +* **runtime-dom/vModel:** remove looseHas if model is Set ([#2236](https://github.com/vuejs/vue-next/issues/2236)) ([6a554fe](https://github.com/vuejs/vue-next/commit/6a554feb13487132ed7631f80a1efe8c41991346)) +* do not enable hmr in non-browser envs ([cf2c9f6](https://github.com/vuejs/vue-next/commit/cf2c9f6faa95add4c23b20c4b8a6e477d05ff0ed)) + + + # [3.0.0](https://github.com/vuejs/vue-next/compare/v3.0.0-rc.13...v3.0.0) (2020-09-18) diff --git a/package.json b/package.json index 364ec7f76aa..2e981bed8f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.0", + "version": "3.0.1", "workspaces": [ "packages/*" ], diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 1b73fc6018c..c0962cce31b 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/compiler-core", "main": "index.js", "module": "dist/compiler-core.esm-bundler.js", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme", "dependencies": { - "@vue/shared": "3.0.0", + "@vue/shared": "3.0.1", "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", "estree-walker": "^2.0.1", diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index 2dfca361ebb..c79e19ba678 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/compiler-dom", "main": "index.js", "module": "dist/compiler-dom.esm-bundler.js", @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-dom#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/compiler-core": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/compiler-core": "3.0.1" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 6c4332508e6..913c7afea2d 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/compiler-sfc", "main": "dist/compiler-sfc.cjs.js", "types": "dist/compiler-sfc.d.ts", @@ -32,15 +32,15 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc#readme", "peerDependencies": { - "vue": "3.0.0" + "vue": "3.0.1" }, "dependencies": { "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", - "@vue/compiler-core": "3.0.0", - "@vue/compiler-dom": "3.0.0", - "@vue/compiler-ssr": "3.0.0", - "@vue/shared": "3.0.0", + "@vue/compiler-core": "3.0.1", + "@vue/compiler-dom": "3.0.1", + "@vue/compiler-ssr": "3.0.1", + "@vue/shared": "3.0.1", "consolidate": "^0.16.0", "estree-walker": "^2.0.1", "hash-sum": "^2.0.0", diff --git a/packages/compiler-ssr/package.json b/packages/compiler-ssr/package.json index 3f5646f8f6b..ef59c212ea1 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-ssr#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/compiler-dom": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/compiler-dom": "3.0.1" } } diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index c57fd7e228f..f94564a18b6 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", @@ -36,6 +36,6 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/reactivity#readme", "dependencies": { - "@vue/shared": "3.0.0" + "@vue/shared": "3.0.1" } } diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index bd8c8c27dd1..7db71e215e8 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/reactivity": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/reactivity": "3.0.1" } } diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 5c505411caa..e5ce8b7fa15 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-dom#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/runtime-core": "3.0.0", + "@vue/shared": "3.0.1", + "@vue/runtime-core": "3.0.1", "csstype": "^2.6.8" } } diff --git a/packages/runtime-test/package.json b/packages/runtime-test/package.json index a90300a8f59..dc645add260 100644 --- a/packages/runtime-test/package.json +++ b/packages/runtime-test/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-test", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/runtime-test", "private": true, "main": "index.js", @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-test#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/runtime-core": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/runtime-core": "3.0.1" } } diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 5a15bc48e0f..6e0f84722f2 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.0.0", + "version": "3.0.1", "description": "@vue/server-renderer", "main": "index.js", "types": "dist/server-renderer.d.ts", @@ -28,10 +28,10 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/server-renderer#readme", "peerDependencies": { - "vue": "3.0.0" + "vue": "3.0.1" }, "dependencies": { - "@vue/shared": "3.0.0", - "@vue/compiler-ssr": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/compiler-ssr": "3.0.1" } } diff --git a/packages/shared/package.json b/packages/shared/package.json index 288f16ebe67..4d27ea968a5 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.0.0", + "version": "3.0.1", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", diff --git a/packages/size-check/package.json b/packages/size-check/package.json index 376702f5b6c..4c6bc0736e7 100644 --- a/packages/size-check/package.json +++ b/packages/size-check/package.json @@ -1,6 +1,6 @@ { "name": "@vue/size-check", - "version": "3.0.0", + "version": "3.0.1", "private": true, "buildOptions": { "name": "Vue", diff --git a/packages/template-explorer/package.json b/packages/template-explorer/package.json index 5a39b683890..b2caf8f5396 100644 --- a/packages/template-explorer/package.json +++ b/packages/template-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/template-explorer", - "version": "3.0.0", + "version": "3.0.1", "private": true, "buildOptions": { "formats": [ diff --git a/packages/vue/package.json b/packages/vue/package.json index 097970911af..1eb233f4472 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.0.0", + "version": "3.0.1", "description": "vue", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", @@ -37,9 +37,9 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/vue#readme", "dependencies": { - "@vue/shared": "3.0.0", - "@vue/compiler-dom": "3.0.0", - "@vue/runtime-dom": "3.0.0" + "@vue/shared": "3.0.1", + "@vue/compiler-dom": "3.0.1", + "@vue/runtime-dom": "3.0.1" }, "devDependencies": { "lodash": "^4.17.15", From f1086245a7c4cf17467fda3746d799360316289e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2020 14:54:54 +0000 Subject: [PATCH 0064/4002] build(deps-dev): bump lint-staged from 10.4.0 to 10.4.1 (#2395) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 325f3bbc0a1..7f83409f052 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4672,9 +4672,9 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@^10.2.10: - version "10.4.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.0.tgz#d18628f737328e0bbbf87d183f4020930e9a984e" - integrity sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg== + version "10.4.1" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.1.tgz#579069caf6451296e37bdd19769028b1f976c469" + integrity sha512-E2Y6Mu1haUD3ZefzwBG8tqy3QDQ9udWRS946YcuDCU8Mi22RjwxrEhLrqTLszxl80DG/sCtKdGCArzEkTsBzJQ== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" From c9e8be09ca71898e669a5b79c4985c05cb843973 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2020 14:58:02 +0000 Subject: [PATCH 0065/4002] build(deps-dev): bump rollup from 2.30.0 to 2.31.0 (#2397) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7f83409f052..0e128df1108 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6444,9 +6444,9 @@ rollup-pluginutils@^2.3.1: estree-walker "^0.6.1" rollup@^2.26.11: - version "2.30.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.30.0.tgz#316a1eb0389dbda4082ef2d191b31488995e4c41" - integrity sha512-j4K1hUZfgFM03DUpayd3c7kZW+2wDbI6rj7ssQxpCpL1vsGpaM0vSorxBuePFwQDFq9O2DI6AOQbm174Awsq4w== + version "2.31.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.31.0.tgz#b845345fabb9998aed9f43b114e5cdb7f0f9bbd7" + integrity sha512-0d8S3XwEZ7aCP910/9SjnelgLvC+ZXziouVolzxPOM1zvKkHioGkWGJIWmlOULlmvB8BZ6S0wrgsT4yMz0eyMg== optionalDependencies: fsevents "~2.1.2" From ba49fd8db880e58ae8be4316725febdcc5cab804 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2020 21:56:17 +0000 Subject: [PATCH 0066/4002] build(deps-dev): bump rollup from 2.31.0 to 2.32.0 (#2408) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0e128df1108..b72894851c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6444,9 +6444,9 @@ rollup-pluginutils@^2.3.1: estree-walker "^0.6.1" rollup@^2.26.11: - version "2.31.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.31.0.tgz#b845345fabb9998aed9f43b114e5cdb7f0f9bbd7" - integrity sha512-0d8S3XwEZ7aCP910/9SjnelgLvC+ZXziouVolzxPOM1zvKkHioGkWGJIWmlOULlmvB8BZ6S0wrgsT4yMz0eyMg== + version "2.32.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.32.0.tgz#ac58c8e85782bea8aa2d440fc05aba345013582a" + integrity sha512-0FIG1jY88uhCP2yP4CfvtKEqPDRmsUwfY1kEOOM+DH/KOGATgaIFd/is1+fQOxsvh62ELzcFfKonwKWnHhrqmw== optionalDependencies: fsevents "~2.1.2" From 0c6e1ed6c1d46fd5db5efb7b33f9d9abdf65ed9b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2020 21:56:25 +0000 Subject: [PATCH 0067/4002] build(deps-dev): bump @types/node from 14.11.8 to 14.11.10 (#2407) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b72894851c0..6b41d768a86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -908,9 +908,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@^14.10.1": - version "14.11.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" - integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + version "14.11.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.10.tgz#8c102aba13bf5253f35146affbf8b26275069bef" + integrity sha512-yV1nWZPlMFpoXyoknm4S56y2nlTAuFYaJuQtYRAOU7xA/FJ9RY0Xm7QOkaYMMmr8ESdHIuUb6oQgR/0+2NqlyA== "@types/node@10.17.13": version "10.17.13" From 2d5784c0b3623678f2b0dec773455142783c801b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2020 21:59:26 +0000 Subject: [PATCH 0068/4002] build(deps-dev): bump lint-staged from 10.4.1 to 10.4.2 (#2410) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6b41d768a86..8b8b9543df1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4672,9 +4672,9 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@^10.2.10: - version "10.4.1" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.1.tgz#579069caf6451296e37bdd19769028b1f976c469" - integrity sha512-E2Y6Mu1haUD3ZefzwBG8tqy3QDQ9udWRS946YcuDCU8Mi22RjwxrEhLrqTLszxl80DG/sCtKdGCArzEkTsBzJQ== + version "10.4.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.2.tgz#9fee4635c4b5ddb845746f237c6d43494ccd21c1" + integrity sha512-OLCA9K1hS+Sl179SO6kX0JtnsaKj/MZalEhUj5yAgXsb63qPI/Gfn6Ua1KuZdbfkZNEu3/n5C/obYCu70IMt9g== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" From 7e6e903111028579dbe2f2d6136c0f7bf0b2e3f4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2020 12:05:12 +0000 Subject: [PATCH 0069/4002] build(deps-dev): bump jest from 26.5.3 to 26.6.0 (#2434) --- yarn.lock | 572 +++++++++++++++++++++++++++--------------------------- 1 file changed, 286 insertions(+), 286 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8b8b9543df1..2f5be8c37f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -409,93 +409,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.5.2.tgz#94fc4865b1abed7c352b5e21e6c57be4b95604a6" - integrity sha512-lJELzKINpF1v74DXHbCRIkQ/+nUV1M+ntj+X1J8LxCgpmJZjfLmhFejiMSbjjD66fayxl5Z06tbs3HMyuik6rw== +"@jest/console@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.0.tgz#fd4a4733df3c50260aefb227414296aee96e682f" + integrity sha512-ArGcZWAEYMWmWnc/QvxLDvFmGRPvmHeulhS7FUUAlUGR5vS/SqMfArsGaYmIFEThSotCMnEihwx1h62I1eg5lg== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.5.2" - jest-util "^26.5.2" + jest-message-util "^26.6.0" + jest-util "^26.6.0" slash "^3.0.0" -"@jest/core@^26.5.3": - version "26.5.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.5.3.tgz#712ed4adb64c3bda256a3f400ff1d3eb2a031f13" - integrity sha512-CiU0UKFF1V7KzYTVEtFbFmGLdb2g4aTtY0WlyUfLgj/RtoTnJFhh50xKKr7OYkdmBUlGFSa2mD1TU3UZ6OLd4g== +"@jest/core@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.0.tgz#04dd3e046e9ebbe06a4f330e05a67f21f7bb314a" + integrity sha512-7wbunxosnC5zXjxrEtTQSblFjRVOT8qz1eSytw8riEeWgegy3ct91NLPEP440CDuWrmW3cOLcEGxIf9q2u6O9Q== dependencies: - "@jest/console" "^26.5.2" - "@jest/reporters" "^26.5.3" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.0" + "@jest/reporters" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.5.2" - jest-config "^26.5.3" - jest-haste-map "^26.5.2" - jest-message-util "^26.5.2" + jest-changed-files "^26.6.0" + jest-config "^26.6.0" + jest-haste-map "^26.6.0" + jest-message-util "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-resolve-dependencies "^26.5.3" - jest-runner "^26.5.3" - jest-runtime "^26.5.3" - jest-snapshot "^26.5.3" - jest-util "^26.5.2" - jest-validate "^26.5.3" - jest-watcher "^26.5.2" + jest-resolve "^26.6.0" + jest-resolve-dependencies "^26.6.0" + jest-runner "^26.6.0" + jest-runtime "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" + jest-watcher "^26.6.0" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.5.2.tgz#eba3cfc698f6e03739628f699c28e8a07f5e65fe" - integrity sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw== +"@jest/environment@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.0.tgz#695ee24cbf110456272caa9debbbf7e01afb2f78" + integrity sha512-l+5MSdiC4rUUrz8xPdj0TwHBwuoqMcAbFnsYDTn5FkenJl8b+lvC5NdJl1tVICGHWnx0fnjdd1luRZ7u3U4xyg== dependencies: - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.5.2" + jest-mock "^26.6.0" -"@jest/fake-timers@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.5.2.tgz#1291ac81680ceb0dc7daa1f92c059307eea6400a" - integrity sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw== +"@jest/fake-timers@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.0.tgz#5b4cc83fab91029963c53e6e2716f02544323b22" + integrity sha512-7VQpjChrwlwvGNysS10lDBLOVLxMvMtpx0Xo6aIotzNVyojYk0NN0CR8R4T6h/eu7Zva/LB3P71jqwGdtADoag== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.5.2" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-message-util "^26.6.0" + jest-mock "^26.6.0" + jest-util "^26.6.0" -"@jest/globals@^26.5.3": - version "26.5.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.5.3.tgz#90769b40e0af3fa0b28f6d8c5bbe3712467243fd" - integrity sha512-7QztI0JC2CuB+Wx1VdnOUNeIGm8+PIaqngYsZXQCkH2QV0GFqzAYc9BZfU0nuqA6cbYrWh5wkuMzyii3P7deug== +"@jest/globals@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.0.tgz#da2f58d17105b6a7531ee3c8724acb5f233400e2" + integrity sha512-rs3a/a8Lq8FgTx11SxbqIU2bDjsFU2PApl2oK2oUVlo84RSF76afFm2nLojW93AGssr715GHUwhq5b6mpCI5BQ== dependencies: - "@jest/environment" "^26.5.2" - "@jest/types" "^26.5.2" - expect "^26.5.3" + "@jest/environment" "^26.6.0" + "@jest/types" "^26.6.0" + expect "^26.6.0" -"@jest/reporters@^26.5.3": - version "26.5.3" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.5.3.tgz#e810e9c2b670f33f1c09e9975749260ca12f1c17" - integrity sha512-X+vR0CpfMQzYcYmMFKNY9n4jklcb14Kffffp7+H/MqitWnb0440bW2L76NGWKAa+bnXhNoZr+lCVtdtPmfJVOQ== +"@jest/reporters@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.0.tgz#2a8d631ad3b19a722fd0fae58ce9fa25e8aac1cf" + integrity sha512-PXbvHhdci5Rj1VFloolgLb+0kkdtzswhG8MzVENKJRI3O1ndwr52G6E/2QupjwrRcYnApZOelFf4nNpf5+SDxA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -506,9 +506,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.5.2" - jest-resolve "^26.5.2" - jest-util "^26.5.2" + jest-haste-map "^26.6.0" + jest-resolve "^26.6.0" + jest-util "^26.6.0" jest-worker "^26.5.0" slash "^3.0.0" source-map "^0.6.0" @@ -527,42 +527,42 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.5.2.tgz#cc1a44cfd4db2ecee3fb0bc4e9fe087aa54b5230" - integrity sha512-E/Zp6LURJEGSCWpoMGmCFuuEI1OWuI3hmZwmULV0GsgJBh7u0rwqioxhRU95euUuviqBDN8ruX/vP/4bwYolXw== +"@jest/test-result@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.0.tgz#79705c8a57165777af5ef1d45c65dcc4a5965c11" + integrity sha512-LV6X1ry+sKjseQsIFz3e6XAZYxwidvmeJFnVF08fq98q08dF1mJYI0lDq/LmH/jas+R4s0pwnNGiz1hfC4ZUBw== dependencies: - "@jest/console" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.0" + "@jest/types" "^26.6.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.5.3": - version "26.5.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.5.3.tgz#9ae0ab9bc37d5171b28424029192e50229814f8d" - integrity sha512-Wqzb7aQ13L3T47xHdpUqYMOpiqz6Dx2QDDghp5AV/eUDXR7JieY+E1s233TQlNyl+PqtqgjVokmyjzX/HA51BA== +"@jest/test-sequencer@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.0.tgz#a9dbc6545b1c59e7f375b05466e172126609906d" + integrity sha512-rWPTMa+8rejvePZnJmnKkmKWh0qILFDPpN0qbSif+KNGvFxqqDGafMo4P2Y8+I9XWrZQBeXL9IxPL4ZzDgRlbw== dependencies: - "@jest/test-result" "^26.5.2" + "@jest/test-result" "^26.6.0" graceful-fs "^4.2.4" - jest-haste-map "^26.5.2" - jest-runner "^26.5.3" - jest-runtime "^26.5.3" + jest-haste-map "^26.6.0" + jest-runner "^26.6.0" + jest-runtime "^26.6.0" -"@jest/transform@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.5.2.tgz#6a0033a1d24316a1c75184d010d864f2c681bef5" - integrity sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg== +"@jest/transform@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.0.tgz#1a6b95d0c7f9b4f96dd3aab9d28422a9e5e4043e" + integrity sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" 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.5.2" + jest-haste-map "^26.6.0" jest-regex-util "^26.0.0" - jest-util "^26.5.2" + jest-util "^26.6.0" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -590,10 +590,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.5.2.tgz#44c24f30c8ee6c7f492ead9ec3f3c62a5289756d" - integrity sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg== +"@jest/types@^26.6.0": + version "26.6.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.0.tgz#2c045f231bfd79d52514cda3fbc93ef46157fa6a" + integrity sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1336,13 +1336,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-jest@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.5.2.tgz#164f367a35946c6cf54eaccde8762dec50422250" - integrity sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A== +babel-jest@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.0.tgz#eca57ac8af99d6e06047e595b1faf0b5adf8a7bb" + integrity sha512-JI66yILI7stzjHccAoQtRKcUwJrJb4oMIxLTirL3GdAjGpaUBQSjZDFi9LsPkN4gftsS4R2AThAJwOjJxadwbg== dependencies: - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^26.5.0" @@ -2879,16 +2879,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.5.3.tgz#89d9795036f7358b0a9a5243238eb8086482d741" - integrity sha512-kkpOhGRWGOr+TEFUnYAjfGvv35bfP+OlPtqPIJpOCR9DVtv8QV+p8zG0Edqafh80fsjeE+7RBcVUq1xApnYglw== +expect@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.0.tgz#f48861317f62bb9f1248eaab7ae9e50a9a5a8339" + integrity sha512-EzhbZ1tbwcaa5Ok39BI11flIMeIUSlg1QsnXOrleaMvltwHsvIQPBtL710l+ma+qDFLUgktCXK4YuQzmHdm7cg== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -3976,57 +3976,57 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.5.2.tgz#330232c6a5c09a7f040a5870e8f0a9c6abcdbed5" - integrity sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w== +jest-changed-files@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.0.tgz#63b04aa261b5733c6ade96b7dd24784d12d8bb2d" + integrity sha512-k8PZzlp3cRWDe0fDc/pYs+c4w36+hiWXe1PpW/pW1UJmu1TNTAcQfZUrVYleij+uEqlY6z4mPv7Iff3kY0o5SQ== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.5.3.tgz#f936b98f247b76b7bc89c7af50af82c88e356a80" - integrity sha512-HkbSvtugpSXBf2660v9FrNVUgxvPkssN8CRGj9gPM8PLhnaa6zziFiCEKQAkQS4uRzseww45o0TR+l6KeRYV9A== +jest-cli@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.0.tgz#dc3ae34fd5937310493ed07dc79c5ffba2bf6671" + integrity sha512-lJAMZGpmML+y3Kfln6L5DGRTfKGQ+n1JDM1RQstojSLUhe/EaXWR8vmcx70v4CyJKvFZs7c/0QDkPX5ra/aDew== dependencies: - "@jest/core" "^26.5.3" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/core" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.5.3" - jest-util "^26.5.2" - jest-validate "^26.5.3" + jest-config "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.5.3.tgz#baf51c9be078c2c755c8f8a51ec0f06c762c1d3f" - integrity sha512-NVhZiIuN0GQM6b6as4CI5FSCyXKxdrx5ACMCcv/7Pf+TeCajJhJc+6dwgdAVPyerUFB9pRBIz3bE7clSrRge/w== +jest-config@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.0.tgz#cb879a37002f881edb66d673fd40b6704595de89" + integrity sha512-RCR1Kf7MGJ5waVCvrj/k3nCAJKquWZlzs8rkskzj0KlG392hNBOaYd5FQ4cCac08j6pwfIDOwNvMcy0/FqguJg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.5.3" - "@jest/types" "^26.5.2" - babel-jest "^26.5.2" + "@jest/test-sequencer" "^26.6.0" + "@jest/types" "^26.6.0" + babel-jest "^26.6.0" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.5.2" - jest-environment-node "^26.5.2" + jest-environment-jsdom "^26.6.0" + jest-environment-node "^26.6.0" jest-get-type "^26.3.0" - jest-jasmine2 "^26.5.3" + jest-jasmine2 "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-util "^26.5.2" - jest-validate "^26.5.3" + jest-resolve "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" micromatch "^4.0.2" - pretty-format "^26.5.2" + pretty-format "^26.6.0" jest-diff@^25.2.1: version "25.5.0" @@ -4038,15 +4038,15 @@ jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.5.2.tgz#8e26cb32dc598e8b8a1b9deff55316f8313c8053" - integrity sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA== +jest-diff@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" + integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== dependencies: chalk "^4.0.0" diff-sequences "^26.5.0" jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.0" jest-docblock@^26.0.0: version "26.0.0" @@ -4055,41 +4055,41 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.5.2.tgz#35e68d6906a7f826d3ca5803cfe91d17a5a34c31" - integrity sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg== +jest-each@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.0.tgz#9e9d90a4fc5a79e1d99a008897038325a6c7fbbf" + integrity sha512-7LzSNwNviYnm4FWK46itIE03NqD/8O8/7tVQ5rwTdTNrmPMQoQ1Z7hEFQ1uzRReluOFislpurpnQ0QsclSiDkA== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.5.2" - pretty-format "^26.5.2" + jest-util "^26.6.0" + pretty-format "^26.6.0" -jest-environment-jsdom@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz#5feab05b828fd3e4b96bee5e0493464ddd2bb4bc" - integrity sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw== +jest-environment-jsdom@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.0.tgz#2ce353fb82d27a9066bfea3ff2c27d9405076c69" + integrity sha512-bXO9IG7a3YlyiHxwfKF+OWoTA+GIw4FrD+Y0pb6CC+nKs5JuSRZmR2ovEX6PWo6KY42ka3JoZOp3KEnXiFPPCg== dependencies: - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-mock "^26.6.0" + jest-util "^26.6.0" jsdom "^16.4.0" -jest-environment-node@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.5.2.tgz#275a0f01b5e47447056f1541a15ed4da14acca03" - integrity sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA== +jest-environment-node@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.0.tgz#97f6e48085e67bda43b97f48e678ce78d760cd14" + integrity sha512-kWU6ZD1h6fs7sIl6ufuK0sXW/3d6WLaj48iow0NxhgU6eY89d9K+0MVmE0cRcVlh53yMyxTK6b+TnhLOnlGp/A== dependencies: - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-mock "^26.6.0" + jest-util "^26.6.0" jest-get-type@^25.2.6: version "25.2.6" @@ -4101,12 +4101,12 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.5.2.tgz#a15008abfc502c18aa56e4919ed8c96304ceb23d" - integrity sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA== +jest-haste-map@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.0.tgz#4cd392bc51109bd8e0f765b2d5afa746bebb5ce2" + integrity sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -4114,7 +4114,7 @@ jest-haste-map@^26.5.2: graceful-fs "^4.2.4" jest-regex-util "^26.0.0" jest-serializer "^26.5.0" - jest-util "^26.5.2" + jest-util "^26.6.0" jest-worker "^26.5.0" micromatch "^4.0.2" sane "^4.0.3" @@ -4122,55 +4122,55 @@ jest-haste-map@^26.5.2: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.5.3.tgz#baad2114ce32d16aff25aeb877d18bb4e332dc4c" - integrity sha512-nFlZOpnGlNc7y/+UkkeHnvbOM+rLz4wB1AimgI9QhtnqSZte0wYjbAm8hf7TCwXlXgDwZxAXo6z0a2Wzn9FoOg== +jest-jasmine2@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.0.tgz#1b59e26aa56651bae3d4637965c8cd4d3851de6d" + integrity sha512-2E3c+0A9y2OIK5caw5qlcm3b4doaf8FSfXKTX3xqKTUJoR4zXh0xvERBNWxZP9xMNXEi/2Z3LVsZpR2hROgixA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.5.2" + "@jest/environment" "^26.6.0" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.5.3" + expect "^26.6.0" is-generator-fn "^2.0.0" - jest-each "^26.5.2" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" - jest-runtime "^26.5.3" - jest-snapshot "^26.5.3" - jest-util "^26.5.2" - pretty-format "^26.5.2" + jest-each "^26.6.0" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" + jest-runtime "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + pretty-format "^26.6.0" throat "^5.0.0" -jest-leak-detector@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz#83fcf9a4a6ef157549552cb4f32ca1d6221eea69" - integrity sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw== +jest-leak-detector@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.0.tgz#a211c4c7627743e8d87b392bf92502cd64275df3" + integrity sha512-3oMv34imWTl1/nwKnmE/DxYo3QqHnZeF3nO6UzldppkhW0Za7OY2DYyWiamqVzwdUrjhoQkY5g+aF6Oc3alYEQ== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.0" -jest-matcher-utils@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz#6aa2c76ce8b9c33e66f8856ff3a52bab59e6c85a" - integrity sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA== +jest-matcher-utils@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.0.tgz#8f57d78353275bfa7a3ccea128c1030b347138e2" + integrity sha512-BUy/dQYb7ELGRazmK4ZVkbfPYCaNnrMtw1YljVhcKzWUxBM0xQ+bffrfnMLdRZp4wUUcT4ahaVnA3VWZtXWP9Q== dependencies: chalk "^4.0.0" - jest-diff "^26.5.2" + jest-diff "^26.6.0" jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.0" -jest-message-util@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.5.2.tgz#6c4c4c46dcfbabb47cd1ba2f6351559729bc11bb" - integrity sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw== +jest-message-util@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.0.tgz#c3499053022e05765f71b8c2535af63009e2d4be" + integrity sha512-WPAeS38Kza29f04I0iOIQrXeiebRXjmn6cFehzI7KKJOgT0NmqYAcLgjWnIAfKs5FBmEQgje1kXab0DaLKCl2w== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -4178,12 +4178,12 @@ jest-message-util@^26.5.2: slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.5.2.tgz#c9302e8ef807f2bfc749ee52e65ad11166a1b6a1" - integrity sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw== +jest-mock@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.0.tgz#5d13a41f3662a98a55c7742ac67c482e232ded13" + integrity sha512-HsNmL8vVIn1rL1GWA21Drpy9Cl+7GImwbWz/0fkWHrUXVzuaG7rP0vwLtE+/n70Mt0U8nPkz8fxioi3SC0wqhw== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4196,83 +4196,83 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.3.tgz#11483f91e534bdcd257ab21e8622799e59701aba" - integrity sha512-+KMDeke/BFK+mIQ2IYSyBz010h7zQaVt4Xie6cLqUGChorx66vVeQVv4ErNoMwInnyYHi1Ud73tDS01UbXbfLQ== +jest-resolve-dependencies@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.0.tgz#05bfecc977a3a48929fc7d9876f03d93a16b7df0" + integrity sha512-4di+XUT7LwJJ8b8qFEEDQssC5+aeVjLhvRICCaS4alh/EVS9JCT1armfJ3pnSS8t4o6659WbMmKVo82H4LuUVw== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" jest-regex-util "^26.0.0" - jest-snapshot "^26.5.3" + jest-snapshot "^26.6.0" -jest-resolve@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.5.2.tgz#0d719144f61944a428657b755a0e5c6af4fc8602" - integrity sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg== +jest-resolve@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.0.tgz#070fe7159af87b03e50f52ea5e17ee95bbee40e1" + integrity sha512-tRAz2bwraHufNp+CCmAD8ciyCpXCs1NQxB5EJAmtCFy6BN81loFEGWKzYu26Y62lAJJe4X4jg36Kf+NsQyiStQ== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.5.2" + jest-util "^26.6.0" read-pkg-up "^7.0.1" resolve "^1.17.0" slash "^3.0.0" -jest-runner@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.5.3.tgz#800787459ea59c68e7505952933e33981dc3db38" - integrity sha512-qproP0Pq7IIule+263W57k2+8kWCszVJTC9TJWGUz0xJBr+gNiniGXlG8rotd0XxwonD5UiJloYoSO5vbUr5FQ== +jest-runner@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.0.tgz#465a76efc9ec12cfd83a2af3a6cfb695b13a3efe" + integrity sha512-QpeN6pje8PQvFgT+wYOlzeycKd67qAvSw5FgYBiX2cTW+QTiObTzv/k09qRvT09rcCntFxUhy9VB1mgNGFLYIA== dependencies: - "@jest/console" "^26.5.2" - "@jest/environment" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.0" + "@jest/environment" "^26.6.0" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.5.3" + jest-config "^26.6.0" jest-docblock "^26.0.0" - jest-haste-map "^26.5.2" - jest-leak-detector "^26.5.2" - jest-message-util "^26.5.2" - jest-resolve "^26.5.2" - jest-runtime "^26.5.3" - jest-util "^26.5.2" + jest-haste-map "^26.6.0" + jest-leak-detector "^26.6.0" + jest-message-util "^26.6.0" + jest-resolve "^26.6.0" + jest-runtime "^26.6.0" + jest-util "^26.6.0" jest-worker "^26.5.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.5.3.tgz#5882ae91fd88304310f069549e6bf82f3f198bea" - integrity sha512-IDjalmn2s/Tc4GvUwhPHZ0iaXCdMRq5p6taW9P8RpU+FpG01O3+H8z+p3rDCQ9mbyyyviDgxy/LHPLzrIOKBkQ== +jest-runtime@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.0.tgz#90f80ea5eb0d97a1089120f582fb84bd36ca5491" + integrity sha512-JEz4YGnybFvtN4NLID6lsZf0bcd8jccwjWcG5TRE3fYVnxoX1egTthPjnC4btIwWJ6QaaHhtOQ/E3AGn8iClAw== dependencies: - "@jest/console" "^26.5.2" - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/globals" "^26.5.3" + "@jest/console" "^26.6.0" + "@jest/environment" "^26.6.0" + "@jest/fake-timers" "^26.6.0" + "@jest/globals" "^26.6.0" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/test-result" "^26.6.0" + "@jest/transform" "^26.6.0" + "@jest/types" "^26.6.0" "@types/yargs" "^15.0.0" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.5.3" - jest-haste-map "^26.5.2" - jest-message-util "^26.5.2" - jest-mock "^26.5.2" + jest-config "^26.6.0" + jest-haste-map "^26.6.0" + jest-message-util "^26.6.0" + jest-mock "^26.6.0" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-snapshot "^26.5.3" - jest-util "^26.5.2" - jest-validate "^26.5.3" + jest-resolve "^26.6.0" + jest-snapshot "^26.6.0" + jest-util "^26.6.0" + jest-validate "^26.6.0" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.4.1" @@ -4285,26 +4285,26 @@ jest-serializer@^26.5.0: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.5.3.tgz#f6b4b4b845f85d4b0dadd7cf119c55d0c1688601" - integrity sha512-ZgAk0Wm0JJ75WS4lGaeRfa0zIgpL0KD595+XmtwlIEMe8j4FaYHyZhP1LNOO+8fXq7HJ3hll54+sFV9X4+CGVw== +jest-snapshot@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.0.tgz#457aa9c1761efc781ac9c02b021a0b21047c6a38" + integrity sha512-mcqJZeIZqxomvBcsaiIbiEe2g7K1UxnUpTwjMoHb+DX4uFGnuZoZ6m28YOYRyCfZsdU9mmq73rNBnEH2atTR4Q== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.5.3" + expect "^26.6.0" graceful-fs "^4.2.4" - jest-diff "^26.5.2" + jest-diff "^26.6.0" jest-get-type "^26.3.0" - jest-haste-map "^26.5.2" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" - jest-resolve "^26.5.2" + jest-haste-map "^26.6.0" + jest-matcher-utils "^26.6.0" + jest-message-util "^26.6.0" + jest-resolve "^26.6.0" natural-compare "^1.4.0" - pretty-format "^26.5.2" + pretty-format "^26.6.0" semver "^7.3.2" jest-util@^26.1.0: @@ -4319,41 +4319,41 @@ jest-util@^26.1.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-util@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.5.2.tgz#8403f75677902cc52a1b2140f568e91f8ed4f4d7" - integrity sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg== +jest-util@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" + integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.5.3: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.5.3.tgz#eefd5a5c87059550548c5ad8d6589746c66929e3" - integrity sha512-LX07qKeAtY+lsU0o3IvfDdN5KH9OulEGOMN1sFo6PnEf5/qjS1LZIwNk9blcBeW94pQUI9dLN9FlDYDWI5tyaA== +jest-validate@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.0.tgz#b95e2076cca1a58b183e5bcce2bf43af52eebf10" + integrity sha512-FKHNqvh1Pgs4NWas56gsTPmjcIoGAAzSVUCK1+g8euzuCGbmdEr8LRTtOEFjd29uMZUk0PhzmzKGlHPe6j3UWw== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.5.2" + pretty-format "^26.6.0" -jest-watcher@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.5.2.tgz#2957f4461007e0769d74b537379ecf6b7c696916" - integrity sha512-i3m1NtWzF+FXfJ3ljLBB/WQEp4uaNhX7QcQUWMokcifFTUQBDFyUMEwk0JkJ1kopHbx7Een3KX0Q7+9koGM/Pw== +jest-watcher@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.0.tgz#06001c22831583a16f9ccb388ee33316a7f4200f" + integrity sha512-gw5BvcgPi0PKpMlNWQjUet5C5A4JOYrT7gexdP6+DR/f7mRm7wE0o1GqwPwcTsTwo0/FNf9c/kIDXTRaSAYwlw== dependencies: - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/test-result" "^26.6.0" + "@jest/types" "^26.6.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.5.2" + jest-util "^26.6.0" string-length "^4.0.1" jest-worker@^26.2.1: @@ -4375,13 +4375,13 @@ jest-worker@^26.5.0: supports-color "^7.0.0" jest@^26.0.1: - version "26.5.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.5.3.tgz#5e7a322d16f558dc565ca97639e85993ef5affe6" - integrity sha512-uJi3FuVSLmkZrWvaDyaVTZGLL8WcfynbRnFXyAHuEtYiSZ+ijDDIMOw1ytmftK+y/+OdAtsG9QrtbF7WIBmOyA== + version "26.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.0.tgz#546b25a1d8c888569dbbe93cae131748086a4a25" + integrity sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA== dependencies: - "@jest/core" "^26.5.3" + "@jest/core" "^26.6.0" import-local "^3.0.2" - jest-cli "^26.5.3" + jest-cli "^26.6.0" jju@~1.4.0: version "1.4.0" @@ -5799,12 +5799,12 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.5.2.tgz#5d896acfdaa09210683d34b6dc0e6e21423cd3e1" - integrity sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og== +pretty-format@^26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" + integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.0" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" From ba881f9190510c613f04950b69d78f6af1a90e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E9=81=93?= Date: Tue, 20 Oct 2020 05:11:28 +0800 Subject: [PATCH 0070/4002] fix(runtime-core): avoid object prototype keys in property access cache (#2416) --- packages/runtime-core/src/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 19035961c96..3fea92ba4e5 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -549,7 +549,7 @@ function setupStatefulComponent( } } // 0. create render proxy property access cache - instance.accessCache = {} + instance.accessCache = Object.create(null) // 1. create public instance / render proxy // also mark it raw so it's never observed instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers) From 5232b80e1608c48c9059ac25f55469939733c18d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:11:45 -0400 Subject: [PATCH 0071/4002] build(deps): bump @babel/parser from 7.12.0 to 7.12.3 (#2409) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.12.0 to 7.12.3. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.12.3/packages/babel-parser) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2f5be8c37f5..7465aef993f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -218,9 +218,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.0.tgz#2ad388f3960045b22f9b7d4bf85e80b15a1c9e3a" - integrity sha512-dYmySMYnlus2jwl7JnnajAj11obRStZoW9cG04wh4ZuhozDn11tDUrhHcUZ9iuNHqALAhh60XqNaYXpvuuE/Gg== + version "7.12.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd" + integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From 7390487c7d19b7681664a98922e633099c6dead0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:11:59 -0400 Subject: [PATCH 0072/4002] build(deps): bump @babel/types from 7.12.0 to 7.12.1 (#2396) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.12.0 to 7.12.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-types) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7465aef993f..9a057c07d99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -347,19 +347,10 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d" - integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.0": - version "7.12.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.0.tgz#b6b49f425ee59043fbc89c61b11a13d5eae7b5c6" - integrity sha512-ggIyFmT2zMaYRheOfPDQ4gz7QqV3B+t2rjqjbttDJxMcb7/LukvWCmlIl1sWcOxrvwpTDd+z0OytzqsbGeb3/g== +"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.1.tgz#e109d9ab99a8de735be287ee3d6a9947a190c4ae" + integrity sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA== dependencies: "@babel/helper-validator-identifier" "^7.10.4" lodash "^4.17.19" From 052a621762c5f7c420464747ebbbed27c7350593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=9C=C9=B4=D0=B2=CA=8F=D1=82=E1=B4=87?= Date: Tue, 20 Oct 2020 05:15:53 +0800 Subject: [PATCH 0073/4002] feat(compile-core): handle falsy dynamic args for v-on and v-bind (#2393) fix #2388 --- .../__tests__/transforms/vBind.spec.ts | 6 +++-- .../__tests__/transforms/vOn.spec.ts | 18 ++++++------- packages/compiler-core/src/runtimeHelpers.ts | 2 ++ .../compiler-core/src/transforms/vBind.ts | 8 ++++++ packages/compiler-core/src/transforms/vOn.ts | 26 +++++++++++-------- .../__tests__/transforms/vOn.spec.ts | 24 ++++++++--------- .../compiler-ssr/__tests__/ssrElement.spec.ts | 8 +++--- packages/runtime-core/src/apiLifecycle.ts | 14 +++++----- packages/runtime-core/src/componentEmits.ts | 22 ++++++++-------- .../runtime-core/src/helpers/toHandlers.ts | 4 +-- packages/runtime-core/src/index.ts | 7 ++++- packages/runtime-core/src/renderer.ts | 1 + packages/runtime-core/src/vnode.ts | 2 +- .../src/helpers/ssrRenderAttrs.ts | 3 ++- packages/shared/src/index.ts | 20 ++++++++------ 15 files changed, 95 insertions(+), 70 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/vBind.spec.ts b/packages/compiler-core/__tests__/transforms/vBind.spec.ts index 76482fcc3c8..aec02647ca7 100644 --- a/packages/compiler-core/__tests__/transforms/vBind.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vBind.spec.ts @@ -71,7 +71,7 @@ describe('compiler: transform v-bind', () => { const props = (node.codegenNode as VNodeCall).props as ObjectExpression expect(props.properties[0]).toMatchObject({ key: { - content: `id`, + content: `id || ""`, isStatic: false }, value: { @@ -130,7 +130,7 @@ describe('compiler: transform v-bind', () => { const props = (node.codegenNode as VNodeCall).props as ObjectExpression expect(props.properties[0]).toMatchObject({ key: { - content: `_${helperNameMap[CAMELIZE]}(foo)`, + content: `_${helperNameMap[CAMELIZE]}(foo || "")`, isStatic: false }, value: { @@ -149,10 +149,12 @@ describe('compiler: transform v-bind', () => { key: { children: [ `_${helperNameMap[CAMELIZE]}(`, + `(`, { content: `_ctx.foo` }, `(`, { content: `_ctx.bar` }, `)`, + `) || ""`, `)` ] }, diff --git a/packages/compiler-core/__tests__/transforms/vOn.spec.ts b/packages/compiler-core/__tests__/transforms/vOn.spec.ts index 4f7cd6c17c4..57408568fbc 100644 --- a/packages/compiler-core/__tests__/transforms/vOn.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vOn.spec.ts @@ -1,14 +1,14 @@ import { baseParse as parse, - transform, - ElementNode, - ObjectExpression, CompilerOptions, + ElementNode, ErrorCodes, - NodeTypes, - VNodeCall, + TO_HANDLER_KEY, helperNameMap, - CAPITALIZE + NodeTypes, + ObjectExpression, + transform, + VNodeCall } from '../../src' import { transformOn } from '../../src/transforms/vOn' import { transformElement } from '../../src/transforms/transformElement' @@ -76,7 +76,7 @@ describe('compiler: transform v-on', () => { key: { type: NodeTypes.COMPOUND_EXPRESSION, children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: `event` }, `)` ] @@ -101,7 +101,7 @@ describe('compiler: transform v-on', () => { key: { type: NodeTypes.COMPOUND_EXPRESSION, children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: `_ctx.event` }, `)` ] @@ -126,7 +126,7 @@ describe('compiler: transform v-on', () => { key: { type: NodeTypes.COMPOUND_EXPRESSION, children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: `_ctx.event` }, `(`, { content: `_ctx.foo` }, diff --git a/packages/compiler-core/src/runtimeHelpers.ts b/packages/compiler-core/src/runtimeHelpers.ts index e791cb6493a..dea6f460b19 100644 --- a/packages/compiler-core/src/runtimeHelpers.ts +++ b/packages/compiler-core/src/runtimeHelpers.ts @@ -23,6 +23,7 @@ export const MERGE_PROPS = Symbol(__DEV__ ? `mergeProps` : ``) export const TO_HANDLERS = Symbol(__DEV__ ? `toHandlers` : ``) export const CAMELIZE = Symbol(__DEV__ ? `camelize` : ``) export const CAPITALIZE = Symbol(__DEV__ ? `capitalize` : ``) +export const TO_HANDLER_KEY = Symbol(__DEV__ ? `toHandlerKey` : ``) export const SET_BLOCK_TRACKING = Symbol(__DEV__ ? `setBlockTracking` : ``) export const PUSH_SCOPE_ID = Symbol(__DEV__ ? `pushScopeId` : ``) export const POP_SCOPE_ID = Symbol(__DEV__ ? `popScopeId` : ``) @@ -56,6 +57,7 @@ export const helperNameMap: any = { [TO_HANDLERS]: `toHandlers`, [CAMELIZE]: `camelize`, [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, [SET_BLOCK_TRACKING]: `setBlockTracking`, [PUSH_SCOPE_ID]: `pushScopeId`, [POP_SCOPE_ID]: `popScopeId`, diff --git a/packages/compiler-core/src/transforms/vBind.ts b/packages/compiler-core/src/transforms/vBind.ts index cb10ed1f4c5..0d31a266a2c 100644 --- a/packages/compiler-core/src/transforms/vBind.ts +++ b/packages/compiler-core/src/transforms/vBind.ts @@ -10,6 +10,14 @@ import { CAMELIZE } from '../runtimeHelpers' export const transformBind: DirectiveTransform = (dir, node, context) => { const { exp, modifiers, loc } = dir const arg = dir.arg! + + if (arg.type !== NodeTypes.SIMPLE_EXPRESSION) { + arg.children.unshift(`(`) + arg.children.push(`) || ""`) + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""` + } + // .prop is no longer necessary due to new patch behavior // .sync is replaced by v-model:arg if (modifiers.includes('camel')) { diff --git a/packages/compiler-core/src/transforms/vOn.ts b/packages/compiler-core/src/transforms/vOn.ts index 31dd16a0bde..441e6fd1674 100644 --- a/packages/compiler-core/src/transforms/vOn.ts +++ b/packages/compiler-core/src/transforms/vOn.ts @@ -1,20 +1,20 @@ import { DirectiveTransform, DirectiveTransformResult } from '../transform' import { - DirectiveNode, + createCompoundExpression, createObjectProperty, createSimpleExpression, + DirectiveNode, + ElementTypes, ExpressionNode, NodeTypes, - createCompoundExpression, - SimpleExpressionNode, - ElementTypes + SimpleExpressionNode } from '../ast' -import { capitalize, camelize } from '@vue/shared' +import { camelize, toHandlerKey } from '@vue/shared' import { createCompilerError, ErrorCodes } from '../errors' import { processExpression } from './transformExpression' import { validateBrowserExpression } from '../validateExpression' -import { isMemberExpression, hasScopeRef } from '../utils' -import { CAPITALIZE } from '../runtimeHelpers' +import { hasScopeRef, isMemberExpression } from '../utils' +import { TO_HANDLER_KEY } from '../runtimeHelpers' const fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^\s*function(?:\s+[\w$]+)?\s*\(/ @@ -43,11 +43,15 @@ export const transformOn: DirectiveTransform = ( if (arg.isStatic) { const rawName = arg.content // for all event listeners, auto convert it to camelCase. See issue #2249 - const normalizedName = capitalize(camelize(rawName)) - eventName = createSimpleExpression(`on${normalizedName}`, true, arg.loc) + eventName = createSimpleExpression( + toHandlerKey(camelize(rawName)), + true, + arg.loc + ) } else { + // #2388 eventName = createCompoundExpression([ - `"on" + ${context.helperString(CAPITALIZE)}(`, + `${context.helperString(TO_HANDLER_KEY)}(`, arg, `)` ]) @@ -55,7 +59,7 @@ export const transformOn: DirectiveTransform = ( } else { // already a compound expression. eventName = arg - eventName.children.unshift(`"on" + ${context.helperString(CAPITALIZE)}(`) + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`) eventName.children.push(`)`) } diff --git a/packages/compiler-dom/__tests__/transforms/vOn.spec.ts b/packages/compiler-dom/__tests__/transforms/vOn.spec.ts index 76d5ca68968..84896a60d75 100644 --- a/packages/compiler-dom/__tests__/transforms/vOn.spec.ts +++ b/packages/compiler-dom/__tests__/transforms/vOn.spec.ts @@ -1,16 +1,16 @@ import { baseParse as parse, - transform, CompilerOptions, ElementNode, - ObjectExpression, - NodeTypes, - VNodeCall, + TO_HANDLER_KEY, helperNameMap, - CAPITALIZE + NodeTypes, + ObjectExpression, + transform, + VNodeCall } from '@vue/compiler-core' import { transformOn } from '../../src/transforms/vOn' -import { V_ON_WITH_MODIFIERS, V_ON_WITH_KEYS } from '../../src/runtimeHelpers' +import { V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS } from '../../src/runtimeHelpers' import { transformElement } from '../../../compiler-core/src/transforms/transformElement' import { transformExpression } from '../../../compiler-core/src/transforms/transformExpression' import { genFlagText } from '../../../compiler-core/__tests__/testUtils' @@ -195,14 +195,14 @@ describe('compiler-dom: transform v-on', () => { const { props: [prop2] } = parseWithVOn(`
`) - // ("on" + (event)).toLowerCase() === "onclick" ? "onContextmenu" : ("on" + (event)) + // (_toHandlerKey(event)).toLowerCase() === "onclick" ? "onContextmenu" : (_toHandlerKey(event)) expect(prop2.key).toMatchObject({ type: NodeTypes.COMPOUND_EXPRESSION, children: [ `(`, { children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: 'event' }, `)` ] @@ -210,7 +210,7 @@ describe('compiler-dom: transform v-on', () => { `) === "onClick" ? "onContextmenu" : (`, { children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: 'event' }, `)` ] @@ -233,14 +233,14 @@ describe('compiler-dom: transform v-on', () => { const { props: [prop2] } = parseWithVOn(`
`) - // ("on" + (event)).toLowerCase() === "onclick" ? "onMouseup" : ("on" + (event)) + // (_eventNaming(event)).toLowerCase() === "onclick" ? "onMouseup" : (_eventNaming(event)) expect(prop2.key).toMatchObject({ type: NodeTypes.COMPOUND_EXPRESSION, children: [ `(`, { children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: 'event' }, `)` ] @@ -248,7 +248,7 @@ describe('compiler-dom: transform v-on', () => { `) === "onClick" ? "onMouseup" : (`, { children: [ - `"on" + _${helperNameMap[CAPITALIZE]}(`, + `_${helperNameMap[TO_HANDLER_KEY]}(`, { content: 'event' }, `)` ] diff --git a/packages/compiler-ssr/__tests__/ssrElement.spec.ts b/packages/compiler-ssr/__tests__/ssrElement.spec.ts index 30e75e36f2b..50b7060a58c 100644 --- a/packages/compiler-ssr/__tests__/ssrElement.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrElement.spec.ts @@ -161,7 +161,7 @@ describe('ssr: element', () => { expect(getCompiledString(`
`)) .toMatchInlineSnapshot(` "\`
\`" `) @@ -170,7 +170,7 @@ describe('ssr: element', () => { "\`
\`" `) @@ -180,7 +180,7 @@ describe('ssr: element', () => { "\`
\`" `) @@ -212,7 +212,7 @@ describe('ssr: element', () => { expect(getCompiledString(`
`)) .toMatchInlineSnapshot(` "\`
\`" `) diff --git a/packages/runtime-core/src/apiLifecycle.ts b/packages/runtime-core/src/apiLifecycle.ts index 5a24ec2da58..4d7b53d36a7 100644 --- a/packages/runtime-core/src/apiLifecycle.ts +++ b/packages/runtime-core/src/apiLifecycle.ts @@ -1,15 +1,15 @@ import { ComponentInternalInstance, - LifecycleHooks, currentInstance, - setCurrentInstance, - isInSSRComponentSetup + isInSSRComponentSetup, + LifecycleHooks, + setCurrentInstance } from './component' import { ComponentPublicInstance } from './componentPublicInstance' import { callWithAsyncErrorHandling, ErrorTypeStrings } from './errorHandling' import { warn } from './warning' -import { capitalize } from '@vue/shared' -import { pauseTracking, resetTracking, DebuggerEvent } from '@vue/reactivity' +import { toHandlerKey } from '@vue/shared' +import { DebuggerEvent, pauseTracking, resetTracking } from '@vue/reactivity' export { onActivated, onDeactivated } from './components/KeepAlive' @@ -49,9 +49,7 @@ export function injectHook( } return wrappedHook } else if (__DEV__) { - const apiName = `on${capitalize( - ErrorTypeStrings[type].replace(/ hook$/, '') - )}` + const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')) warn( `${apiName} is called when there is no active component instance to be ` + `associated with. ` + diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index d8578589c4e..7f1bd1813fb 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -1,13 +1,13 @@ import { - isArray, - isOn, - hasOwn, + camelize, EMPTY_OBJ, - capitalize, + toHandlerKey, + extend, + hasOwn, hyphenate, + isArray, isFunction, - extend, - camelize + isOn } from '@vue/shared' import { ComponentInternalInstance, @@ -56,10 +56,10 @@ export function emit( } = instance if (emitsOptions) { if (!(event in emitsOptions)) { - if (!propsOptions || !(`on` + capitalize(event) in propsOptions)) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { warn( `Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "on${capitalize(event)}" prop.` + `the emits option nor as an "${toHandlerKey(event)}" prop.` ) } } else { @@ -82,7 +82,7 @@ export function emit( if (__DEV__) { const lowerCaseEvent = event.toLowerCase() - if (lowerCaseEvent !== event && props[`on` + capitalize(lowerCaseEvent)]) { + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { warn( `Event "${lowerCaseEvent}" is emitted in component ` + `${formatComponentName( @@ -97,12 +97,12 @@ export function emit( } // convert handler name to camelCase. See issue #2249 - let handlerName = `on${capitalize(camelize(event))}` + let handlerName = toHandlerKey(camelize(event)) let handler = props[handlerName] // for v-model update:xxx events, also trigger kebab-case equivalent // for props passed via kebab-case if (!handler && event.startsWith('update:')) { - handlerName = `on${capitalize(hyphenate(event))}` + handlerName = toHandlerKey(hyphenate(event)) handler = props[handlerName] } if (!handler) { diff --git a/packages/runtime-core/src/helpers/toHandlers.ts b/packages/runtime-core/src/helpers/toHandlers.ts index 38022edd7d9..d366a9b76c9 100644 --- a/packages/runtime-core/src/helpers/toHandlers.ts +++ b/packages/runtime-core/src/helpers/toHandlers.ts @@ -1,4 +1,4 @@ -import { isObject, capitalize } from '@vue/shared' +import { toHandlerKey, isObject } from '@vue/shared' import { warn } from '../warning' /** @@ -12,7 +12,7 @@ export function toHandlers(obj: Record): Record { return ret } for (const key in obj) { - ret[`on${capitalize(key)}`] = obj[key] + ret[toHandlerKey(key)] = obj[key] } return ret } diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index ca1cadf28d9..b711f8895e8 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -240,7 +240,12 @@ export { createCommentVNode, createStaticVNode } from './vnode' -export { toDisplayString, camelize, capitalize } from '@vue/shared' +export { + toDisplayString, + camelize, + capitalize, + toHandlerKey +} from '@vue/shared' // For test-utils export { transformVNodeArgs } from './vnode' diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 997c015d8b8..db47c15ad5e 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1070,6 +1070,7 @@ function baseCreateRenderer( ) => { if (oldProps !== newProps) { for (const key in newProps) { + // empty string is not valid prop if (isReservedProp(key)) continue const next = newProps[key] const prev = oldProps[key] diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 56ff85f5eea..8be4314d5bb 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -644,7 +644,7 @@ export function mergeProps(...args: (Data & VNodeProps)[]) { ? [].concat(existing as any, toMerge[key] as any) : incoming } - } else { + } else if (key !== '') { ret[key] = toMerge[key] } } diff --git a/packages/server-renderer/src/helpers/ssrRenderAttrs.ts b/packages/server-renderer/src/helpers/ssrRenderAttrs.ts index 958e470805c..c06def0a992 100644 --- a/packages/server-renderer/src/helpers/ssrRenderAttrs.ts +++ b/packages/server-renderer/src/helpers/ssrRenderAttrs.ts @@ -10,7 +10,8 @@ import { makeMap } from '@vue/shared' -const shouldIgnoreProp = makeMap(`key,ref,innerHTML,textContent`) +// leading comma for empty string "" +const shouldIgnoreProp = makeMap(`,key,ref,innerHTML,textContent`) export function ssrRenderAttrs( props: Record, diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index f32988096ba..fb355ac399a 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -94,7 +94,8 @@ export const isIntegerKey = (key: unknown) => '' + parseInt(key, 10) === key export const isReservedProp = /*#__PURE__*/ makeMap( - 'key,ref,' + + // the leading comma is intentional so empty string "" is also included + ',key,ref,' + 'onVnodeBeforeMount,onVnodeMounted,' + 'onVnodeBeforeUpdate,onVnodeUpdated,' + 'onVnodeBeforeUnmount,onVnodeUnmounted' @@ -122,19 +123,22 @@ const hyphenateRE = /\B([A-Z])/g /** * @private */ -export const hyphenate = cacheStringFunction( - (str: string): string => { - return str.replace(hyphenateRE, '-$1').toLowerCase() - } +export const hyphenate = cacheStringFunction((str: string) => + str.replace(hyphenateRE, '-$1').toLowerCase() ) /** * @private */ export const capitalize = cacheStringFunction( - (str: string): string => { - return str.charAt(0).toUpperCase() + str.slice(1) - } + (str: string) => str.charAt(0).toUpperCase() + str.slice(1) +) + +/** + * @private + */ +export const toHandlerKey = cacheStringFunction( + (str: string) => (str ? `on${capitalize(str)}` : ``) ) // compare whether a value has changed, accounting for NaN. From 8e5cdc0d0e1ceea233f7e46039fc9120db2a9694 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 19 Oct 2020 23:19:49 +0200 Subject: [PATCH 0074/4002] ci: add size check on push (#2392) --- .github/workflows/size-check.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/size-check.yml b/.github/workflows/size-check.yml index bf63447ecd3..9ddd816273d 100644 --- a/.github/workflows/size-check.yml +++ b/.github/workflows/size-check.yml @@ -1,5 +1,8 @@ name: 'size' on: + push: + branches: + - master pull_request: branches: - master @@ -12,7 +15,7 @@ jobs: - uses: actions/checkout@v1 - uses: bahmutov/npm-install@v1 - - uses: posva/size-check-action@v1.0.2 + - uses: posva/size-check-action@v1.1.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} build_script: size From d9ad45ad6cf05c47d6a3438b57366d7d2146d13b Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Mon, 19 Oct 2020 22:25:55 +0100 Subject: [PATCH 0075/4002] types(defineComponent): fix optional Boolean prop types (#2401) fix #2338 --- packages/runtime-core/src/componentProps.ts | 19 +++++++++++++-- test-dts/defineComponent.test-d.tsx | 5 ++++ test-dts/h.test-d.ts | 26 +++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index 938318d4a9f..f1be9b76961 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -65,13 +65,28 @@ type PropMethod = T extends (...args: any) => any // if i : never type RequiredKeys = { - [K in keyof T]: T[K] extends { required: true } | { default: any } ? K : never + [K in keyof T]: T[K] extends + | { required: true } + | { default: any } + // don't mark Boolean props as undefined + | BooleanConstructor + | { type: BooleanConstructor } + ? K + : never }[keyof T] type OptionalKeys = Exclude> type DefaultKeys = { - [K in keyof T]: T[K] extends { default: any } ? K : never + [K in keyof T]: T[K] extends + | { default: any } + // Boolean implicitly defaults to false + | BooleanConstructor + | { type: BooleanConstructor } + ? T[K] extends { type: BooleanConstructor; required: true } // not default if Boolean is marked as required + ? never + : K + : never }[keyof T] type InferPropType = T extends null diff --git a/test-dts/defineComponent.test-d.tsx b/test-dts/defineComponent.test-d.tsx index f201d660d87..c77feba025d 100644 --- a/test-dts/defineComponent.test-d.tsx +++ b/test-dts/defineComponent.test-d.tsx @@ -19,6 +19,7 @@ describe('with object props', () => { a?: number | undefined b: string e?: Function + h: boolean bb: string bbb: string cc?: string[] | undefined @@ -46,6 +47,7 @@ describe('with object props', () => { required: true }, e: Function, + h: Boolean, // default value should infer type and make it non-void bb: { default: 'hello' @@ -108,6 +110,7 @@ describe('with object props', () => { expectType(props.a) expectType(props.b) expectType(props.e) + expectType(props.h) expectType(props.bb) expectType(props.bbb) expectType(props.cc) @@ -142,6 +145,7 @@ describe('with object props', () => { expectType(props.a) expectType(props.b) expectType(props.e) + expectType(props.h) expectType(props.bb) expectType(props.cc) expectType(props.dd) @@ -161,6 +165,7 @@ describe('with object props', () => { expectType(this.a) expectType(this.b) expectType(this.e) + expectType(this.h) expectType(this.bb) expectType(this.cc) expectType(this.dd) diff --git a/test-dts/h.test-d.ts b/test-dts/h.test-d.ts index 4376eaf979e..877c62860cd 100644 --- a/test-dts/h.test-d.ts +++ b/test-dts/h.test-d.ts @@ -198,3 +198,29 @@ describe('component w/ props w/ default value', () => { h(MyComponent, {}) }) + +// #2338 +describe('Boolean prop implicit false', () => { + const MyComponent = defineComponent({ + props: { + visible: Boolean + } + }) + + h(MyComponent, {}) + + const RequiredComponent = defineComponent({ + props: { + visible: { + type: Boolean, + required: true + } + } + }) + + h(RequiredComponent, { + visible: true + }) + // @ts-expect-error + expectError(h(RequiredComponent, {})) +}) From 0e5a3c47a7398dfd0107fccf9b615772dd01aa74 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 19 Oct 2020 17:37:10 -0400 Subject: [PATCH 0076/4002] fix(reactivity): track length on for in iteration on Array fix #2427 --- .../reactivity/__tests__/reactiveArray.spec.ts | 15 +++++++++++++++ packages/reactivity/src/baseHandlers.ts | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/reactivity/__tests__/reactiveArray.spec.ts b/packages/reactivity/__tests__/reactiveArray.spec.ts index 170cb1b39c1..da3dc1f101a 100644 --- a/packages/reactivity/__tests__/reactiveArray.spec.ts +++ b/packages/reactivity/__tests__/reactiveArray.spec.ts @@ -128,6 +128,21 @@ describe('reactivity/reactive/Array', () => { expect(fn).toHaveBeenCalledTimes(1) }) + // #2427 + test('track length on for ... in iteration', () => { + const array = reactive([1]) + let length = '' + effect(() => { + length = '' + for (const key in array) { + length += key + } + }) + expect(length).toBe('0') + array.push(1) + expect(length).toBe('01') + }) + describe('Array methods w/ refs', () => { let original: any[] beforeEach(() => { diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 3d5ee55f621..a246b6f3194 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -179,7 +179,7 @@ function has(target: object, key: string | symbol): boolean { } function ownKeys(target: object): (string | number | symbol)[] { - track(target, TrackOpTypes.ITERATE, ITERATE_KEY) + track(target, TrackOpTypes.ITERATE, isArray(target) ? 'length' : ITERATE_KEY) return Reflect.ownKeys(target) } From e894caf7315bc36ea30a2fba3f1263025cb9deb0 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 20 Oct 2020 05:40:21 +0800 Subject: [PATCH 0077/4002] types(tsx): svg xmlns attribute typing (#2344) --- packages/runtime-dom/types/jsx.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index 5d6bf20fbc8..f0c426009de 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -1004,6 +1004,7 @@ export interface SVGAttributes extends AriaAttributes, EventHandlers { xlinkShow?: string xlinkTitle?: string xlinkType?: string + xmlns?: string y1?: number | string y2?: number | string y?: number | string From edd49dcab40eb3faa44248772b176d5eebfd30fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=9B=A8=E6=B0=B4=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=B0=94?= <958414905@qq.com> Date: Tue, 20 Oct 2020 06:08:54 +0800 Subject: [PATCH 0078/4002] fix(runtime-core): avoid mutating EMPTY_ARR when setting dev root (#2419) also freeze EMPTY_ARR in dev fix #2413 --- packages/runtime-core/src/componentProps.ts | 2 +- packages/runtime-core/src/componentRenderUtils.ts | 12 +++++++----- packages/runtime-core/src/vnode.ts | 2 +- packages/shared/src/index.ts | 2 +- packages/vue/__tests__/index.spec.ts | 11 +++++++++++ 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index f1be9b76961..47b06459505 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -378,7 +378,7 @@ export function normalizePropsOptions( } if (!raw && !hasExtends) { - return (comp.__props = EMPTY_ARR) + return (comp.__props = EMPTY_ARR as any) } if (isArray(raw)) { diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 39f53603c56..a3da6e0ff4f 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -226,7 +226,7 @@ const getChildRoot = ( return [vnode, undefined] } const rawChildren = vnode.children as VNodeArrayChildren - const dynamicChildren = vnode.dynamicChildren as VNodeArrayChildren + const dynamicChildren = vnode.dynamicChildren const childRoot = filterSingleRoot(rawChildren) if (!childRoot) { return [vnode, undefined] @@ -235,10 +235,12 @@ const getChildRoot = ( const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1 const setRoot = (updatedRoot: VNode) => { rawChildren[index] = updatedRoot - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot - } else if (dynamicChildren && updatedRoot.patchFlag > 0) { - dynamicChildren.push(updatedRoot) + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot] + } } } return [normalizeVNode(childRoot), setRoot] diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 8be4314d5bb..88fca729634 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -243,7 +243,7 @@ export function createBlock( true /* isBlock: prevent a block from tracking itself */ ) // save current block children on the block vnode - vnode.dynamicChildren = currentBlock || EMPTY_ARR + vnode.dynamicChildren = currentBlock || (EMPTY_ARR as any) // close block closeBlock() // a block is always going to be patched, so track it as a child of its diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index fb355ac399a..84b324beda3 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -28,7 +28,7 @@ export const babelParserDefaultPlugins = [ export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__ ? Object.freeze({}) : {} -export const EMPTY_ARR: [] = [] +export const EMPTY_ARR = __DEV__ ? Object.freeze([]) : [] export const NOOP = () => {} diff --git a/packages/vue/__tests__/index.spec.ts b/packages/vue/__tests__/index.spec.ts index 18c1c182e5a..ae1f35bc259 100644 --- a/packages/vue/__tests__/index.spec.ts +++ b/packages/vue/__tests__/index.spec.ts @@ -1,3 +1,4 @@ +import { EMPTY_ARR } from '@vue/shared' import { createApp, ref, nextTick, reactive } from '../src' describe('compiler + runtime integration', () => { @@ -281,4 +282,14 @@ describe('compiler + runtime integration', () => { await nextTick() expect(container.innerHTML).toBe(`
2
1
`) }) + + // #2413 + it('EMPTY_ARR should not change', () => { + const App = { + template: `
{{ v }}
` + } + const container = document.createElement('div') + createApp(App).mount(container) + expect(EMPTY_ARR.length).toBe(0) + }) }) From 314ab2c7c5dec56d9b117ac3bb988f19d92cf126 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 20 Oct 2020 00:12:09 +0200 Subject: [PATCH 0079/4002] fix(compiler): stringify values on v-text (#2432) fix #2430 --- .../__tests__/__snapshots__/index.spec.ts.snap | 6 ++++-- .../__tests__/transforms/vText.spec.ts | 8 ++++++-- packages/compiler-dom/src/transforms/vText.ts | 14 +++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap b/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap index 40e14d51f18..c094979fcd3 100644 --- a/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap +++ b/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap @@ -5,10 +5,12 @@ exports[`compile should contain standard transforms 1`] = ` return function render(_ctx, _cache) { with (_ctx) { - const { createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock } = _Vue + const { toDisplayString: _toDisplayString, createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock } = _Vue return (_openBlock(), _createBlock(_Fragment, null, [ - _createVNode(\\"div\\", { textContent: text }, null, 8 /* PROPS */, [\\"textContent\\"]), + _createVNode(\\"div\\", { + textContent: _toDisplayString(text) + }, null, 8 /* PROPS */, [\\"textContent\\"]), _createVNode(\\"div\\", { innerHTML: html }, null, 8 /* PROPS */, [\\"innerHTML\\"]), _createVNode(\\"div\\", null, \\"test\\"), _createVNode(\\"div\\", { style: {\\"color\\":\\"red\\"} }, \\"red\\"), diff --git a/packages/compiler-dom/__tests__/transforms/vText.spec.ts b/packages/compiler-dom/__tests__/transforms/vText.spec.ts index de31fdd44a4..75dbda31fd1 100644 --- a/packages/compiler-dom/__tests__/transforms/vText.spec.ts +++ b/packages/compiler-dom/__tests__/transforms/vText.spec.ts @@ -31,7 +31,9 @@ describe('compiler: v-text transform', () => { expect((ast.children[0] as PlainElementNode).codegenNode).toMatchObject({ tag: `"div"`, props: createObjectMatcher({ - textContent: `[test]` + textContent: { + arguments: [{ content: 'test' }] + } }), children: undefined, patchFlag: genFlagText(PatchFlags.PROPS), @@ -50,7 +52,9 @@ describe('compiler: v-text transform', () => { expect((ast.children[0] as PlainElementNode).codegenNode).toMatchObject({ tag: `"div"`, props: createObjectMatcher({ - textContent: `[test]` + textContent: { + arguments: [{ content: 'test' }] + } }), children: undefined, // <-- children should have been removed patchFlag: genFlagText(PatchFlags.PROPS), diff --git a/packages/compiler-dom/src/transforms/vText.ts b/packages/compiler-dom/src/transforms/vText.ts index 0969ce95ecc..862d2c2040c 100644 --- a/packages/compiler-dom/src/transforms/vText.ts +++ b/packages/compiler-dom/src/transforms/vText.ts @@ -1,7 +1,9 @@ import { DirectiveTransform, createObjectProperty, - createSimpleExpression + createSimpleExpression, + TO_DISPLAY_STRING, + createCallExpression } from '@vue/compiler-core' import { createDOMCompilerError, DOMErrorCodes } from '../errors' @@ -21,8 +23,14 @@ export const transformVText: DirectiveTransform = (dir, node, context) => { return { props: [ createObjectProperty( - createSimpleExpression(`textContent`, true, loc), - exp || createSimpleExpression('', true) + createSimpleExpression(`textContent`, true), + exp + ? createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) + : createSimpleExpression('', true) ) ] } From 111d04f119a2b2d0b1a1790a063b152c17787943 Mon Sep 17 00:00:00 2001 From: Hunter Date: Tue, 20 Oct 2020 08:45:48 +0800 Subject: [PATCH 0080/4002] fix(runtime-core): prevent self-injection (#2424) fix #2400 --- packages/runtime-core/__tests__/apiInject.spec.ts | 15 +++++++++++++++ packages/runtime-core/src/apiInject.ts | 11 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/__tests__/apiInject.spec.ts b/packages/runtime-core/__tests__/apiInject.spec.ts index 8498e4f848f..bb21524878a 100644 --- a/packages/runtime-core/__tests__/apiInject.spec.ts +++ b/packages/runtime-core/__tests__/apiInject.spec.ts @@ -303,4 +303,19 @@ describe('api: provide/inject', () => { render(h(Provider), root) expect(`injection "foo" not found.`).not.toHaveBeenWarned() }) + + // #2400 + it('should not self-inject', () => { + const Comp = { + setup() { + provide('foo', 'foo') + const injection = inject('foo', null) + return () => injection + } + } + + const root = nodeOps.createElement('div') + render(h(Comp), root) + expect(serialize(root)).toBe(`
`) + }) }) diff --git a/packages/runtime-core/src/apiInject.ts b/packages/runtime-core/src/apiInject.ts index c12b6490849..186b411b241 100644 --- a/packages/runtime-core/src/apiInject.ts +++ b/packages/runtime-core/src/apiInject.ts @@ -47,8 +47,15 @@ export function inject( // a functional component const instance = currentInstance || currentRenderingInstance if (instance) { - const provides = instance.provides - if ((key as string | symbol) in provides) { + // #2400 + // to support `app.use` plugins, + // fallback to appContext's `provides` if the intance is at root + const provides = + instance.parent == null + ? instance.vnode.appContext && instance.vnode.appContext.provides + : instance.parent.provides + + if (provides && (key as string | symbol) in provides) { // TS doesn't allow symbol as index type return provides[key as string] } else if (arguments.length > 1) { From 288c764e5279ccef63e0ef304d4250f5ad935a46 Mon Sep 17 00:00:00 2001 From: ShaoDamao Date: Tue, 20 Oct 2020 14:51:05 +0800 Subject: [PATCH 0081/4002] chore(runtime-core): fix typo (#2442) Co-authored-by: shaoziwei --- packages/runtime-core/src/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 3fea92ba4e5..8f089eb4ee3 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -66,7 +66,7 @@ export type Data = Record export interface ComponentCustomProps {} /** - * Default allowed non-declared props on ocmponent in TSX + * Default allowed non-declared props on component in TSX */ export interface AllowedComponentProps { class?: unknown From 6d2a1cb64d090c482ed2cde7311f81b33e0f8d90 Mon Sep 17 00:00:00 2001 From: Hunter Date: Tue, 20 Oct 2020 21:31:08 +0800 Subject: [PATCH 0082/4002] fix(compiler-core): fix multiline member expression check (#2436) fix #2426 --- .../transforms/__snapshots__/vModel.spec.ts.snap | 8 ++++++-- .../compiler-core/__tests__/transforms/vModel.spec.ts | 7 ++++--- packages/compiler-core/src/utils.ts | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/__snapshots__/vModel.spec.ts.snap b/packages/compiler-core/__tests__/transforms/__snapshots__/vModel.spec.ts.snap index cdbe3c3eefa..bef1bd699b7 100644 --- a/packages/compiler-core/__tests__/transforms/__snapshots__/vModel.spec.ts.snap +++ b/packages/compiler-core/__tests__/transforms/__snapshots__/vModel.spec.ts.snap @@ -35,10 +35,14 @@ return function render(_ctx, _cache) { return (_openBlock(), _createBlock(\\"input\\", { modelValue: - model + model +. +foo , \\"onUpdate:modelValue\\": $event => ( - model + model +. +foo = $event) }, null, 8 /* PROPS */, [\\"modelValue\\", \\"onUpdate:modelValue\\"])) } diff --git a/packages/compiler-core/__tests__/transforms/vModel.spec.ts b/packages/compiler-core/__tests__/transforms/vModel.spec.ts index 42f9c6052b2..119624cda8c 100644 --- a/packages/compiler-core/__tests__/transforms/vModel.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vModel.spec.ts @@ -115,8 +115,9 @@ describe('compiler: transform v-model', () => { expect(generate(root, { mode: 'module' }).code).toMatchSnapshot() }) + // #2426 test('simple expression (with multilines)', () => { - const root = parseWithVModel('') + const root = parseWithVModel('') const node = root.children[0] as ElementNode const props = ((node.codegenNode as VNodeCall).props as ObjectExpression) .properties @@ -127,7 +128,7 @@ describe('compiler: transform v-model', () => { isStatic: true }, value: { - content: '\n model \n', + content: '\n model\n.\nfoo \n', isStatic: false } }) @@ -141,7 +142,7 @@ describe('compiler: transform v-model', () => { children: [ '$event => (', { - content: '\n model \n', + content: '\n model\n.\nfoo \n', isStatic: false }, ' = $event)' diff --git a/packages/compiler-core/src/utils.ts b/packages/compiler-core/src/utils.ts index efc97f5d4c4..107bb0f6c14 100644 --- a/packages/compiler-core/src/utils.ts +++ b/packages/compiler-core/src/utils.ts @@ -56,7 +56,7 @@ const nonIdentifierRE = /^\d|[^\$\w]/ export const isSimpleIdentifier = (name: string): boolean => !nonIdentifierRE.test(name) -const memberExpRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^\]]+\])*$/ +const memberExpRE = /^[A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*|\[[^\]]+\])*$/ export const isMemberExpression = (path: string): boolean => { if (!path) return false return memberExpRE.test(path.trim()) From 4bbb2b2ee6866ed80cb542c2ff24207b4bd09bda Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 20 Oct 2020 09:49:53 -0400 Subject: [PATCH 0083/4002] fix(runtime-core): fix component .once listener logic --- .../__tests__/componentEmits.spec.ts | 24 +++++++++++++++++++ packages/runtime-core/src/componentEmits.ts | 18 ++++++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/packages/runtime-core/__tests__/componentEmits.spec.ts b/packages/runtime-core/__tests__/componentEmits.spec.ts index 317b36f8ccb..f93d547ab19 100644 --- a/packages/runtime-core/__tests__/componentEmits.spec.ts +++ b/packages/runtime-core/__tests__/componentEmits.spec.ts @@ -196,6 +196,30 @@ describe('component: emit', () => { expect(fn).toHaveBeenCalledTimes(1) }) + test('.once with normal listener of the same name', () => { + const Foo = defineComponent({ + render() {}, + emits: { + foo: null + }, + created() { + this.$emit('foo') + this.$emit('foo') + } + }) + const onFoo = jest.fn() + const onFooOnce = jest.fn() + render( + h(Foo, { + onFoo, + onFooOnce + }), + nodeOps.createElement('div') + ) + expect(onFoo).toHaveBeenCalledTimes(2) + expect(onFooOnce).toHaveBeenCalledTimes(1) + }) + test('isEmitListener', () => { const options = { click: null } expect(isEmitListener(options, 'onClick')).toBe(true) diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index 7f1bd1813fb..726a16b8743 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -105,17 +105,25 @@ export function emit( handlerName = toHandlerKey(hyphenate(event)) handler = props[handlerName] } - if (!handler) { - handler = props[handlerName + `Once`] + + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + ErrorCodes.COMPONENT_EVENT_HANDLER, + args + ) + } + + const onceHandler = props[handlerName + `Once`] + if (onceHandler) { if (!instance.emitted) { ;(instance.emitted = {} as Record)[handlerName] = true } else if (instance.emitted[handlerName]) { return } - } - if (handler) { callWithAsyncErrorHandling( - handler, + onceHandler, instance, ErrorCodes.COMPONENT_EVENT_HANDLER, args From 128ec460ec00ca8672352d019b264c80dfd0c3b0 Mon Sep 17 00:00:00 2001 From: Hunter Date: Tue, 20 Oct 2020 21:59:27 +0800 Subject: [PATCH 0084/4002] fix(v-model): built in modifiers support on component (#2348) close #2326 --- .../__tests__/componentEmits.spec.ts | 62 +++++++++++++++++++ packages/runtime-core/src/componentEmits.ts | 26 ++++++-- 2 files changed, 84 insertions(+), 4 deletions(-) diff --git a/packages/runtime-core/__tests__/componentEmits.spec.ts b/packages/runtime-core/__tests__/componentEmits.spec.ts index f93d547ab19..53c8d324ea3 100644 --- a/packages/runtime-core/__tests__/componentEmits.spec.ts +++ b/packages/runtime-core/__tests__/componentEmits.spec.ts @@ -220,6 +220,68 @@ describe('component: emit', () => { expect(onFooOnce).toHaveBeenCalledTimes(1) }) + test('.number modifier should work with v-model on component', () => { + const Foo = defineComponent({ + render() {}, + created() { + this.$emit('update:modelValue', '1') + this.$emit('update:foo', '2') + } + }) + + const fn1 = jest.fn() + const fn2 = jest.fn() + + const Comp = () => + h(Foo, { + modelValue: null, + modelModifiers: { number: true }, + 'onUpdate:modelValue': fn1, + + foo: null, + fooModifiers: { number: true }, + 'onUpdate:foo': fn2 + }) + + render(h(Comp), nodeOps.createElement('div')) + + expect(fn1).toHaveBeenCalledTimes(1) + expect(fn1).toHaveBeenCalledWith(1) + expect(fn2).toHaveBeenCalledTimes(1) + expect(fn2).toHaveBeenCalledWith(2) + }) + + test('.trim modifier should work with v-model on component', () => { + const Foo = defineComponent({ + render() {}, + created() { + this.$emit('update:modelValue', ' one ') + this.$emit('update:foo', ' two ') + } + }) + + const fn1 = jest.fn() + const fn2 = jest.fn() + + const Comp = () => + h(Foo, { + modelValue: null, + modelModifiers: { trim: true }, + 'onUpdate:modelValue': fn1, + + foo: null, + fooModifiers: { trim: true }, + 'onUpdate:foo': fn2 + }) + + render(h(Comp), nodeOps.createElement('div')) + + expect(fn1).toHaveBeenCalledTimes(1) + expect(fn1).toHaveBeenCalledWith('one') + expect(fn2).toHaveBeenCalledTimes(1) + expect(fn2).toHaveBeenCalledWith('two') + }) + test('isEmitListener', () => { const options = { click: null } expect(isEmitListener(options, 'onClick')).toBe(true) diff --git a/packages/runtime-core/src/componentEmits.ts b/packages/runtime-core/src/componentEmits.ts index 726a16b8743..6b9e505de62 100644 --- a/packages/runtime-core/src/componentEmits.ts +++ b/packages/runtime-core/src/componentEmits.ts @@ -7,7 +7,8 @@ import { hyphenate, isArray, isFunction, - isOn + isOn, + toNumber } from '@vue/shared' import { ComponentInternalInstance, @@ -45,7 +46,7 @@ export type EmitFn< export function emit( instance: ComponentInternalInstance, event: string, - ...args: any[] + ...rawArgs: any[] ) { const props = instance.vnode.props || EMPTY_OBJ @@ -65,7 +66,7 @@ export function emit( } else { const validator = emitsOptions[event] if (isFunction(validator)) { - const isValid = validator(...args) + const isValid = validator(...rawArgs) if (!isValid) { warn( `Invalid event arguments: event validation failed for event "${event}".` @@ -76,6 +77,23 @@ export function emit( } } + let args = rawArgs + const isModelListener = event.startsWith('update:') + + // for v-model update:xxx events, apply modifiers on args + const modelArg = isModelListener && event.slice(7) + if (modelArg && modelArg in props) { + const modifiersKey = `${ + modelArg === 'modelValue' ? 'model' : modelArg + }Modifiers` + const { number, trim } = props[modifiersKey] || EMPTY_OBJ + if (trim) { + args = rawArgs.map(a => a.trim()) + } else if (number) { + args = rawArgs.map(toNumber) + } + } + if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { devtoolsComponentEmit(instance, event, args) } @@ -101,7 +119,7 @@ export function emit( let handler = props[handlerName] // for v-model update:xxx events, also trigger kebab-case equivalent // for props passed via kebab-case - if (!handler && event.startsWith('update:')) { + if (!handler && isModelListener) { handlerName = toHandlerKey(hyphenate(event)) handler = props[handlerName] } From 0227b4a697afd598f6fa279a1a7ce84242e68f43 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 20 Oct 2020 12:28:02 -0400 Subject: [PATCH 0085/4002] fix(suspense): fix suspense nested child updates in template mode fix #2214 --- .../__tests__/components/Suspense.spec.ts | 25 ++++++++++++ .../runtime-core/src/components/Suspense.ts | 40 ++++++------------- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/packages/runtime-core/__tests__/components/Suspense.spec.ts b/packages/runtime-core/__tests__/components/Suspense.spec.ts index 5602b4a7f14..e9800475532 100644 --- a/packages/runtime-core/__tests__/components/Suspense.spec.ts +++ b/packages/runtime-core/__tests__/components/Suspense.spec.ts @@ -14,6 +14,7 @@ import { onErrorCaptured, shallowRef } from '@vue/runtime-test' +import { createApp } from 'vue' describe('Suspense', () => { const deps: Promise[] = [] @@ -1068,4 +1069,28 @@ describe('Suspense', () => { expect(serializeInner(root)).toBe(`
two
`) expect(calls).toEqual([`one mounted`, `one unmounted`, `two mounted`]) }) + + // #2214 + // Since suspense renders its own root like a component, it should not patch + // its content in optimized mode. + test('should not miss nested element updates when used in templates', async () => { + const n = ref(1) + const Comp = { + setup() { + return { n } + }, + template: ` + +
{{ n }}
+
+ ` + } + const root = document.createElement('div') + createApp(Comp).mount(root) + expect(root.innerHTML).toBe(`
1
`) + + n.value++ + await nextTick() + expect(root.innerHTML).toBe(`
2
`) + }) }) diff --git a/packages/runtime-core/src/components/Suspense.ts b/packages/runtime-core/src/components/Suspense.ts index 288139609a9..105af731531 100644 --- a/packages/runtime-core/src/components/Suspense.ts +++ b/packages/runtime-core/src/components/Suspense.ts @@ -69,7 +69,6 @@ export const SuspenseImpl = { anchor, parentComponent, isSVG, - optimized, rendererInternals ) } @@ -121,8 +120,7 @@ function mountSuspense( null, parentComponent, suspense, - isSVG, - optimized + isSVG ) // now check if we have encountered any async deps if (suspense.deps > 0) { @@ -135,8 +133,7 @@ function mountSuspense( anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, - optimized + isSVG ) setActiveBranch(suspense, vnode.ssFallback!) } else { @@ -152,7 +149,6 @@ function patchSuspense( anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, isSVG: boolean, - optimized: boolean, { p: patch, um: unmount, o: { createElement } }: RendererInternals ) { const suspense = (n2.suspense = n1.suspense)! @@ -173,8 +169,7 @@ function patchSuspense( null, parentComponent, suspense, - isSVG, - optimized + isSVG ) if (suspense.deps <= 0) { suspense.resolve() @@ -186,8 +181,7 @@ function patchSuspense( anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, - optimized + isSVG ) setActiveBranch(suspense, newFallback) } @@ -220,8 +214,7 @@ function patchSuspense( null, parentComponent, suspense, - isSVG, - optimized + isSVG ) if (suspense.deps <= 0) { suspense.resolve() @@ -233,8 +226,7 @@ function patchSuspense( anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, - optimized + isSVG ) setActiveBranch(suspense, newFallback) } @@ -247,8 +239,7 @@ function patchSuspense( anchor, parentComponent, suspense, - isSVG, - optimized + isSVG ) // force resolve suspense.resolve(true) @@ -261,8 +252,7 @@ function patchSuspense( null, parentComponent, suspense, - isSVG, - optimized + isSVG ) if (suspense.deps <= 0) { suspense.resolve() @@ -279,8 +269,7 @@ function patchSuspense( anchor, parentComponent, suspense, - isSVG, - optimized + isSVG ) setActiveBranch(suspense, newBranch) } else { @@ -300,8 +289,7 @@ function patchSuspense( null, parentComponent, suspense, - isSVG, - optimized + isSVG ) if (suspense.deps <= 0) { // incoming branch has no async deps, resolve now. @@ -327,7 +315,6 @@ export interface SuspenseBoundary { parent: SuspenseBoundary | null parentComponent: ComponentInternalInstance | null isSVG: boolean - optimized: boolean container: RendererElement hiddenContainer: RendererElement anchor: RendererNode | null @@ -392,7 +379,6 @@ function createSuspenseBoundary( parent, parentComponent, isSVG, - optimized, container, hiddenContainer, anchor, @@ -499,8 +485,7 @@ function createSuspenseBoundary( activeBranch, parentComponent, container, - isSVG, - optimized + isSVG } = suspense // invoke @fallback event @@ -522,8 +507,7 @@ function createSuspenseBoundary( anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, - optimized + isSVG ) setActiveBranch(suspense, fallbackVNode) } From fff62e2ee8accf31bb5ac5abdb4c0636216cfd0e Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Wed, 21 Oct 2020 02:59:55 +0800 Subject: [PATCH 0086/4002] fix(runtime-core): non-stable Fragment should always unmount its children (#2445) fix #2444 --- .../__tests__/rendererOptimizedMode.spec.ts | 42 +++++++++++++++++++ packages/runtime-core/src/renderer.ts | 7 +++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts b/packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts index 8b674b8a395..24f496caa79 100644 --- a/packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts +++ b/packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts @@ -475,4 +475,46 @@ describe('renderer: optimized mode', () => { render(null, root) expect(spy).toHaveBeenCalledTimes(1) }) + + // #2444 + // `KEYED_FRAGMENT` and `UNKEYED_FRAGMENT` always need to diff its children + test('non-stable Fragment always need to diff its children', () => { + const spyA = jest.fn() + const spyB = jest.fn() + const ChildA = { + setup() { + onBeforeUnmount(spyA) + return () => 'child' + } + } + const ChildB = { + setup() { + onBeforeUnmount(spyB) + return () => 'child' + } + } + const Parent = () => ( + openBlock(), + createBlock('div', null, [ + (openBlock(true), + createBlock( + Fragment, + null, + [createVNode(ChildA, { key: 0 })], + 128 /* KEYED_FRAGMENT */ + )), + (openBlock(true), + createBlock( + Fragment, + null, + [createVNode(ChildB)], + 256 /* UNKEYED_FRAGMENT */ + )) + ]) + ) + render(h(Parent), root) + render(null, root) + expect(spyA).toHaveBeenCalledTimes(1) + expect(spyB).toHaveBeenCalledTimes(1) + }) }) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index db47c15ad5e..f0182c16f64 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -2038,7 +2038,12 @@ function baseCreateRenderer( false, true ) - } else if (!optimized && shapeFlag & ShapeFlags.ARRAY_CHILDREN) { + } else if ( + (type === Fragment && + (patchFlag & PatchFlags.KEYED_FRAGMENT || + patchFlag & PatchFlags.UNKEYED_FRAGMENT)) || + (!optimized && shapeFlag & ShapeFlags.ARRAY_CHILDREN) + ) { unmountChildren(children as VNode[], parentComponent, parentSuspense) } From 1f2a652a9d2e3bec472fb1786a4c16d6ccfa1fb1 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Tue, 20 Oct 2020 20:56:29 +0100 Subject: [PATCH 0087/4002] fix(types): h support for resolveComponent (#2402) close #2357 --- packages/runtime-core/src/h.ts | 18 +++++++++++++++++- .../runtime-core/src/helpers/resolveAssets.ts | 4 +--- test-dts/h.test-d.ts | 11 ++++++++++- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packages/runtime-core/src/h.ts b/packages/runtime-core/src/h.ts index bf03247f2cb..cb87cf6ee3c 100644 --- a/packages/runtime-core/src/h.ts +++ b/packages/runtime-core/src/h.ts @@ -10,7 +10,12 @@ import { Teleport, TeleportProps } from './components/Teleport' import { Suspense, SuspenseProps } from './components/Suspense' import { isObject, isArray } from '@vue/shared' import { RawSlots } from './componentSlots' -import { FunctionalComponent, Component, ComponentOptions } from './component' +import { + FunctionalComponent, + Component, + ComponentOptions, + ConcreteComponent +} from './component' import { EmitsOptions } from './componentEmits' import { DefineComponent } from './apiDefineComponent' @@ -112,6 +117,17 @@ export function h( // catch-all for generic component types export function h(type: Component, children?: RawChildren): VNode +// concrete component +export function h

( + type: ConcreteComponent | string, + children?: RawChildren +): VNode +export function h

( + type: ConcreteComponent

| string, + props?: (RawProps & P) | ({} extends P ? null : never), + children?: RawChildren +): VNode + // component without props export function h( type: Component, diff --git a/packages/runtime-core/src/helpers/resolveAssets.ts b/packages/runtime-core/src/helpers/resolveAssets.ts index 59c9f4cc14c..2ed49fba085 100644 --- a/packages/runtime-core/src/helpers/resolveAssets.ts +++ b/packages/runtime-core/src/helpers/resolveAssets.ts @@ -16,9 +16,7 @@ const DIRECTIVES = 'directives' /** * @private */ -export function resolveComponent( - name: string -): ConcreteComponent | string | undefined { +export function resolveComponent(name: string): ConcreteComponent | string { return resolveAsset(COMPONENTS, name) || name } diff --git a/test-dts/h.test-d.ts b/test-dts/h.test-d.ts index 877c62860cd..c71b54a2aa8 100644 --- a/test-dts/h.test-d.ts +++ b/test-dts/h.test-d.ts @@ -8,7 +8,8 @@ import { Suspense, Component, expectError, - expectAssignable + expectAssignable, + resolveComponent } from './index' describe('h inference w/ element', () => { @@ -224,3 +225,11 @@ describe('Boolean prop implicit false', () => { // @ts-expect-error expectError(h(RequiredComponent, {})) }) + +// #2357 +describe('resolveComponent should work', () => { + h(resolveComponent('test')) + h(resolveComponent('test'), { + message: '1' + }) +}) From f2d03a59c676e3cc805eb995dfa48ce19b6234ef Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 20 Oct 2020 16:24:12 -0400 Subject: [PATCH 0088/4002] release: v3.0.2 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ package.json | 2 +- packages/compiler-core/package.json | 4 ++-- packages/compiler-dom/package.json | 6 +++--- packages/compiler-sfc/package.json | 12 ++++++------ packages/compiler-ssr/package.json | 6 +++--- packages/reactivity/package.json | 4 ++-- packages/runtime-core/package.json | 6 +++--- packages/runtime-dom/package.json | 6 +++--- packages/runtime-test/package.json | 6 +++--- packages/server-renderer/package.json | 8 ++++---- packages/shared/package.json | 2 +- packages/size-check/package.json | 2 +- packages/template-explorer/package.json | 2 +- packages/vue/package.json | 8 ++++---- 15 files changed, 61 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b19e869acd..26b2357c845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## [3.0.2](https://github.com/vuejs/vue-next/compare/v3.0.1...v3.0.2) (2020-10-20) + + +### Bug Fixes + +* **compiler:** stringify values on v-text ([#2432](https://github.com/vuejs/vue-next/issues/2432)) ([314ab2c](https://github.com/vuejs/vue-next/commit/314ab2c7c5dec56d9b117ac3bb988f19d92cf126)), closes [#2430](https://github.com/vuejs/vue-next/issues/2430) +* **compiler-core:** fix multiline member expression check ([#2436](https://github.com/vuejs/vue-next/issues/2436)) ([6d2a1cb](https://github.com/vuejs/vue-next/commit/6d2a1cb64d090c482ed2cde7311f81b33e0f8d90)), closes [#2426](https://github.com/vuejs/vue-next/issues/2426) +* **reactivity:** track length on for in iteration on Array ([0e5a3c4](https://github.com/vuejs/vue-next/commit/0e5a3c47a7398dfd0107fccf9b615772dd01aa74)), closes [#2427](https://github.com/vuejs/vue-next/issues/2427) +* **runtime-core:** avoid mutating EMPTY_ARR when setting dev root ([#2419](https://github.com/vuejs/vue-next/issues/2419)) ([edd49dc](https://github.com/vuejs/vue-next/commit/edd49dcab40eb3faa44248772b176d5eebfd30fe)), closes [#2413](https://github.com/vuejs/vue-next/issues/2413) +* **runtime-core:** avoid object prototype keys in property access cache ([#2416](https://github.com/vuejs/vue-next/issues/2416)) ([ba881f9](https://github.com/vuejs/vue-next/commit/ba881f9190510c613f04950b69d78f6af1a90e06)) +* **runtime-core:** fix component .once listener logic ([4bbb2b2](https://github.com/vuejs/vue-next/commit/4bbb2b2ee6866ed80cb542c2ff24207b4bd09bda)) +* **runtime-core:** non-stable Fragment should always unmount its children ([#2445](https://github.com/vuejs/vue-next/issues/2445)) ([fff62e2](https://github.com/vuejs/vue-next/commit/fff62e2ee8accf31bb5ac5abdb4c0636216cfd0e)), closes [#2444](https://github.com/vuejs/vue-next/issues/2444) +* **runtime-core:** prevent self-injection ([#2424](https://github.com/vuejs/vue-next/issues/2424)) ([111d04f](https://github.com/vuejs/vue-next/commit/111d04f119a2b2d0b1a1790a063b152c17787943)), closes [#2400](https://github.com/vuejs/vue-next/issues/2400) +* **suspense:** fix suspense nested child updates in template mode ([0227b4a](https://github.com/vuejs/vue-next/commit/0227b4a697afd598f6fa279a1a7ce84242e68f43)), closes [#2214](https://github.com/vuejs/vue-next/issues/2214) +* **types:** h support for resolveComponent ([#2402](https://github.com/vuejs/vue-next/issues/2402)) ([1f2a652](https://github.com/vuejs/vue-next/commit/1f2a652a9d2e3bec472fb1786a4c16d6ccfa1fb1)), closes [#2357](https://github.com/vuejs/vue-next/issues/2357) +* **v-model:** built in modifiers support on component ([#2348](https://github.com/vuejs/vue-next/issues/2348)) ([128ec46](https://github.com/vuejs/vue-next/commit/128ec460ec00ca8672352d019b264c80dfd0c3b0)), closes [#2326](https://github.com/vuejs/vue-next/issues/2326) + + +### Features + +* **compile-core:** handle falsy dynamic args for v-on and v-bind ([#2393](https://github.com/vuejs/vue-next/issues/2393)) ([052a621](https://github.com/vuejs/vue-next/commit/052a621762c5f7c420464747ebbbed27c7350593)), closes [#2388](https://github.com/vuejs/vue-next/issues/2388) + + + ## [3.0.1](https://github.com/vuejs/vue-next/compare/v3.0.0...v3.0.1) (2020-10-15) diff --git a/package.json b/package.json index 2e981bed8f4..e1a781b2090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.0.1", + "version": "3.0.2", "workspaces": [ "packages/*" ], diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index c0962cce31b..fa5c3f6e9d4 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/compiler-core", "main": "index.js", "module": "dist/compiler-core.esm-bundler.js", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme", "dependencies": { - "@vue/shared": "3.0.1", + "@vue/shared": "3.0.2", "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", "estree-walker": "^2.0.1", diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index c79e19ba678..cff82fbafa7 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/compiler-dom", "main": "index.js", "module": "dist/compiler-dom.esm-bundler.js", @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-dom#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/compiler-core": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/compiler-core": "3.0.2" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 913c7afea2d..f041dde1e1c 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/compiler-sfc", "main": "dist/compiler-sfc.cjs.js", "types": "dist/compiler-sfc.d.ts", @@ -32,15 +32,15 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc#readme", "peerDependencies": { - "vue": "3.0.1" + "vue": "3.0.2" }, "dependencies": { "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", - "@vue/compiler-core": "3.0.1", - "@vue/compiler-dom": "3.0.1", - "@vue/compiler-ssr": "3.0.1", - "@vue/shared": "3.0.1", + "@vue/compiler-core": "3.0.2", + "@vue/compiler-dom": "3.0.2", + "@vue/compiler-ssr": "3.0.2", + "@vue/shared": "3.0.2", "consolidate": "^0.16.0", "estree-walker": "^2.0.1", "hash-sum": "^2.0.0", diff --git a/packages/compiler-ssr/package.json b/packages/compiler-ssr/package.json index ef59c212ea1..f65b92773bc 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-ssr#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/compiler-dom": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/compiler-dom": "3.0.2" } } diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index f94564a18b6..9caecbce0eb 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", @@ -36,6 +36,6 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/reactivity#readme", "dependencies": { - "@vue/shared": "3.0.1" + "@vue/shared": "3.0.2" } } diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index 7db71e215e8..5f72eb04c05 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/reactivity": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/reactivity": "3.0.2" } } diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index e5ce8b7fa15..d71dbe888f9 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-dom#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/runtime-core": "3.0.1", + "@vue/shared": "3.0.2", + "@vue/runtime-core": "3.0.2", "csstype": "^2.6.8" } } diff --git a/packages/runtime-test/package.json b/packages/runtime-test/package.json index dc645add260..5c0bbc0bc0d 100644 --- a/packages/runtime-test/package.json +++ b/packages/runtime-test/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-test", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/runtime-test", "private": true, "main": "index.js", @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-test#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/runtime-core": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/runtime-core": "3.0.2" } } diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 6e0f84722f2..4d4531042be 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.0.1", + "version": "3.0.2", "description": "@vue/server-renderer", "main": "index.js", "types": "dist/server-renderer.d.ts", @@ -28,10 +28,10 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/server-renderer#readme", "peerDependencies": { - "vue": "3.0.1" + "vue": "3.0.2" }, "dependencies": { - "@vue/shared": "3.0.1", - "@vue/compiler-ssr": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/compiler-ssr": "3.0.2" } } diff --git a/packages/shared/package.json b/packages/shared/package.json index 4d27ea968a5..37125f9146a 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.0.1", + "version": "3.0.2", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", diff --git a/packages/size-check/package.json b/packages/size-check/package.json index 4c6bc0736e7..f3de6665fab 100644 --- a/packages/size-check/package.json +++ b/packages/size-check/package.json @@ -1,6 +1,6 @@ { "name": "@vue/size-check", - "version": "3.0.1", + "version": "3.0.2", "private": true, "buildOptions": { "name": "Vue", diff --git a/packages/template-explorer/package.json b/packages/template-explorer/package.json index b2caf8f5396..19ddbf82a8b 100644 --- a/packages/template-explorer/package.json +++ b/packages/template-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/template-explorer", - "version": "3.0.1", + "version": "3.0.2", "private": true, "buildOptions": { "formats": [ diff --git a/packages/vue/package.json b/packages/vue/package.json index 1eb233f4472..fb728dd8c04 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.0.1", + "version": "3.0.2", "description": "vue", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", @@ -37,9 +37,9 @@ }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/vue#readme", "dependencies": { - "@vue/shared": "3.0.1", - "@vue/compiler-dom": "3.0.1", - "@vue/runtime-dom": "3.0.1" + "@vue/shared": "3.0.2", + "@vue/compiler-dom": "3.0.2", + "@vue/runtime-dom": "3.0.2" }, "devDependencies": { "lodash": "^4.17.15", From 434de69a0655357e4255c29b56f4635f4390dbd0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 06:31:09 +0000 Subject: [PATCH 0089/4002] build(deps-dev): bump @typescript-eslint/parser from 4.4.1 to 4.5.0 (#2451) --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9a057c07d99..f6c8f8ef8bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,35 +955,35 @@ "@types/yargs-parser" "*" "@typescript-eslint/parser@^4.1.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.4.1.tgz#25fde9c080611f303f2f33cedb145d2c59915b80" - integrity sha512-S0fuX5lDku28Au9REYUsV+hdJpW/rNW0gWlc4SXzF/kdrRaAVX9YCxKpziH7djeWT/HFAjLZcnY7NJD8xTeUEg== + version "4.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.5.0.tgz#b2d659f25eec0041c7bc5660b91db1eefe8d7122" + integrity sha512-xb+gmyhQcnDWe+5+xxaQk5iCw6KqXd8VQxGiTeELTMoYeRjpocZYYRP1gFVM2C8Yl0SpUvLa1lhprwqZ00w3Iw== dependencies: - "@typescript-eslint/scope-manager" "4.4.1" - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/typescript-estree" "4.4.1" + "@typescript-eslint/scope-manager" "4.5.0" + "@typescript-eslint/types" "4.5.0" + "@typescript-eslint/typescript-estree" "4.5.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.4.1.tgz#d19447e60db2ce9c425898d62fa03b2cce8ea3f9" - integrity sha512-2oD/ZqD4Gj41UdFeWZxegH3cVEEH/Z6Bhr/XvwTtGv66737XkR4C9IqEkebCuqArqBJQSj4AgNHHiN1okzD/wQ== +"@typescript-eslint/scope-manager@4.5.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.5.0.tgz#8dfd53c3256d4357e7d66c2fc8956835f4d239be" + integrity sha512-C0cEO0cTMPJ/w4RA/KVe4LFFkkSh9VHoFzKmyaaDWAnPYIEzVCtJ+Un8GZoJhcvq+mPFXEsXa01lcZDHDG6Www== dependencies: - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/visitor-keys" "4.4.1" + "@typescript-eslint/types" "4.5.0" + "@typescript-eslint/visitor-keys" "4.5.0" -"@typescript-eslint/types@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.1.tgz#c507b35cf523bc7ba00aae5f75ee9b810cdabbc1" - integrity sha512-KNDfH2bCyax5db+KKIZT4rfA8rEk5N0EJ8P0T5AJjo5xrV26UAzaiqoJCxeaibqc0c/IvZxp7v2g3difn2Pn3w== +"@typescript-eslint/types@4.5.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.5.0.tgz#98256e07bad1c8d15d0c9627ebec82fd971bb3c3" + integrity sha512-n2uQoXnyWNk0Les9MtF0gCK3JiWd987JQi97dMSxBOzVoLZXCNtxFckVqt1h8xuI1ix01t+iMY4h4rFMj/303g== -"@typescript-eslint/typescript-estree@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.1.tgz#598f6de488106c2587d47ca2462c60f6e2797cb8" - integrity sha512-wP/V7ScKzgSdtcY1a0pZYBoCxrCstLrgRQ2O9MmCUZDtmgxCO/TCqOTGRVwpP4/2hVfqMz/Vw1ZYrG8cVxvN3g== +"@typescript-eslint/typescript-estree@4.5.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.5.0.tgz#d50cf91ae3a89878401111031eb6fb6d03554f64" + integrity sha512-gN1mffq3zwRAjlYWzb5DanarOPdajQwx5MEWkWCk0XvqC8JpafDTeioDoow2L4CA/RkYZu7xEsGZRhqrTsAG8w== dependencies: - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/visitor-keys" "4.4.1" + "@typescript-eslint/types" "4.5.0" + "@typescript-eslint/visitor-keys" "4.5.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -991,12 +991,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.1.tgz#1769dc7a9e2d7d2cfd3318b77ed8249187aed5c3" - integrity sha512-H2JMWhLaJNeaylSnMSQFEhT/S/FsJbebQALmoJxMPMxLtlVAMy2uJP/Z543n9IizhjRayLSqoInehCeNW9rWcw== +"@typescript-eslint/visitor-keys@4.5.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.5.0.tgz#b59f26213ac597efe87f6b13cf2aabee70542af0" + integrity sha512-UHq4FSa55NDZqscRU//O5ROFhHa9Hqn9KWTEvJGTArtTQp5GKv9Zqf6d/Q3YXXcFv4woyBml7fJQlQ+OuqRcHA== dependencies: - "@typescript-eslint/types" "4.4.1" + "@typescript-eslint/types" "4.5.0" eslint-visitor-keys "^2.0.0" "@zeit/schemas@2.6.0": From dec8f82e2dde593f1d572924ccee123bca34083c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 06:33:24 +0000 Subject: [PATCH 0090/4002] build(deps-dev): bump @types/jest from 26.0.14 to 26.0.15 (#2452) --- yarn.lock | 70 ++++++------------------------------------------------- 1 file changed, 7 insertions(+), 63 deletions(-) diff --git a/yarn.lock b/yarn.lock index f6c8f8ef8bd..c3b7177ed39 100644 --- a/yarn.lock +++ b/yarn.lock @@ -560,16 +560,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" - integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - "@jest/types@^26.3.0": version "26.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" @@ -860,14 +850,6 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" - integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - "@types/istanbul-reports@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" @@ -876,12 +858,12 @@ "@types/istanbul-lib-report" "*" "@types/jest@26.x", "@types/jest@^26.0.0": - version "26.0.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.14.tgz#078695f8f65cb55c5a98450d65083b2b73e5a3f3" - integrity sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg== + version "26.0.15" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.15.tgz#12e02c0372ad0548e07b9f4e19132b834cb1effe" + integrity sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog== dependencies: - jest-diff "^25.2.1" - pretty-format "^25.2.1" + jest-diff "^26.0.0" + pretty-format "^26.0.0" "@types/lru-cache@^5.1.0": version "5.1.0" @@ -1742,14 +1724,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0, chalk@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -2475,11 +2449,6 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - diff-sequences@^26.5.0: version "26.5.0" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" @@ -4019,17 +3988,7 @@ jest-config@^26.6.0: micromatch "^4.0.2" pretty-format "^26.6.0" -jest-diff@^25.2.1: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" - integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-diff@^26.6.0: +jest-diff@^26.0.0, jest-diff@^26.6.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== @@ -4082,11 +4041,6 @@ jest-environment-node@^26.6.0: jest-mock "^26.6.0" jest-util "^26.6.0" -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== - jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" @@ -5780,17 +5734,7 @@ prettier@~1.14.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg== -pretty-format@^25.2.1, pretty-format@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" - integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== - dependencies: - "@jest/types" "^25.5.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^26.6.0: +pretty-format@^26.0.0, pretty-format@^26.6.0: version "26.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== From f4621ff5ee4abe924d985177956af3ddc9bb378f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 06:34:05 +0000 Subject: [PATCH 0091/4002] build(deps-dev): bump @types/node from 14.11.10 to 14.14.0 (#2453) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c3b7177ed39..7ba911a1227 100644 --- a/yarn.lock +++ b/yarn.lock @@ -881,9 +881,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@^14.10.1": - version "14.11.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.10.tgz#8c102aba13bf5253f35146affbf8b26275069bef" - integrity sha512-yV1nWZPlMFpoXyoknm4S56y2nlTAuFYaJuQtYRAOU7xA/FJ9RY0Xm7QOkaYMMmr8ESdHIuUb6oQgR/0+2NqlyA== + version "14.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.0.tgz#f1091b6ad5de18e8e91bdbd43ec63f13de372538" + integrity sha512-BfbIHP9IapdupGhq/hc+jT5dyiBVZ2DdeC5WwJWQWDb0GijQlzUFAeIQn/2GtvZcd2HVUU7An8felIICFTC2qg== "@types/node@10.17.13": version "10.17.13" From 6e76fafa9213ae458edfcaf366979fcbf256058e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:13:23 +0000 Subject: [PATCH 0092/4002] build(deps-dev): bump @types/node from 14.14.0 to 14.14.2 (#2466) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7ba911a1227..792dd4c178e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -881,9 +881,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@^14.10.1": - version "14.14.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.0.tgz#f1091b6ad5de18e8e91bdbd43ec63f13de372538" - integrity sha512-BfbIHP9IapdupGhq/hc+jT5dyiBVZ2DdeC5WwJWQWDb0GijQlzUFAeIQn/2GtvZcd2HVUU7An8felIICFTC2qg== + version "14.14.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.2.tgz#d25295f9e4ca5989a2c610754dc02a9721235eeb" + integrity sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg== "@types/node@10.17.13": version "10.17.13" From cd7834aa5066afd58aee1f017e4b89b1708e696a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:13:55 +0000 Subject: [PATCH 0093/4002] build(deps-dev): bump rollup from 2.32.0 to 2.32.1 (#2465) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 792dd4c178e..151fdcaa6dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6379,9 +6379,9 @@ rollup-pluginutils@^2.3.1: estree-walker "^0.6.1" rollup@^2.26.11: - version "2.32.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.32.0.tgz#ac58c8e85782bea8aa2d440fc05aba345013582a" - integrity sha512-0FIG1jY88uhCP2yP4CfvtKEqPDRmsUwfY1kEOOM+DH/KOGATgaIFd/is1+fQOxsvh62ELzcFfKonwKWnHhrqmw== + version "2.32.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.32.1.tgz#625a92c54f5b4d28ada12d618641491d4dbb548c" + integrity sha512-Op2vWTpvK7t6/Qnm1TTh7VjEZZkN8RWgf0DHbkKzQBwNf748YhXbozHVefqpPp/Fuyk/PQPAnYsBxAEtlMvpUw== optionalDependencies: fsevents "~2.1.2" From 51e43e07998eeade153c42a9a9b3eda8fe885c88 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 22 Oct 2020 17:49:54 -0400 Subject: [PATCH 0094/4002] fix(runtime-core): components with static props and slots should not be force updated --- packages/runtime-core/src/componentRenderUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index a3da6e0ff4f..9c5ecaf5b68 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -309,7 +309,7 @@ export function shouldUpdateComponent( return true } - if (optimized && patchFlag > 0) { + if (optimized && patchFlag >= 0) { if (patchFlag & PatchFlags.DYNAMIC_SLOTS) { // slot content that references values that might have changed, // e.g. in a v-for From 118502a4b88719645013c372532a9c413fcc58e7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 23 Oct 2020 14:37:09 -0400 Subject: [PATCH 0095/4002] chore: comments [ci skip] --- packages/reactivity/src/reactive.ts | 44 ++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/reactivity/src/reactive.ts b/packages/reactivity/src/reactive.ts index 3f6da8364a0..cea41a191ae 100644 --- a/packages/reactivity/src/reactive.ts +++ b/packages/reactivity/src/reactive.ts @@ -59,6 +59,28 @@ function getTargetType(value: Target) { // only unwrap nested ref type UnwrapNestedRefs = T extends Ref ? T : UnwrapRef +/** + * Creates a reactive copy of the original object. + * + * The reactive conversion is "deep"—it affects all nested properties. In the + * ES2015 Proxy based implementation, the returned proxy is **not** equal to the + * original object. It is recommended to work exclusively with the reactive + * proxy and avoid relying on the original object. + * + * A reactive object also automatically unwraps refs contained in it, so you + * don't need to use `.value` when accessing and mutating their value: + * + * ```js + * const count = ref(0) + * const obj = reactive({ + * count + * }) + * + * obj.count++ + * obj.count // -> 1 + * count.value // -> 1 + * ``` + */ export function reactive(target: T): UnwrapNestedRefs export function reactive(target: object) { // if trying to observe a readonly proxy, return the readonly version. @@ -73,9 +95,11 @@ export function reactive(target: object) { ) } -// Return a reactive-copy of the original object, where only the root level -// properties are reactive, and does NOT unwrap refs nor recursively convert -// returned properties. +/** + * Return a shallowly-reactive copy of the original object, where only the root + * level properties are reactive. It also does not auto-unwrap refs (even at the + * root level). + */ export function shallowReactive(target: T): T { return createReactiveObject( target, @@ -107,6 +131,10 @@ export type DeepReadonly = T extends Builtin ? { readonly [K in keyof T]: DeepReadonly } : Readonly +/** + * Creates a readonly copy of the original object. Note the returned copy is not + * made reactive, but `readonly` can be called on an already reactive object. + */ export function readonly( target: T ): DeepReadonly> { @@ -118,10 +146,12 @@ export function readonly( ) } -// Return a reactive-copy of the original object, where only the root level -// properties are readonly, and does NOT unwrap refs nor recursively convert -// returned properties. -// This is used for creating the props proxy object for stateful components. +/** + * Returns a reactive-copy of the original object, where only the root level + * properties are readonly, and does NOT unwrap refs nor recursively convert + * returned properties. + * This is used for creating the props proxy object for stateful components. + */ export function shallowReadonly( target: T ): Readonly<{ [K in keyof T]: UnwrapNestedRefs }> { From ea5f92ae051be511558569eaf4c2afa2839c3e4d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 19:52:38 +0000 Subject: [PATCH 0096/4002] build(deps-dev): bump ts-jest from 26.4.1 to 26.4.2 (#2476) --- yarn.lock | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 151fdcaa6dc..0567f1dac21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -446,6 +446,11 @@ slash "^3.0.0" strip-ansi "^6.0.0" +"@jest/create-cache-key-function@^26.5.0": + version "26.5.0" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.5.0.tgz#1d07947adc51ea17766d9f0ccf5a8d6ea94c47dc" + integrity sha512-DJ+pEBUIqarrbv1W/C39f9YH0rJ4wsXZ/VC6JafJPlHW2HOucKceeaqTOQj9MEDQZjySxMLkOq5mfXZXNZcmWw== + "@jest/environment@^26.6.0": version "26.6.0" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.0.tgz#695ee24cbf110456272caa9debbbf7e01afb2f78" @@ -560,17 +565,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" - integrity sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jest/types@^26.6.0": version "26.6.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.0.tgz#2c045f231bfd79d52514cda3fbc93ef46157fa6a" @@ -4252,19 +4246,7 @@ jest-snapshot@^26.6.0: pretty-format "^26.6.0" semver "^7.3.2" -jest-util@^26.1.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" - integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== - dependencies: - "@jest/types" "^26.3.0" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" - -jest-util@^26.6.0: +jest-util@^26.1.0, jest-util@^26.6.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== @@ -7217,10 +7199,11 @@ trim-right@^1.0.1: integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= ts-jest@^26.2.0: - version "26.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.1.tgz#08ec0d3fc2c3a39e4a46eae5610b69fafa6babd0" - integrity sha512-F4aFq01aS6mnAAa0DljNmKr/Kk9y4HVZ1m6/rtJ0ED56cuxINGq3Q9eVAh+z5vcYKe5qnTMvv90vE8vUMFxomg== + version "26.4.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.2.tgz#00b6c970bee202ceef7c6e6e9805c4837b22dab8" + integrity sha512-0+MynTTzzbuy5rGjzsCKjxHJk5gY906c/FSaqQ3081+G7dp2Yygfa9hVlbrtNNcztffh1mC6Rs9jb/yHpcjsoQ== dependencies: + "@jest/create-cache-key-function" "^26.5.0" "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" From fd102181a2f33a708f1f67c452bb18419feb06b9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2020 16:24:40 +0000 Subject: [PATCH 0097/4002] build(deps-dev): bump jest from 26.6.0 to 26.6.1 (#2475) --- yarn.lock | 623 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 346 insertions(+), 277 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0567f1dac21..e0fe1a7c016 100644 --- a/yarn.lock +++ b/yarn.lock @@ -400,46 +400,46 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.0.tgz#fd4a4733df3c50260aefb227414296aee96e682f" - integrity sha512-ArGcZWAEYMWmWnc/QvxLDvFmGRPvmHeulhS7FUUAlUGR5vS/SqMfArsGaYmIFEThSotCMnEihwx1h62I1eg5lg== +"@jest/console@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.1.tgz#6a19eaac4aa8687b4db9130495817c65aec3d34e" + integrity sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.6.0" - jest-util "^26.6.0" + jest-message-util "^26.6.1" + jest-util "^26.6.1" slash "^3.0.0" -"@jest/core@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.0.tgz#04dd3e046e9ebbe06a4f330e05a67f21f7bb314a" - integrity sha512-7wbunxosnC5zXjxrEtTQSblFjRVOT8qz1eSytw8riEeWgegy3ct91NLPEP440CDuWrmW3cOLcEGxIf9q2u6O9Q== +"@jest/core@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.1.tgz#77426822f667a2cda82bf917cee11cc8ba71f9ac" + integrity sha512-p4F0pgK3rKnoS9olXXXOkbus1Bsu6fd8pcvLMPsUy4CVXZ8WSeiwQ1lK5hwkCIqJ+amZOYPd778sbPha/S8Srw== dependencies: - "@jest/console" "^26.6.0" - "@jest/reporters" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.1" + "@jest/reporters" "^26.6.1" + "@jest/test-result" "^26.6.1" + "@jest/transform" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.6.0" - jest-config "^26.6.0" - jest-haste-map "^26.6.0" - jest-message-util "^26.6.0" + jest-changed-files "^26.6.1" + jest-config "^26.6.1" + jest-haste-map "^26.6.1" + jest-message-util "^26.6.1" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-resolve-dependencies "^26.6.0" - jest-runner "^26.6.0" - jest-runtime "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" - jest-watcher "^26.6.0" + jest-resolve "^26.6.1" + jest-resolve-dependencies "^26.6.1" + jest-runner "^26.6.1" + jest-runtime "^26.6.1" + jest-snapshot "^26.6.1" + jest-util "^26.6.1" + jest-validate "^26.6.1" + jest-watcher "^26.6.1" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" @@ -451,47 +451,47 @@ resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.5.0.tgz#1d07947adc51ea17766d9f0ccf5a8d6ea94c47dc" integrity sha512-DJ+pEBUIqarrbv1W/C39f9YH0rJ4wsXZ/VC6JafJPlHW2HOucKceeaqTOQj9MEDQZjySxMLkOq5mfXZXNZcmWw== -"@jest/environment@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.0.tgz#695ee24cbf110456272caa9debbbf7e01afb2f78" - integrity sha512-l+5MSdiC4rUUrz8xPdj0TwHBwuoqMcAbFnsYDTn5FkenJl8b+lvC5NdJl1tVICGHWnx0fnjdd1luRZ7u3U4xyg== +"@jest/environment@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.1.tgz#38a56f1cc66f96bf53befcc5ebeaf1c2dce90e9a" + integrity sha512-GNvHwkOFJtNgSwdzH9flUPzF9AYAZhUg124CBoQcwcZCM9s5TLz8Y3fMtiaWt4ffbigoetjGk5PU2Dd8nLrSEw== dependencies: - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/fake-timers" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" - jest-mock "^26.6.0" + jest-mock "^26.6.1" -"@jest/fake-timers@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.0.tgz#5b4cc83fab91029963c53e6e2716f02544323b22" - integrity sha512-7VQpjChrwlwvGNysS10lDBLOVLxMvMtpx0Xo6aIotzNVyojYk0NN0CR8R4T6h/eu7Zva/LB3P71jqwGdtADoag== +"@jest/fake-timers@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.1.tgz#5aafba1822075b7142e702b906094bea15f51acf" + integrity sha512-T/SkMLgOquenw/nIisBRD6XAYpFir0kNuclYLkse5BpzeDUukyBr+K31xgAo9M0hgjU9ORlekAYPSzc0DKfmKg== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.6.0" - jest-mock "^26.6.0" - jest-util "^26.6.0" + jest-message-util "^26.6.1" + jest-mock "^26.6.1" + jest-util "^26.6.1" -"@jest/globals@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.0.tgz#da2f58d17105b6a7531ee3c8724acb5f233400e2" - integrity sha512-rs3a/a8Lq8FgTx11SxbqIU2bDjsFU2PApl2oK2oUVlo84RSF76afFm2nLojW93AGssr715GHUwhq5b6mpCI5BQ== +"@jest/globals@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.1.tgz#b232c7611d8a2de62b4bf9eb9a007138322916f4" + integrity sha512-acxXsSguuLV/CeMYmBseefw6apO7NuXqpE+v5r3yD9ye2PY7h1nS20vY7Obk2w6S7eJO4OIAJeDnoGcLC/McEQ== dependencies: - "@jest/environment" "^26.6.0" - "@jest/types" "^26.6.0" - expect "^26.6.0" + "@jest/environment" "^26.6.1" + "@jest/types" "^26.6.1" + expect "^26.6.1" -"@jest/reporters@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.0.tgz#2a8d631ad3b19a722fd0fae58ce9fa25e8aac1cf" - integrity sha512-PXbvHhdci5Rj1VFloolgLb+0kkdtzswhG8MzVENKJRI3O1ndwr52G6E/2QupjwrRcYnApZOelFf4nNpf5+SDxA== +"@jest/reporters@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.1.tgz#582ede05278cf5eeffe58bc519f4a35f54fbcb0d" + integrity sha512-J6OlXVFY3q1SXWJhjme5i7qT/BAZSikdOK2t8Ht5OS32BDo6KfG5CzIzzIFnAVd82/WWbc9Hb7SJ/jwSvVH9YA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.1" + "@jest/test-result" "^26.6.1" + "@jest/transform" "^26.6.1" + "@jest/types" "^26.6.1" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -502,10 +502,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.6.0" - jest-resolve "^26.6.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-haste-map "^26.6.1" + jest-resolve "^26.6.1" + jest-util "^26.6.1" + jest-worker "^26.6.1" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -523,42 +523,42 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.0.tgz#79705c8a57165777af5ef1d45c65dcc4a5965c11" - integrity sha512-LV6X1ry+sKjseQsIFz3e6XAZYxwidvmeJFnVF08fq98q08dF1mJYI0lDq/LmH/jas+R4s0pwnNGiz1hfC4ZUBw== +"@jest/test-result@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.1.tgz#d75698d8a06aa663e8936663778c831512330cc1" + integrity sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg== dependencies: - "@jest/console" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.1" + "@jest/types" "^26.6.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.0.tgz#a9dbc6545b1c59e7f375b05466e172126609906d" - integrity sha512-rWPTMa+8rejvePZnJmnKkmKWh0qILFDPpN0qbSif+KNGvFxqqDGafMo4P2Y8+I9XWrZQBeXL9IxPL4ZzDgRlbw== +"@jest/test-sequencer@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.1.tgz#34216ac2c194b0eeebde30d25424d1134703fd2e" + integrity sha512-0csqA/XApZiNeTIPYh6koIDCACSoR6hi29T61tKJMtCZdEC+tF3PoNt7MS0oK/zKC6daBgCbqXxia5ztr/NyCQ== dependencies: - "@jest/test-result" "^26.6.0" + "@jest/test-result" "^26.6.1" graceful-fs "^4.2.4" - jest-haste-map "^26.6.0" - jest-runner "^26.6.0" - jest-runtime "^26.6.0" + jest-haste-map "^26.6.1" + jest-runner "^26.6.1" + jest-runtime "^26.6.1" -"@jest/transform@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.0.tgz#1a6b95d0c7f9b4f96dd3aab9d28422a9e5e4043e" - integrity sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg== +"@jest/transform@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.1.tgz#f70786f96e0f765947b4fb4f54ffcfb7bd783711" + integrity sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.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.6.0" + jest-haste-map "^26.6.1" jest-regex-util "^26.0.0" - jest-util "^26.6.0" + jest-util "^26.6.1" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" @@ -576,6 +576,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.6.1": + version "26.6.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.1.tgz#2638890e8031c0bc8b4681e0357ed986e2f866c5" + integrity sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@ls-lint/ls-lint@^1.9.2": version "1.9.2" resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" @@ -1303,13 +1314,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-jest@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.0.tgz#eca57ac8af99d6e06047e595b1faf0b5adf8a7bb" - integrity sha512-JI66yILI7stzjHccAoQtRKcUwJrJb4oMIxLTirL3GdAjGpaUBQSjZDFi9LsPkN4gftsS4R2AThAJwOjJxadwbg== +babel-jest@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.1.tgz#07bd7bec14de47fe0f2c9a139741329f1f41788b" + integrity sha512-duMWEOKrSBYRVTTNpL2SipNIWnZOjP77auOBMPQ3zXAdnDbyZQWU8r/RxNWpUf9N6cgPFecQYelYLytTVXVDtA== dependencies: - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/transform" "^26.6.1" + "@jest/types" "^26.6.1" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^26.5.0" @@ -1771,6 +1782,11 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +cjs-module-lexer@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.4.3.tgz#9e31f7fe701f5fcee5793f77ab4e58fa8dcde8bc" + integrity sha512-5RLK0Qfs0PNDpEyBXIr3bIT1Muw3ojSlvpw6dAmkUcO0+uTrsBn7GuEIgx40u+OzbCBLDta7nvmud85P4EmTsQ== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2833,16 +2849,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.0.tgz#f48861317f62bb9f1248eaab7ae9e50a9a5a8339" - integrity sha512-EzhbZ1tbwcaa5Ok39BI11flIMeIUSlg1QsnXOrleaMvltwHsvIQPBtL710l+ma+qDFLUgktCXK4YuQzmHdm7cg== +expect@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.1.tgz#e1e053cdc43b21a452b36fc7cc9401e4603949c1" + integrity sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" + jest-matcher-utils "^26.6.1" + jest-message-util "^26.6.1" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -3612,6 +3628,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" + integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3930,59 +3953,59 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.0.tgz#63b04aa261b5733c6ade96b7dd24784d12d8bb2d" - integrity sha512-k8PZzlp3cRWDe0fDc/pYs+c4w36+hiWXe1PpW/pW1UJmu1TNTAcQfZUrVYleij+uEqlY6z4mPv7Iff3kY0o5SQ== +jest-changed-files@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.1.tgz#2fac3dc51297977ee883347948d8e3d37c417fba" + integrity sha512-NhSdZ5F6b/rIN5V46x1l31vrmukD/bJUXgYAY8VtP1SknYdJwjYDRxuLt7Z8QryIdqCjMIn2C0Cd98EZ4umo8Q== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.0.tgz#dc3ae34fd5937310493ed07dc79c5ffba2bf6671" - integrity sha512-lJAMZGpmML+y3Kfln6L5DGRTfKGQ+n1JDM1RQstojSLUhe/EaXWR8vmcx70v4CyJKvFZs7c/0QDkPX5ra/aDew== +jest-cli@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.1.tgz#8952242fa812c05bd129abf7c022424045b7fd67" + integrity sha512-aPLoEjlwFrCWhiPpW5NUxQA1X1kWsAnQcQ0SO/fHsCvczL3W75iVAcH9kP6NN+BNqZcHNEvkhxT5cDmBfEAh+w== dependencies: - "@jest/core" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/core" "^26.6.1" + "@jest/test-result" "^26.6.1" + "@jest/types" "^26.6.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-config "^26.6.1" + jest-util "^26.6.1" + jest-validate "^26.6.1" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.0.tgz#cb879a37002f881edb66d673fd40b6704595de89" - integrity sha512-RCR1Kf7MGJ5waVCvrj/k3nCAJKquWZlzs8rkskzj0KlG392hNBOaYd5FQ4cCac08j6pwfIDOwNvMcy0/FqguJg== +jest-config@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.1.tgz#8c343fbdd9c24ad003e261f73583c3c020f32b42" + integrity sha512-mtJzIynIwW1d1nMlKCNCQiSgWaqFn8cH/fOSNY97xG7Y9tBCZbCSuW2GTX0RPmceSJGO7l27JgwC18LEg0Vg+g== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.0" - "@jest/types" "^26.6.0" - babel-jest "^26.6.0" + "@jest/test-sequencer" "^26.6.1" + "@jest/types" "^26.6.1" + babel-jest "^26.6.1" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.6.0" - jest-environment-node "^26.6.0" + jest-environment-jsdom "^26.6.1" + jest-environment-node "^26.6.1" jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.0" + jest-jasmine2 "^26.6.1" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-resolve "^26.6.1" + jest-util "^26.6.1" + jest-validate "^26.6.1" micromatch "^4.0.2" - pretty-format "^26.6.0" + pretty-format "^26.6.1" -jest-diff@^26.0.0, jest-diff@^26.6.0: +jest-diff@^26.0.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== @@ -3992,6 +4015,16 @@ jest-diff@^26.0.0, jest-diff@^26.6.0: jest-get-type "^26.3.0" pretty-format "^26.6.0" +jest-diff@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.1.tgz#38aa194979f454619bb39bdee299fb64ede5300c" + integrity sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg== + dependencies: + chalk "^4.0.0" + diff-sequences "^26.5.0" + jest-get-type "^26.3.0" + pretty-format "^26.6.1" + jest-docblock@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" @@ -3999,53 +4032,53 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.0.tgz#9e9d90a4fc5a79e1d99a008897038325a6c7fbbf" - integrity sha512-7LzSNwNviYnm4FWK46itIE03NqD/8O8/7tVQ5rwTdTNrmPMQoQ1Z7hEFQ1uzRReluOFislpurpnQ0QsclSiDkA== +jest-each@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.1.tgz#e968e88309a3e2ae9648634af8f89d8ee5acfddd" + integrity sha512-gSn8eB3buchuq45SU7pLB7qmCGax1ZSxfaWuEFblCyNMtyokYaKFh9dRhYPujK6xYL57dLIPhLKatjmB5XWzGA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.6.0" - pretty-format "^26.6.0" + jest-util "^26.6.1" + pretty-format "^26.6.1" -jest-environment-jsdom@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.0.tgz#2ce353fb82d27a9066bfea3ff2c27d9405076c69" - integrity sha512-bXO9IG7a3YlyiHxwfKF+OWoTA+GIw4FrD+Y0pb6CC+nKs5JuSRZmR2ovEX6PWo6KY42ka3JoZOp3KEnXiFPPCg== +jest-environment-jsdom@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.1.tgz#63093bf89daee6139616568a43633b84cf7aac21" + integrity sha512-A17RiXuHYNVlkM+3QNcQ6n5EZyAc6eld8ra9TW26luounGWpku4tj03uqRgHJCI1d4uHr5rJiuCH5JFRtdmrcA== dependencies: - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/environment" "^26.6.1" + "@jest/fake-timers" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" - jest-mock "^26.6.0" - jest-util "^26.6.0" + jest-mock "^26.6.1" + jest-util "^26.6.1" jsdom "^16.4.0" -jest-environment-node@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.0.tgz#97f6e48085e67bda43b97f48e678ce78d760cd14" - integrity sha512-kWU6ZD1h6fs7sIl6ufuK0sXW/3d6WLaj48iow0NxhgU6eY89d9K+0MVmE0cRcVlh53yMyxTK6b+TnhLOnlGp/A== +jest-environment-node@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.1.tgz#4d73d8b33c26989a92a0ed3ad0bfd6f7a196d9bd" + integrity sha512-YffaCp6h0j1kbcf1NVZ7umC6CPgD67YS+G1BeornfuSkx5s3xdhuwG0DCxSiHPXyT81FfJzA1L7nXvhq50OWIg== dependencies: - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/environment" "^26.6.1" + "@jest/fake-timers" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" - jest-mock "^26.6.0" - jest-util "^26.6.0" + jest-mock "^26.6.1" + jest-util "^26.6.1" jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.0.tgz#4cd392bc51109bd8e0f765b2d5afa746bebb5ce2" - integrity sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w== +jest-haste-map@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.1.tgz#97e96f5fd7576d980307fbe6160b10c016b543d4" + integrity sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -4053,63 +4086,63 @@ jest-haste-map@^26.6.0: graceful-fs "^4.2.4" jest-regex-util "^26.0.0" jest-serializer "^26.5.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-util "^26.6.1" + jest-worker "^26.6.1" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.0.tgz#1b59e26aa56651bae3d4637965c8cd4d3851de6d" - integrity sha512-2E3c+0A9y2OIK5caw5qlcm3b4doaf8FSfXKTX3xqKTUJoR4zXh0xvERBNWxZP9xMNXEi/2Z3LVsZpR2hROgixA== +jest-jasmine2@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.1.tgz#11c92603d1fa97e3c33404359e69d6cec7e57017" + integrity sha512-2uYdT32o/ZzSxYAPduAgokO8OlAL1YdG/9oxcEY138EDNpIK5XRRJDaGzTZdIBWSxk0aR8XxN44FvfXtHB+Fiw== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.6.0" + "@jest/environment" "^26.6.1" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/test-result" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.6.0" + expect "^26.6.1" is-generator-fn "^2.0.0" - jest-each "^26.6.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" - jest-runtime "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - pretty-format "^26.6.0" + jest-each "^26.6.1" + jest-matcher-utils "^26.6.1" + jest-message-util "^26.6.1" + jest-runtime "^26.6.1" + jest-snapshot "^26.6.1" + jest-util "^26.6.1" + pretty-format "^26.6.1" throat "^5.0.0" -jest-leak-detector@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.0.tgz#a211c4c7627743e8d87b392bf92502cd64275df3" - integrity sha512-3oMv34imWTl1/nwKnmE/DxYo3QqHnZeF3nO6UzldppkhW0Za7OY2DYyWiamqVzwdUrjhoQkY5g+aF6Oc3alYEQ== +jest-leak-detector@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.1.tgz#f63e46dc4e3aa30d29b40ae49966a15730d25bbe" + integrity sha512-j9ZOtJSJKlHjrs4aIxWjiQUjyrffPdiAQn2Iw0916w7qZE5Lk0T2KhIH6E9vfhzP6sw0Q0jtnLLb4vQ71o1HlA== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.6.0" + pretty-format "^26.6.1" -jest-matcher-utils@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.0.tgz#8f57d78353275bfa7a3ccea128c1030b347138e2" - integrity sha512-BUy/dQYb7ELGRazmK4ZVkbfPYCaNnrMtw1YljVhcKzWUxBM0xQ+bffrfnMLdRZp4wUUcT4ahaVnA3VWZtXWP9Q== +jest-matcher-utils@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz#bc90822d352c91c2ec1814731327691d06598400" + integrity sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg== dependencies: chalk "^4.0.0" - jest-diff "^26.6.0" + jest-diff "^26.6.1" jest-get-type "^26.3.0" - pretty-format "^26.6.0" + pretty-format "^26.6.1" -jest-message-util@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.0.tgz#c3499053022e05765f71b8c2535af63009e2d4be" - integrity sha512-WPAeS38Kza29f04I0iOIQrXeiebRXjmn6cFehzI7KKJOgT0NmqYAcLgjWnIAfKs5FBmEQgje1kXab0DaLKCl2w== +jest-message-util@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.1.tgz#d62c20c0fe7be10bfd6020b675abb9b5fa933ff3" + integrity sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -4117,12 +4150,12 @@ jest-message-util@^26.6.0: slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.0.tgz#5d13a41f3662a98a55c7742ac67c482e232ded13" - integrity sha512-HsNmL8vVIn1rL1GWA21Drpy9Cl+7GImwbWz/0fkWHrUXVzuaG7rP0vwLtE+/n70Mt0U8nPkz8fxioi3SC0wqhw== +jest-mock@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.1.tgz#6c12a92a82fc833f81a5b6de6b67d78386e276a3" + integrity sha512-my0lPTBu1awY8iVG62sB2sx9qf8zxNDVX+5aFgoB8Vbqjb6LqIOsfyFA8P1z6H2IsqMbvOX9oCJnK67Y3yUIMA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4135,83 +4168,84 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.0.tgz#05bfecc977a3a48929fc7d9876f03d93a16b7df0" - integrity sha512-4di+XUT7LwJJ8b8qFEEDQssC5+aeVjLhvRICCaS4alh/EVS9JCT1armfJ3pnSS8t4o6659WbMmKVo82H4LuUVw== +jest-resolve-dependencies@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.1.tgz#e9d091a159ad198c029279737a8b4c507791d75c" + integrity sha512-MN6lufbZJ3RBfTnJesZtHu3hUCBqPdHRe2+FhIt0yiqJ3fMgzWRqMRQyN/d/QwOE7KXwAG2ekZutbPhuD7s51A== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" jest-regex-util "^26.0.0" - jest-snapshot "^26.6.0" + jest-snapshot "^26.6.1" -jest-resolve@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.0.tgz#070fe7159af87b03e50f52ea5e17ee95bbee40e1" - integrity sha512-tRAz2bwraHufNp+CCmAD8ciyCpXCs1NQxB5EJAmtCFy6BN81loFEGWKzYu26Y62lAJJe4X4jg36Kf+NsQyiStQ== +jest-resolve@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.1.tgz#e9a9130cc069620d5aeeb87043dd9e130b68c6a1" + integrity sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.6.0" + jest-util "^26.6.1" read-pkg-up "^7.0.1" - resolve "^1.17.0" + resolve "^1.18.1" slash "^3.0.0" -jest-runner@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.0.tgz#465a76efc9ec12cfd83a2af3a6cfb695b13a3efe" - integrity sha512-QpeN6pje8PQvFgT+wYOlzeycKd67qAvSw5FgYBiX2cTW+QTiObTzv/k09qRvT09rcCntFxUhy9VB1mgNGFLYIA== +jest-runner@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.1.tgz#a945971b5a23740c1fe20e372a38de668b7c76bf" + integrity sha512-DmpNGdgsbl5s0FGkmsInmqnmqCtliCSnjWA2TFAJS1m1mL5atwfPsf+uoZ8uYQ2X0uDj4NM+nPcDnUpbNTRMBA== dependencies: - "@jest/console" "^26.6.0" - "@jest/environment" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.1" + "@jest/environment" "^26.6.1" + "@jest/test-result" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.6.0" + jest-config "^26.6.1" jest-docblock "^26.0.0" - jest-haste-map "^26.6.0" - jest-leak-detector "^26.6.0" - jest-message-util "^26.6.0" - jest-resolve "^26.6.0" - jest-runtime "^26.6.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-haste-map "^26.6.1" + jest-leak-detector "^26.6.1" + jest-message-util "^26.6.1" + jest-resolve "^26.6.1" + jest-runtime "^26.6.1" + jest-util "^26.6.1" + jest-worker "^26.6.1" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.0.tgz#90f80ea5eb0d97a1089120f582fb84bd36ca5491" - integrity sha512-JEz4YGnybFvtN4NLID6lsZf0bcd8jccwjWcG5TRE3fYVnxoX1egTthPjnC4btIwWJ6QaaHhtOQ/E3AGn8iClAw== +jest-runtime@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.1.tgz#9a131e7b4f0bc6beefd62e7443f757c1d5fa9dec" + integrity sha512-7uOCNeezXDWgjEyzYbRN2ViY7xNZzusNVGAMmU0UHRUNXuY4j4GBHKGMqPo/cBPZA9bSYp+lwK2DRRBU5Dv6YQ== dependencies: - "@jest/console" "^26.6.0" - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/globals" "^26.6.0" + "@jest/console" "^26.6.1" + "@jest/environment" "^26.6.1" + "@jest/fake-timers" "^26.6.1" + "@jest/globals" "^26.6.1" "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/test-result" "^26.6.1" + "@jest/transform" "^26.6.1" + "@jest/types" "^26.6.1" "@types/yargs" "^15.0.0" chalk "^4.0.0" + cjs-module-lexer "^0.4.2" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.6.0" - jest-haste-map "^26.6.0" - jest-message-util "^26.6.0" - jest-mock "^26.6.0" + jest-config "^26.6.1" + jest-haste-map "^26.6.1" + jest-message-util "^26.6.1" + jest-mock "^26.6.1" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-resolve "^26.6.1" + jest-snapshot "^26.6.1" + jest-util "^26.6.1" + jest-validate "^26.6.1" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.4.1" @@ -4224,29 +4258,29 @@ jest-serializer@^26.5.0: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.0.tgz#457aa9c1761efc781ac9c02b021a0b21047c6a38" - integrity sha512-mcqJZeIZqxomvBcsaiIbiEe2g7K1UxnUpTwjMoHb+DX4uFGnuZoZ6m28YOYRyCfZsdU9mmq73rNBnEH2atTR4Q== +jest-snapshot@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.1.tgz#469e9d0b749496aea7dad0d7e5e5c88b91cdb4cc" + integrity sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.6.0" + expect "^26.6.1" graceful-fs "^4.2.4" - jest-diff "^26.6.0" + jest-diff "^26.6.1" jest-get-type "^26.3.0" - jest-haste-map "^26.6.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" - jest-resolve "^26.6.0" + jest-haste-map "^26.6.1" + jest-matcher-utils "^26.6.1" + jest-message-util "^26.6.1" + jest-resolve "^26.6.1" natural-compare "^1.4.0" - pretty-format "^26.6.0" + pretty-format "^26.6.1" semver "^7.3.2" -jest-util@^26.1.0, jest-util@^26.6.0: +jest-util@^26.1.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== @@ -4258,29 +4292,41 @@ jest-util@^26.1.0, jest-util@^26.6.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.0.tgz#b95e2076cca1a58b183e5bcce2bf43af52eebf10" - integrity sha512-FKHNqvh1Pgs4NWas56gsTPmjcIoGAAzSVUCK1+g8euzuCGbmdEr8LRTtOEFjd29uMZUk0PhzmzKGlHPe6j3UWw== +jest-util@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.1.tgz#4cc0d09ec57f28d12d053887eec5dc976a352e9b" + integrity sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.1" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.1.tgz#28730eb8570d60968d9d06f1a8c94d922167bd2a" + integrity sha512-BEFpGbylKocnNPZULcnk+TGaz1oFZQH/wcaXlaXABbu0zBwkOGczuWgdLucUouuQqn7VadHZZeTvo8VSFDLMOA== + dependencies: + "@jest/types" "^26.6.1" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.6.0" + pretty-format "^26.6.1" -jest-watcher@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.0.tgz#06001c22831583a16f9ccb388ee33316a7f4200f" - integrity sha512-gw5BvcgPi0PKpMlNWQjUet5C5A4JOYrT7gexdP6+DR/f7mRm7wE0o1GqwPwcTsTwo0/FNf9c/kIDXTRaSAYwlw== +jest-watcher@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.1.tgz#debfa34e9c5c3e735593403794fe53d2955bfabc" + integrity sha512-0LBIPPncNi9CaLKK15bnxyd2E8OMl4kJg0PTiNOI+MXztXw1zVdtX/x9Pr6pXaQYps+eS/ts43O4+HByZ7yJSw== dependencies: - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/test-result" "^26.6.1" + "@jest/types" "^26.6.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.6.0" + jest-util "^26.6.1" string-length "^4.0.1" jest-worker@^26.2.1: @@ -4292,23 +4338,23 @@ jest-worker@^26.2.1: merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" - integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== +jest-worker@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.1.tgz#c2ae8cde6802cc14056043f997469ec170d9c32a" + integrity sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" jest@^26.0.1: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.0.tgz#546b25a1d8c888569dbbe93cae131748086a4a25" - integrity sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA== + version "26.6.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.1.tgz#821e8280d2bdeeed40ac7bc43941dceff0f1b650" + integrity sha512-f+ahfqw3Ffy+9vA7sWFGpTmhtKEMsNAZiWBVXDkrpIO73zIz22iimjirnV78kh/eWlylmvLh/0WxHN6fZraZdA== dependencies: - "@jest/core" "^26.6.0" + "@jest/core" "^26.6.1" import-local "^3.0.2" - jest-cli "^26.6.0" + jest-cli "^26.6.1" jju@~1.4.0: version "1.4.0" @@ -5726,6 +5772,16 @@ pretty-format@^26.0.0, pretty-format@^26.6.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-format@^26.6.1: + version "26.6.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.1.tgz#af9a2f63493a856acddeeb11ba6bcf61989660a8" + integrity sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA== + dependencies: + "@jest/types" "^26.6.1" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^17.0.1" + process-es6@^0.11.2, process-es6@^0.11.6: version "0.11.6" resolved "https://registry.yarnpkg.com/process-es6/-/process-es6-0.11.6.tgz#c6bb389f9a951f82bd4eb169600105bd2ff9c778" @@ -5987,6 +6043,11 @@ react-is@^16.12.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" + integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -6256,6 +6317,14 @@ resolve@1.17.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2 dependencies: path-parse "^1.0.6" +resolve@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" + integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== + dependencies: + is-core-module "^2.0.0" + path-parse "^1.0.6" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" From 6b424c258f0deb6f7172e5b954aa968df70b1700 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 25 Oct 2020 05:00:09 +0000 Subject: [PATCH 0098/4002] build(deps-dev): bump eslint from 7.11.0 to 7.12.0 (#2481) --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index e0fe1a7c016..277815238bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -369,10 +369,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@eslint/eslintrc@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085" - integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA== +"@eslint/eslintrc@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.0.tgz#bc7e3c4304d4c8720968ccaee793087dfb5fe6b4" + integrity sha512-+cIGPCBdLCzqxdtwppswP+zTsH9BOIGzAeKfBIbtb4gW/giMlfMwP0HUSFfhzh20f9u8uZ8hOp62+4GPquTbwQ== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -2649,12 +2649,12 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.7.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.11.0.tgz#aaf2d23a0b5f1d652a08edacea0c19f7fadc0b3b" - integrity sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw== + version "7.12.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.0.tgz#7b6a85f87a9adc239e979bb721cde5ce0dc27da6" + integrity sha512-n5pEU27DRxCSlOhJ2rO57GDLcNsxO0LPpAbpFdh7xmcDmjmlGUfoyrsB3I7yYdQXO5N3gkSTiDrPSPNFiiirXA== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.1.3" + "@eslint/eslintrc" "^0.2.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" From 9c23ddf9c593dcf6d20bc911ec95d9b674f23dc8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 26 Oct 2020 17:52:16 -0400 Subject: [PATCH 0099/4002] fix(hmr): fix updates for imported but not yet rendered components --- packages/runtime-core/__tests__/hmr.spec.ts | 26 ++++----- packages/runtime-core/src/hmr.ts | 59 ++++++++++++--------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/packages/runtime-core/__tests__/hmr.spec.ts b/packages/runtime-core/__tests__/hmr.spec.ts index 31c910d17d4..ab2de223cdc 100644 --- a/packages/runtime-core/__tests__/hmr.spec.ts +++ b/packages/runtime-core/__tests__/hmr.spec.ts @@ -33,9 +33,9 @@ describe('hot module replacement', () => { }) test('createRecord', () => { - expect(createRecord('test1')).toBe(true) + expect(createRecord('test1', {})).toBe(true) // if id has already been created, should return false - expect(createRecord('test1')).toBe(false) + expect(createRecord('test1', {})).toBe(false) }) test('rerender', async () => { @@ -47,7 +47,7 @@ describe('hot module replacement', () => { __hmrId: childId, render: compileToFunction(`

`) } - createRecord(childId) + createRecord(childId, Child) const Parent: ComponentOptions = { __hmrId: parentId, @@ -59,7 +59,7 @@ describe('hot module replacement', () => { `
{{ count }}{{ count }}
` ) } - createRecord(parentId) + createRecord(parentId, Parent) render(h(Parent), root) expect(serializeInner(root)).toBe(`
0
0
`) @@ -125,7 +125,7 @@ describe('hot module replacement', () => { unmounted: unmountSpy, render: compileToFunction(`
{{ count }}
`) } - createRecord(childId) + createRecord(childId, Child) const Parent: ComponentOptions = { render: () => h(Child) @@ -164,7 +164,7 @@ describe('hot module replacement', () => { render: compileToFunction(`
{{ count }}
`) } } - createRecord(childId) + createRecord(childId, Child) const Parent: ComponentOptions = { render: () => h(Child) @@ -209,7 +209,7 @@ describe('hot module replacement', () => { }, render: compileToFunction(template) } - createRecord(id) + createRecord(id, Comp) render(h(Comp), root) expect(serializeInner(root)).toBe( @@ -246,14 +246,14 @@ describe('hot module replacement', () => { }, render: compileToFunction(`
{{ msg }}
`) } - createRecord(childId) + createRecord(childId, Child) const Parent: ComponentOptions = { __hmrId: parentId, components: { Child }, render: compileToFunction(``) } - createRecord(parentId) + createRecord(parentId, Parent) render(h(Parent), root) expect(serializeInner(root)).toBe(`
foo
`) @@ -272,14 +272,14 @@ describe('hot module replacement', () => { __hmrId: childId, render: compileToFunction(`
child
`) } - createRecord(childId) + createRecord(childId, Child) const Parent: ComponentOptions = { __hmrId: parentId, components: { Child }, render: compileToFunction(``) } - createRecord(parentId) + createRecord(parentId, Parent) render(h(Parent), root) expect(serializeInner(root)).toBe(`
child
`) @@ -299,7 +299,7 @@ describe('hot module replacement', () => { __hmrId: childId, render: compileToFunction(`
child
`) } - createRecord(childId) + createRecord(childId, Child) const components: ComponentOptions[] = [] @@ -321,7 +321,7 @@ describe('hot module replacement', () => { } } - createRecord(parentId) + createRecord(parentId, parentComp) } const last = components[components.length - 1] diff --git a/packages/runtime-core/src/hmr.ts b/packages/runtime-core/src/hmr.ts index faf4cb24e72..9a2d20def51 100644 --- a/packages/runtime-core/src/hmr.ts +++ b/packages/runtime-core/src/hmr.ts @@ -42,7 +42,10 @@ if (__DEV__ && (__BROWSER__ || __TEST__)) { } as HMRRuntime } -type HMRRecord = Set +type HMRRecord = { + component: ComponentOptions + instances: Set +} const map: Map = new Map() @@ -50,30 +53,37 @@ export function registerHMR(instance: ComponentInternalInstance) { const id = instance.type.__hmrId! let record = map.get(id) if (!record) { - createRecord(id) + createRecord(id, instance.type as ComponentOptions) record = map.get(id)! } - record.add(instance) + record.instances.add(instance) } export function unregisterHMR(instance: ComponentInternalInstance) { - map.get(instance.type.__hmrId!)!.delete(instance) + map.get(instance.type.__hmrId!)!.instances.delete(instance) } -function createRecord(id: string): boolean { +function createRecord( + id: string, + component: ComponentOptions | ClassComponent +): boolean { if (map.has(id)) { return false } - map.set(id, new Set()) + map.set(id, { + component: isClassComponent(component) ? component.__vccOpts : component, + instances: new Set() + }) return true } function rerender(id: string, newRender?: Function) { const record = map.get(id) if (!record) return + if (newRender) record.component.render = newRender // Array.from creates a snapshot which avoids the set being mutated during // updates - Array.from(record).forEach(instance => { + Array.from(record.instances).forEach(instance => { if (newRender) { instance.render = newRender as InternalRenderFunction } @@ -90,26 +100,27 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) { if (!record) return // Array.from creates a snapshot which avoids the set being mutated during // updates - Array.from(record).forEach(instance => { - const comp = instance.type - if (!hmrDirtyComponents.has(comp)) { - // 1. Update existing comp definition to match new one - newComp = isClassComponent(newComp) ? newComp.__vccOpts : newComp - extend(comp, newComp) - for (const key in comp) { - if (!(key in newComp)) { - delete (comp as any)[key] - } + const { component, instances } = record + + if (!hmrDirtyComponents.has(component)) { + // 1. Update existing comp definition to match new one + newComp = isClassComponent(newComp) ? newComp.__vccOpts : newComp + extend(component, newComp) + for (const key in component) { + if (!(key in newComp)) { + delete (component as any)[key] } - // 2. Mark component dirty. This forces the renderer to replace the component - // on patch. - hmrDirtyComponents.add(comp) - // 3. Make sure to unmark the component after the reload. - queuePostFlushCb(() => { - hmrDirtyComponents.delete(comp) - }) } + // 2. Mark component dirty. This forces the renderer to replace the component + // on patch. + hmrDirtyComponents.add(component) + // 3. Make sure to unmark the component after the reload. + queuePostFlushCb(() => { + hmrDirtyComponents.delete(component) + }) + } + Array.from(instances).forEach(instance => { if (instance.parent) { // 4. Force the parent instance to re-render. This will cause all updated // components to be unmounted and re-mounted. Queue the update so that we From 8e2037537219219d5ab6456e8a29bd0235eac311 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 27 Oct 2020 18:50:34 -0400 Subject: [PATCH 0100/4002] fix(types): ensure correct type for toRef and toRefs on existing refs --- packages/reactivity/src/ref.ts | 9 ++++----- test-dts/ref.test-d.ts | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 04464fdff43..e3633f982e0 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -20,7 +20,8 @@ export interface Ref { _shallow?: boolean } -export type ToRefs = { [K in keyof T]: Ref } +export type ToRef = T extends Ref ? T : Ref> +export type ToRefs = { [K in keyof T]: ToRef } const convert = (val: T): T => isObject(val) ? reactive(val) : val @@ -30,9 +31,7 @@ export function isRef(r: any): r is Ref { return Boolean(r && r.__v_isRef === true) } -export function ref( - value: T -): T extends Ref ? T : Ref> +export function ref(value: T): ToRef export function ref(value: T): Ref> export function ref(): Ref export function ref(value?: unknown) { @@ -171,7 +170,7 @@ class ObjectRefImpl { export function toRef( object: T, key: K -): Ref { +): ToRef { return isRef(object[key]) ? object[key] : (new ObjectRefImpl(object, key) as any) diff --git a/test-dts/ref.test-d.ts b/test-dts/ref.test-d.ts index c961f4be37d..f736977b5c8 100644 --- a/test-dts/ref.test-d.ts +++ b/test-dts/ref.test-d.ts @@ -6,7 +6,9 @@ import { unref, reactive, expectType, - proxyRefs + proxyRefs, + toRef, + toRefs } from './index' function plainType(arg: number | Ref) { @@ -154,3 +156,18 @@ const r2 = { const p2 = proxyRefs(r2) expectType(p2.a) expectType>(p2.obj.k) + +// toRef +const obj = { + a: 1, + b: ref(1) +} +expectType>(toRef(obj, 'a')) +expectType>(toRef(obj, 'b')) + +// toRefs +const objRefs = toRefs(obj) +expectType<{ + a: Ref + b: Ref +}>(objRefs) From ccf49d9f3b036d6d646806b459095a9a1b567a8f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:49:23 +0000 Subject: [PATCH 0101/4002] build(deps-dev): bump eslint from 7.12.0 to 7.12.1 (#2498) --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 277815238bf..809da50209b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -369,10 +369,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@eslint/eslintrc@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.0.tgz#bc7e3c4304d4c8720968ccaee793087dfb5fe6b4" - integrity sha512-+cIGPCBdLCzqxdtwppswP+zTsH9BOIGzAeKfBIbtb4gW/giMlfMwP0HUSFfhzh20f9u8uZ8hOp62+4GPquTbwQ== +"@eslint/eslintrc@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.1.tgz#f72069c330461a06684d119384435e12a5d76e3c" + integrity sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -2649,12 +2649,12 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.7.0: - version "7.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.0.tgz#7b6a85f87a9adc239e979bb721cde5ce0dc27da6" - integrity sha512-n5pEU27DRxCSlOhJ2rO57GDLcNsxO0LPpAbpFdh7xmcDmjmlGUfoyrsB3I7yYdQXO5N3gkSTiDrPSPNFiiirXA== + version "7.12.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" + integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.0" + "@eslint/eslintrc" "^0.2.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" From 417e3688c6c691844fc113cc8c6955c17392be1b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:50:21 +0000 Subject: [PATCH 0102/4002] build(deps-dev): bump lint-staged from 10.4.2 to 10.5.0 (#2499) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 809da50209b..9ebff2ea8fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4645,9 +4645,9 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@^10.2.10: - version "10.4.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.2.tgz#9fee4635c4b5ddb845746f237c6d43494ccd21c1" - integrity sha512-OLCA9K1hS+Sl179SO6kX0JtnsaKj/MZalEhUj5yAgXsb63qPI/Gfn6Ua1KuZdbfkZNEu3/n5C/obYCu70IMt9g== + version "10.5.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.0.tgz#c923c2447a84c595874f3de696778736227e7a7a" + integrity sha512-gjC9+HGkBubOF+Yyoj9pd52Qfm/kYB+dRX1UOgWjHKvSDYl+VHkZXlBMlqSZa2cH3Kp5/uNL480sV6e2dTgXSg== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" From 485a5eb7d656ec10c755bea7cfca849f5ec95f6e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:51:45 +0000 Subject: [PATCH 0103/4002] build(deps-dev): bump typescript from 4.0.3 to 4.0.5 (#2500) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9ebff2ea8fa..b35c5678869 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7371,9 +7371,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" - integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== + version "4.0.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" + integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== typescript@~3.9.7: version "3.9.7" From 44e816e18f840a76682ea85770921a50b665d9e1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:52:52 +0000 Subject: [PATCH 0104/4002] build(deps-dev): bump @microsoft/api-extractor from 7.10.4 to 7.10.6 (#2501) --- yarn.lock | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/yarn.lock b/yarn.lock index b35c5678869..08c082359e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -592,24 +592,24 @@ resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" integrity sha512-sugEjWjSSy9OHF6t1ZBLZCAROj52cZthB9dIePmzZzzMwmWwy3qAEMSdJheHeS1FOwDZI7Ipm1H/bWgzJNnSAw== -"@microsoft/api-extractor-model@7.10.3": - version "7.10.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.3.tgz#f687f324e940bd71e3e73b5b262a54594b0ea61c" - integrity sha512-etP4NbZpj+zPCuO3YYigIYXkXq5zYhfE3vo/hrCj1OOd/159HDbSHnEQrNWRVy5TR79RAzHvkYAwtLYKeYP8Ag== +"@microsoft/api-extractor-model@7.10.5": + version "7.10.5" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.5.tgz#6b8a706ca5c66e1b62ee7c5bdfd55c443d5b3aa9" + integrity sha512-ZDZ0wuD0d6mIddBuriLTyeCm5cjCR+VL6hla9D0uICdXimY3OoL838MYDZ+UkOLLR9z2GwNxciczRTIrjdQ0oA== dependencies: "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.34.3" + "@rushstack/node-core-library" "3.34.5" "@microsoft/api-extractor@^7.9.15": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.10.4.tgz#9055fab0a702d2d74eba05ff369c50012cf41176" - integrity sha512-vod9Y8IHhBtB3hcKiOe4OLi/hNeWtgRh/mxGrye5SeHaJpu5urAAA9CxLxBT8fDe+pyr1ipzlaiM/eMm2vXKgw== + version "7.10.6" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.10.6.tgz#b47fc89555837acb624c7c950be8d5de80e86190" + integrity sha512-3/c5znYqn8ewJPgf4t5MsIKYq40ORMsToaoAamuqYCCt3mWfDjvArRuosnLl7mLYAs6SbkxPCwh6vEczlZx8Tw== dependencies: - "@microsoft/api-extractor-model" "7.10.3" + "@microsoft/api-extractor-model" "7.10.5" "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.34.3" - "@rushstack/rig-package" "0.2.4" - "@rushstack/ts-command-line" "4.7.3" + "@rushstack/node-core-library" "3.34.5" + "@rushstack/rig-package" "0.2.5" + "@rushstack/ts-command-line" "4.7.4" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" @@ -692,10 +692,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.34.3": - version "3.34.3" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.34.3.tgz#a59a1e452dcc79bd4e5f0840b4e9603551668f85" - integrity sha512-WNXHEk5/uoZsbrKzGpYUzDDymJvZarRkByab4uS1fbEcTSDFSVB9e0rREzCkU9yDAQlRutbFwiTXLu3LVR5F6w== +"@rushstack/node-core-library@3.34.5": + version "3.34.5" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.34.5.tgz#ccd4316aed1651742b9bee97fc18b4236f4722b4" + integrity sha512-mbJxkrmtcIYH0DPVwPdt6RY27GUbIWG+5/6LPj3SJCF/TA45L0n7AL6cN90PrzdOUWOQV+41vxluLVcY9Ak3aw== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -707,19 +707,19 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.4.tgz#259feb6637bedbfdc130d3a188ce85370e048743" - integrity sha512-/UXb6N0m0l+5kU4mLmRxyw3we+/w1fesgvfg96xllty5LyQxKDvkscmjlvCU/Yx55WO1tVxN4/7YlNEB2DcHyA== +"@rushstack/rig-package@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.5.tgz#241465ae97867bbdfb6a4467107fad309ae7981a" + integrity sha512-8f/NVb1BO5ZJPKTFVqsEikbznnY5qxOLoqayux5OaqxTyGY8YG3d7xqHJSKMUJhIUhSzgwVjT2WNNipD2/S7sw== dependencies: "@types/node" "10.17.13" resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.7.3": - version "4.7.3" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.3.tgz#fa72c637d70aa29c201f8f016f7db626f2d23a2c" - integrity sha512-8FNrUSbMgKLgRVcsg1STsIC2xAdyes7qJtVwg36hSnBAMZgCCIM+Z36nnxyrnYTS/6qwiXv7fwVaUxXH+SyiAQ== +"@rushstack/ts-command-line@4.7.4": + version "4.7.4" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.4.tgz#71b785aea62b3cb71547a1c8a51e8948c8a26b87" + integrity sha512-x2ZQjE5ss5nnGRceAIRe16VNZNFoS4v/RJH9+Em/yYOIwPJr0TZ93xTXQQE2uQVTgBBw06I/BUOdfMpJK/vDUQ== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -6310,14 +6310,14 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.17.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2, resolve@~1.17.0: +resolve@1.17.0, resolve@~1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resolve@^1.18.1: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== From 4339c6874275ef92d7f05f405d942425481ee1fd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:56:22 +0000 Subject: [PATCH 0105/4002] build(deps-dev): bump @typescript-eslint/parser from 4.5.0 to 4.6.0 (#2502) --- yarn.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 08c082359e5..3b8a3dec260 100644 --- a/yarn.lock +++ b/yarn.lock @@ -942,35 +942,35 @@ "@types/yargs-parser" "*" "@typescript-eslint/parser@^4.1.1": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.5.0.tgz#b2d659f25eec0041c7bc5660b91db1eefe8d7122" - integrity sha512-xb+gmyhQcnDWe+5+xxaQk5iCw6KqXd8VQxGiTeELTMoYeRjpocZYYRP1gFVM2C8Yl0SpUvLa1lhprwqZ00w3Iw== + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d" + integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q== dependencies: - "@typescript-eslint/scope-manager" "4.5.0" - "@typescript-eslint/types" "4.5.0" - "@typescript-eslint/typescript-estree" "4.5.0" + "@typescript-eslint/scope-manager" "4.6.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/typescript-estree" "4.6.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.5.0.tgz#8dfd53c3256d4357e7d66c2fc8956835f4d239be" - integrity sha512-C0cEO0cTMPJ/w4RA/KVe4LFFkkSh9VHoFzKmyaaDWAnPYIEzVCtJ+Un8GZoJhcvq+mPFXEsXa01lcZDHDG6Www== +"@typescript-eslint/scope-manager@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662" + integrity sha512-uZx5KvStXP/lwrMrfQQwDNvh2ppiXzz5TmyTVHb+5TfZ3sUP7U1onlz3pjoWrK9konRyFe1czyxObWTly27Ang== dependencies: - "@typescript-eslint/types" "4.5.0" - "@typescript-eslint/visitor-keys" "4.5.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/visitor-keys" "4.6.0" -"@typescript-eslint/types@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.5.0.tgz#98256e07bad1c8d15d0c9627ebec82fd971bb3c3" - integrity sha512-n2uQoXnyWNk0Les9MtF0gCK3JiWd987JQi97dMSxBOzVoLZXCNtxFckVqt1h8xuI1ix01t+iMY4h4rFMj/303g== +"@typescript-eslint/types@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f" + integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA== -"@typescript-eslint/typescript-estree@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.5.0.tgz#d50cf91ae3a89878401111031eb6fb6d03554f64" - integrity sha512-gN1mffq3zwRAjlYWzb5DanarOPdajQwx5MEWkWCk0XvqC8JpafDTeioDoow2L4CA/RkYZu7xEsGZRhqrTsAG8w== +"@typescript-eslint/typescript-estree@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08" + integrity sha512-s4Z9qubMrAo/tw0CbN0IN4AtfwuehGXVZM0CHNMdfYMGBDhPdwTEpBrecwhP7dRJu6d9tT9ECYNaWDHvlFSngA== dependencies: - "@typescript-eslint/types" "4.5.0" - "@typescript-eslint/visitor-keys" "4.5.0" + "@typescript-eslint/types" "4.6.0" + "@typescript-eslint/visitor-keys" "4.6.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -978,12 +978,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.5.0.tgz#b59f26213ac597efe87f6b13cf2aabee70542af0" - integrity sha512-UHq4FSa55NDZqscRU//O5ROFhHa9Hqn9KWTEvJGTArtTQp5GKv9Zqf6d/Q3YXXcFv4woyBml7fJQlQ+OuqRcHA== +"@typescript-eslint/visitor-keys@4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da" + integrity sha512-38Aa9Ztl0XyFPVzmutHXqDMCu15Xx8yKvUo38Gu3GhsuckCh3StPI5t2WIO9LHEsOH7MLmlGfKUisU8eW1Sjhg== dependencies: - "@typescript-eslint/types" "4.5.0" + "@typescript-eslint/types" "4.6.0" eslint-visitor-keys "^2.0.0" "@zeit/schemas@2.6.0": From b927d1d37deda14b0e04b0b59bfe431d64c96cf6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:58:25 +0000 Subject: [PATCH 0106/4002] build(deps-dev): bump @rollup/plugin-replace from 2.3.3 to 2.3.4 (#2504) --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3b8a3dec260..5a6b6a4cef1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -676,12 +676,12 @@ resolve "^1.17.0" "@rollup/plugin-replace@^2.2.1": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.3.tgz#cd6bae39444de119f5d905322b91ebd4078562e7" - integrity sha512-XPmVXZ7IlaoWaJLkSCDaa0Y6uVo5XQYHhiMFzOd5qSv5rE+t/UJToPIOE56flKIxBFQI27ONsxb7dqHnwSsjKQ== + version "2.3.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz#7dd84c17755d62b509577f2db37eb524d7ca88ca" + integrity sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ== dependencies: - "@rollup/pluginutils" "^3.0.8" - magic-string "^0.25.5" + "@rollup/pluginutils" "^3.1.0" + magic-string "^0.25.7" "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" @@ -4836,7 +4836,7 @@ magic-string@^0.22.5: dependencies: vlq "^0.2.2" -magic-string@^0.25.5, magic-string@^0.25.7: +magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== From b6d3bb5cf10c7e3c431cb96e48a75e68dd7919a9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:59:15 +0000 Subject: [PATCH 0107/4002] build(deps-dev): bump ts-jest from 26.4.2 to 26.4.3 (#2505) --- yarn.lock | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5a6b6a4cef1..26af86913bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4280,19 +4280,7 @@ jest-snapshot@^26.6.1: pretty-format "^26.6.1" semver "^7.3.2" -jest-util@^26.1.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" - integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== - dependencies: - "@jest/types" "^26.6.0" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" - -jest-util@^26.6.1: +jest-util@^26.1.0, jest-util@^26.6.1: version "26.6.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.1.tgz#4cc0d09ec57f28d12d053887eec5dc976a352e9b" integrity sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA== @@ -7268,9 +7256,9 @@ trim-right@^1.0.1: integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= ts-jest@^26.2.0: - version "26.4.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.2.tgz#00b6c970bee202ceef7c6e6e9805c4837b22dab8" - integrity sha512-0+MynTTzzbuy5rGjzsCKjxHJk5gY906c/FSaqQ3081+G7dp2Yygfa9hVlbrtNNcztffh1mC6Rs9jb/yHpcjsoQ== + version "26.4.3" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.3.tgz#d153a616033e7ec8544b97ddbe2638cbe38d53db" + integrity sha512-pFDkOKFGY+nL9v5pkhm+BIFpoAuno96ff7GMnIYr/3L6slFOS365SI0fGEVYx2RKGji5M2elxhWjDMPVcOCdSw== dependencies: "@jest/create-cache-key-function" "^26.5.0" "@types/jest" "26.x" From 0935c0501b8dcabf5600a539672c4745f7b1b93f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 19:43:12 +0000 Subject: [PATCH 0108/4002] build(deps-dev): bump @types/node from 14.14.2 to 14.14.6 (#2512) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 26af86913bd..479504fc307 100644 --- a/yarn.lock +++ b/yarn.lock @@ -886,9 +886,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@^14.10.1": - version "14.14.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.2.tgz#d25295f9e4ca5989a2c610754dc02a9721235eeb" - integrity sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg== + version "14.14.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.6.tgz#146d3da57b3c636cc0d1769396ce1cfa8991147f" + integrity sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw== "@types/node@10.17.13": version "10.17.13" From 00c62c1b5cf8b211fe8764f0e27caf60b517625a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:07:30 +0000 Subject: [PATCH 0109/4002] build(deps-dev): bump execa from 4.0.3 to 4.1.0 (#2517) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 479504fc307..e04ccf8c1fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2817,9 +2817,9 @@ execa@^1.0.0: strip-eof "^1.0.0" execa@^4.0.0, execa@^4.0.2, execa@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" - integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: cross-spawn "^7.0.0" get-stream "^5.0.0" From fe8f8f88a2605249d3e0d39b818b4c5f80dd80b6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:09:36 +0000 Subject: [PATCH 0110/4002] build(deps-dev): bump @microsoft/api-extractor from 7.10.6 to 7.11.0 (#2519) --- yarn.lock | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/yarn.lock b/yarn.lock index e04ccf8c1fd..63234098c98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -592,20 +592,20 @@ resolved "https://registry.yarnpkg.com/@ls-lint/ls-lint/-/ls-lint-1.9.2.tgz#689f1f4c06072823a726802ba167340efcefe19c" integrity sha512-sugEjWjSSy9OHF6t1ZBLZCAROj52cZthB9dIePmzZzzMwmWwy3qAEMSdJheHeS1FOwDZI7Ipm1H/bWgzJNnSAw== -"@microsoft/api-extractor-model@7.10.5": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.5.tgz#6b8a706ca5c66e1b62ee7c5bdfd55c443d5b3aa9" - integrity sha512-ZDZ0wuD0d6mIddBuriLTyeCm5cjCR+VL6hla9D0uICdXimY3OoL838MYDZ+UkOLLR9z2GwNxciczRTIrjdQ0oA== +"@microsoft/api-extractor-model@7.10.6": + version "7.10.6" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.10.6.tgz#2d20a5fffefd4063dfda747504ce3c810a3d78b5" + integrity sha512-kOhL5fjRIRJYKX5tQcijPcyejA3l29Lg+sbnpM+4owngdbM91O4PcysS6MrzKEvZrLN6+v8LkOlNre8n/sDZPA== dependencies: "@microsoft/tsdoc" "0.12.19" "@rushstack/node-core-library" "3.34.5" "@microsoft/api-extractor@^7.9.15": - version "7.10.6" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.10.6.tgz#b47fc89555837acb624c7c950be8d5de80e86190" - integrity sha512-3/c5znYqn8ewJPgf4t5MsIKYq40ORMsToaoAamuqYCCt3mWfDjvArRuosnLl7mLYAs6SbkxPCwh6vEczlZx8Tw== + version "7.11.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.11.0.tgz#5f1355c1152035c177081eb4127371fa7ade4531" + integrity sha512-VZ77kHn0CNWiPqe/yVY2XxL9AvDSy/Pvc7RqhVxy9OHiWV3Qkwh9gRssz+Wf5XLLWylduwg/Ikl9sneUJ2FVVw== dependencies: - "@microsoft/api-extractor-model" "7.10.5" + "@microsoft/api-extractor-model" "7.10.6" "@microsoft/tsdoc" "0.12.19" "@rushstack/node-core-library" "3.34.5" "@rushstack/rig-package" "0.2.5" @@ -615,7 +615,7 @@ resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~3.9.7" + typescript "~4.0.5" "@microsoft/tsdoc@0.12.19": version "0.12.19" @@ -7358,16 +7358,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.0.2: +typescript@^4.0.2, typescript@~4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== -typescript@~3.9.7: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== - uglify-js@^2.6.1: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" From 556560fae31d9e406cfae656089657b6332686c1 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 29 Oct 2020 15:03:39 -0400 Subject: [PATCH 0111/4002] feat(compiler-sfc): new script setup implementation - now exposes all top level bindings to template - support `ref:` syntax sugar --- .../src/transforms/transformExpression.ts | 97 ++-- .../__snapshots__/compileScript.spec.ts.snap | 265 +++++----- .../__tests__/compileScript.spec.ts | 453 +++++++++------- packages/compiler-sfc/src/compileScript.ts | 498 +++++++++++------- packages/compiler-sfc/src/genCssVars.ts | 2 +- 5 files changed, 758 insertions(+), 557 deletions(-) diff --git a/packages/compiler-core/src/transforms/transformExpression.ts b/packages/compiler-core/src/transforms/transformExpression.ts index a671c563f70..c2f00a4ce27 100644 --- a/packages/compiler-core/src/transforms/transformExpression.ts +++ b/packages/compiler-core/src/transforms/transformExpression.ts @@ -161,9 +161,9 @@ export function processExpression( if (!isDuplicate(node)) { const needPrefix = shouldPrefix(node, parent) if (!knownIds[node.name] && needPrefix) { - if (isPropertyShorthand(node, parent)) { - // property shorthand like { foo }, we need to add the key since we - // rewrite the value + if (isStaticProperty(parent) && parent.shorthand) { + // property shorthand like { foo }, we need to add the key since + // we rewrite the value node.prefix = `${node.name}: ` } node.name = prefix(node.name) @@ -278,46 +278,65 @@ const isStaticProperty = (node: Node): node is ObjectProperty => (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && !node.computed -const isPropertyShorthand = (node: Node, parent: Node) => { - return ( - isStaticProperty(parent) && - parent.value === node && - parent.key.type === 'Identifier' && - parent.key.name === (node as Identifier).name && - parent.key.start === node.start - ) -} - const isStaticPropertyKey = (node: Node, parent: Node) => isStaticProperty(parent) && parent.key === node -function shouldPrefix(identifier: Identifier, parent: Node) { +function shouldPrefix(id: Identifier, parent: Node) { + // declaration id if ( - !( - isFunction(parent) && - // not id of a FunctionDeclaration - ((parent as any).id === identifier || - // not a params of a function - parent.params.includes(identifier)) - ) && - // not a key of Property - !isStaticPropertyKey(identifier, parent) && - // not a property of a MemberExpression - !( - (parent.type === 'MemberExpression' || - parent.type === 'OptionalMemberExpression') && - parent.property === identifier && - !parent.computed - ) && - // not in an Array destructure pattern - !(parent.type === 'ArrayPattern') && - // skip whitelisted globals - !isGloballyWhitelisted(identifier.name) && - // special case for webpack compilation - identifier.name !== `require` && - // is a special keyword but parsed as identifier - identifier.name !== `arguments` + (parent.type === 'VariableDeclarator' || + parent.type === 'ClassDeclaration') && + parent.id === id ) { - return true + return false + } + + if (isFunction(parent)) { + // function decalration/expression id + if ((parent as any).id === id) { + return false + } + // params list + if (parent.params.includes(id)) { + return false + } } + + // property key + // this also covers object destructure pattern + if (isStaticPropertyKey(id, parent)) { + return false + } + + // array destructure pattern + if (parent.type === 'ArrayPattern') { + return false + } + + // member expression property + if ( + (parent.type === 'MemberExpression' || + parent.type === 'OptionalMemberExpression') && + parent.property === id && + !parent.computed + ) { + return false + } + + // is a special keyword but parsed as identifier + if (id.name === 'arguments') { + return false + } + + // skip whitelisted globals + if (isGloballyWhitelisted(id.name)) { + return false + } + + // special case for webpack compilation + if (id.name === 'require') { + return false + } + + return true } diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index a6bb93e7405..69937bc9e79 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -1,8 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SFC compile `).content - ) - }) - - test('should extract comment for import or type declarations', () => { - assertCode( - compile(``).content - ) - }) - test('explicit setup signature', () => { assertCode( compile(``).content ) }) - test('import dedupe between `) assertCode(content) - expect(content.indexOf(`import { x }`)).toEqual( - content.lastIndexOf(`import { x }`) - ) + expect(content).toMatch('return { x, a, b, c, d }') }) - describe('exports', () => { - test('export const x = ...', () => { - const { content, bindings } = compile( - `` - ) - assertCode(content) - expect(bindings).toStrictEqual({ - x: 'setup' - }) - }) - - test('export const { x } = ... (destructuring)', () => { - const { content, bindings } = compile(``) - assertCode(content) - expect(bindings).toStrictEqual({ - a: 'setup', - b: 'setup', - c: 'setup', - d: 'setup', - e: 'setup', - f: 'setup' - }) - }) - - test('export function x() {}', () => { - const { content, bindings } = compile( - `` - ) - assertCode(content) - expect(bindings).toStrictEqual({ - x: 'setup' - }) - }) - - test('export class X() {}', () => { - const { content, bindings } = compile( - `` - ) - assertCode(content) - expect(bindings).toStrictEqual({ - X: 'setup' - }) - }) - - test('export { x }', () => { - const { content, bindings } = compile( - `` - ) - assertCode(content) - expect(bindings).toStrictEqual({ - x: 'setup', - y: 'setup' - }) - }) - - test(`export { x } from './x'`, () => { - const { content, bindings } = compile( - `` - ) - assertCode(content) - expect(bindings).toStrictEqual({ - x: 'setup', - y: 'setup' - }) - }) - - test(`export default from './x'`, () => { - const { content, bindings } = compile( - ``, - { - babelParserPlugins: ['exportDefaultFrom'] - } + describe('imports', () => { + test('should hoist and expose imports', () => { + assertCode( + compile(``).content ) - assertCode(content) - expect(bindings).toStrictEqual({}) }) - test(`export { x as default }`, () => { - const { content, bindings } = compile( - `` + test('should extract comment for import or type declarations', () => { + assertCode( + compile(``).content ) - assertCode(content) - expect(bindings).toStrictEqual({ - y: 'setup' - }) }) - test(`export { x as default } from './x'`, () => { - const { content, bindings } = compile( - `` - ) + test('dedupe between user & helper', () => { + const { content } = compile(``) assertCode(content) - expect(bindings).toStrictEqual({ - y: 'setup' - }) + expect(content).toMatch(`import { ref } from 'vue'`) }) - test(`export * from './x'`, () => { - const { content, bindings } = compile( - `` - ) + test('import dedupe between + + `) assertCode(content) - expect(bindings).toStrictEqual({ - y: 'setup' - // in this case we cannot extract bindings from ./x so it falls back - // to runtime proxy dispatching - }) - }) - - test('export default in ` + expect(content.indexOf(`import { x }`)).toEqual( + content.lastIndexOf(`import { x }`) ) - assertCode(content) - expect(bindings).toStrictEqual({ - foo: 'props', - y: 'setup' - }) }) }) describe('`) assertCode(content) - expect(bindings).toStrictEqual({ a: 'setup' }) }) test('extract props', () => { @@ -333,7 +210,7 @@ import b from 'b' test('w/ \n` + + `\n` + `` ).content ) @@ -356,8 +233,8 @@ import b from 'b' assertAwaitDetection(`const a = 1 + (await foo)`) }) - test('export', () => { - assertAwaitDetection(`export const a = 1 + (await foo)`) + test('ref', () => { + assertAwaitDetection(`ref: a = 1 + (await foo)`) }) test('nested statements', () => { @@ -366,7 +243,7 @@ import b from 'b' test('should ignore await inside functions', () => { // function declaration - assertAwaitDetection(`export async function foo() { await bar }`, false) + assertAwaitDetection(`async function foo() { await bar }`, false) // function expression assertAwaitDetection(`const foo = async () => { await bar }`, false) // object method @@ -379,6 +256,197 @@ import b from 'b' }) }) + describe('ref: syntax sugar', () => { + test('convert ref declarations', () => { + const { content, bindings } = compile(``) + expect(content).toMatch(`import { ref } from 'vue'`) + expect(content).not.toMatch(`ref: a`) + expect(content).toMatch(`const a = ref(1)`) + expect(content).toMatch(` + const b = ref({ + count: 0 + }) + `) + // normal declarations left untouched + expect(content).toMatch(`let c = () => {}`) + expect(content).toMatch(`let d`) + assertCode(content) + expect(bindings).toStrictEqual({ + a: 'setup', + b: 'setup', + c: 'setup', + d: 'setup' + }) + }) + + test('multi ref declarations', () => { + const { content, bindings } = compile(``) + expect(content).toMatch(` + const a = ref(1), b = ref(2), c = ref({ + count: 0 + }) + `) + expect(content).toMatch(`return { a, b, c }`) + assertCode(content) + expect(bindings).toStrictEqual({ + a: 'setup', + b: 'setup', + c: 'setup' + }) + }) + + test('should not convert non ref labels', () => { + const { content } = compile(``) + expect(content).toMatch(`foo: a = 1, b = 2`) + assertCode(content) + }) + + test('accessing ref binding', () => { + const { content } = compile(``) + expect(content).toMatch(`console.log(a.value)`) + expect(content).toMatch(`return a.value + 1`) + assertCode(content) + }) + + test('cases that should not append .value', () => { + const { content } = compile(``) + expect(content).not.toMatch(`a.value`) + }) + + test('mutating ref binding', () => { + const { content } = compile(``) + expect(content).toMatch(`a.value++`) + expect(content).toMatch(`a.value = a.value + 1`) + expect(content).toMatch(`b.value.count++`) + expect(content).toMatch(`b.value.count = b.value.count + 1`) + assertCode(content) + }) + + test('using ref binding in property shorthand', () => { + const { content } = compile(``) + expect(content).toMatch(`const b = { a: a.value }`) + // should not convert destructure + expect(content).toMatch(`const { a } = b`) + assertCode(content) + }) + + test('object destructure', () => { + const { content, bindings } = compile(``) + expect(content).toMatch( + `const n = ref(1), { a: __a, b: __c, d: __d = 1, e: __f = 2, ...__g } = useFoo()` + ) + expect(content).toMatch(`\nconst a = ref(__a);`) + expect(content).not.toMatch(`\nconst b = ref(__b);`) + expect(content).toMatch(`\nconst c = ref(__c);`) + expect(content).toMatch(`\nconst d = ref(__d);`) + expect(content).not.toMatch(`\nconst e = ref(__e);`) + expect(content).toMatch(`\nconst f = ref(__f);`) + expect(content).toMatch(`\nconst g = ref(__g);`) + expect(content).toMatch( + `console.log(n.value, a.value, c.value, d.value, f.value, g.value)` + ) + expect(content).toMatch(`return { n, a, c, d, f, g }`) + expect(bindings).toStrictEqual({ + n: 'setup', + a: 'setup', + c: 'setup', + d: 'setup', + f: 'setup', + g: 'setup' + }) + assertCode(content) + }) + + test('array destructure', () => { + const { content, bindings } = compile(``) + expect(content).toMatch( + `const n = ref(1), [__a, __b = 1, ...__c] = useFoo()` + ) + expect(content).toMatch(`\nconst a = ref(__a);`) + expect(content).toMatch(`\nconst b = ref(__b);`) + expect(content).toMatch(`\nconst c = ref(__c);`) + expect(content).toMatch(`console.log(n.value, a.value, b.value, c.value)`) + expect(content).toMatch(`return { n, a, b, c }`) + expect(bindings).toStrictEqual({ + n: 'setup', + a: 'setup', + b: 'setup', + c: 'setup' + }) + assertCode(content) + }) + + test('nested destructure', () => { + const { content, bindings } = compile(``) + expect(content).toMatch(`const [{ a: { b: __b }}] = useFoo()`) + expect(content).toMatch(`const { c: [__d, __e] } = useBar()`) + expect(content).not.toMatch(`\nconst a = ref(__a);`) + expect(content).not.toMatch(`\nconst c = ref(__c);`) + expect(content).toMatch(`\nconst b = ref(__b);`) + expect(content).toMatch(`\nconst d = ref(__d);`) + expect(content).toMatch(`\nconst e = ref(__e);`) + expect(content).toMatch(`return { b, d, e }`) + expect(bindings).toStrictEqual({ + b: 'setup', + d: 'setup', + e: 'setup' + }) + assertCode(content) + }) + }) + describe('errors', () => { test('`) + ).toThrow(`cannot contain non-type named exports`) + expect(() => compile(``) - ).toThrow(`Cannot export locally defined variable as default`) + ).toThrow(`cannot contain non-type named exports`) + }) + + test('ref: non-assignment expressions', () => { + expect(() => + compile(``) + ).toThrow(`ref: statements can only contain assignment expressions`) }) test('export default referencing local var', () => { @@ -410,10 +492,10 @@ import b from 'b' ).toThrow(`cannot reference locally declared variables`) }) - test('export default referencing exports', () => { + test('export default referencing ref declarations', () => { expect(() => compile(``).content - ) - }) - - test('should allow export default referencing re-exported binding', () => { - assertCode( - compile(` - - `) - ).toThrow(`Default export is already declared`) - - expect(() => - compile(` - - - `) - ).toThrow(`Default export is already declared`) - expect(() => compile(` `) expect(content).toMatch(`import { ref } from 'vue'`) + expect(content).not.toMatch(`ref: foo`) expect(content).not.toMatch(`ref: a`) + expect(content).not.toMatch(`ref: b`) + expect(content).toMatch(`const foo = ref()`) expect(content).toMatch(`const a = ref(1)`) expect(content).toMatch(` const b = ref({ @@ -279,6 +283,7 @@ describe('SFC compile `) - ).toThrow(`cannot contain non-type named exports`) + ).toThrow(`cannot contain non-type named or * exports`) + + expect(() => + compile(``) + ).toThrow(`cannot contain non-type named or * exports`) expect(() => compile(``) - ).toThrow(`cannot contain non-type named exports`) + ).toThrow(`cannot contain non-type named or * exports`) }) test('ref: non-assignment expressions', () => { diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 45cdea72256..94eb0e56f8d 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -27,13 +27,28 @@ import { import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' import { genCssVarsCode, injectCssVarsCalls } from './genCssVars' +import { compileTemplate, SFCTemplateCompileOptions } from './compileTemplate' export interface SFCScriptCompileOptions { /** * https://babeljs.io/docs/en/babel-parser#plugins */ babelParserPlugins?: ParserPlugin[] + /** + * Enable ref: label sugar + * https://github.com/vuejs/rfcs/pull/228 + * @default true + */ refSugar?: boolean + /** + * Compile the template and inline the resulting render function + * directly inside setup(). + * - Only affects `).content - ) - }) - test('should expose top level declarations', () => { const { content } = compile(` `) assertCode(content) - expect(content).toMatch('return { x, a, b, c, d }') + expect(content).toMatch('return { a, b, c, d, x }') + }) + + test('defineContext()', () => { + const { content, bindings } = compile(` + + `) + // should generate working code + assertCode(content) + // should anayze bindings + expect(bindings).toStrictEqual({ + foo: 'props', + bar: 'const', + props: 'const', + emit: 'const' + }) + + // should remove defineContext import and call + expect(content).not.toMatch('defineContext') + // should generate correct setup signature + expect(content).toMatch(`setup(__props, { props, emit }) {`) + // should include context options in default export + expect(content).toMatch(`export default { + props: { + foo: String + }, + emit: ['a', 'b'],`) }) describe('imports', () => { @@ -51,18 +81,22 @@ describe('SFC compile `).content + compile(` + + `).content ) }) test('dedupe between user & helper', () => { - const { content } = compile(``) + const { content } = compile(` + + `) assertCode(content) expect(content).toMatch(`import { ref } from 'vue'`) }) @@ -84,7 +118,62 @@ describe('SFC compile + + `, + { inlineTemplate: true } + ) + // check snapshot and make sure helper imports and + // hoists are placed correctly. + assertCode(content) + }) + + test('avoid unref() when necessary', () => { + // function, const, component import + const { content } = compile( + ` + + + `, + { inlineTemplate: true } + ) + assertCode(content) + // no need to unref vue component import + expect(content).toMatch(`createVNode(Foo)`) + // should unref other imports + expect(content).toMatch(`unref(other)`) + // no need to unref constant literals + expect(content).not.toMatch(`unref(constant)`) + // should unref const w/ call init (e.g. ref()) + expect(content).toMatch(`unref(count)`) + // no need to unref function declarations + expect(content).toMatch(`{ onClick: fn }`) + // no need to mark constant fns in patch flag + expect(content).not.toMatch(`PROPS`) + }) + }) + + describe('with TypeScript', () => { test('hoist type declarations', () => { const { content } = compile(` + `) + assertCode(content) + expect(content).toMatch(`export default defineComponent({ + props: { foo: String }, + emits: ['a', 'b'], + setup(__props, { props, emit }) {`) + }) + + test('defineContext w/ type / extract props', () => { + const { content, bindings } = compile(` + `) assertCode(content) expect(content).toMatch(`string: { type: String, required: true }`) @@ -154,21 +263,57 @@ describe('SFC compile + `) + assertCode(content) + expect(content).toMatch(`props: {},\n emit: (e: 'foo' | 'bar') => void,`) + expect(content).toMatch(`emits: ["foo", "bar"] as unknown as undefined`) + }) + + test('defineContext w/ type / extract emits (union)', () => { + const { content } = compile(` + `) assertCode(content) expect(content).toMatch( - `declare function __emit__(e: 'foo' | 'bar'): void` - ) - expect(content).toMatch( - `declare function __emit__(e: 'baz', id: number): void` + `props: {},\n emit: ((e: 'foo' | 'bar') => void) | ((e: 'baz', id: number) => void),` ) expect(content).toMatch( `emits: ["foo", "bar", "baz"] as unknown as undefined` @@ -220,9 +365,7 @@ describe('SFC compile `) - expect(content).toMatch( - `export ${shouldAsync ? `async ` : ``}function setup` - ) + expect(content).toMatch(`${shouldAsync ? `async ` : ``}setup()`) } test('expression statement', () => { @@ -459,25 +602,27 @@ describe('SFC compile `) - ).toThrow(`cannot contain non-type named or * exports`) + ).toThrow(moduleErrorMsg) expect(() => compile(``) - ).toThrow(`cannot contain non-type named or * exports`) + ).toThrow(moduleErrorMsg) expect(() => compile(``) - ).toThrow(`cannot contain non-type named or * exports`) + ).toThrow(moduleErrorMsg) }) test('ref: non-assignment expressions', () => { @@ -488,97 +633,74 @@ describe('SFC compile `) + }).toThrow(`cannot accept both type and non-type arguments`) + }) + + test('defineContext() referencing local var', () => { expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) }) - test('export default referencing ref declarations', () => { + test('defineContext() referencing ref declarations', () => { expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) }) - test('should allow export default referencing scope var', () => { + test('should allow defineContext() referencing scope var', () => { assertCode( compile(``).content ) }) - test('should allow export default referencing imported binding', () => { + test('should allow defineContext() referencing imported binding', () => { assertCode( compile(``).content ) }) - - test('error on duplicated default export', () => { - expect(() => - compile(` - - - `) - ).toThrow(`Default export is already declared`) - - expect(() => - compile(` - - - `) - ).toThrow(`Default export is already declared`) - - expect(() => - compile(` - - - `) - ).toThrow(`Default export is already declared`) - }) }) }) @@ -779,11 +901,12 @@ describe('SFC analyze `) expect(bindings).toStrictEqual({ diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index ea5bf95f0ea..b90b677f7c8 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -15,12 +15,12 @@ import { TSType, TSTypeLiteral, TSFunctionType, - TSDeclareFunction, ObjectProperty, ArrayExpression, Statement, Expression, - LabeledStatement + LabeledStatement, + TSUnionType } from '@babel/types' import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' @@ -143,6 +143,7 @@ export function compileScript( const refIdentifiers: Set = new Set() const enableRefSugar = options.refSugar !== false let defaultExport: Node | undefined + let hasContextCall = false let setupContextExp: string | undefined let setupContextArg: ObjectExpression | undefined let setupContextType: TSTypeLiteral | undefined @@ -182,6 +183,48 @@ export function compileScript( ) } + function processContextCall(node: Node): boolean { + if ( + node.type === 'CallExpression' && + node.callee.type === 'Identifier' && + node.callee.name === CTX_FN_NAME + ) { + if (hasContextCall) { + error('duplicate defineContext() call', node) + } + hasContextCall = true + const optsArg = node.arguments[0] + if (optsArg) { + if (optsArg.type === 'ObjectExpression') { + setupContextArg = optsArg + } else { + error(`${CTX_FN_NAME}() argument must be an object literal.`, optsArg) + } + } + // context call has type parameters - infer runtime types from it + if (node.typeParameters) { + if (setupContextArg) { + error( + `${CTX_FN_NAME}() cannot accept both type and non-type arguments ` + + `at the same time. Use one or the other.`, + node + ) + } + const typeArg = node.typeParameters.params[0] + if (typeArg.type === 'TSTypeLiteral') { + setupContextType = typeArg + } else { + error( + `type argument passed to ${CTX_FN_NAME}() must be a literal type.`, + typeArg + ) + } + } + return true + } + return false + } + function processRefExpression(exp: Expression, statement: LabeledStatement) { if (exp.type === 'AssignmentExpression') { helperImports.add('ref') @@ -500,51 +543,24 @@ export function compileScript( } } + if ( + node.type === 'ExpressionStatement' && + processContextCall(node.expression) + ) { + s.remove(node.start! + startOffset, node.end! + startOffset) + } + if (node.type === 'VariableDeclaration' && !node.declare) { for (const decl of node.declarations) { - if ( - decl.init && - decl.init.type === 'CallExpression' && - decl.init.callee.type === 'Identifier' && - decl.init.callee.name === CTX_FN_NAME - ) { - if (node.declarations.length === 1) { - s.remove(node.start! + startOffset, node.end! + startOffset) - } else { - s.remove(decl.start! + startOffset, decl.end! + startOffset) - } + if (decl.init && processContextCall(decl.init)) { setupContextExp = scriptSetup.content.slice( decl.id.start!, decl.id.end! ) - const optsArg = decl.init.arguments[0] - if (optsArg.type === 'ObjectExpression') { - setupContextArg = optsArg + if (node.declarations.length === 1) { + s.remove(node.start! + startOffset, node.end! + startOffset) } else { - error( - `${CTX_FN_NAME}() argument must be an object literal.`, - optsArg - ) - } - - // useSetupContext() has type parameters - infer runtime types from it - if (decl.init.typeParameters) { - if (setupContextArg) { - error( - `${CTX_FN_NAME}() cannot accept both type and non-type arguments ` + - `at the same time. Use one or the other.`, - decl.init - ) - } - const typeArg = decl.init.typeParameters.params[0] - if (typeArg.type === 'TSTypeLiteral') { - setupContextType = typeArg - } else { - error( - `type argument passed to ${CTX_FN_NAME}() must be a literal type.`, - typeArg - ) - } + s.remove(decl.start! + startOffset, decl.end! + startOffset) } } } @@ -641,7 +657,8 @@ export function compileScript( typeNode.start!, typeNode.end! ) - if (m.key.name === 'props') { + const key = m.key.name + if (key === 'props') { propsType = typeString if (typeNode.type === 'TSTypeLiteral') { extractRuntimeProps(typeNode, typeDeclaredProps, declaredTypes) @@ -649,18 +666,23 @@ export function compileScript( // TODO be able to trace references error(`props type must be an object literal type`, typeNode) } - } else if (m.key.name === 'emit') { + } else if (key === 'emit') { emitType = typeString - if (typeNode.type === 'TSFunctionType') { + if ( + typeNode.type === 'TSFunctionType' || + typeNode.type === 'TSUnionType' + ) { extractRuntimeEmits(typeNode, typeDeclaredEmits) } else { // TODO be able to trace references error(`emit type must be a function type`, typeNode) } - } else if (m.key.name === 'attrs') { + } else if (key === 'attrs') { attrsType = typeString - } else if (m.key.name === 'slots') { + } else if (key === 'slots') { slotsType = typeString + } else { + error(`invalid setup context property: "${key}"`, m.key) } } } @@ -747,19 +769,13 @@ export function compileScript( if (setupContextArg) { Object.assign(bindingMetadata, analyzeBindingsFromOptions(setupContextArg)) } - if (options.inlineTemplate) { - for (const [key, { source }] of Object.entries(userImports)) { - bindingMetadata[key] = source.endsWith('.vue') - ? BindingTypes.CONST - : BindingTypes.SETUP - } - for (const key in setupBindings) { - bindingMetadata[key] = setupBindings[key] - } - } else { - for (const key in allBindings) { - bindingMetadata[key] = BindingTypes.SETUP - } + for (const [key, { source }] of Object.entries(userImports)) { + bindingMetadata[key] = source.endsWith('.vue') + ? BindingTypes.CONST + : BindingTypes.SETUP + } + for (const key in setupBindings) { + bindingMetadata[key] = setupBindings[key] } // 11. generate return statement @@ -1135,11 +1151,20 @@ function toRuntimeTypeString(types: string[]) { } function extractRuntimeEmits( - node: TSFunctionType | TSDeclareFunction, + node: TSFunctionType | TSUnionType, emits: Set ) { - const eventName = - node.type === 'TSDeclareFunction' ? node.params[0] : node.parameters[0] + if (node.type === 'TSUnionType') { + for (let t of node.types) { + if (t.type === 'TSParenthesizedType') t = t.typeAnnotation + if (t.type === 'TSFunctionType') { + extractRuntimeEmits(t, emits) + } + } + return + } + + const eventName = node.parameters[0] if ( eventName.type === 'Identifier' && eventName.typeAnnotation && From 292a657861e5799ec14dab1b6e4d5def003f49d0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 12 Nov 2020 22:44:18 -0500 Subject: [PATCH 0145/4002] wip: fix runtimeConstant marking --- .../src/transforms/transformExpression.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/compiler-core/src/transforms/transformExpression.ts b/packages/compiler-core/src/transforms/transformExpression.ts index 276c8cb1bdf..f72bd16bb34 100644 --- a/packages/compiler-core/src/transforms/transformExpression.ts +++ b/packages/compiler-core/src/transforms/transformExpression.ts @@ -100,13 +100,6 @@ export function processExpression( } const { inline, bindingMetadata } = context - - // const bindings exposed from setup - we know they never change - if (bindingMetadata[node.content] === BindingTypes.CONST) { - node.isRuntimeConstant = true - return node - } - const prefix = (raw: string) => { const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw] if (inline) { @@ -138,6 +131,10 @@ export function processExpression( // bail on parens to prevent any possible function invocations. const bailConstant = rawExp.indexOf(`(`) > -1 if (isSimpleIdentifier(rawExp)) { + // const bindings exposed from setup - we know they never change + if (bindingMetadata[node.content] === BindingTypes.CONST) { + node.isRuntimeConstant = true + } if ( !asParams && !context.identifiers[rawExp] && From 001f8ce99386054c2bea0e3d248f50e1fb4c38bc Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 12 Nov 2020 22:51:40 -0500 Subject: [PATCH 0146/4002] wip: defineContext -> useOptions --- .../__snapshots__/compileScript.spec.ts.snap | 78 +++++++-------- .../__tests__/compileScript.spec.ts | 70 ++++++------- packages/compiler-sfc/src/compileScript.ts | 97 +++++++++---------- .../useOptions.ts} | 12 ++- packages/runtime-core/src/index.ts | 2 +- 5 files changed, 131 insertions(+), 128 deletions(-) rename packages/runtime-core/src/{apiDefineContext.ts => helpers/useOptions.ts} (58%) diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index 6b95ef42840..c48e1ff45b1 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -56,25 +56,7 @@ return { color } }" `; -exports[`SFC compile @@ -302,11 +302,11 @@ const { props, emit } = defineContext({ expect(content).toMatch(`emits: ["foo", "bar"] as unknown as undefined`) }) - test('defineContext w/ type / extract emits (union)', () => { + test('useOptions w/ type / extract emits (union)', () => { const { content } = compile(` @@ -633,21 +633,21 @@ const { props, emit } = defineContext({ ).toThrow(`ref: statements can only contain assignment expressions`) }) - test('defineContext() w/ both type and non-type args', () => { + test('useOptions() w/ both type and non-type args', () => { expect(() => { compile(``) }).toThrow(`cannot accept both type and non-type arguments`) }) - test('defineContext() referencing local var', () => { + test('useOptions() referencing local var', () => { expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) }) - test('should allow defineContext() referencing scope var', () => { + test('should allow useOptions() referencing scope var', () => { assertCode( compile(` @@ -302,11 +302,11 @@ const { props, emit } = useOptions({ expect(content).toMatch(`emits: ["foo", "bar"] as unknown as undefined`) }) - test('useOptions w/ type / extract emits (union)', () => { + test('defineOptions w/ type / extract emits (union)', () => { const { content } = compile(` @@ -633,21 +633,21 @@ const { props, emit } = useOptions({ ).toThrow(`ref: statements can only contain assignment expressions`) }) - test('useOptions() w/ both type and non-type args', () => { + test('defineOptions() w/ both type and non-type args', () => { expect(() => { compile(``) }).toThrow(`cannot accept both type and non-type arguments`) }) - test('useOptions() referencing local var', () => { + test('defineOptions() referencing local var', () => { expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) }) - test('should allow useOptions() referencing scope var', () => { + test('should allow defineOptions() referencing scope var', () => { assertCode( compile(` `) assertCode(content) - expect(content).toMatch(`export default defineComponent({ + expect(content).toMatch(`export default _defineComponent({ + expose: [], props: { foo: String }, emits: ['a', 'b'], setup(__props, { props, emit }) {`) @@ -410,14 +412,14 @@ const { props, emit } = defineOptions({ let c = () => {} let d `) - expect(content).toMatch(`import { ref } from 'vue'`) + expect(content).toMatch(`import { ref as _ref } from 'vue'`) expect(content).not.toMatch(`ref: foo`) expect(content).not.toMatch(`ref: a`) expect(content).not.toMatch(`ref: b`) - expect(content).toMatch(`const foo = ref()`) - expect(content).toMatch(`const a = ref(1)`) + expect(content).toMatch(`const foo = _ref()`) + expect(content).toMatch(`const a = _ref(1)`) expect(content).toMatch(` - const b = ref({ + const b = _ref({ count: 0 }) `) @@ -441,7 +443,7 @@ const { props, emit } = defineOptions({ } `) expect(content).toMatch(` - const a = ref(1), b = ref(2), c = ref({ + const a = _ref(1), b = _ref(2), c = _ref({ count: 0 }) `) @@ -526,15 +528,15 @@ const { props, emit } = defineOptions({ console.log(n, a, c, d, f, g) `) expect(content).toMatch( - `const n = ref(1), { a: __a, b: __c, d: __d = 1, e: __f = 2, ...__g } = useFoo()` + `const n = _ref(1), { a: __a, b: __c, d: __d = 1, e: __f = 2, ...__g } = useFoo()` ) - expect(content).toMatch(`\nconst a = ref(__a);`) - expect(content).not.toMatch(`\nconst b = ref(__b);`) - expect(content).toMatch(`\nconst c = ref(__c);`) - expect(content).toMatch(`\nconst d = ref(__d);`) - expect(content).not.toMatch(`\nconst e = ref(__e);`) - expect(content).toMatch(`\nconst f = ref(__f);`) - expect(content).toMatch(`\nconst g = ref(__g);`) + expect(content).toMatch(`\nconst a = _ref(__a);`) + expect(content).not.toMatch(`\nconst b = _ref(__b);`) + expect(content).toMatch(`\nconst c = _ref(__c);`) + expect(content).toMatch(`\nconst d = _ref(__d);`) + expect(content).not.toMatch(`\nconst e = _ref(__e);`) + expect(content).toMatch(`\nconst f = _ref(__f);`) + expect(content).toMatch(`\nconst g = _ref(__g);`) expect(content).toMatch( `console.log(n.value, a.value, c.value, d.value, f.value, g.value)` ) @@ -556,11 +558,11 @@ const { props, emit } = defineOptions({ console.log(n, a, b, c) `) expect(content).toMatch( - `const n = ref(1), [__a, __b = 1, ...__c] = useFoo()` + `const n = _ref(1), [__a, __b = 1, ...__c] = useFoo()` ) - expect(content).toMatch(`\nconst a = ref(__a);`) - expect(content).toMatch(`\nconst b = ref(__b);`) - expect(content).toMatch(`\nconst c = ref(__c);`) + expect(content).toMatch(`\nconst a = _ref(__a);`) + expect(content).toMatch(`\nconst b = _ref(__b);`) + expect(content).toMatch(`\nconst c = _ref(__c);`) expect(content).toMatch(`console.log(n.value, a.value, b.value, c.value)`) expect(content).toMatch(`return { n, a, b, c }`) expect(bindings).toStrictEqual({ @@ -580,11 +582,11 @@ const { props, emit } = defineOptions({ `) expect(content).toMatch(`const [{ a: { b: __b }}] = useFoo()`) expect(content).toMatch(`const { c: [__d, __e] } = useBar()`) - expect(content).not.toMatch(`\nconst a = ref(__a);`) - expect(content).not.toMatch(`\nconst c = ref(__c);`) - expect(content).toMatch(`\nconst b = ref(__b);`) - expect(content).toMatch(`\nconst d = ref(__d);`) - expect(content).toMatch(`\nconst e = ref(__e);`) + expect(content).not.toMatch(`\nconst a = _ref(__a);`) + expect(content).not.toMatch(`\nconst c = _ref(__c);`) + expect(content).toMatch(`\nconst b = _ref(__b);`) + expect(content).toMatch(`\nconst d = _ref(__d);`) + expect(content).toMatch(`\nconst e = _ref(__e);`) expect(content).toMatch(`return { b, d, e }`) expect(bindings).toStrictEqual({ b: 'setup', diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 47420ca36a7..a049d205971 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -24,7 +24,11 @@ import { } from '@babel/types' import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' -import { genCssVarsCode, injectCssVarsCalls } from './genCssVars' +import { + CSS_VARS_HELPER, + genCssVarsCode, + injectCssVarsCalls +} from './genCssVars' import { compileTemplate, SFCTemplateCompileOptions } from './compileTemplate' const DEFINE_OPTIONS = 'defineOptions' @@ -165,6 +169,11 @@ export function compileScript( const scriptStartOffset = script && script.loc.start.offset const scriptEndOffset = script && script.loc.end.offset + function helper(key: string): string { + helperImports.add(key) + return `_${key}` + } + function parse( input: string, options: ParserOptions, @@ -240,11 +249,10 @@ export function compileScript( function processRefExpression(exp: Expression, statement: LabeledStatement) { if (exp.type === 'AssignmentExpression') { - helperImports.add('ref') const { left, right } = exp if (left.type === 'Identifier') { registerRefBinding(left) - s.prependRight(right.start! + startOffset, `ref(`) + s.prependRight(right.start! + startOffset, `${helper('ref')}(`) s.appendLeft(right.end! + startOffset, ')') } else if (left.type === 'ObjectPattern') { // remove wrapping parens @@ -272,7 +280,7 @@ export function compileScript( exp.expressions.forEach(e => processRefExpression(e, statement)) } else if (exp.type === 'Identifier') { registerRefBinding(exp) - s.appendLeft(exp.end! + startOffset, ` = ref()`) + s.appendLeft(exp.end! + startOffset, ` = ${helper('ref')}()`) } else { error(`ref: statements can only contain assignment expressions.`, exp) } @@ -326,7 +334,7 @@ export function compileScript( // append binding declarations after the parent statement s.appendLeft( statement.end! + startOffset, - `\nconst ${nameId.name} = ref(__${nameId.name});` + `\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});` ) } } @@ -360,7 +368,7 @@ export function compileScript( // append binding declarations after the parent statement s.appendLeft( statement.end! + startOffset, - `\nconst ${nameId.name} = ref(__${nameId.name});` + `\nconst ${nameId.name} = ${helper('ref')}(__${nameId.name});` ) } } @@ -744,7 +752,7 @@ export function compileScript( // 8. inject `useCssVars` calls if (hasCssVars) { - helperImports.add(`useCssVars`) + helperImports.add(CSS_VARS_HELPER) for (const style of styles) { const vars = style.attrs.vars if (typeof vars === 'string') { @@ -829,7 +837,6 @@ export function compileScript( if (isTS) { // for TS, make sure the exported type is still valid type with // correct props information - helperImports.add(`defineComponent`) // we have to use object spread for types to be merged properly // user's TS setting should compile it down to proper targets const def = defaultExport ? `\n ...${defaultTempVar},` : `` @@ -838,7 +845,9 @@ export function compileScript( // this allows `import { setup } from '*.vue'` for testing purposes. s.prependLeft( startOffset, - `\nexport default defineComponent({${def}${runtimeOptions}\n ${ + `\nexport default ${helper( + `defineComponent` + )}({${def}${runtimeOptions}\n ${ hasAwait ? `async ` : `` }setup(${args}) {\n` ) @@ -865,11 +874,12 @@ export function compileScript( } // 12. finalize Vue helper imports - // TODO account for cases where user imports a helper with the same name - // from a non-vue source - const helpers = [...helperImports].filter(i => !userImports[i]) - if (helpers.length) { - s.prepend(`import { ${helpers.join(', ')} } from 'vue'\n`) + if (helperImports.size > 0) { + s.prepend( + `import { ${[...helperImports] + .map(h => `${h} as _${h}`) + .join(', ')} } from 'vue'\n` + ) } s.trim() diff --git a/packages/compiler-sfc/src/genCssVars.ts b/packages/compiler-sfc/src/genCssVars.ts index 3d926cf593e..69d1457f6ff 100644 --- a/packages/compiler-sfc/src/genCssVars.ts +++ b/packages/compiler-sfc/src/genCssVars.ts @@ -10,6 +10,8 @@ import { SFCDescriptor } from './parse' import { rewriteDefault } from './rewriteDefault' import { ParserPlugin } from '@babel/parser' +export const CSS_VARS_HELPER = `useCssVars` + export function genCssVarsCode( varsExp: string, scoped: boolean, @@ -38,7 +40,7 @@ export function genCssVarsCode( }) .join('') - return `__useCssVars__(_ctx => (${transformedString})${ + return `_${CSS_VARS_HELPER}(_ctx => (${transformedString})${ scoped ? `, true` : `` })` } @@ -65,7 +67,7 @@ export function injectCssVarsCalls( return ( script + - `\nimport { useCssVars as __useCssVars__ } from 'vue'\n` + + `\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\n` + `const __injectCSSVars__ = () => {\n${calls}}\n` + `const __setup__ = __default__.setup\n` + `__default__.setup = __setup__\n` + From 3a6b1207fa39cb35eed5bae0b5fdcdb465926bca Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 16 Nov 2020 15:40:16 -0500 Subject: [PATCH 0156/4002] fix(style-vars): apply css vars in post flush effect --- packages/runtime-dom/src/helpers/useCssVars.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-dom/src/helpers/useCssVars.ts b/packages/runtime-dom/src/helpers/useCssVars.ts index ff90ec8ce64..1f5ac7fae48 100644 --- a/packages/runtime-dom/src/helpers/useCssVars.ts +++ b/packages/runtime-dom/src/helpers/useCssVars.ts @@ -30,7 +30,7 @@ export function useCssVars( const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy!), prefix) - onMounted(() => watchEffect(setVars)) + onMounted(() => watchEffect(setVars, { flush: 'post' })) onUpdated(setVars) } From 62372e9943d0fbacc93ca93757964a566d2487f8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 16 Nov 2020 17:22:59 -0500 Subject: [PATCH 0157/4002] chore: remove unused dep from compiler-sfc --- packages/compiler-sfc/package.json | 1 - yarn.lock | 5 ----- 2 files changed, 6 deletions(-) diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f041dde1e1c..3e2fed2353f 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -43,7 +43,6 @@ "@vue/shared": "3.0.2", "consolidate": "^0.16.0", "estree-walker": "^2.0.1", - "hash-sum": "^2.0.0", "lru-cache": "^5.1.1", "magic-string": "^0.25.7", "merge-source-map": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index ead083dfcb1..358fb854e4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3398,11 +3398,6 @@ hash-base@^3.0.0: inherits "^2.0.1" safe-buffer "^5.0.1" -hash-sum@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" - integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== - hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" From 41bb7fa330e78c4a354a2e67742bd13bee2f4293 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 16 Nov 2020 18:27:15 -0500 Subject: [PATCH 0158/4002] feat(compiler-sfc): new SFC css varaible injection implementation ref: https://github.com/vuejs/rfcs/pull/231 --- packages/compiler-core/src/codegen.ts | 7 +- .../src/transforms/transformExpression.ts | 17 ++- .../__snapshots__/compileScript.spec.ts.snap | 101 ++++----------- .../__snapshots__/cssVars.spec.ts.snap | 107 ++++++++++++++++ .../__tests__/compileScript.spec.ts | 66 +--------- .../__tests__/compileStyle.spec.ts | 57 +++------ .../compiler-sfc/__tests__/cssVars.spec.ts | 111 ++++++++++++++++ packages/compiler-sfc/__tests__/utils.ts | 28 +++++ packages/compiler-sfc/src/compileScript.ts | 119 +++++++++++------- packages/compiler-sfc/src/compileStyle.ts | 10 +- packages/compiler-sfc/src/compileTemplate.ts | 5 +- .../src/{genCssVars.ts => cssVars.ts} | 77 ++++++++---- packages/compiler-sfc/src/parse.ts | 3 - .../compiler-sfc/src/stylePluginScopedVars.ts | 15 --- .../__tests__/helpers/useCssVars.spec.ts | 93 ++++++++------ .../runtime-dom/src/helpers/useCssVars.ts | 22 ++-- 16 files changed, 497 insertions(+), 341 deletions(-) create mode 100644 packages/compiler-sfc/__tests__/__snapshots__/cssVars.spec.ts.snap create mode 100644 packages/compiler-sfc/__tests__/cssVars.spec.ts create mode 100644 packages/compiler-sfc/__tests__/utils.ts rename packages/compiler-sfc/src/{genCssVars.ts => cssVars.ts} (52%) delete mode 100644 packages/compiler-sfc/src/stylePluginScopedVars.ts diff --git a/packages/compiler-core/src/codegen.ts b/packages/compiler-core/src/codegen.ts index 9e58d751da9..a481ddcf55a 100644 --- a/packages/compiler-core/src/codegen.ts +++ b/packages/compiler-core/src/codegen.ts @@ -215,9 +215,10 @@ export function generate( } // binding optimizations - const optimizeSources = options.bindingMetadata - ? `, $props, $setup, $data, $options` - : `` + const optimizeSources = + options.bindingMetadata && !options.inline + ? `, $props, $setup, $data, $options` + : `` // enter render function if (!ssr) { if (isSetupInlined) { diff --git a/packages/compiler-core/src/transforms/transformExpression.ts b/packages/compiler-core/src/transforms/transformExpression.ts index f72bd16bb34..0a6cc8ef00f 100644 --- a/packages/compiler-core/src/transforms/transformExpression.ts +++ b/packages/compiler-core/src/transforms/transformExpression.ts @@ -113,17 +113,16 @@ export function processExpression( // it gets correct type return `__props.${raw}` } - } - - if (type === BindingTypes.CONST) { - // setup const binding in non-inline mode - return `$setup.${raw}` - } else if (type) { - return `$${type}.${raw}` } else { - // fallback to ctx - return `_ctx.${raw}` + if (type === BindingTypes.CONST) { + // setup const binding in non-inline mode + return `$setup.${raw}` + } else if (type) { + return `$${type}.${raw}` + } } + // fallback to ctx + return `_ctx.${raw}` } // fast path if expression is a simple identifier. diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index baac4d5815d..907a47c8dc6 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -1,62 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`SFC compile \n` + - `` - ).content - ) - }) - - test('\n` + - `` - ).content - ) - }) - - test('\n` + - `` - ).content - ) - }) - - test('w/ \n` + - `` - ).content - ) - }) - }) - describe('async/await detection', () => { function assertAwaitDetection(code: string, shouldAsync = true) { const { content } = compile(``) - expect(content).toMatch(`${shouldAsync ? `async ` : ``}setup()`) + expect(content).toMatch(`${shouldAsync ? `async ` : ``}setup(`) } test('expression statement', () => { diff --git a/packages/compiler-sfc/__tests__/compileStyle.spec.ts b/packages/compiler-sfc/__tests__/compileStyle.spec.ts index ce83747033b..a1b3b21eeba 100644 --- a/packages/compiler-sfc/__tests__/compileStyle.spec.ts +++ b/packages/compiler-sfc/__tests__/compileStyle.spec.ts @@ -9,27 +9,27 @@ import { } from '../src/compileStyle' import path from 'path' -describe('SFC scoped CSS', () => { - function compileScoped( - source: string, - options?: Partial - ): string { - const res = compileStyle({ - source, - filename: 'test.css', - id: 'test', - scoped: true, - ...options +export function compileScoped( + source: string, + options?: Partial +): string { + const res = compileStyle({ + source, + filename: 'test.css', + id: 'test', + scoped: true, + ...options + }) + if (res.errors.length) { + res.errors.forEach(err => { + console.error(err) }) - if (res.errors.length) { - res.errors.forEach(err => { - console.error(err) - }) - expect(res.errors.length).toBe(0) - } - return res.code + expect(res.errors.length).toBe(0) } + return res.code +} +describe('SFC scoped CSS', () => { test('simple selectors', () => { expect(compileScoped(`h1 { color: red; }`)).toMatch( `h1[test] { color: red;` @@ -266,27 +266,6 @@ describe('SFC scoped CSS', () => { ).toHaveBeenWarned() }) }) - - describe('` + ).content + ) + }) + + test('\n` + + `` + ).content + ) + }) + + test('\n` + `` + ).content + ) + }) + + test('w/ \n` + + `` + ).content + ) + }) + }) + + test('generating correct code for nested paths', () => { + const { content } = compileSFCScript( + `\n` + + `` + ) + expect(content).toMatch(`_useCssVars(_ctx => ({ + color: (_ctx.color), + font_size: (_ctx.font.size) +})`) + assertCode(content) + }) + + test('w/ \n` + + `` + ) + // should handle: + // 1. local const bindings + // 2. local potential ref bindings + // 3. props bindings (analyzed) + expect(content).toMatch(`_useCssVars(_ctx => ({ + color: (color), + size: (_unref(size)), + foo: (__props.foo) +})`) + expect(content).toMatch( + `import { useCssVars as _useCssVars, unref as _unref } from 'vue'` + ) + assertCode(content) + }) + + test('should rewrite CSS vars in scoped mode', () => { + const { code } = compileStyle({ + source: `.foo { + color: var(--v-bind:color); + font-size: var(--:font.size); + }`, + filename: 'test.css', + id: 'data-v-test' + }) + expect(code).toMatchInlineSnapshot(` + ".foo { + color: var(--test-color); + font-size: var(--test-font_size); + }" + `) + }) +}) diff --git a/packages/compiler-sfc/__tests__/utils.ts b/packages/compiler-sfc/__tests__/utils.ts new file mode 100644 index 00000000000..ae68611932c --- /dev/null +++ b/packages/compiler-sfc/__tests__/utils.ts @@ -0,0 +1,28 @@ +import { parse, SFCScriptCompileOptions, compileScript } from '../src' +import { parse as babelParse } from '@babel/parser' +import { babelParserDefaultPlugins } from '@vue/shared' + +export function compileSFCScript( + src: string, + options?: Partial +) { + const { descriptor } = parse(src) + return compileScript(descriptor, { + ...options, + id: 'xxxxxxxx' + }) +} + +export function assertCode(code: string) { + // parse the generated code to make sure it is valid + try { + babelParse(code, { + sourceType: 'module', + plugins: [...babelParserDefaultPlugins, 'typescript'] + }) + } catch (e) { + console.log(code) + throw e + } + expect(code).toMatchSnapshot() +} diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index a049d205971..522277db2f4 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -1,5 +1,5 @@ import MagicString from 'magic-string' -import { BindingMetadata, BindingTypes } from '@vue/compiler-core' +import { BindingMetadata, BindingTypes, UNREF } from '@vue/compiler-core' import { SFCDescriptor, SFCScriptBlock } from './parse' import { parse as _parse, ParserOptions, ParserPlugin } from '@babel/parser' import { babelParserDefaultPlugins, generateCodeFrame } from '@vue/shared' @@ -26,14 +26,20 @@ import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' import { CSS_VARS_HELPER, + parseCssVars, genCssVarsCode, injectCssVarsCalls -} from './genCssVars' +} from './cssVars' import { compileTemplate, SFCTemplateCompileOptions } from './compileTemplate' const DEFINE_OPTIONS = 'defineOptions' export interface SFCScriptCompileOptions { + /** + * Scope ID for prefixing injected CSS varialbes. + * This must be consistent with the `id` passed to `compileStyle`. + */ + id: string /** * https://babeljs.io/docs/en/babel-parser#plugins */ @@ -52,7 +58,7 @@ export interface SFCScriptCompileOptions { * from being hot-reloaded separately from component state. */ inlineTemplate?: boolean - templateOptions?: SFCTemplateCompileOptions + templateOptions?: Partial } const hasWarned: Record = {} @@ -71,19 +77,33 @@ function warnOnce(msg: string) { */ export function compileScript( sfc: SFCDescriptor, - options: SFCScriptCompileOptions = {} + options: SFCScriptCompileOptions ): SFCScriptBlock { - const { script, scriptSetup, styles, source, filename } = sfc + const { script, scriptSetup, source, filename } = sfc if (__DEV__ && !__TEST__ && scriptSetup) { warnOnce( `\n` + - `` - ).content - ) - }) - - test('\n` + - `` - ).content - ) - }) - - test('\n` + `` - ).content - ) - }) - - test('w/ \n` + - `` - ).content - ) - }) - }) - test('generating correct code for nested paths', () => { const { content } = compileSFCScript( `\n` + `` ) expect(content).toMatch(`_useCssVars(_ctx => ({ @@ -71,9 +31,9 @@ describe('CSS vars injection', () => { \n` + `` ) @@ -95,8 +55,8 @@ describe('CSS vars injection', () => { test('should rewrite CSS vars in scoped mode', () => { const { code } = compileStyle({ source: `.foo { - color: var(--v-bind:color); - font-size: var(--:font.size); + color: v-bind(color); + font-size: v-bind('font.size'); }`, filename: 'test.css', id: 'data-v-test' @@ -108,4 +68,44 @@ describe('CSS vars injection', () => { }" `) }) + + describe('codegen', () => { + test('\n` + + `` + ).content + ) + }) + + test('\n` + + `` + ).content + ) + }) + + test('\n` + `` + ).content + ) + }) + + test('w/ \n` + + `` + ).content + ) + }) + }) }) diff --git a/packages/compiler-sfc/src/cssVars.ts b/packages/compiler-sfc/src/cssVars.ts index f88de5bb6b1..b9293bea0fb 100644 --- a/packages/compiler-sfc/src/cssVars.ts +++ b/packages/compiler-sfc/src/cssVars.ts @@ -13,7 +13,7 @@ import { ParserPlugin } from '@babel/parser' import postcss, { Root } from 'postcss' export const CSS_VARS_HELPER = `useCssVars` -export const cssVarRE = /\bvar\(--(?:v-bind)?:([^)]+)\)/g +export const cssVarRE = /\bv-bind\(\s*(?:'([^']+)'|"([^"]+)"|([^'"][^)]*))\s*\)/g export function convertCssVarCasing(raw: string): string { return raw.replace(/([^\w-])/g, '_') @@ -24,7 +24,7 @@ export function parseCssVars(sfc: SFCDescriptor): string[] { sfc.styles.forEach(style => { let match while ((match = cssVarRE.exec(style.content))) { - vars.push(match[1]) + vars.push(match[1] || match[2] || match[3]) } }) return vars @@ -38,8 +38,8 @@ export const cssVarsPlugin = postcss.plugin( root.walkDecls(decl => { // rewrite CSS variables if (cssVarRE.test(decl.value)) { - decl.value = decl.value.replace(cssVarRE, (_, $1) => { - return `var(--${shortId}-${convertCssVarCasing($1)})` + decl.value = decl.value.replace(cssVarRE, (_, $1, $2, $3) => { + return `var(--${shortId}-${convertCssVarCasing($1 || $2 || $3)})` }) } }) From c15bd6235e5ed6ae0fa2d73be839866ce4269126 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 17 Nov 2020 12:42:58 -0500 Subject: [PATCH 0160/4002] wip: generate valid v-model and TS code in script setup inline mode --- packages/compiler-core/src/options.ts | 4 +++ packages/compiler-core/src/runtimeHelpers.ts | 4 ++- packages/compiler-core/src/transform.ts | 2 ++ .../compiler-core/src/transforms/vModel.ts | 30 +++++++++++++++---- packages/compiler-core/src/transforms/vOn.ts | 10 +++++-- packages/compiler-sfc/src/compileScript.ts | 13 +++++++- 6 files changed, 52 insertions(+), 11 deletions(-) diff --git a/packages/compiler-core/src/options.ts b/packages/compiler-core/src/options.ts index 2a6b79c1642..02ac12e6227 100644 --- a/packages/compiler-core/src/options.ts +++ b/packages/compiler-core/src/options.ts @@ -169,6 +169,10 @@ export interface TransformOptions extends SharedTransformCodegenOptions { * needed to render inline CSS variables on component root */ ssrCssVars?: string + /** + * Indicates that transforms should try to output valid TS code + */ + isTS?: boolean onError?: (error: CompilerError) => void } diff --git a/packages/compiler-core/src/runtimeHelpers.ts b/packages/compiler-core/src/runtimeHelpers.ts index 1cf8c7bfc12..f40c94c3d89 100644 --- a/packages/compiler-core/src/runtimeHelpers.ts +++ b/packages/compiler-core/src/runtimeHelpers.ts @@ -30,6 +30,7 @@ export const POP_SCOPE_ID = Symbol(__DEV__ ? `popScopeId` : ``) export const WITH_SCOPE_ID = Symbol(__DEV__ ? `withScopeId` : ``) export const WITH_CTX = Symbol(__DEV__ ? `withCtx` : ``) export const UNREF = Symbol(__DEV__ ? `unref` : ``) +export const IS_REF = Symbol(__DEV__ ? `isRef` : ``) // Name mapping for runtime helpers that need to be imported from 'vue' in // generated code. Make sure these are correctly exported in the runtime! @@ -64,7 +65,8 @@ export const helperNameMap: any = { [POP_SCOPE_ID]: `popScopeId`, [WITH_SCOPE_ID]: `withScopeId`, [WITH_CTX]: `withCtx`, - [UNREF]: `unref` + [UNREF]: `unref`, + [IS_REF]: `isRef` } export function registerRuntimeHelpers(helpers: any) { diff --git a/packages/compiler-core/src/transform.ts b/packages/compiler-core/src/transform.ts index c3a37c9f715..eddd03caa14 100644 --- a/packages/compiler-core/src/transform.ts +++ b/packages/compiler-core/src/transform.ts @@ -125,6 +125,7 @@ export function createTransformContext( ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, + isTS = false, onError = defaultOnError }: TransformOptions ): TransformContext { @@ -144,6 +145,7 @@ export function createTransformContext( ssrCssVars, bindingMetadata, inline, + isTS, onError, // state diff --git a/packages/compiler-core/src/transforms/vModel.ts b/packages/compiler-core/src/transforms/vModel.ts index ee1a4bd8bc3..2acb5af1952 100644 --- a/packages/compiler-core/src/transforms/vModel.ts +++ b/packages/compiler-core/src/transforms/vModel.ts @@ -14,6 +14,7 @@ import { hasScopeRef, isStaticExp } from '../utils' +import { helperNameMap, IS_REF, UNREF } from '../runtimeHelpers' export const transformModel: DirectiveTransform = (dir, node, context) => { const { exp, arg } = dir @@ -24,10 +25,16 @@ export const transformModel: DirectiveTransform = (dir, node, context) => { return createTransformProps() } + const rawExp = exp.loc.source const expString = - exp.type === NodeTypes.SIMPLE_EXPRESSION ? exp.content : exp.loc.source + exp.type === NodeTypes.SIMPLE_EXPRESSION ? exp.content : rawExp - if (!isMemberExpression(expString)) { + // im SFC \n` + + ``, + { isProd: true } + ) + expect(content).toMatch(`_useCssVars(_ctx => ({ + "4003f1a6": (_ctx.color), + "41b6490a": (_ctx.font.size) +}))}`) + + const { code } = compileStyle({ + source: `.foo { + color: v-bind(color); + font-size: v-bind('font.size'); + }`, + filename: 'test.css', + id: mockId, + isProd: true + }) + expect(code).toMatchInlineSnapshot(` + ".foo { + color: var(--4003f1a6); + font-size: var(--41b6490a); + }" + `) + }) + describe('codegen', () => { test(' + + `, + { inlineTemplate: true } + ) + assertCode(content) + }) }) describe('with TypeScript', () => { From 9297410569afd5154d8dd8ba4b36ff6f19b354d7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 17 Nov 2020 18:31:49 -0500 Subject: [PATCH 0165/4002] chore: remove non-working esm-browser build for compiler-sfc for now --- packages/compiler-sfc/README.md | 16 ++++++++++------ packages/compiler-sfc/package.json | 3 +-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/compiler-sfc/README.md b/packages/compiler-sfc/README.md index 4fc4ffa107f..cc7b6cc05dc 100644 --- a/packages/compiler-sfc/README.md +++ b/packages/compiler-sfc/README.md @@ -2,14 +2,18 @@ > Lower level utilities for compiling Vue single file components -This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue single file components into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader). +This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue single file components into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader), [rollup-plugin-vue](https://github.com/vuejs/rollup-plugin-vue) and [vite](https://github.com/vitejs/vite). -The API surface is intentionally minimal - the goal is to reuse as much as possible while being as flexible as possible. +The API is intentionally low-level, because different toolings have different constraints on how much context is shared between the transformation of each block in an SFC. For example, the template sub-loader in `vue-loader` may not have access to the full SFC and its descriptor. -## Browser Build Usage +## Browser Build Notes -This package relies on `postcss`, `postcss-selector-parser` and `postcss-modules` +The browser build relies on a browser-bundled build of `postcss` to be available under the global `postcss` (since it can't be properly bundled by Rollup). -## API +## Usage Example -TODO +```js +// TODO +``` + +For detailed APIs, check out the source type definitions. diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f041dde1e1c..47fff1dcfd4 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -11,8 +11,7 @@ "name": "VueCompilerSFC", "formats": [ "cjs", - "global", - "esm-browser" + "global" ], "prod": false, "enableNonBrowserBranches": true From cdc9f336fd62c40b6b54637cdcd5fc4a941aa38a Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 17 Nov 2020 18:54:47 -0500 Subject: [PATCH 0166/4002] wip: new cssVars SSR integration + fix cssVars SSR injection for suspense --- packages/compiler-core/src/options.ts | 1 + .../src/transforms/transformElement.ts | 2 +- packages/compiler-sfc/src/compileScript.ts | 10 +--- packages/compiler-sfc/src/compileTemplate.ts | 9 ++++ packages/compiler-sfc/src/cssVars.ts | 29 +++++++++-- packages/compiler-sfc/src/index.ts | 1 + .../compiler-sfc/src/stylePluginScoped.ts | 13 ++--- packages/compiler-sfc/src/warn.ts | 12 +++++ .../__tests__/ssrInjectCssVars.spec.ts | 49 ++++++++++++------- packages/compiler-ssr/src/runtimeHelpers.ts | 4 +- .../compiler-ssr/src/ssrCodegenTransform.ts | 15 ++---- .../src/transforms/ssrInjectCssVars.ts | 36 +++++++++----- .../__tests__/ssrResolveCssVars.spec.ts | 27 ---------- .../src/helpers/ssrResolveCssVars.ts | 11 ----- packages/server-renderer/src/index.ts | 1 - 15 files changed, 117 insertions(+), 103 deletions(-) create mode 100644 packages/compiler-sfc/src/warn.ts delete mode 100644 packages/server-renderer/__tests__/ssrResolveCssVars.spec.ts delete mode 100644 packages/server-renderer/src/helpers/ssrResolveCssVars.ts diff --git a/packages/compiler-core/src/options.ts b/packages/compiler-core/src/options.ts index 02ac12e6227..bb18faf0e46 100644 --- a/packages/compiler-core/src/options.ts +++ b/packages/compiler-core/src/options.ts @@ -166,6 +166,7 @@ export interface TransformOptions extends SharedTransformCodegenOptions { scopeId?: string | null /** * SFC ` + `, + { + inlineTemplate: true, + templateOptions: { + ssr: true + } + } + ) + expect(content).toMatch(`\n __ssrInlineRender: true,\n`) + expect(content).toMatch(`return (_ctx, _push`) + expect(content).toMatch(`ssrInterpolate`) + assertCode(content) + }) }) describe('with TypeScript', () => { diff --git a/packages/compiler-sfc/__tests__/compileStyle.spec.ts b/packages/compiler-sfc/__tests__/compileStyle.spec.ts index a1b3b21eeba..8e5db0704cf 100644 --- a/packages/compiler-sfc/__tests__/compileStyle.spec.ts +++ b/packages/compiler-sfc/__tests__/compileStyle.spec.ts @@ -16,7 +16,7 @@ export function compileScoped( const res = compileStyle({ source, filename: 'test.css', - id: 'test', + id: 'data-v-test', scoped: true, ...options }) @@ -32,61 +32,61 @@ export function compileScoped( describe('SFC scoped CSS', () => { test('simple selectors', () => { expect(compileScoped(`h1 { color: red; }`)).toMatch( - `h1[test] { color: red;` + `h1[data-v-test] { color: red;` ) expect(compileScoped(`.foo { color: red; }`)).toMatch( - `.foo[test] { color: red;` + `.foo[data-v-test] { color: red;` ) }) test('descendent selector', () => { expect(compileScoped(`h1 .foo { color: red; }`)).toMatch( - `h1 .foo[test] { color: red;` + `h1 .foo[data-v-test] { color: red;` ) }) test('multiple selectors', () => { expect(compileScoped(`h1 .foo, .bar, .baz { color: red; }`)).toMatch( - `h1 .foo[test], .bar[test], .baz[test] { color: red;` + `h1 .foo[data-v-test], .bar[data-v-test], .baz[data-v-test] { color: red;` ) }) test('pseudo class', () => { expect(compileScoped(`.foo:after { color: red; }`)).toMatch( - `.foo[test]:after { color: red;` + `.foo[data-v-test]:after { color: red;` ) }) test('pseudo element', () => { expect(compileScoped(`::selection { display: none; }`)).toMatch( - '[test]::selection {' + '[data-v-test]::selection {' ) }) test('spaces before pseudo element', () => { const code = compileScoped(`.abc, ::selection { color: red; }`) - expect(code).toMatch('.abc[test],') - expect(code).toMatch('[test]::selection {') + expect(code).toMatch('.abc[data-v-test],') + expect(code).toMatch('[data-v-test]::selection {') }) test('::v-deep', () => { expect(compileScoped(`:deep(.foo) { color: red; }`)).toMatchInlineSnapshot(` - "[test] .foo { color: red; + "[data-v-test] .foo { color: red; }" `) expect(compileScoped(`::v-deep(.foo) { color: red; }`)) .toMatchInlineSnapshot(` - "[test] .foo { color: red; + "[data-v-test] .foo { color: red; }" `) expect(compileScoped(`::v-deep(.foo .bar) { color: red; }`)) .toMatchInlineSnapshot(` - "[test] .foo .bar { color: red; + "[data-v-test] .foo .bar { color: red; }" `) expect(compileScoped(`.baz .qux ::v-deep(.foo .bar) { color: red; }`)) .toMatchInlineSnapshot(` - ".baz .qux[test] .foo .bar { color: red; + ".baz .qux[data-v-test] .foo .bar { color: red; }" `) }) @@ -94,22 +94,22 @@ describe('SFC scoped CSS', () => { test('::v-slotted', () => { expect(compileScoped(`:slotted(.foo) { color: red; }`)) .toMatchInlineSnapshot(` - ".foo[test-s] { color: red; + ".foo[data-v-test-s] { color: red; }" `) expect(compileScoped(`::v-slotted(.foo) { color: red; }`)) .toMatchInlineSnapshot(` - ".foo[test-s] { color: red; + ".foo[data-v-test-s] { color: red; }" `) expect(compileScoped(`::v-slotted(.foo .bar) { color: red; }`)) .toMatchInlineSnapshot(` - ".foo .bar[test-s] { color: red; + ".foo .bar[data-v-test-s] { color: red; }" `) expect(compileScoped(`.baz .qux ::v-slotted(.foo .bar) { color: red; }`)) .toMatchInlineSnapshot(` - ".baz .qux .foo .bar[test-s] { color: red; + ".baz .qux .foo .bar[data-v-test-s] { color: red; }" `) }) @@ -142,7 +142,7 @@ describe('SFC scoped CSS', () => { expect(compileScoped(`@media print { .foo { color: red }}`)) .toMatchInlineSnapshot(` "@media print { - .foo[test] { color: red + .foo[data-v-test] { color: red }}" `) }) @@ -151,7 +151,7 @@ describe('SFC scoped CSS', () => { expect(compileScoped(`@supports(display: grid) { .foo { display: grid }}`)) .toMatchInlineSnapshot(` "@supports(display: grid) { - .foo[test] { display: grid + .foo[data-v-test] { display: grid }}" `) }) @@ -222,7 +222,7 @@ describe('SFC scoped CSS', () => { // vue-loader/#1370 test('spaces after selector', () => { expect(compileScoped(`.foo , .bar { color: red; }`)).toMatchInlineSnapshot(` - ".foo[test], .bar[test] { color: red; + ".foo[data-v-test], .bar[data-v-test] { color: red; }" `) }) @@ -231,12 +231,12 @@ describe('SFC scoped CSS', () => { test('::v-deep as combinator', () => { expect(compileScoped(`::v-deep .foo { color: red; }`)) .toMatchInlineSnapshot(` - "[test] .foo { color: red; + "[data-v-test] .foo { color: red; }" `) expect(compileScoped(`.bar ::v-deep .foo { color: red; }`)) .toMatchInlineSnapshot(` - ".bar[test] .foo { color: red; + ".bar[data-v-test] .foo { color: red; }" `) expect( @@ -247,7 +247,7 @@ describe('SFC scoped CSS', () => { test('>>> (deprecated syntax)', () => { const code = compileScoped(`>>> .foo { color: red; }`) expect(code).toMatchInlineSnapshot(` - "[test] .foo { color: red; + "[data-v-test] .foo { color: red; }" `) expect( @@ -258,7 +258,7 @@ describe('SFC scoped CSS', () => { test('/deep/ (deprecated syntax)', () => { const code = compileScoped(`/deep/ .foo { color: red; }`) expect(code).toMatchInlineSnapshot(` - "[test] .foo { color: red; + "[data-v-test] .foo { color: red; }" `) expect( diff --git a/packages/compiler-sfc/__tests__/compileTemplate.spec.ts b/packages/compiler-sfc/__tests__/compileTemplate.spec.ts index 2a456d8ef5b..576240b5e1d 100644 --- a/packages/compiler-sfc/__tests__/compileTemplate.spec.ts +++ b/packages/compiler-sfc/__tests__/compileTemplate.spec.ts @@ -1,10 +1,20 @@ -import { compileTemplate } from '../src/compileTemplate' +import { + compileTemplate, + SFCTemplateCompileOptions +} from '../src/compileTemplate' import { parse, SFCTemplateBlock } from '../src/parse' +function compile(opts: Omit) { + return compileTemplate({ + ...opts, + id: '' + }) +} + test('should work', () => { const source = `

{{ render }}

` - const result = compileTemplate({ filename: 'example.vue', source }) + const result = compile({ filename: 'example.vue', source }) expect(result.errors.length).toBe(0) expect(result.source).toBe(source) @@ -25,7 +35,7 @@ body { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock - const result = compileTemplate({ + const result = compile({ filename: 'example.vue', source: template.content, preprocessLang: template.lang @@ -40,7 +50,7 @@ test('warn missing preprocessor', () => { sourceMap: true }).descriptor.template as SFCTemplateBlock - const result = compileTemplate({ + const result = compile({ filename: 'example.vue', source: template.content, preprocessLang: template.lang @@ -52,7 +62,7 @@ test('warn missing preprocessor', () => { test('transform asset url options', () => { const input = { source: ``, filename: 'example.vue' } // Object option - const { code: code1 } = compileTemplate({ + const { code: code1 } = compile({ ...input, transformAssetUrls: { tags: { foo: ['bar'] } @@ -61,7 +71,7 @@ test('transform asset url options', () => { expect(code1).toMatch(`import _imports_0 from 'baz'\n`) // legacy object option (direct tags config) - const { code: code2 } = compileTemplate({ + const { code: code2 } = compile({ ...input, transformAssetUrls: { foo: ['bar'] @@ -70,7 +80,7 @@ test('transform asset url options', () => { expect(code2).toMatch(`import _imports_0 from 'baz'\n`) // false option - const { code: code3 } = compileTemplate({ + const { code: code3 } = compile({ ...input, transformAssetUrls: false }) @@ -87,7 +97,7 @@ test('source map', () => { { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock - const result = compileTemplate({ + const result = compile({ filename: 'example.vue', source: template.content }) @@ -96,7 +106,7 @@ test('source map', () => { }) test('template errors', () => { - const result = compileTemplate({ + const result = compile({ filename: 'example.vue', source: `
` @@ -114,7 +124,7 @@ test('preprocessor errors', () => { { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock - const result = compileTemplate({ + const result = compile({ filename: 'example.vue', source: template.content, preprocessLang: template.lang diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index f0f2b5112a9..2e06b5fd6cc 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -167,6 +167,7 @@ export function compileScript( let optionsArg: ObjectExpression | undefined let optionsType: TSTypeLiteral | undefined let hasAwait = false + let hasInlinedSsrRenderFn = false // context types to generate let propsType = `{}` let emitType = `(e: string, ...args: any[]) => void` @@ -820,15 +821,24 @@ export function compileScript( // 10. generate return statement let returned if (options.inlineTemplate) { - if (sfc.template) { + if (sfc.template && !sfc.template.src) { + if (options.templateOptions && options.templateOptions.ssr) { + hasInlinedSsrRenderFn = true + } // inline render function mode - we are going to compile the template and // inline it right here const { code, ast, preamble, tips, errors } = compileTemplate({ - ...options.templateOptions, filename, source: sfc.template.content, inMap: sfc.template.map, + ...options.templateOptions, + id: scopeId, + scoped: sfc.styles.some(s => s.scoped), + isProd: options.isProd, + ssrCssVars: sfc.cssVars, compilerOptions: { + ...(options.templateOptions && + options.templateOptions.compilerOptions), inline: true, isTS, bindingMetadata @@ -883,6 +893,9 @@ export function compileScript( // 11. finalize default export // expose: [] makes + + `, + { inlineTemplate: true } + ) + expect(content).toMatch('[_unref(vMyDir)]') + expect(content).toMatch('_createVNode(ChildComp)') + // kebab-case component support + expect(content).toMatch('_createVNode(SomeOtherComp)') + assertCode(content) + }) + test('avoid unref() when necessary', () => { // function, const, component import const { content } = compile( diff --git a/packages/template-explorer/src/options.ts b/packages/template-explorer/src/options.ts index cdf00ec874a..dab7f8adf8a 100644 --- a/packages/template-explorer/src/options.ts +++ b/packages/template-explorer/src/options.ts @@ -19,7 +19,8 @@ export const compilerOptions: CompilerOptions = reactive({ setupConst: BindingTypes.SETUP_CONST, setupLet: BindingTypes.SETUP_LET, setupMaybeRef: BindingTypes.SETUP_MAYBE_REF, - setupProp: BindingTypes.PROPS + setupProp: BindingTypes.PROPS, + vMySetupDir: BindingTypes.SETUP_CONST } }) From 47d73c23e18b3951d299497990081aca696814c4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 24 Nov 2020 15:12:59 -0500 Subject: [PATCH 0200/4002] wip: defineOptions -> defineProps + defineEmit + useContext --- .../__snapshots__/compileScript.spec.ts.snap | 148 ++++--- .../__snapshots__/cssVars.spec.ts.snap | 4 +- .../__tests__/compileScript.spec.ts | 231 ++++++----- .../compiler-sfc/__tests__/cssVars.spec.ts | 8 +- packages/compiler-sfc/src/compileScript.ts | 366 ++++++++++-------- packages/runtime-core/src/apiDefineOptions.ts | 91 ----- packages/runtime-core/src/apiSetupHelpers.ts | 60 +++ packages/runtime-core/src/component.ts | 6 +- packages/runtime-core/src/componentOptions.ts | 2 +- .../runtime-core/src/componentRenderUtils.ts | 3 +- packages/runtime-core/src/index.ts | 2 +- test-dts/defineOptions.test-d.ts | 96 ----- test-dts/setupHelpers.test-d.ts | 89 +++++ 13 files changed, 588 insertions(+), 518 deletions(-) delete mode 100644 packages/runtime-core/src/apiDefineOptions.ts create mode 100644 packages/runtime-core/src/apiSetupHelpers.ts delete mode 100644 test-dts/defineOptions.test-d.ts create mode 100644 test-dts/setupHelpers.test-d.ts diff --git a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap index 9d05d643a83..11658523ece 100644 --- a/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap @@ -33,38 +33,55 @@ return { x } export const n = 1" `; -exports[`SFC compile `) @@ -36,21 +32,42 @@ const bar = 1 expect(bindings).toStrictEqual({ foo: BindingTypes.PROPS, bar: BindingTypes.SETUP_CONST, - props: BindingTypes.SETUP_CONST, - emit: BindingTypes.SETUP_CONST + props: BindingTypes.SETUP_CONST }) // should remove defineOptions import and call - expect(content).not.toMatch('defineOptions') + expect(content).not.toMatch('defineProps') // should generate correct setup signature - expect(content).toMatch(`setup(__props, { props, emit }) {`) + expect(content).toMatch(`setup(__props) {`) + // should assign user identifier to it + expect(content).toMatch(`const props = __props`) // should include context options in default export expect(content).toMatch(`export default { expose: [], props: { - foo: String - }, - emit: ['a', 'b'],`) + foo: String +},`) + }) + + test('defineEmit()', () => { + const { content, bindings } = compile(` + + `) + assertCode(content) + expect(bindings).toStrictEqual({ + myEmit: BindingTypes.SETUP_CONST + }) + // should remove defineOptions import and call + expect(content).not.toMatch('defineEmit') + // should generate correct setup signature + expect(content).toMatch(`setup(__props, { emit: myEmit }) {`) + // should include context options in default export + expect(content).toMatch(`export default { + expose: [], + emits: ['foo', 'bar'],`) }) describe(' `) assertCode(content) @@ -375,42 +390,40 @@ const { props, emit } = defineOptions({ expose: [], props: { foo: String }, emits: ['a', 'b'], - setup(__props, { props, emit }) {`) + setup(__props, { emit }) {`) }) - test('defineOptions w/ type / extract props', () => { + test('defineProps w/ type', () => { const { content, bindings } = compile(` `) assertCode(content) @@ -466,33 +479,28 @@ const { props, emit } = defineOptions({ }) }) - test('defineOptions w/ type / extract emits', () => { + test('defineEmit w/ type', () => { const { content } = compile(` `) assertCode(content) - expect(content).toMatch(`props: {},\n emit: (e: 'foo' | 'bar') => void,`) + expect(content).toMatch(`emit: ((e: 'foo' | 'bar') => void),`) expect(content).toMatch(`emits: ["foo", "bar"] as unknown as undefined`) }) - test('defineOptions w/ type / extract emits (union)', () => { + test('defineEmit w/ type (union)', () => { + const type = `((e: 'foo' | 'bar') => void) | ((e: 'baz', id: number) => void)` const { content } = compile(` `) assertCode(content) - expect(content).toMatch( - `props: {},\n emit: ((e: 'foo' | 'bar') => void) | ((e: 'baz', id: number) => void),` - ) + expect(content).toMatch(`emit: (${type}),`) expect(content).toMatch( `emits: ["foo", "bar", "baz"] as unknown as undefined` ) @@ -774,71 +782,96 @@ const { props, emit } = defineOptions({ ).toThrow(`ref: statements can only contain assignment expressions`) }) - test('defineOptions() w/ both type and non-type args', () => { + test('defineProps/Emit() w/ both type and non-type args', () => { + expect(() => { + compile(``) + }).toThrow(`cannot accept both type and non-type arguments`) + expect(() => { compile(``) }).toThrow(`cannot accept both type and non-type arguments`) }) - test('defineOptions() referencing local var', () => { + test('defineProps/Emit() referencing local var', () => { expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) + + expect(() => + compile(``) + ).toThrow(`cannot reference locally declared variables`) }) - test('defineOptions() referencing ref declarations', () => { + test('defineProps/Emit() referencing ref declarations', () => { + expect(() => + compile(``) + ).toThrow(`cannot reference locally declared variables`) + expect(() => compile(``) ).toThrow(`cannot reference locally declared variables`) }) - test('should allow defineOptions() referencing scope var', () => { + test('should allow defineProps/Emit() referencing scope var', () => { assertCode( compile(``).content ) }) - test('should allow defineOptions() referencing imported binding', () => { + test('should allow defineProps/Emit() referencing imported binding', () => { assertCode( compile(``).content ) }) @@ -1063,11 +1096,9 @@ describe('SFC analyze \n` + ``).descriptor + .slotted + ).toBe(false) + expect( + parse(``) + .descriptor.slotted + ).toBe(true) + expect( + parse(``) + .descriptor.slotted + ).toBe(true) + }) + test('error tolerance', () => { const { errors } = parse(` @@ -20,9 +20,9 @@ import CodeMirror from '../codemirror/CodeMirror.vue' import { store } from '../store' import { ref } from 'vue' -type Modes = 'preview' | 'executed' | 'js' | 'css' | 'template' +type Modes = 'preview' | 'js' | 'css' -const modes: Modes[] = ['preview', 'js', 'css', 'template', 'executed'] +const modes: Modes[] = ['preview', 'js', 'css'] const mode = ref('preview') @@ -35,14 +35,15 @@ const mode = ref('preview') .tab-buttons { box-sizing: border-box; border-bottom: 1px solid #ddd; + background-color: white; } .tab-buttons button { margin: 0; font-size: 13px; - font-family: 'Source Code Pro', monospace; + font-family: var(--font-code); border: none; outline: none; - background-color: #f8f8f8; + background-color: transparent; padding: 8px 16px 6px; text-transform: uppercase; cursor: pointer; @@ -51,7 +52,7 @@ const mode = ref('preview') } button.active { - color: #42b983; - border-bottom: 3px solid #42b983; + color: var(--color-branding-dark); + border-bottom: 3px solid var(--color-branding-dark); } diff --git a/packages/sfc-playground/src/output/Preview.vue b/packages/sfc-playground/src/output/Preview.vue index 8ef3b101441..ef76c23f311 100644 --- a/packages/sfc-playground/src/output/Preview.vue +++ b/packages/sfc-playground/src/output/Preview.vue @@ -11,12 +11,11 @@ - - `.trim() +export const MAIN_FILE = 'App.vue' +export const COMP_IDENTIFIER = `__sfc__` + // @ts-ignore -export const sandboxVueURL = import.meta.env.PROD +export const SANDBOX_VUE_URL = import.meta.env.PROD ? '/vue.runtime.esm-browser.js' // to be copied on build : '/src/vue-dev-proxy' -export const store = reactive({ - code: saved, - compiled: { - executed: '', +export class File { + filename: string + code: string + compiled = { js: '', - css: '', - template: '' + css: '' + } + + constructor(filename: string, code = '') { + this.filename = filename + this.code = code + } +} + +interface Store { + files: Record + activeFilename: string + readonly activeFile: File + errors: (string | Error)[] +} + +const savedFiles = localStorage.getItem(STORAGE_KEY) +const files = savedFiles + ? JSON.parse(savedFiles) + : { + 'App.vue': new File(MAIN_FILE, welcomeCode) + } + +export const store: Store = reactive({ + files, + activeFilename: MAIN_FILE, + get activeFile() { + return store.files[store.activeFilename] }, - errors: [] as (string | CompilerError | SyntaxError)[] + errors: [] +}) + +for (const file in store.files) { + if (file !== MAIN_FILE) { + compileFile(store.files[file]) + } +} + +watchEffect(() => compileFile(store.activeFile)) +watchEffect(() => { + localStorage.setItem(STORAGE_KEY, JSON.stringify(store.files)) }) -const filename = 'Playground.vue' -const id = 'scope-id' -const compIdentifier = `__comp` +export function setActive(filename: string) { + store.activeFilename = filename +} + +export function addFile(filename: string) { + store.files[filename] = new File(filename) + setActive(filename) +} -watchEffect(async () => { - const { code, compiled } = store +export function deleteFile(filename: string) { + if (confirm(`Are you sure you want to delete ${filename}?`)) { + if (store.activeFilename === filename) { + store.activeFilename = MAIN_FILE + } + delete store.files[filename] + } +} + +async function compileFile({ filename, code, compiled }: File) { if (!code.trim()) { return } - localStorage.setItem(storeKey, code) + if (filename.endsWith('.js')) { + compiled.js = code + return + } + const id = await hashId(filename) const { errors, descriptor } = parse(code, { filename, sourceMap: true }) if (errors.length) { store.errors = errors @@ -84,20 +133,14 @@ watchEffect(async () => { refSugar: true, inlineTemplate: true }) - compiled.js = compiledScript.content.trim() finalCode += - `\n` + - rewriteDefault( - rewriteVueImports(compiledScript.content), - compIdentifier - ) + `\n` + rewriteDefault(compiledScript.content, COMP_IDENTIFIER) } catch (e) { store.errors = [e] return } } else { - compiled.js = '' - finalCode += `\nconst ${compIdentifier} = {}` + finalCode += `\nconst ${COMP_IDENTIFIER} = {}` } // template @@ -115,25 +158,25 @@ watchEffect(async () => { return } - compiled.template = templateResult.code.trim() finalCode += `\n` + - rewriteVueImports(templateResult.code).replace( + templateResult.code.replace( /\nexport (function|const) render/, '$1 render' ) - finalCode += `\n${compIdentifier}.render = render` - } else { - compiled.template = descriptor.scriptSetup - ? '/* inlined in JS (script setup) */' - : '/* no template present */' + finalCode += `\n${COMP_IDENTIFIER}.render = render` } if (hasScoped) { - finalCode += `\n${compIdentifier}.__scopeId = ${JSON.stringify( + finalCode += `\n${COMP_IDENTIFIER}.__scopeId = ${JSON.stringify( `data-v-${id}` )}` } + if (finalCode) { + finalCode += `\nexport default ${COMP_IDENTIFIER}` + compiled.js = finalCode.trimStart() + } + // styles let css = '' for (const style of descriptor.styles) { @@ -162,25 +205,18 @@ watchEffect(async () => { } if (css) { compiled.css = css.trim() - finalCode += `\ndocument.getElementById('__sfc-styles').innerHTML = ${JSON.stringify( - css - )}` } else { - compiled.css = '' + compiled.css = '/* No From aa8bf1b7a352095349e8799aa79247af5a29f837 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 28 Mar 2021 21:55:22 -0400 Subject: [PATCH 0527/4002] workflow(sfc-playground): improve module rewrite --- .../src/output/moduleCompiler.ts | 234 ++++++++++++------ .../sfc-playground/src/output/srcdoc.html | 14 ++ 2 files changed, 178 insertions(+), 70 deletions(-) diff --git a/packages/sfc-playground/src/output/moduleCompiler.ts b/packages/sfc-playground/src/output/moduleCompiler.ts index 82ffd223957..31f6bc06799 100644 --- a/packages/sfc-playground/src/output/moduleCompiler.ts +++ b/packages/sfc-playground/src/output/moduleCompiler.ts @@ -1,12 +1,23 @@ import { store, MAIN_FILE, SANDBOX_VUE_URL, File } from '../store' -import { babelParse, MagicString, walk } from '@vue/compiler-sfc' +import { + babelParse, + MagicString, + walk, + walkIdentifiers +} from '@vue/compiler-sfc' import { babelParserDefaultPlugins } from '@vue/shared' -import { Identifier, Node } from '@babel/types' +import { ExportSpecifier, Identifier, Node, ObjectProperty } from '@babel/types' export function compileModulesForPreview() { return processFile(store.files[MAIN_FILE]).reverse() } +const modulesKey = `__modules__` +const exportKey = `__export__` +const dynamicImportKey = `__dynamic_import__` +const moduleKey = `__module__` + +// similar logic with Vite's SSR transform, except this is targeting the browser function processFile(file: File, seen = new Set()) { if (seen.has(file)) { return [] @@ -14,133 +25,191 @@ function processFile(file: File, seen = new Set()) { seen.add(file) const { js, css } = file.compiled + + const s = new MagicString(js) + const ast = babelParse(js, { sourceFilename: file.filename, sourceType: 'module', plugins: [...babelParserDefaultPlugins] }).program.body + const idToImportMap = new Map() + const declaredConst = new Set() const importedFiles = new Set() const importToIdMap = new Map() - const s = new MagicString(js) - - function registerImport(source: string) { + function defineImport(node: Node, source: string) { const filename = source.replace(/^\.\/+/, '') if (!(filename in store.files)) { throw new Error(`File "${filename}" does not exist.`) } if (importedFiles.has(filename)) { - return importToIdMap.get(filename) + return importToIdMap.get(filename)! } importedFiles.add(filename) const id = `__import_${importedFiles.size}__` importToIdMap.set(filename, id) - s.prepend(`const ${id} = __modules__[${JSON.stringify(filename)}]\n`) + s.appendLeft( + node.start!, + `const ${id} = ${modulesKey}[${JSON.stringify(filename)}]\n` + ) return id } + function defineExport(name: string, local = name) { + s.append(`\n${exportKey}(${moduleKey}, "${name}", () => ${local})`) + } + + // 0. instantiate module s.prepend( - `const mod = __modules__[${JSON.stringify( + `const ${moduleKey} = __modules__[${JSON.stringify( file.filename - )}] = Object.create(null)\n\n` + )}] = { [Symbol.toStringTag]: "Module" }\n\n` ) + // 1. check all import statements and record id -> importName map for (const node of ast) { + // import foo from 'foo' --> foo -> __import_foo__.default + // import { baz } from 'foo' --> baz -> __import_foo__.baz + // import * as ok from 'foo' --> ok -> __import_foo__ if (node.type === 'ImportDeclaration') { const source = node.source.value - if (source === 'vue') { - // rewrite Vue imports - s.overwrite( - node.source.start!, - node.source.end!, - `"${SANDBOX_VUE_URL}"` - ) - } else if (source.startsWith('./')) { - // rewrite the import to retrieve the import from global registry - s.remove(node.start!, node.end!) - - const id = registerImport(source) - + if (source.startsWith('./')) { + const importId = defineImport(node, node.source.value) for (const spec of node.specifiers) { - if (spec.type === 'ImportDefaultSpecifier') { - s.prependRight( - node.start!, - `const ${spec.local.name} = ${id}.default\n` - ) - } else if (spec.type === 'ImportSpecifier') { - s.prependRight( - node.start!, - `const ${spec.local.name} = ${id}.${ - (spec.imported as Identifier).name - }\n` + if (spec.type === 'ImportSpecifier') { + idToImportMap.set( + spec.local.name, + `${importId}.${(spec.imported as Identifier).name}` ) + } else if (spec.type === 'ImportDefaultSpecifier') { + idToImportMap.set(spec.local.name, `${importId}.default`) } else { - // namespace import - s.prependRight(node.start!, `const ${spec.local.name} = ${id}`) + // namespace specifier + idToImportMap.set(spec.local.name, importId) } } + s.remove(node.start!, node.end!) + } else { + if (source === 'vue') { + // rewrite Vue imports + s.overwrite( + node.source.start!, + node.source.end!, + `"${SANDBOX_VUE_URL}"` + ) + } } } + } - if (node.type === 'ExportDefaultDeclaration') { - // export default -> mod.default = ... - s.overwrite(node.start!, node.declaration.start!, 'mod.default = ') - } - + // 2. check all export statements and define exports + for (const node of ast) { + // named exports if (node.type === 'ExportNamedDeclaration') { - if (node.source) { - // export { foo } from '...' -> mode.foo = __import_x__.foo - const id = registerImport(node.source.value) - let code = `` - for (const spec of node.specifiers) { - if (spec.type === 'ExportSpecifier') { - code += `mod.${(spec.exported as Identifier).name} = ${id}.${ - spec.local.name - }\n` - } - } - s.overwrite(node.start!, node.end!, code) - } else if (node.declaration) { + if (node.declaration) { if ( node.declaration.type === 'FunctionDeclaration' || node.declaration.type === 'ClassDeclaration' ) { // export function foo() {} - const name = node.declaration.id!.name - s.appendLeft(node.end!, `\nmod.${name} = ${name}\n`) + defineExport(node.declaration.id!.name) } else if (node.declaration.type === 'VariableDeclaration') { // export const foo = 1, bar = 2 for (const decl of node.declaration.declarations) { - for (const { name } of extractIdentifiers(decl.id)) { - s.appendLeft(node.end!, `\nmod.${name} = ${name}`) + const names = extractNames(decl.id as any) + for (const name of names) { + defineExport(name) } } } s.remove(node.start!, node.declaration.start!) + } else if (node.source) { + // export { foo, bar } from './foo' + const importId = defineImport(node, node.source.value) + for (const spec of node.specifiers) { + defineExport( + (spec.exported as Identifier).name, + `${importId}.${(spec as ExportSpecifier).local.name}` + ) + } + s.remove(node.start!, node.end!) } else { - let code = `` + // export { foo, bar } for (const spec of node.specifiers) { - if (spec.type === 'ExportSpecifier') { - code += `mod.${(spec.exported as Identifier).name} = ${ - spec.local.name - }\n` - } + const local = (spec as ExportSpecifier).local.name + const binding = idToImportMap.get(local) + defineExport((spec.exported as Identifier).name, binding || local) } - s.overwrite(node.start!, node.end!, code) + s.remove(node.start!, node.end!) } } + // default export + if (node.type === 'ExportDefaultDeclaration') { + s.overwrite(node.start!, node.start! + 14, `${moduleKey}.default =`) + } + + // export * from './foo' if (node.type === 'ExportAllDeclaration') { - const id = registerImport(node.source.value) - s.overwrite(node.start!, node.end!, `Object.assign(mod, ${id})`) + const importId = defineImport(node, node.source.value) + s.remove(node.start!, node.end!) + s.append(`\nfor (const key in ${importId}) { + if (key !== 'default') { + ${exportKey}(${moduleKey}, key, () => ${importId}[key]) + } + }`) } } - // dynamic import - walk(ast as any, { - enter(node) { - if (node.type === 'ImportExpression') { + // 3. convert references to import bindings + for (const node of ast) { + if (node.type === 'ImportDeclaration') continue + walkIdentifiers(node, (id, parent, parentStack) => { + const binding = idToImportMap.get(id.name) + if (!binding) { + return + } + if (isStaticProperty(parent) && parent.shorthand) { + // let binding used in a property shorthand + // { foo } -> { foo: __import_x__.foo } + // skip for destructure patterns + if ( + !(parent as any).inPattern || + isInDestructureAssignment(parent, parentStack) + ) { + s.appendLeft(id.end!, `: ${binding}`) + } + } else if ( + parent.type === 'ClassDeclaration' && + id === parent.superClass + ) { + if (!declaredConst.has(id.name)) { + declaredConst.add(id.name) + // locate the top-most node containing the class declaration + const topNode = parentStack[1] + s.prependRight(topNode.start!, `const ${id.name} = ${binding};\n`) + } + } else { + s.overwrite(id.start!, id.end!, binding) + } + }) + } + + // 4. convert dynamic imports + ;(walk as any)(ast, { + enter(node: Node, parent: Node) { + if (node.type === 'Import' && parent.type === 'CallExpression') { + const arg = parent.arguments[0] + if (arg.type === 'StringLiteral' && arg.value.startsWith('./')) { + s.overwrite(node.start!, node.start! + 6, dynamicImportKey) + s.overwrite( + arg.start!, + arg.end!, + JSON.stringify(arg.value.replace(/^\.\/+/, '')) + ) + } } } }) @@ -161,6 +230,13 @@ function processFile(file: File, seen = new Set()) { return processed } +const isStaticProperty = (node: Node): node is ObjectProperty => + node.type === 'ObjectProperty' && !node.computed + +function extractNames(param: Node): string[] { + return extractIdentifiers(param).map(id => id.name) +} + function extractIdentifiers( param: Node, nodes: Identifier[] = [] @@ -205,3 +281,21 @@ function extractIdentifiers( return nodes } + +function isInDestructureAssignment(parent: Node, parentStack: Node[]): boolean { + if ( + parent && + (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern') + ) { + let i = parentStack.length + while (i--) { + const p = parentStack[i] + if (p.type === 'AssignmentExpression') { + return true + } else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { + break + } + } + } + return false +} diff --git a/packages/sfc-playground/src/output/srcdoc.html b/packages/sfc-playground/src/output/srcdoc.html index 31e033542f2..063a522d456 100644 --- a/packages/sfc-playground/src/output/srcdoc.html +++ b/packages/sfc-playground/src/output/srcdoc.html @@ -11,6 +11,20 @@ + diff --git a/packages/sfc-playground/src/download/download.ts b/packages/sfc-playground/src/download/download.ts new file mode 100644 index 00000000000..91cdfd00f34 --- /dev/null +++ b/packages/sfc-playground/src/download/download.ts @@ -0,0 +1,31 @@ +import { exportFiles } from '../store' +import { saveAs } from 'file-saver' + +import index from './template/index.html?raw' +import main from './template/main.js?raw' +import pkg from './template/package.json?raw' +import config from './template/vite.config.js?raw' +import readme from './template/README.md?raw' + +export async function downloadProject() { + const { default: JSZip } = await import('jszip') + const zip = new JSZip() + + // basic structure + zip.file('index.html', index) + zip.file('package.json', pkg) + zip.file('vite.config.js', config) + zip.file('README.md', readme) + + // project src + const src = zip.folder('src')! + src.file('main.js', main) + + const files = exportFiles() + for (const file in files) { + src.file(file, files[file]) + } + + const blob = await zip.generateAsync({ type: 'blob' }) + saveAs(blob, 'vue-project.zip') +} diff --git a/packages/sfc-playground/src/download/template/README.md b/packages/sfc-playground/src/download/template/README.md new file mode 100644 index 00000000000..39c47d255ae --- /dev/null +++ b/packages/sfc-playground/src/download/template/README.md @@ -0,0 +1,14 @@ +# Vite Vue Starter + +This is a project template using [Vite](https://vitejs.dev/). It requires [Node.js](https://nodejs.org) v12+. + +To start: + +```sh +npm install +npm run dev + +# if using yarn: +yarn +yarn dev +``` diff --git a/packages/sfc-playground/src/download/template/index.html b/packages/sfc-playground/src/download/template/index.html new file mode 100644 index 00000000000..030a6ff51bf --- /dev/null +++ b/packages/sfc-playground/src/download/template/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/packages/sfc-playground/src/download/template/main.js b/packages/sfc-playground/src/download/template/main.js new file mode 100644 index 00000000000..01433bca2ac --- /dev/null +++ b/packages/sfc-playground/src/download/template/main.js @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/packages/sfc-playground/src/download/template/package.json b/packages/sfc-playground/src/download/template/package.json new file mode 100644 index 00000000000..6bede6ce627 --- /dev/null +++ b/packages/sfc-playground/src/download/template/package.json @@ -0,0 +1,17 @@ +{ + "name": "vite-vue-starter", + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview" + }, + "dependencies": { + "vue": "^3.0.9" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^1.1.5", + "@vue/compiler-sfc": "^3.0.9", + "vite": "^2.1.3" + } +} \ No newline at end of file diff --git a/packages/sfc-playground/src/download/template/vite.config.js b/packages/sfc-playground/src/download/template/vite.config.js new file mode 100644 index 00000000000..315212d69a7 --- /dev/null +++ b/packages/sfc-playground/src/download/template/vite.config.js @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()] +}) diff --git a/packages/sfc-playground/src/editor/FileSelector.vue b/packages/sfc-playground/src/editor/FileSelector.vue index 23c6d4f363e..639b0ec1860 100644 --- a/packages/sfc-playground/src/editor/FileSelector.vue +++ b/packages/sfc-playground/src/editor/FileSelector.vue @@ -101,14 +101,9 @@ function doneAddFile() { padding-left: 0; } .add { - margin: 0; font-size: 20px; font-family: var(--font-code); color: #999; - border: none; - outline: none; - background-color: transparent; - cursor: pointer; vertical-align: middle; margin-left: 6px; } diff --git a/packages/sfc-playground/src/output/Output.vue b/packages/sfc-playground/src/output/Output.vue index 0027cdaed04..87b189094f2 100644 --- a/packages/sfc-playground/src/output/Output.vue +++ b/packages/sfc-playground/src/output/Output.vue @@ -38,15 +38,10 @@ const mode = ref('preview') background-color: white; } .tab-buttons button { - margin: 0; font-size: 13px; font-family: var(--font-code); - border: none; - outline: none; - background-color: transparent; padding: 8px 16px 6px; text-transform: uppercase; - cursor: pointer; color: #999; box-sizing: border-box; } diff --git a/packages/sfc-playground/src/output/srcdoc.html b/packages/sfc-playground/src/output/srcdoc.html index 063a522d456..e389e39aa3f 100644 --- a/packages/sfc-playground/src/output/srcdoc.html +++ b/packages/sfc-playground/src/output/srcdoc.html @@ -97,7 +97,8 @@ ['clear', 'log', 'info', 'dir', 'warn', 'error', 'table'].forEach((level) => { const original = console[level]; console[level] = (...args) => { - if (String(args[0]).includes('You are running a development build of Vue')) { + const msg = String(args[0]) + if (msg.includes('You are running a development build of Vue')) { return } const stringifiedArgs = stringify(args); diff --git a/packages/sfc-playground/src/store.ts b/packages/sfc-playground/src/store.ts index 0eb121b109c..2328d52af62 100644 --- a/packages/sfc-playground/src/store.ts +++ b/packages/sfc-playground/src/store.ts @@ -7,8 +7,6 @@ import { rewriteDefault } from '@vue/compiler-sfc' -const STORAGE_KEY = 'vue-sfc-playground' - const welcomeCode = ` diff --git a/packages/sfc-playground/src/output/Preview.vue b/packages/sfc-playground/src/output/Preview.vue index ef76c23f311..0c3feac2fdc 100644 --- a/packages/sfc-playground/src/output/Preview.vue +++ b/packages/sfc-playground/src/output/Preview.vue @@ -30,26 +30,22 @@ async function updatePreview() { const modules = compileModulesForPreview() console.log(`successfully compiled ${modules.length} modules.`) // reset modules - await proxy.eval(` - window.__modules__ = {} - window.__css__ = '' - `) - // evaluate modules - for (const mod of modules) { - await proxy.eval(mod) - } - // reboot - await proxy.eval(` - import { createApp as _createApp } from "${SANDBOX_VUE_URL}" - if (window.__app__) { - window.__app__.unmount() - document.getElementById('app').innerHTML = '' - } - document.getElementById('__sfc-styles').innerHTML = window.__css__ - const app = window.__app__ = _createApp(__modules__["${MAIN_FILE}"].default) - app.config.errorHandler = e => console.error(e) - app.mount('#app') - `) + await proxy.eval([ + `window.__modules__ = {};window.__css__ = ''`, + ...modules, + ` +import { createApp as _createApp } from "${SANDBOX_VUE_URL}" + +if (window.__app__) { + window.__app__.unmount() + document.getElementById('app').innerHTML = '' +} + +document.getElementById('__sfc-styles').innerHTML = window.__css__ +const app = window.__app__ = _createApp(__modules__["${MAIN_FILE}"].default) +app.config.errorHandler = e => console.error(e) +app.mount('#app')`.trim() + ]) } catch (e) { runtimeError.value = e.stack } diff --git a/packages/sfc-playground/src/output/PreviewProxy.ts b/packages/sfc-playground/src/output/PreviewProxy.ts index 338da5ab868..8c115e0d2ab 100644 --- a/packages/sfc-playground/src/output/PreviewProxy.ts +++ b/packages/sfc-playground/src/output/PreviewProxy.ts @@ -86,7 +86,7 @@ export class PreviewProxy { } } - eval(script: string) { + eval(script: string | string[]) { return this.iframe_command('eval', { script }) } diff --git a/packages/sfc-playground/src/output/srcdoc.html b/packages/sfc-playground/src/output/srcdoc.html index e389e39aa3f..4446c493247 100644 --- a/packages/sfc-playground/src/output/srcdoc.html +++ b/packages/sfc-playground/src/output/srcdoc.html @@ -9,7 +9,7 @@ From 3736496006485e61614bef285ea89ea2a33134c4 Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Tue, 30 Mar 2021 03:15:08 +0800 Subject: [PATCH 0536/4002] fix(runtime-core): avoid unmount teleport's children multiple times (#3499) fix #3497 --- .../__tests__/components/Teleport.spec.ts | 42 ++++++++++++++++++- packages/runtime-core/src/renderer.ts | 22 +++++----- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/packages/runtime-core/__tests__/components/Teleport.spec.ts b/packages/runtime-core/__tests__/components/Teleport.spec.ts index f6babd9263b..8b234e2b1e6 100644 --- a/packages/runtime-core/__tests__/components/Teleport.spec.ts +++ b/packages/runtime-core/__tests__/components/Teleport.spec.ts @@ -8,7 +8,9 @@ import { ref, nextTick, markRaw, - defineComponent + defineComponent, + withDirectives, + createApp } from '@vue/runtime-test' import { createVNode, Fragment } from '../../src/vnode' import { compile, render as domRender } from 'vue' @@ -432,4 +434,42 @@ describe('renderer: teleport', () => { `"
teleported
false"` ) }) + + // #3497 + test(`the dir hooks of the Teleport's children should be called correctly`, async () => { + const target = nodeOps.createElement('div') + const root = nodeOps.createElement('div') + const toggle = ref(true) + const dir = { + mounted: jest.fn(), + unmounted: jest.fn() + } + + const app = createApp({ + setup() { + return () => { + return toggle.value + ? h(Teleport, { to: target }, [ + withDirectives(h('div', ['foo']), [[dir]]) + ]) + : null + } + } + }) + app.mount(root) + + expect(serializeInner(root)).toMatchInlineSnapshot( + `""` + ) + expect(serializeInner(target)).toMatchInlineSnapshot(`"
foo
"`) + expect(dir.mounted).toHaveBeenCalledTimes(1) + expect(dir.unmounted).toHaveBeenCalledTimes(0) + + toggle.value = false + await nextTick() + expect(serializeInner(root)).toMatchInlineSnapshot(`""`) + expect(serializeInner(target)).toMatchInlineSnapshot(`""`) + expect(dir.mounted).toHaveBeenCalledTimes(1) + expect(dir.unmounted).toHaveBeenCalledTimes(1) + }) }) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 4375dcdbf10..5122e7a9131 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -2096,7 +2096,16 @@ function baseCreateRenderer( invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount') } - if ( + if (shapeFlag & ShapeFlags.TELEPORT) { + ;(vnode.type as typeof TeleportImpl).remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ) + } else if ( dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments (type !== Fragment || @@ -2119,17 +2128,6 @@ function baseCreateRenderer( unmountChildren(children as VNode[], parentComponent, parentSuspense) } - if (shapeFlag & ShapeFlags.TELEPORT) { - ;(vnode.type as typeof TeleportImpl).remove( - vnode, - parentComponent, - parentSuspense, - optimized, - internals, - doRemove - ) - } - if (doRemove) { remove(vnode) } From 555b016dcb3b347a1d8b3d14df74c175115adb0b Mon Sep 17 00:00:00 2001 From: HcySunYang Date: Tue, 30 Mar 2021 03:18:25 +0800 Subject: [PATCH 0537/4002] fix(compiler-core): allow PascalCase dynamic component tag usage (#3508) fix #3507 --- .../transforms/transformElement.spec.ts | 18 ++++++++++++++++++ .../src/transforms/transformElement.ts | 13 +++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/transformElement.spec.ts b/packages/compiler-core/__tests__/transforms/transformElement.spec.ts index c07bb0e5533..bc2c9686a6c 100644 --- a/packages/compiler-core/__tests__/transforms/transformElement.spec.ts +++ b/packages/compiler-core/__tests__/transforms/transformElement.spec.ts @@ -836,6 +836,24 @@ describe('compiler: element transform', () => { }) }) + test('capitalized version w/ static binding', () => { + const { node, root } = parseWithBind(``) + expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT) + expect(node).toMatchObject({ + isBlock: true, + tag: { + callee: RESOLVE_DYNAMIC_COMPONENT, + arguments: [ + { + type: NodeTypes.SIMPLE_EXPRESSION, + content: 'foo', + isStatic: true + } + ] + } + }) + }) + test('dynamic binding', () => { const { node, root } = parseWithBind(``) expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT) diff --git a/packages/compiler-core/src/transforms/transformElement.ts b/packages/compiler-core/src/transforms/transformElement.ts index 5c34c6d2eee..398758f4234 100644 --- a/packages/compiler-core/src/transforms/transformElement.ts +++ b/packages/compiler-core/src/transforms/transformElement.ts @@ -230,8 +230,9 @@ export function resolveComponentType( const { tag } = node // 1. dynamic component - const isProp = - node.tag === 'component' ? findProp(node, 'is') : findDir(node, 'is') + const isProp = isComponentTag(tag) + ? findProp(node, 'is') + : findDir(node, 'is') if (isProp) { const exp = isProp.type === NodeTypes.ATTRIBUTE @@ -413,7 +414,7 @@ export function buildProps( } } // skip :is on - if (name === 'is' && tag === 'component') { + if (name === 'is' && isComponentTag(tag)) { continue } properties.push( @@ -452,7 +453,7 @@ export function buildProps( // skip v-is and :is on if ( name === 'is' || - (isBind && tag === 'component' && isBindKey(arg, 'is')) + (isBind && isComponentTag(tag) && isBindKey(arg, 'is')) ) { continue } @@ -672,3 +673,7 @@ function stringifyDynamicPropNames(props: string[]): string { } return propsNamesString + `]` } + +function isComponentTag(tag: string) { + return tag[0].toLowerCase() + tag.slice(1) === 'component' +} From 4d2853ef57d28b5f0f7c395b1319076e0534cc2f Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 29 Mar 2021 15:26:54 -0400 Subject: [PATCH 0538/4002] workflow(sfc-playground): display analyzed bindings in js output --- packages/sfc-playground/src/store.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/sfc-playground/src/store.ts b/packages/sfc-playground/src/store.ts index 5a0a5d05027..7e5cdcb1bf7 100644 --- a/packages/sfc-playground/src/store.ts +++ b/packages/sfc-playground/src/store.ts @@ -147,6 +147,13 @@ async function compileFile({ filename, code, compiled }: File) { refSugar: true, inlineTemplate: true }) + if (compiledScript.bindings) { + finalCode += `\n/* Analyzed bindings: ${JSON.stringify( + compiledScript.bindings, + null, + 2 + )} */` + } finalCode += `\n` + rewriteDefault(compiledScript.content, COMP_IDENTIFIER) } catch (e) { From 7ab519cc96e939956c6ca67d05160e8de47b17e0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 29 Mar 2021 15:34:57 -0400 Subject: [PATCH 0539/4002] workflow(sfc-playground): pass along analyzed bindings when compiling template --- packages/sfc-playground/src/store.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/sfc-playground/src/store.ts b/packages/sfc-playground/src/store.ts index 7e5cdcb1bf7..2f38287c5ed 100644 --- a/packages/sfc-playground/src/store.ts +++ b/packages/sfc-playground/src/store.ts @@ -140,9 +140,10 @@ async function compileFile({ filename, code, compiled }: File) { } // script + let compiledScript if (descriptor.script || descriptor.scriptSetup) { try { - const compiledScript = compileScript(descriptor, { + compiledScript = compileScript(descriptor, { id, refSugar: true, inlineTemplate: true @@ -172,7 +173,10 @@ async function compileFile({ filename, code, compiled }: File) { id, scoped: hasScoped, slotted: descriptor.slotted, - isProd: false + isProd: false, + compilerOptions: { + bindingMetadata: compiledScript && compiledScript.bindings + } }) if (templateResult.errors.length) { store.errors = templateResult.errors From 4d9f9fdf9d3194a32ca3d1719df809b90b56e2d3 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 29 Mar 2021 16:06:14 -0400 Subject: [PATCH 0540/4002] workflow(sfc-playground): make warnings dismissable --- packages/sfc-playground/src/Message.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/sfc-playground/src/Message.vue b/packages/sfc-playground/src/Message.vue index 7cc23995554..828f6b2cd32 100644 --- a/packages/sfc-playground/src/Message.vue +++ b/packages/sfc-playground/src/Message.vue @@ -1,16 +1,23 @@ + `) + ).toThrow() + }) + + test('defineEmit w/ type (type literal w/ call signatures)', () => { + const type = `{(e: 'foo' | 'bar'): void; (e: 'baz', id: number): void;}` const { content } = compile(` diff --git a/packages/sfc-playground/src/output/Preview.vue b/packages/sfc-playground/src/output/Preview.vue index 0c3feac2fdc..230025a5f4d 100644 --- a/packages/sfc-playground/src/output/Preview.vue +++ b/packages/sfc-playground/src/output/Preview.vue @@ -14,7 +14,7 @@ import Message from '../Message.vue' import { ref, onMounted, onUnmounted, watchEffect } from 'vue' import srcdoc from './srcdoc.html?raw' import { PreviewProxy } from './PreviewProxy' -import { MAIN_FILE, SANDBOX_VUE_URL } from '../store' +import { MAIN_FILE, SANDBOX_VUE_URL } from '../sfcCompiler' import { compileModulesForPreview } from './moduleCompiler' const iframe = ref() diff --git a/packages/sfc-playground/src/output/moduleCompiler.ts b/packages/sfc-playground/src/output/moduleCompiler.ts index 31f6bc06799..ea22d6b462b 100644 --- a/packages/sfc-playground/src/output/moduleCompiler.ts +++ b/packages/sfc-playground/src/output/moduleCompiler.ts @@ -1,4 +1,5 @@ -import { store, MAIN_FILE, SANDBOX_VUE_URL, File } from '../store' +import { store, File } from '../store' +import { MAIN_FILE, SANDBOX_VUE_URL } from '../sfcCompiler' import { babelParse, MagicString, diff --git a/packages/sfc-playground/src/sfcCompiler.ts b/packages/sfc-playground/src/sfcCompiler.ts new file mode 100644 index 00000000000..e0ab8d2f9cf --- /dev/null +++ b/packages/sfc-playground/src/sfcCompiler.ts @@ -0,0 +1,225 @@ +import { store, File } from './store' +import { + parse, + compileTemplate, + compileStyleAsync, + compileScript, + rewriteDefault, + SFCDescriptor, + BindingMetadata +} from '@vue/compiler-sfc' + +export const MAIN_FILE = 'App.vue' +export const COMP_IDENTIFIER = `__sfc__` + +// @ts-ignore +export const SANDBOX_VUE_URL = import.meta.env.PROD + ? '/vue.runtime.esm-browser.js' // to be copied on build + : '/src/vue-dev-proxy' + +export async function compileFile({ filename, code, compiled }: File) { + if (!code.trim()) { + return + } + + if (filename.endsWith('.js')) { + compiled.js = compiled.ssr = code + return + } + + const id = await hashId(filename) + const { errors, descriptor } = parse(code, { filename, sourceMap: true }) + if (errors.length) { + store.errors = errors + return + } + + if ( + (descriptor.script && descriptor.script.lang) || + (descriptor.scriptSetup && descriptor.scriptSetup.lang) || + descriptor.styles.some(s => s.lang) || + (descriptor.template && descriptor.template.lang) + ) { + store.errors = [ + 'lang="x" pre-processors are not supported in the in-browser playground.' + ] + return + } + + const hasScoped = descriptor.styles.some(s => s.scoped) + let clientCode = '' + let ssrCode = '' + + const appendSharedCode = (code: string) => { + clientCode += code + ssrCode += code + } + + const clientScriptResult = doCompileScript(descriptor, id, false) + if (!clientScriptResult) { + return + } + const [clientScript, bindings] = clientScriptResult + clientCode += clientScript + + // script ssr only needs to be performed if using `.trim() -export const MAIN_FILE = 'App.vue' -export const COMP_IDENTIFIER = `__sfc__` - -// @ts-ignore -export const SANDBOX_VUE_URL = import.meta.env.PROD - ? '/vue.runtime.esm-browser.js' // to be copied on build - : '/src/vue-dev-proxy' - export class File { filename: string code: string compiled = { js: '', - css: '' + css: '', + ssr: '' } constructor(filename: string, code = '') { @@ -106,143 +93,3 @@ export function deleteFile(filename: string) { delete store.files[filename] } } - -async function compileFile({ filename, code, compiled }: File) { - if (!code.trim()) { - return - } - - if (filename.endsWith('.js')) { - compiled.js = code - return - } - - const id = await hashId(filename) - const { errors, descriptor } = parse(code, { filename, sourceMap: true }) - if (errors.length) { - store.errors = errors - return - } - - const hasScoped = descriptor.styles.some(s => s.scoped) - let finalCode = '' - - if ( - (descriptor.script && descriptor.script.lang) || - (descriptor.scriptSetup && descriptor.scriptSetup.lang) || - descriptor.styles.some(s => s.lang) || - (descriptor.template && descriptor.template.lang) - ) { - store.errors = [ - 'lang="x" pre-processors are not supported in the in-browser playground.' - ] - return - } - - // script - let compiledScript - if (descriptor.script || descriptor.scriptSetup) { - try { - compiledScript = compileScript(descriptor, { - id, - refSugar: true, - inlineTemplate: true - }) - if (compiledScript.bindings) { - finalCode += `\n/* Analyzed bindings: ${JSON.stringify( - compiledScript.bindings, - null, - 2 - )} */` - } - finalCode += - `\n` + rewriteDefault(compiledScript.content, COMP_IDENTIFIER) - } catch (e) { - store.errors = [e] - return - } - } else { - finalCode += `\nconst ${COMP_IDENTIFIER} = {}` - } - - // template - if (descriptor.template && !descriptor.scriptSetup) { - const templateResult = compileTemplate({ - source: descriptor.template.content, - filename, - id, - scoped: hasScoped, - slotted: descriptor.slotted, - isProd: false, - compilerOptions: { - bindingMetadata: compiledScript && compiledScript.bindings - } - }) - if (templateResult.errors.length) { - store.errors = templateResult.errors - return - } - - finalCode += - `\n` + - templateResult.code.replace( - /\nexport (function|const) render/, - '$1 render' - ) - finalCode += `\n${COMP_IDENTIFIER}.render = render` - } - if (hasScoped) { - finalCode += `\n${COMP_IDENTIFIER}.__scopeId = ${JSON.stringify( - `data-v-${id}` - )}` - } - - if (finalCode) { - finalCode += `\n${COMP_IDENTIFIER}.__file = ${JSON.stringify(filename)}` - finalCode += `\nexport default ${COMP_IDENTIFIER}` - compiled.js = finalCode.trimStart() - } - - // styles - let css = '' - for (const style of descriptor.styles) { - if (style.module) { - // TODO error - continue - } - - const styleResult = await compileStyleAsync({ - source: style.content, - filename, - id, - scoped: style.scoped, - modules: !!style.module - }) - if (styleResult.errors.length) { - // postcss uses pathToFileURL which isn't polyfilled in the browser - // ignore these errors for now - if (!styleResult.errors[0].message.includes('pathToFileURL')) { - store.errors = styleResult.errors - } - // proceed even if css compile errors - } else { - css += styleResult.code + '\n' - } - } - if (css) { - compiled.css = css.trim() - } else { - compiled.css = '/* No diff --git a/packages/sfc-playground/src/sfcCompiler.ts b/packages/sfc-playground/src/sfcCompiler.ts index 15b24e4c02b..dc586632870 100644 --- a/packages/sfc-playground/src/sfcCompiler.ts +++ b/packages/sfc-playground/src/sfcCompiler.ts @@ -1,22 +1,40 @@ import { store, File } from './store' -import { - parse, - compileTemplate, - compileStyleAsync, - compileScript, - rewriteDefault, - SFCDescriptor, - BindingMetadata -} from '@vue/compiler-sfc' +import { SFCDescriptor, BindingMetadata } from '@vue/compiler-sfc' +import * as defaultCompiler from '@vue/compiler-sfc' export const MAIN_FILE = 'App.vue' export const COMP_IDENTIFIER = `__sfc__` +/** + * The default SFC compiler we are using is built from each commit + * but we may swap it out with a version fetched from CDNs + */ +let SFCCompiler: typeof defaultCompiler = defaultCompiler + // @ts-ignore -export const SANDBOX_VUE_URL = import.meta.env.PROD +const defaultVueUrl = import.meta.env.PROD ? '/vue.runtime.esm-browser.js' // to be copied on build : '/src/vue-dev-proxy' +export let SANDBOX_VUE_URL = defaultVueUrl + +export async function setVersion(version: string) { + const compilerUrl = `https://unpkg.com/@vue/compiler-sfc@${version}/dist/compiler-sfc.esm-browser.js` + const runtimeUrl = `https://cdn.skypack.dev/@vue/runtime-dom@${version}` + const [compiler] = await Promise.all([ + import(/* @vite-ignore */ compilerUrl), + import(/* @vite-ignore */ runtimeUrl) + ]) + SFCCompiler = compiler + SANDBOX_VUE_URL = runtimeUrl + console.info(`Now using Vue version: ${version}`) +} + +export function resetVersion() { + SFCCompiler = defaultCompiler + SANDBOX_VUE_URL = defaultVueUrl +} + export async function compileFile({ filename, code, compiled }: File) { if (!code.trim()) { store.errors = [] @@ -30,7 +48,10 @@ export async function compileFile({ filename, code, compiled }: File) { } const id = await hashId(filename) - const { errors, descriptor } = parse(code, { filename, sourceMap: true }) + const { errors, descriptor } = SFCCompiler.parse(code, { + filename, + sourceMap: true + }) if (errors.length) { store.errors = errors return @@ -121,7 +142,7 @@ export async function compileFile({ filename, code, compiled }: File) { return } - const styleResult = await compileStyleAsync({ + const styleResult = await SFCCompiler.compileStyleAsync({ source: style.content, filename, id, @@ -156,7 +177,7 @@ function doCompileScript( ): [string, BindingMetadata | undefined] | undefined { if (descriptor.script || descriptor.scriptSetup) { try { - const compiledScript = compileScript(descriptor, { + const compiledScript = SFCCompiler.compileScript(descriptor, { id, refSugar: true, inlineTemplate: true, @@ -173,7 +194,9 @@ function doCompileScript( 2 )} */` } - code += `\n` + rewriteDefault(compiledScript.content, COMP_IDENTIFIER) + code += + `\n` + + SFCCompiler.rewriteDefault(compiledScript.content, COMP_IDENTIFIER) return [code, compiledScript.bindings] } catch (e) { store.errors = [e] @@ -190,7 +213,7 @@ function doCompileTemplate( bindingMetadata: BindingMetadata | undefined, ssr: boolean ) { - const templateResult = compileTemplate({ + const templateResult = SFCCompiler.compileTemplate({ source: descriptor.template!.content, filename: descriptor.filename, id, diff --git a/yarn.lock b/yarn.lock index 2eb346a0814..285bf02127d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7223,10 +7223,10 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vite@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.1.4.tgz#66396823701e54cf3bfb9f73dbd386c9b4329c86" - integrity sha512-j/p0RZQvNY/auSPfazsDfo1PHtFp8ktwXPbzI6NqplzHcR3Cn/dfQWiMxL6zp8j9IWdcJP1Zfms7mxruBhStJw== +vite@^2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.1.5.tgz#4857da441c62f7982c83cbd5f42a00330f20c9c1" + integrity sha512-tYU5iaYeUgQYvK/CNNz3tiJ8vYqPWfCE9IQ7K0iuzYovWw7lzty7KRYGWwV3CQPh0NKxWjOczAqiJsCL0Xb+Og== dependencies: esbuild "^0.9.3" postcss "^8.2.1" From ebf396251cb0181dc968657e9e060a3307429d5e Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 30 Mar 2021 22:10:18 -0400 Subject: [PATCH 0563/4002] chore(sfc-playground): responsive --- packages/sfc-playground/src/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sfc-playground/src/Header.vue b/packages/sfc-playground/src/Header.vue index 9c408e16a7c..48821d49515 100644 --- a/packages/sfc-playground/src/Header.vue +++ b/packages/sfc-playground/src/Header.vue @@ -129,7 +129,7 @@ h1 img { top: -2px; } -@media (max-width: 400px) { +@media (max-width: 480px) { h1 span { display: none; } From 7bc5fd9a04db4f4a335ca945ece9ed43271b1b52 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 31 Mar 2021 12:22:08 -0400 Subject: [PATCH 0564/4002] chore(sfc-playground): teardown preview update watcher --- packages/sfc-playground/src/output/Preview.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sfc-playground/src/output/Preview.vue b/packages/sfc-playground/src/output/Preview.vue index 230025a5f4d..637b618eb9f 100644 --- a/packages/sfc-playground/src/output/Preview.vue +++ b/packages/sfc-playground/src/output/Preview.vue @@ -12,6 +12,7 @@ From e097bd4dd5497223bd1110c9616b88f148624b13 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 31 Mar 2021 12:36:45 -0400 Subject: [PATCH 0565/4002] chore(sfc-playground): use svg logo --- packages/sfc-playground/index.html | 2 +- packages/sfc-playground/public/icon.png | Bin 3395 -> 0 bytes packages/sfc-playground/public/logo.svg | 4 ++++ packages/sfc-playground/src/Header.vue | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 packages/sfc-playground/public/icon.png create mode 100644 packages/sfc-playground/public/logo.svg diff --git a/packages/sfc-playground/index.html b/packages/sfc-playground/index.html index a5e35213436..f58afbc9295 100644 --- a/packages/sfc-playground/index.html +++ b/packages/sfc-playground/index.html @@ -4,7 +4,7 @@ - + Vue SFC Playground diff --git a/packages/sfc-playground/public/icon.png b/packages/sfc-playground/public/icon.png deleted file mode 100644 index 4388bfdca3d4d778d2f25a5861599f8f19a1177c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3395 zcmaJ^dpy(o8y`aCQb$M{Gf69KbDPa&mJzw-a@=pT&3zZ!m|LaXQi-Stqav};(cC3M zM}?d^vCOT0I;N7*N=fvaPM!1nKF&@kJcVR{+lVnpAW=nV5g|H(io-_}8K6*NcqG{pEa>P0gCYr*U~dy=m^0Oe z7!hfoL?e16xp?A}qVY%q7;OczNI;1QNJIt>lt79h(@_bQ;BUMr(S5@W1%tkYFrqEN ze~R*PJ`A#<(1;)t15+!P8!LgB{xFgOZ^M8V*o?+;j% zjYbGVxnu3V=Mq_#;0OkTih@F!Or`4OCV95o&O>x)4w-L)G}xSjtYevz@Q}3MqS^c z=?r(`-!lF&n(moMB|_babV?izFPcY~_7AYAcmJMfBT%FUg{9!*NJKKj0c!~sc?<}V z1e6KP(DZx{!kk~eI~MsL4MCDJ0}i3B?ug#`N698}~# z2*4l^2$-pjof!hNA>QZ!0*1A7WRL!P>~qu#$^9z(m!0H z_1U=owYMVUugxctMe9xz?e+DZ*aiSVrr80D@l4=N_`ae9j3}c&b|M6c^Scw&#v42` zs@=W24^$JB&ZnFHq$6hgI?L<)7qPYdpMFDMm5r*2NZZ#;hNLU%;UMB}lBX&zgLa?a z^q;(Rv!#SE3*p7_>9&tfp}FA;>iv!v_p|!wd;>mn_^936qi>ng*>kFww|a^}qJTRK znA`1@E!Y|;+Yc3d2h!d=ZZPN&V<0ppw;;&qMLk zs8GnX$?aj;YSC%6t7ryd|Y^9Qc9F|ZTi%4o)Pe;3_TsRPSb<*4*B>QW0CG(vI z>y^yW0M4}!mMf3!4z1fO+L~w1pRfz#LUd11)b_hvE5tyLhoKw+{E?+obcpiN*0LU8 z+U$wi{2kPnH5r4PMp&T>SNDmqNn*??;K@i|?J!$E9U15d+24QdeF^V4qsj`m?4KR1 zo+530cOpA+R_oI`YVpGHn|g}#XF^ggiIq#Q$r!(y$dA${=6vmyc6@muL~LaHK9;_U zM6ianv&69LoqCIN7iY5Nk~w}(YQ_@J^_HeBva+0R_9?+f_e~4spT$RYhq*aCNMrO$ zANmbE3u(ID)?XQ7A$ZW2RXgnhnaPNg>o$T&swba`imtoDTfX-ox*^fNY~&|)r*EP9 zDjZoQYgH3!&1P!g6r^)r`PMo_8VTHjZZPV`=6oa69GQI3%5zMi(iWaa;uA~o4%J^) zTvx7E_z4|v`9%k4yvRr!>a=q&CRMXs)EtsGU0BaC=tm1rZCwe$9zABiZcVuVM#f_O zEcY-xE#-a$$qK0SptY*~;s&%&{MxjMyzUJK)Ro2HOShN#i zdmd(sJrh3Lv2smAU0Uf)tzU1B4BTO~oK-hJav|YH;*QbtQMXN4?1g)YYj*9zWn;WS zf1=g6CNYN>p%StDbcLOA=ocrq)8-NU#|p81bRF3}y8w-f<_em-45$3L1@~e-{F^+_ zxkl==Ne8Vus0W)|3%}tC9-OE+5bT+_6f|Q*jZeS-JXh8E3%`TziByq04bJ6a1d7>H z;RYj*F8l4WsVGR4UERkbN(jGxSrPD|EDl*hJV;*`c%6d`F)1W~@pz_2+lh zX8Y6jap-cIJ8qTxvL@N3GJ-7LiuUjog<%wMNATus+JP&V$uD}fv7BWwUYMmGCIMGj z{8~4f?dWx0LX>Y-qi=!s6hE7+ubMW78h!`|R=KV%8FK zd9Sek(lv`S^5+9xYR`{X>yATq2OfeBt(}qyYA3{aLq|2d#^vB$R4#D)8lf9t!Y;+P z_6W7^{$}!gg?;4KjI39niyeEj#~ble%M>uw{nu#b`CHdh{gg9q+d8BrP^@~lDBI@d z7PMHwiV3pH(=wk3x<4;S!E(K=DJ>2!RAm*jrN_O@8jfGh%FKDK2Jufl-PsHs+4lH9 zDVKmh4;9;;mTf^PV;hRc zGZ1`0sMNGF2Q#}5#R#bM)tW_A=dSME$5(a2i}Ihk4u>_zBv%vI*myG)hHABMyPQj@ zM)WDfPOZ2LDPxwQFP3s9qT2x$(n(71$z;Qxd;tB$vX<;ZX<>Nsq(dQ>mhaX*MIFCf zb0p{bXj}2S`bD#rpHdTdNv!#{OR);Jsq8JJ*l1;(96~iudG#aZgj0Qo3WuL}YVZek z(SM)#(x7!4_(saUC6(W&b$isUNe3O4T~w_02Y#{Bs)T0h-r|>RiXN`FZb$o39EXiL z*RJ#X)VH`&nA(%q0JE_w3>ZQUex|DOv-oSu#vm zNS0_maoG$tauoZ;v)jT-lc=;EaufphG>)@S1@N~a5rr)*{bw*r-?o*rX6>8&zHcc*`CR~1#1jSw~d|R zwXi;)w4*Di+agG^bKz87RbPQwK!stmYMB_=wK@dlhtu9wFD@&T*Rq=*u7gj@78PR;rI9VW}r3UUH0!vA30jS z9UC??hXtMukpyu2>X*~v8;@W;`1_RbZHs(`$_8)1P;u9mwi4Rc0`sT=V!Y1o!I{Qq zTuHw3d^RR%uB5r{Ro1<>F8RPbj_b`$75gQNggjNu*H}~8;-HRVpN?w*H+KzOf}(^U z)d8)S!qI%E&Bf@3i1yh^Px1-jguC#MCUGbC&Rv0bg=h2Ms1B6?sLoFXEM>DdK;(^h zBZ=9iZF8CfgvLGLDUDAC>!hByzwDss&zxy_dFFE+ps2snc=RE+p+zrQ*E_9YM0{{Y z!fhZyCOLFWcsB~(RGiu+Zuz#hisxiIQ_CT@V-K)JH skXH~y@{pZ%H2RLzTI|$xG-@5%4N!D?9MV?={PtVpVC#adKM-=_zfn5szW@LL diff --git a/packages/sfc-playground/public/logo.svg b/packages/sfc-playground/public/logo.svg new file mode 100644 index 00000000000..71c1cfb9afa --- /dev/null +++ b/packages/sfc-playground/public/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/sfc-playground/src/Header.vue b/packages/sfc-playground/src/Header.vue index 48821d49515..a2a9f88439e 100644 --- a/packages/sfc-playground/src/Header.vue +++ b/packages/sfc-playground/src/Header.vue @@ -1,7 +1,7 @@