diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 11a9a532fd5456..301b795e15fb5e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -66,7 +66,7 @@ body: required: true - label: Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate. required: true - - label: Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead. + - label: Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead. required: true - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/). required: true diff --git a/.github/issue-workflow.excalidraw b/.github/issue-workflow.excalidraw new file mode 100644 index 00000000000000..fc12540b41969d --- /dev/null +++ b/.github/issue-workflow.excalidraw @@ -0,0 +1,2738 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "diamond", + "version": 265, + "versionNonce": 192248478, + "isDeleted": false, + "id": "sQbLVqjpgdZXg0DrdESrv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 735.9493670886075, + "y": 178.5833246155455, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 177114754, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "text", + "version": 206, + "versionNonce": 749438530, + "isDeleted": false, + "id": "Zo2OUf2C5ZeVhoM2q7Uni", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 799, + "y": 235.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 164, + "height": 48, + "seed": 478396126, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Followed issue\ntemplate?", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Followed issue\ntemplate?" + }, + { + "type": "line", + "version": 216, + "versionNonce": 1785231070, + "isDeleted": false, + "id": "alQgWzqeIA8Wd_epahTcc", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 883, + "y": 336, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 1247524446, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 377, + "versionNonce": 665153026, + "isDeleted": false, + "id": "fDfDOoQv4l7fM9iicquNl", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1161.8952582689835, + "y": 369.56739811912234, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 279.04014344843074, + "height": 0, + "seed": 109974722, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -279.04014344843074, + 0 + ] + ] + }, + { + "type": "text", + "version": 304, + "versionNonce": 573696798, + "isDeleted": false, + "id": "zMMCi3Zo6KpPyyx8G8eYr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 835.3743472748146, + "y": 397.6001419449459, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 666855710, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 589, + "versionNonce": 1116495298, + "isDeleted": false, + "id": "Ztoo5I5eH0mNv9l39lH11", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1186.2924959296251, + "y": 397.47863964423703, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 1575246878, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 357, + "versionNonce": 1094899550, + "isDeleted": false, + "id": "ESEzIw1uAeGDtzFQxjoUn", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1161.6266683902663, + "y": 370.5206504984035, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 102.02490458900218, + "seed": 820054494, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 102.02490458900218 + ] + ] + }, + { + "type": "rectangle", + "version": 503, + "versionNonce": 176117122, + "isDeleted": false, + "id": "VAqo6Z6jbCX7jifpnRFcL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1056.276152926349, + "y": 473.85054740562003, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 275.3695193143709, + "height": 82.49906843870326, + "seed": 1100774814, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "text", + "version": 591, + "versionNonce": 1609317278, + "isDeleted": false, + "id": "LhHi_nLcEjXVWTrzIj_Aw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1099.9609125835343, + "y": 491.10008162497166, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 188, + "height": 48, + "seed": 1527850654, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Close and ask to\nfollow template", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Close and ask to\nfollow template" + }, + { + "type": "text", + "version": 551, + "versionNonce": 300687710, + "isDeleted": false, + "id": "-w-lI8s8rNBbK0EDBgrjg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 806.60554399834, + "y": 506.67439364859297, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 153, + "height": 24, + "seed": 1427727810, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948632442, + "fontSize": 20, + "fontFamily": 3, + "text": "Is duplicate?", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Is duplicate?" + }, + { + "type": "line", + "version": 437, + "versionNonce": 1683953630, + "isDeleted": false, + "id": "Kkfv8iJRmQOZXVmxjq4VB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 883.8589168277284, + "y": 599.9686255820234, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 377873922, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "text", + "version": 558, + "versionNonce": 1722113282, + "isDeleted": false, + "id": "XlHx-HWp0TSFlM-imDtj5", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 845.3844268932406, + "y": 671.5687675269694, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 1855837634, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "text", + "version": 735, + "versionNonce": 1185704990, + "isDeleted": false, + "id": "KyQkN5f-OgFpz5uedfqMK", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1104.9975246719962, + "y": 756.829751760595, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 176, + "height": 48, + "seed": 282119490, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Close and point\nto duplicate", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Close and point\nto duplicate" + }, + { + "type": "text", + "version": 591, + "versionNonce": 431385794, + "isDeleted": false, + "id": "Iegl-yl9ijRqFOpeSBldb", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 805.8181494893245, + "y": 758.0208016745363, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 153, + "height": 48, + "seed": 92919042, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Has proper\nreproduction?", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Has proper\nreproduction?" + }, + { + "type": "line", + "version": 546, + "versionNonce": 1422211166, + "isDeleted": false, + "id": "bJ3UV8aCWRq1vt_Tkw0jp", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 882.0773648501048, + "y": 862.5450610034595, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 326628510, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 680, + "versionNonce": 797934722, + "isDeleted": false, + "id": "iXnyiAlfBjFRTxHo7LXqG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1160.972623119087, + "y": 894.1124591225819, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 279.04014344843074, + "height": 0, + "seed": 2007346242, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -279.04014344843074, + 0 + ] + ] + }, + { + "type": "text", + "version": 679, + "versionNonce": 1987738782, + "isDeleted": false, + "id": "-V8am98wE-u1ZwjM5-_Dg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 833.102874915617, + "y": 934.1452029484055, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 766174, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 934, + "versionNonce": 569353282, + "isDeleted": false, + "id": "pCFWl38d536W9NeeiBAFj", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1185.2789516888201, + "y": 934.1146097386056, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 476763138, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 627, + "versionNonce": 1904031966, + "isDeleted": false, + "id": "OAYqmOtcU81wORAuzxSWw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1160.7040332403699, + "y": 895.065711501863, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 84.25681865453203, + "seed": 1398662430, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 84.25681865453203 + ] + ] + }, + { + "type": "text", + "version": 878, + "versionNonce": 1521863682, + "isDeleted": false, + "id": "sc6Al_aPs279jhxFkrLtM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1091.446447122361, + "y": 1002.3719204352936, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 317, + "height": 24, + "seed": 517968222, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Label: \"needs reproduction\"", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Label: \"needs reproduction\"" + }, + { + "type": "text", + "version": 720, + "versionNonce": 761163038, + "isDeleted": false, + "id": "K0mUQrR_xWSMwnC7n3pLQ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 816.9313570364943, + "y": 1018.9264620518948, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 129, + "height": 48, + "seed": 501331358, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 20, + "fontFamily": 3, + "text": "Is actually\na bug?", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Is actually\na bug?" + }, + { + "type": "text", + "version": 1046, + "versionNonce": 803273666, + "isDeleted": false, + "id": "kWwkE1CtF3bPL1IrH3nsI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1099.946447122361, + "y": 1039.3719204352938, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 300, + "height": 38, + "seed": 1254767518, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776, + "fontSize": 16, + "fontFamily": 3, + "text": "bot will auto close if no update\nhas been made in 3 days", + "baseline": 34, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "bot will auto close if no update\nhas been made in 3 days" + }, + { + "type": "diamond", + "version": 609, + "versionNonce": 2005866846, + "isDeleted": false, + "id": "EjTMjKTsLZaR41AMwsmNy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 738.0549110869475, + "y": 437.7577182641384, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 1803796226, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "diamond", + "version": 511, + "versionNonce": 1603285890, + "isDeleted": false, + "id": "VfIJSVxD9gou9yN2KDONV", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 737.267516577932, + "y": 701.1041262900818, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 1344307614, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "diamond", + "version": 544, + "versionNonce": 1197489566, + "isDeleted": false, + "id": "HSSomUo5enDAFinc7SLgD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 736.3807241251018, + "y": 962.0097866674403, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 1448404318, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "rectangle", + "version": 570, + "versionNonce": 201487170, + "isDeleted": false, + "id": "ngwqQYNo3Yjj_Nkg3D99a", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1055.3127650148108, + "y": 739.5802175412433, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 275.3695193143709, + "height": 82.49906843870326, + "seed": 1214881218, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "rectangle", + "version": 682, + "versionNonce": 33741278, + "isDeleted": false, + "id": "nnx4AoKQIT9eP622eJ9AD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1055.3127650148108, + "y": 981.0741934448577, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 389.2673642151006, + "height": 117.43882747484807, + "seed": 177151390, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455776 + }, + { + "type": "line", + "version": 618, + "versionNonce": 932625154, + "isDeleted": false, + "id": "UbhoavCtdEmARfulbxS6B", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 881.5581485734253, + "y": 1123.5920490269261, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 2065819586, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455776, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 914, + "versionNonce": 1049095710, + "isDeleted": false, + "id": "UL7ZiIflZEl47HrMlp-IL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1638.7841025144658, + "y": 1155.1594471460483, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 757.3708391204892, + "height": 0, + "seed": 774040926, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -757.3708391204892, + 0 + ] + ] + }, + { + "type": "text", + "version": 751, + "versionNonce": 1087113922, + "isDeleted": false, + "id": "74qsx9VEJNHwAn5Hw1_WD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 832.5836586389375, + "y": 1195.192190971872, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 1809031042, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 976, + "versionNonce": 165706334, + "isDeleted": false, + "id": "-1ioc8tEbSPtI5ozdVi75", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1663.7900384424438, + "y": 1195.1312947317692, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 609849758, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 872, + "versionNonce": 1581343362, + "isDeleted": false, + "id": "mspcCj6jasZd4jMwqcYrg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1639.18481696369, + "y": 1156.1126995253296, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 74.0498029861119, + "seed": 351821634, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 74.0498029861119 + ] + ] + }, + { + "type": "text", + "version": 1111, + "versionNonce": 719158942, + "isDeleted": false, + "id": "f267tX8JXETN_7f-dFfC7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 769.9139104197111, + "y": 1245.010365053955, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 376, + "height": 24, + "seed": 1304375902, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "1. Remove \"pending triage\" label", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "1. Remove \"pending triage\" label" + }, + { + "type": "rectangle", + "version": 988, + "versionNonce": 448119362, + "isDeleted": false, + "id": "vcDVvtyx6f0Wn0KbHWHvM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 735.280228312161, + "y": 1225.2999396508208, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 460.69593564367204, + "height": 252.52898004072858, + "seed": 1915041438, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "text", + "version": 1193, + "versionNonce": 1714420446, + "isDeleted": false, + "id": "kCXoBQ8uydHh5UHMAVmsY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 769.9139104197111, + "y": 1289.5272898961812, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 212, + "height": 24, + "seed": 685064322, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "2. Add \"bug\" label", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "2. Add \"bug\" label" + }, + { + "type": "text", + "version": 1326, + "versionNonce": 1359489538, + "isDeleted": false, + "id": "ISJ9XbIqLfUQiNlZWuJlb", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 768.3266088324094, + "y": 1333.1721497092653, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 363, + "height": 72, + "seed": 875452290, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "3. Add related feature label if\n applicable (e.g. \"bug: ssr\"\n or \"plugin: vue\")", + "baseline": 67, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "3. Add related feature label if\n applicable (e.g. \"bug: ssr\"\n or \"plugin: vue\")" + }, + { + "type": "text", + "version": 1425, + "versionNonce": 1114173214, + "isDeleted": false, + "id": "o5xZIQge3zU5dqWbKuNe4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 768.3266088324094, + "y": 1427.2991338362494, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 388, + "height": 24, + "seed": 1678453826, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "4. Add priority label (see below)", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "4. Add priority label (see below)" + }, + { + "type": "text", + "version": 903, + "versionNonce": 674732482, + "isDeleted": false, + "id": "VzxxMS2qarD3kj7kwWJeo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1551.664548833127, + "y": 1289.5705520867325, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 176, + "height": 48, + "seed": 478062082, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "Is the behavior\nintended?", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Is the behavior\nintended?" + }, + { + "type": "diamond", + "version": 699, + "versionNonce": 1274633054, + "isDeleted": false, + "id": "5K7ULA43_7XI_Lbw38zmI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1494.6139159217344, + "y": 1232.653876702278, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 1822962462, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "text", + "version": 928, + "versionNonce": 258150786, + "isDeleted": false, + "id": "eyAyR-XwXjgrYdlkC6Og3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 805.3540409843638, + "y": 1555.4084520993458, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 152, + "height": 72, + "seed": 1243657054, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "Does the\nbug make Vite\nunusable?", + "baseline": 67, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Does the\nbug make Vite\nunusable?" + }, + { + "type": "diamond", + "version": 705, + "versionNonce": 1496465310, + "isDeleted": false, + "id": "zS7O1N2taRTf739KkKDb0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 736.3034080729711, + "y": 1510.4917767148913, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 1811757442, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "line", + "version": 742, + "versionNonce": 969511234, + "isDeleted": false, + "id": "US-PSZA6_UT_z_spAryVq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 881.0553396856625, + "y": 1477.9512520454418, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 34.31975968008919, + "seed": 717559134, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 34.31975968008919 + ] + ] + }, + { + "type": "line", + "version": 814, + "versionNonce": 1313119198, + "isDeleted": false, + "id": "h3nfhOKNfGpCZMs8_nP8b", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1642.5139379373118, + "y": 1392.7900933483634, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 30.545426859719328, + "seed": 1953011010, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 30.545426859719328 + ] + ] + }, + { + "type": "line", + "version": 1118, + "versionNonce": 449452290, + "isDeleted": false, + "id": "QjjbF35QLBSjRh2Uhiq4e", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1847.409196206294, + "y": 1424.357491467486, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 409.7726291513309, + "height": 0, + "seed": 1409800158, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -409.7726291513309, + 0 + ] + ] + }, + { + "type": "text", + "version": 915, + "versionNonce": 1631678494, + "isDeleted": false, + "id": "FRAEyymDWFym3AmT-mQdc", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1802.1397672002695, + "y": 1394.857175557787, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 1128082462, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 838, + "versionNonce": 1642309826, + "isDeleted": false, + "id": "CDq3V6c7Pmbpwxe4acXk5", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1846.1406063275767, + "y": 1425.3107438467669, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 42.26804123711344, + "seed": 2073144514, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 42.26804123711344 + ] + ] + }, + { + "type": "text", + "version": 1149, + "versionNonce": 1578744926, + "isDeleted": false, + "id": "hM1wTAvGc1wtJsLf0i7Kf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1705.3908622494707, + "y": 1489.6169527801976, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 282, + "height": 24, + "seed": 20838494, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "Keep open for discussion", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Keep open for discussion" + }, + { + "type": "text", + "version": 1326, + "versionNonce": 1991590018, + "isDeleted": false, + "id": "fbQ5BH5Mm4CFml4NHSw9n", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1709.8908622494707, + "y": 1526.6169527801976, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 273, + "height": 19, + "seed": 366689438, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "Remove \"pending triage\" label", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Remove \"pending triage\" label" + }, + { + "type": "line", + "version": 991, + "versionNonce": 1788772510, + "isDeleted": false, + "id": "MS1ddNWaIQ5MEW6BHgdIo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1437.4406369309029, + "y": 1426.8510831378217, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 42.26804123711344, + "seed": 1072557086, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 42.26804123711344 + ] + ] + }, + { + "type": "text", + "version": 1185, + "versionNonce": 1962795074, + "isDeleted": false, + "id": "0qyN9aJ3ZVkpqPkKuy_fS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1337.2462614139467, + "y": 1489.5018785478514, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 200, + "height": 24, + "seed": 552182530, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 20, + "fontFamily": 3, + "text": "Explain and close", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Explain and close" + }, + { + "type": "text", + "version": 1359, + "versionNonce": 1249950942, + "isDeleted": false, + "id": "_RMV2vqzS5jLLOkBklyf3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1328.7462614139467, + "y": 1526.5018785478514, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 217, + "height": 19, + "seed": 1983350302, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "point to docs if needed", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "point to docs if needed" + }, + { + "type": "rectangle", + "version": 1033, + "versionNonce": 681347074, + "isDeleted": false, + "id": "tO_0BspEaH0efc-UgMWhM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1281.8598911343533, + "y": 1468.2041515574156, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 310.7727405591866, + "height": 101.30979521678366, + "seed": 1333916354, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "text", + "version": 986, + "versionNonce": 592539934, + "isDeleted": false, + "id": "ggYg6ky4YdpuaDP4UQ-GM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1459.1969387686004, + "y": 1396.3068525502197, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 1126673054, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "rectangle", + "version": 1213, + "versionNonce": 160446402, + "isDeleted": false, + "id": "Si230clokwDoUey4FowxX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1668.961481217189, + "y": 1469.4055183326752, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 354.8587620645635, + "height": 101.30979521678366, + "seed": 345483230, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "line", + "version": 675, + "versionNonce": 1082236254, + "isDeleted": false, + "id": "Wg6zEEc2hZHw309saLOjA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 882.6534155876153, + "y": 1671.162110835381, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 775120350, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 886, + "versionNonce": 938995586, + "isDeleted": false, + "id": "KwcnA5g6GzWSfwNGWT2zQ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1452.906386425121, + "y": 1702.7295089545037, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 570.3978560169538, + "height": 0, + "seed": 226815746, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455777, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -570.3978560169538, + 0 + ] + ] + }, + { + "type": "text", + "version": 807, + "versionNonce": 1466057118, + "isDeleted": false, + "id": "VX-xsCbPecgdaJ41sJs5G", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 838.6789256531275, + "y": 1742.7622527803273, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 751237662, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 898, + "versionNonce": 1576022786, + "isDeleted": false, + "id": "yHflVaBJQqmGQRkR9GXOe", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 765.0074077740048, + "y": 1815.543511883816, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 234, + "height": 72, + "seed": 97094302, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948755258, + "fontSize": 20, + "fontFamily": 3, + "text": "Does the bug\naffects the majority\nof users?", + "baseline": 67, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Does the bug\naffects the majority\nof users?" + }, + { + "type": "diamond", + "version": 673, + "versionNonce": 1260674526, + "isDeleted": false, + "id": "RfN8aFfNbf6juWW5DWt6M", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 736.9567748626122, + "y": 1770.6268364993616, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 532317918, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455777 + }, + { + "type": "line", + "version": 823, + "versionNonce": 775911170, + "isDeleted": false, + "id": "muvErataGmDyY0E5WCO-1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 882.9166281024866, + "y": 1933.6215702948407, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 1826686366, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 981, + "versionNonce": 1893265950, + "isDeleted": false, + "id": "HsO3NfLz8GC4Dz7iQIKkD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1089.8528549664418, + "y": 1965.1889684139633, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 207.08111204340355, + "height": 0, + "seed": 298986306, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -207.08111204340355, + 0 + ] + ] + }, + { + "type": "text", + "version": 961, + "versionNonce": 1526548162, + "isDeleted": false, + "id": "kgPR6NfHGPY3o5ftAF847", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 832.9421381679988, + "y": 2005.221712239787, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 1277862366, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 1100, + "versionNonce": 1399914078, + "isDeleted": false, + "id": "MafZIHtvFdt6Znj_rF3o4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1113.6939725169598, + "y": 2003.1608159996838, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 1521447682, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 951, + "versionNonce": 384507522, + "isDeleted": false, + "id": "CKWqmxPG_A6nwwP-Qmfce", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1090.5432964927518, + "y": 1964.6270692780927, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.9389053628438, + "seed": 7779870, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.9389053628438 + ] + ] + }, + { + "type": "text", + "version": 1290, + "versionNonce": 2008908446, + "isDeleted": false, + "id": "jFG-MF9igR98DJ-5OzIso", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 786.7396231515502, + "y": 2056.7331392238157, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 118, + "height": 24, + "seed": 981243074, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 20, + "fontFamily": 3, + "text": "p5: urgent", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p5: urgent" + }, + { + "type": "rectangle", + "version": 1160, + "versionNonce": 247987778, + "isDeleted": false, + "id": "eHAFrOXDQ9bl6njKEHOO3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 741.1108286295326, + "y": 2033.9873325245144, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 209.257589044035, + "height": 69.49161339860213, + "seed": 626044034, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778 + }, + { + "type": "text", + "version": 1405, + "versionNonce": 544177886, + "isDeleted": false, + "id": "QfpGXu6cKkYc0l3P3kSbI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1053.0691719277108, + "y": 2056.9149574056346, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 153, + "height": 24, + "seed": 1774456990, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 20, + "fontFamily": 3, + "text": "p4: important", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p4: important" + }, + { + "type": "rectangle", + "version": 1277, + "versionNonce": 2138236418, + "isDeleted": false, + "id": "IKZeMSoWRnegv9VYaXQ46", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1012.8191652844812, + "y": 2034.1691507063333, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 233.5000132864592, + "height": 69.49161339860213, + "seed": 280580162, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778 + }, + { + "type": "line", + "version": 649, + "versionNonce": 303559454, + "isDeleted": false, + "id": "nU4yBZdIQUUj3iFUrAKSS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1163.7694127003945, + "y": 634.5772159715862, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 279.04014344843074, + "height": 0, + "seed": 476863362, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -279.04014344843074, + 0 + ] + ] + }, + { + "type": "text", + "version": 915, + "versionNonce": 837473730, + "isDeleted": false, + "id": "dPbyUUnJ74BiBtR08NNNr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1184.666650361036, + "y": 660.9733059815493, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 1941607838, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "line", + "version": 628, + "versionNonce": 1462230878, + "isDeleted": false, + "id": "CBYnQSD2RkkXY-KjUY9XS", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1163.5008228216768, + "y": 635.5304683508673, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 102.89551452317858, + "seed": 723098434, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 102.89551452317858 + ] + ] + }, + { + "type": "line", + "version": 1021, + "versionNonce": 2001653122, + "isDeleted": false, + "id": "l8yR5sBqXptSOVbigUPqh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1454.4330956470337, + "y": 1700.4575046257976, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 71.34763447797354, + "seed": 1398920734, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 71.34763447797354 + ] + ] + }, + { + "type": "text", + "version": 1146, + "versionNonce": 66077598, + "isDeleted": false, + "id": "oQa8WA77NVi3AEKLqB4nT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1411.958605712546, + "y": 1742.932439382468, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 1826923202, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "text", + "version": 1254, + "versionNonce": 618515778, + "isDeleted": false, + "id": "nPokHFX6K-pxacGCTVYh7", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1365.787087833423, + "y": 1815.7136984859567, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 176, + "height": 72, + "seed": 993878622, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 20, + "fontFamily": 3, + "text": "Are there\nworkarounds for\nthe bug?", + "baseline": 67, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Are there\nworkarounds for\nthe bug?" + }, + { + "type": "diamond", + "version": 1004, + "versionNonce": 2057445342, + "isDeleted": false, + "id": "lsD6TTbP-wED13SQGEYfA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1308.7364549220304, + "y": 1770.7970231015022, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 730266242, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778 + }, + { + "type": "line", + "version": 1154, + "versionNonce": 267834626, + "isDeleted": false, + "id": "Un2yWLkc5__AjClolDNQC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1454.6963081619049, + "y": 1933.7917568969813, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 100.47284166624985, + "seed": 1885169310, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 100.47284166624985 + ] + ] + }, + { + "type": "line", + "version": 1336, + "versionNonce": 793670686, + "isDeleted": false, + "id": "3wTe3JwvBpm607Y1XB2m3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1726.916387113522, + "y": 1965.3591550161034, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 272.36496413106465, + "height": 0, + "seed": 1535662658, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -272.36496413106465, + 0 + ] + ] + }, + { + "type": "text", + "version": 1292, + "versionNonce": 169403586, + "isDeleted": false, + "id": "pMnpI2Mh04kP31FrMqvFa", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1404.721818227417, + "y": 2005.391898841927, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 1131602654, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 1450, + "versionNonce": 1810251870, + "isDeleted": false, + "id": "OcbZ7xCL2DhsyqpBsDsC1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1748.4736525763788, + "y": 2003.3310026018241, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 197640706, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 1301, + "versionNonce": 1558379650, + "isDeleted": false, + "id": "VShYhytzLb0pAjVSz_nlX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1725.322976552171, + "y": 1964.7972558802328, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.9389053628438, + "seed": 1192154910, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641948455778, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.9389053628438 + ] + ] + }, + { + "type": "text", + "version": 1642, + "versionNonce": 339379358, + "isDeleted": false, + "id": "x9tibphUwKZc-RUn7QLZL", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1350.9132426049077, + "y": 2056.903325825955, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 212, + "height": 24, + "seed": 390345154, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 20, + "fontFamily": 3, + "text": "p2: has workaround", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p2: has workaround" + }, + { + "type": "rectangle", + "version": 1536, + "versionNonce": 1175723074, + "isDeleted": false, + "id": "yQ1aFpIR9EQqb7VNHXXf8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1311.3753571737996, + "y": 2034.1575191266538, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 291.0757708622167, + "height": 69.49161339860213, + "seed": 329401182, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778 + }, + { + "type": "text", + "version": 1777, + "versionNonce": 1778139358, + "isDeleted": false, + "id": "_SRs00rbZEDk1zn6_Vvzg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1699.84885198713, + "y": 2057.085144007774, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 153, + "height": 24, + "seed": 555526530, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778, + "fontSize": 20, + "fontFamily": 3, + "text": "p3: minor bug", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "p3: minor bug" + }, + { + "type": "rectangle", + "version": 1623, + "versionNonce": 1938506754, + "isDeleted": false, + "id": "6dcJQjVFo_xqCMRkmOoSZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1659.5988453439004, + "y": 2034.3393373084728, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 233.5000132864592, + "height": 69.49161339860213, + "seed": 192817054, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641948455778 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/.github/issue-workflow.png b/.github/issue-workflow.png index ee925080422023..92b1de0633c229 100644 Binary files a/.github/issue-workflow.png and b/.github/issue-workflow.png differ diff --git a/.github/pr-workflow.excalidraw b/.github/pr-workflow.excalidraw new file mode 100644 index 00000000000000..bd85d16edf1749 --- /dev/null +++ b/.github/pr-workflow.excalidraw @@ -0,0 +1,1954 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "diamond", + "version": 264, + "versionNonce": 290598110, + "isDeleted": false, + "id": "sQbLVqjpgdZXg0DrdESrv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 735.9493670886075, + "y": 178.5833246155455, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 290.1012658227851, + "height": 161.833350768909, + "seed": 177114754, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086786 + }, + { + "type": "text", + "version": 205, + "versionNonce": 98179074, + "isDeleted": false, + "id": "Zo2OUf2C5ZeVhoM2q7Uni", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 816, + "y": 235.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 130, + "height": 48, + "seed": 478396126, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086786, + "fontSize": 20, + "fontFamily": 3, + "text": "Bug fix\nor feature?", + "baseline": 43, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Bug fix\nor feature?" + }, + { + "type": "text", + "version": 549, + "versionNonce": 2016741122, + "isDeleted": false, + "id": "-w-lI8s8rNBbK0EDBgrjg", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 342.29080030842067, + "y": 499.5156029443476, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 246, + "height": 96, + "seed": 1427727810, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086786, + "fontSize": 20, + "fontFamily": 3, + "text": "Is a \"strict fix\"\ni.e. fixes an obvious\noversight with no\nside effects?", + "baseline": 91, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Is a \"strict fix\"\ni.e. fixes an obvious\noversight with no\nside effects?" + }, + { + "type": "diamond", + "version": 608, + "versionNonce": 2122822558, + "isDeleted": false, + "id": "EjTMjKTsLZaR41AMwsmNy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 272.6763813887976, + "y": 440.0654105718307, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 385.22883783924595, + "height": 214.90038474503385, + "seed": 1803796226, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086786 + }, + { + "type": "line", + "version": 1246, + "versionNonce": 1051442078, + "isDeleted": false, + "id": "YDKz6FIMNIlyOXN9eOsmk", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 698.1506535081975, + "y": 685.3181565485763, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 456.28561526150804, + "height": 0, + "seed": 1533033346, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086787, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -456.28561526150804, + 0 + ] + ] + }, + { + "type": "text", + "version": 1237, + "versionNonce": 1279345538, + "isDeleted": false, + "id": "2GhSpfbAxb6KdwUH_dCib", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 282.112356568573, + "y": 645.8893619128614, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 19, + "seed": 913618334, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947344672, + "fontSize": 16, + "fontFamily": 3, + "text": "YES", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "YES" + }, + { + "type": "text", + "version": 1432, + "versionNonce": 1617063170, + "isDeleted": false, + "id": "8im9pL5oJz7NQJ8NLgnRe", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 639.4795755329188, + "y": 645.3669272112203, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 20, + "height": 19, + "seed": 546405186, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947336848, + "fontSize": 16, + "fontFamily": 3, + "text": "NO", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "NO" + }, + { + "type": "line", + "version": 1227, + "versionNonce": 42851586, + "isDeleted": false, + "id": "k4djJr0-qduIuEKzBQYCv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 700.6365918164028, + "y": 684.7562574127057, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.9389053628438, + "seed": 130568670, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086788, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.9389053628438 + ] + ] + }, + { + "type": "text", + "version": 1557, + "versionNonce": 462154782, + "isDeleted": false, + "id": "qHmyXdhasjA8eOdNVyBIr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.83291847520127, + "y": 776.8623273584287, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 282, + "height": 24, + "seed": 1964716162, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Verify the fix locally", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Verify the fix locally" + }, + { + "type": "rectangle", + "version": 1566, + "versionNonce": 613346498, + "isDeleted": false, + "id": "j--1q7-LLu6zXaPFAqLAC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 100.20412395318385, + "y": 754.1165206591274, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 457.25758904403494, + "height": 167.4916133986022, + "seed": 1558079006, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "9-0M_bcCrbauwjYk_9TfT", + "type": "arrow" + }, + { + "id": "HTv335lYKWtnkrIwtHQku", + "type": "arrow" + }, + { + "id": "aKq8DF78DWjpCfemhb5XX", + "type": "arrow" + }, + { + "id": "I3s4dbv-i4whr70NalFut", + "type": "arrow" + } + ], + "updated": 1641947086788 + }, + { + "type": "line", + "version": 537, + "versionNonce": 964295838, + "isDeleted": false, + "id": "l0bWHJVqhs_B31UG1rxwq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 240.26983738542606, + "y": 686.1858215233636, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.93908875127318, + "seed": 1005211202, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086788, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.93908875127318 + ] + ] + }, + { + "type": "text", + "version": 1624, + "versionNonce": 816325698, + "isDeleted": false, + "id": "lnaMqZ2QkzVhowWY1bT9O", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.83291847520127, + "y": 809.8623273584287, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 247, + "height": 24, + "seed": 163010974, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + } + ], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Review code quality", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Review code quality" + }, + { + "type": "text", + "version": 1686, + "versionNonce": 680311006, + "isDeleted": false, + "id": "eI2OuvQy_x4rapowl4CAr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.83291847520127, + "y": 841.8623273584287, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 388, + "height": 24, + "seed": 1270788766, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Require test case if applicable", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Require test case if applicable" + }, + { + "type": "text", + "version": 1746, + "versionNonce": 2120109058, + "isDeleted": false, + "id": "Ab6Ypbk6c3nYNIMNKumY8", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.83291847520127, + "y": 872.8623273584287, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 353, + "height": 24, + "seed": 1963246338, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Request changes if necessary", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Request changes if necessary" + }, + { + "type": "text", + "version": 1797, + "versionNonce": 981136194, + "isDeleted": false, + "id": "d2OV-XorNMEgYi21Qgd2b", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 6.282101231183835, + "x": 286.9508930319074, + "y": 1016.6460651990882, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 83, + "height": 24, + "seed": 1674651870, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "Approve", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Approve" + }, + { + "type": "rectangle", + "version": 1945, + "versionNonce": 1968331230, + "isDeleted": false, + "id": "y3YlS22NXZHdevz-ZzYl6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 6.282101231183835, + "x": 98.80297336665012, + "y": 993.901943508281, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 456.1871867260777, + "height": 69.49161339860235, + "seed": 1540938754, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "9-0M_bcCrbauwjYk_9TfT", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + } + ], + "updated": 1641947086788 + }, + { + "id": "9-0M_bcCrbauwjYk_9TfT", + "type": "arrow", + "x": 327.0608817658424, + "y": 923.4043679975948, + "width": 1.1386196663628425, + "height": 65.95236612437759, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1731023746, + "version": 2104, + "versionNonce": 50281218, + "isDeleted": false, + "boundElements": null, + "updated": 1641947086788, + "points": [ + [ + 0, + 0 + ], + [ + -1.1386196663628425, + 65.95236612437759 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "j--1q7-LLu6zXaPFAqLAC", + "focus": 0.0012831296632707053, + "gap": 1.7962339398652034 + }, + "endBinding": { + "elementId": "y3YlS22NXZHdevz-ZzYl6", + "focus": -0.007225371302232891, + "gap": 4.546242518557165 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "text", + "version": 1787, + "versionNonce": 468151838, + "isDeleted": false, + "id": "RBx7JQHKRVEHkjai36KOM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 672.0818031973912, + "y": 777.0349540879783, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 305, + "height": 48, + "seed": 1689229150, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "Discuss the potential side\neffects of the fix, e.g.", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Discuss the potential side\neffects of the fix, e.g." + }, + { + "type": "rectangle", + "version": 1792, + "versionNonce": 186944194, + "isDeleted": false, + "id": "rwXJrcQo_SplPMRBcV5RZ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 639.4530086753738, + "y": 752.9002584997883, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 412.8131445995905, + "height": 254.99161339860223, + "seed": 826185090, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + }, + { + "id": "iECy_Q-M9rMIvIFp5TFMF", + "type": "arrow" + } + ], + "updated": 1641947086788 + }, + { + "type": "text", + "version": 1926, + "versionNonce": 1233773186, + "isDeleted": false, + "id": "8kqLvDOHHelyQUyrgia7I", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 672.0818031973912, + "y": 843.4238429768673, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 340, + "height": 72, + "seed": 2009136030, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Could it introduce implicit\n behavior changes in other\n cases?", + "baseline": 67, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Could it introduce implicit\n behavior changes in other\n cases?" + }, + { + "type": "text", + "version": 1994, + "versionNonce": 1448935070, + "isDeleted": false, + "id": "dHM9p4Gz0tOJeZIIEdL4a", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 672.0818031973912, + "y": 930.0349540879783, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 328, + "height": 48, + "seed": 496276802, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Does it introduce too much\n changes?", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Does it introduce too much\n changes?" + }, + { + "type": "text", + "version": 1980, + "versionNonce": 149832258, + "isDeleted": false, + "id": "DIdjL8bcCP67EuOMJAPGm", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.79811525412958, + "y": 1160.0947133527843, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 293, + "height": 48, + "seed": 1202955138, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "Merge if approved by 2 or\nmore team members", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Merge if approved by 2 or\nmore team members" + }, + { + "type": "rectangle", + "version": 2122, + "versionNonce": 2051814686, + "isDeleted": false, + "id": "62ZHSfzhqzsrh4dVzLQiy", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 100.16932073211217, + "y": 1136.9600177645943, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 456.5631445995905, + "height": 294.0541133986022, + "seed": 2037108126, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + }, + { + "id": "e19wFLrAWPdYqboa6YXdy", + "type": "arrow" + } + ], + "updated": 1641947126334 + }, + { + "type": "text", + "version": 2083, + "versionNonce": 1680910850, + "isDeleted": false, + "id": "V-myePWAh66gfv9Eh8hV1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.79811525412958, + "y": 1226.4836022416735, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 282, + "height": 24, + "seed": 2117591874, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Use \"Squash and Merge\"", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Use \"Squash and Merge\"" + }, + { + "type": "text", + "version": 2202, + "versionNonce": 872967966, + "isDeleted": false, + "id": "6G0ZLaH1Ke-09BHdyVaN1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.79811525412958, + "y": 1266.5322133527843, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 363, + "height": 48, + "seed": 1479479682, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- Edit commit message to follow\n convention", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Edit commit message to follow\n convention" + }, + { + "type": "text", + "version": 2340, + "versionNonce": 1571347294, + "isDeleted": false, + "id": "qgXNTKjXhHEHFMg8H_1rC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 132.79811525412958, + "y": 1332.1572133527843, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 352, + "height": 72, + "seed": 203188702, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "- In commit message body, list\n relevant issues being fixed\n e.g. \"fix #1234, fix #1235\"", + "baseline": 67, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- In commit message body, list\n relevant issues being fixed\n e.g. \"fix #1234, fix #1235\"" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow", + "x": 329.9373607609896, + "y": 1065.1741445425164, + "width": 1.830043903629985, + "height": 66.56469151842111, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 893045570, + "version": 2142, + "versionNonce": 364026114, + "isDeleted": false, + "boundElements": null, + "updated": 1641947086788, + "points": [ + [ + 0, + 0 + ], + [ + -1.830043903629985, + 66.56469151842111 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "y3YlS22NXZHdevz-ZzYl6", + "focus": -0.01765763497144198, + "gap": 1.7838626235180755 + }, + "endBinding": { + "elementId": "62ZHSfzhqzsrh4dVzLQiy", + "focus": -0.019495610197224435, + "gap": 5.221181703656839 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "text", + "version": 2067, + "versionNonce": 1193340958, + "isDeleted": false, + "id": "erEE8G8FKvYhRr0-5lMCt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 672.0818031973912, + "y": 1100.389792797655, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 341, + "height": 48, + "seed": 1659701278, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "Add priority labels\n(See issue triaging workflow)", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Add priority labels\n(See issue triaging workflow)" + }, + { + "type": "rectangle", + "version": 2040, + "versionNonce": 1807493314, + "isDeleted": false, + "id": "SsXRoiB6K85RJkG0cLHKt", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 639.4530086753738, + "y": 1077.8680004352714, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 412.8131445995905, + "height": 95.31419404376325, + "seed": 1452430430, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + } + ], + "updated": 1641947086788 + }, + { + "id": "iECy_Q-M9rMIvIFp5TFMF", + "type": "arrow", + "x": 846.1502354837385, + "y": 1009.0048773144631, + "width": 1.4724394828381264, + "height": 68.99666593246332, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 488605278, + "version": 1617, + "versionNonce": 2124284062, + "isDeleted": false, + "boundElements": null, + "updated": 1641947086788, + "points": [ + [ + 0, + 0 + ], + [ + -1.4724394828381264, + 68.99666593246332 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "rwXJrcQo_SplPMRBcV5RZ", + "focus": -0.014513930519579882, + "gap": 1.1130054160725535 + }, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "DSjLArh7-2UnOKdJGzomr", + "type": "arrow", + "x": 845.0001977768175, + "y": 1172.2951998951075, + "width": 2.652485747952369, + "height": 68.02463696164841, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1035607042, + "version": 1752, + "versionNonce": 1119248450, + "isDeleted": false, + "boundElements": null, + "updated": 1641947086788, + "points": [ + [ + 0, + 0 + ], + [ + -2.652485747952369, + 68.02463696164841 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "LgjfqFPAEinqw-48hD1DU", + "focus": -0.01634796150004538, + "gap": 2.064292610773464 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "text", + "version": 2141, + "versionNonce": 848313566, + "isDeleted": false, + "id": "MWIPixVB7po50KFcFrK-t", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 720.7466777493628, + "y": 1266.7509039087658, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 247, + "height": 24, + "seed": 1252032606, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086788, + "fontSize": 20, + "fontFamily": 3, + "text": "Await input from Evan", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Await input from Evan" + }, + { + "type": "rectangle", + "version": 2154, + "versionNonce": 725944322, + "isDeleted": false, + "id": "LgjfqFPAEinqw-48hD1DU", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 637.8401054495674, + "y": 1242.3841294675294, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 412.8131445995905, + "height": 72.73354888247324, + "seed": 233618562, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + }, + { + "id": "iECy_Q-M9rMIvIFp5TFMF", + "type": "arrow" + }, + { + "id": "DSjLArh7-2UnOKdJGzomr", + "type": "arrow" + } + ], + "updated": 1641947086788 + }, + { + "id": "I3s4dbv-i4whr70NalFut", + "type": "arrow", + "x": 845.5170912834428, + "y": 1314.944326268947, + "width": 284, + "height": 498.0232558139535, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1762514946, + "version": 1327, + "versionNonce": 1869864414, + "isDeleted": false, + "boundElements": null, + "updated": 1641947086788, + "points": [ + [ + 0, + 0 + ], + [ + -18.83720930232562, + 38.348837209302474 + ], + [ + -120, + 41.02325581395348 + ], + [ + -224, + 36.186046511627865 + ], + [ + -248, + -11 + ], + [ + -250, + -93 + ], + [ + -249, + -183 + ], + [ + -247, + -268 + ], + [ + -247, + -347 + ], + [ + -251.48837209302337, + -437.3023255813954 + ], + [ + -284, + -457 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "j--1q7-LLu6zXaPFAqLAC", + "focus": -0.5439174079059673, + "gap": 4.055378286224027 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "text", + "version": 1865, + "versionNonce": 1950155422, + "isDeleted": false, + "id": "JoRpLjElVazgNFj4cZiqq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1164.7661471371505, + "y": 463.66908277859034, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 317, + "height": 24, + "seed": 1605394654, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086789, + "fontSize": 20, + "fontFamily": 3, + "text": "- Discuss feature necessity", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Discuss feature necessity" + }, + { + "type": "rectangle", + "version": 1868, + "versionNonce": 886994718, + "isDeleted": false, + "id": "6f4EO1ZMWYeKarDz8375U", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1132.137352615133, + "y": 439.53438719040014, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 425.1208369072829, + "height": 279.60699801398687, + "seed": 2057905154, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + }, + { + "id": "iECy_Q-M9rMIvIFp5TFMF", + "type": "arrow" + }, + { + "id": "Tz2EigpQnKb294z7ILDj_", + "type": "arrow" + } + ], + "updated": 1641947090794 + }, + { + "type": "text", + "version": 2048, + "versionNonce": 1627324126, + "isDeleted": false, + "id": "o7tqZAe2UwoTuGvhH7EIu", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1164.7661471371505, + "y": 501.05797166747925, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 293, + "height": 48, + "seed": 988583198, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086789, + "fontSize": 20, + "fontFamily": 3, + "text": "- Is this the best way to\n address the need?", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Is this the best way to\n address the need?" + }, + { + "type": "text", + "version": 2082, + "versionNonce": 1906009602, + "isDeleted": false, + "id": "MWLzSueAo93vByEHBi54p", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1164.7661471371505, + "y": 564.6690827785903, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 247, + "height": 24, + "seed": 1190884638, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086789, + "fontSize": 20, + "fontFamily": 3, + "text": "- Review code quality", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Review code quality" + }, + { + "type": "line", + "version": 465, + "versionNonce": 347566878, + "isDeleted": false, + "id": "ZqgvD11xSG3hXxpGNqSFO", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 465.3990233049102, + "y": 653.9851862944989, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 31.92990562768, + "seed": 1751912450, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086789, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 31.92990562768 + ] + ] + }, + { + "type": "line", + "version": 1467, + "versionNonce": 836128066, + "isDeleted": false, + "id": "kgReLARaeJtWLIucHDGFT", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1294.4362354574944, + "y": 371.9077923147119, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 831.391216879718, + "height": 0, + "seed": 122656158, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086789, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -831.391216879718, + 0 + ] + ] + }, + { + "type": "text", + "version": 1268, + "versionNonce": 1611760450, + "isDeleted": false, + "id": "BWA8XBcQGAcRC30wZHVzw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 500.83079843812163, + "y": 331.9405361405356, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 67, + "height": 19, + "seed": 122985282, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947346511, + "fontSize": 16, + "fontFamily": 3, + "text": "BUG FIX", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "BUG FIX" + }, + { + "type": "text", + "version": 1416, + "versionNonce": 836155870, + "isDeleted": false, + "id": "pDZYx50Ve5EU9-dHrW3yB", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1190.3134020178518, + "y": 331.4181014388942, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 67, + "height": 19, + "seed": 977744350, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947305581, + "fontSize": 16, + "fontFamily": 3, + "text": "FEATURE", + "baseline": 15, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "FEATURE" + }, + { + "type": "line", + "version": 1233, + "versionNonce": 640545822, + "isDeleted": false, + "id": "jr3dxD_dUYR4pXR-X_uoJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1293.8165721474898, + "y": 369.8074316403798, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.9389053628438, + "seed": 1449386754, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086789, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.9389053628438 + ] + ] + }, + { + "type": "line", + "version": 547, + "versionNonce": 317809858, + "isDeleted": false, + "id": "6P3oUr3EUMyTRa_-kJeNw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 465.4498177165133, + "y": 371.2369957510378, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 68.93908875127318, + "seed": 478234142, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086789, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 68.93908875127318 + ] + ] + }, + { + "type": "line", + "version": 431, + "versionNonce": 1523957854, + "isDeleted": false, + "id": "Sl75qgdjG_g3QRVYYwaRC", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 882.5790036359972, + "y": 339.03636052217286, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 31.92990562768, + "seed": 1538536130, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947086789, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 31.92990562768 + ] + ] + }, + { + "type": "text", + "version": 2118, + "versionNonce": 2033845406, + "isDeleted": false, + "id": "IbwDGf9_heqir9YyW_RVW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1164.7661471371505, + "y": 604.6690827785903, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 235, + "height": 24, + "seed": 413268510, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947086789, + "fontSize": 20, + "fontFamily": 3, + "text": "- Add feature labels", + "baseline": 19, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Add feature labels" + }, + { + "type": "text", + "version": 2210, + "versionNonce": 283705950, + "isDeleted": false, + "id": "YtIpxbcQQVbCSbV3q4QPH", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1164.7661471371505, + "y": 643.6690827785903, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 352, + "height": 48, + "seed": 665408450, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947089307, + "fontSize": 20, + "fontFamily": 3, + "text": "- Approve if you feel strongly\n that the feature is needed", + "baseline": 43, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- Approve if you feel strongly\n that the feature is needed" + }, + { + "type": "text", + "version": 2288, + "versionNonce": 1621749214, + "isDeleted": false, + "id": "_QI4-CZIy_nABUPn3RB7r", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1215.4374848433713, + "y": 814.0677609737774, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 247, + "height": 24, + "seed": 742373086, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [], + "updated": 1641947099203, + "fontSize": 20, + "fontFamily": 3, + "text": "Await input from Evan", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "Await input from Evan" + }, + { + "type": "rectangle", + "version": 2314, + "versionNonce": 2055471326, + "isDeleted": false, + "id": "cQeOM81IMRmQYPfSNDc_w", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1132.530912543576, + "y": 789.7009865325405, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 426.65929844574435, + "height": 72.73354888247324, + "seed": 31600130, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElements": [ + { + "id": "DNNnCdMRNJwMdJ9kccYg5", + "type": "arrow" + }, + { + "id": "BsVtWjyNfAaTD2juDwo4y", + "type": "arrow" + }, + { + "id": "B_fXkAEkXbcQLinuLeg3e", + "type": "arrow" + }, + { + "id": "UfG_juqIBi1ZgfOvHtTUA", + "type": "arrow" + }, + { + "id": "iECy_Q-M9rMIvIFp5TFMF", + "type": "arrow" + }, + { + "id": "DSjLArh7-2UnOKdJGzomr", + "type": "arrow" + }, + { + "id": "Tz2EigpQnKb294z7ILDj_", + "type": "arrow" + }, + { + "id": "e19wFLrAWPdYqboa6YXdy", + "type": "arrow" + } + ], + "updated": 1641947126334 + }, + { + "type": "arrow", + "version": 1719, + "versionNonce": 806769858, + "isDeleted": false, + "id": "Tz2EigpQnKb294z7ILDj_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 90, + "angle": 0, + "x": 1348.6842784701294, + "y": 721.2617356998531, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 1.5984643496256012, + "height": 64.5218005954606, + "seed": 1293204318, + "groupIds": [], + "strokeSharpness": "round", + "boundElements": [], + "updated": 1641947103757, + "startBinding": { + "elementId": "6f4EO1ZMWYeKarDz8375U", + "focus": -0.034730097781564113, + "gap": 2.120350495466141 + }, + "endBinding": { + "elementId": "cQeOM81IMRmQYPfSNDc_w", + "focus": 0.0010607736883342003, + "gap": 3.91745023722666 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -1.5984643496256012, + 64.5218005954606 + ] + ] + }, + { + "id": "e19wFLrAWPdYqboa6YXdy", + "type": "arrow", + "x": 1351.2451771510634, + "y": 863.4523763583926, + "width": 784.6153846153845, + "height": 527.6923076923077, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "round", + "seed": 978982046, + "version": 477, + "versionNonce": 1389609758, + "isDeleted": false, + "boundElements": null, + "updated": 1641947142555, + "points": [ + [ + 0, + 0 + ], + [ + -3.0769230769230944, + 424.61538461538464 + ], + [ + -16.923076923076906, + 515.3846153846151 + ], + [ + -118.46153846153834, + 526.1538461538461 + ], + [ + -593.8461538461538, + 526.1538461538461 + ], + [ + -784.6153846153845, + 527.6923076923077 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "cQeOM81IMRmQYPfSNDc_w", + "focus": -0.026477991878603318, + "gap": 1.0178409433789852 + }, + "endBinding": { + "elementId": "62ZHSfzhqzsrh4dVzLQiy", + "focus": 0.7327187841855894, + "gap": 9.89732720397626 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/.github/pr-workflow.png b/.github/pr-workflow.png index 83ac8108bc72c8..3d097dc47cfeca 100644 Binary files a/.github/pr-workflow.png and b/.github/pr-workflow.png differ diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 763dfcfc467d9d..06fe0e7ea2aaff 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -28,6 +28,7 @@ "react-router", // `react-router:v6.0.0+` has breaking changes "react-router-dom", // `react-router-dom:v6.0.0+` has breaking changes "source-map", // `source-map:v0.7.0+` needs more investigation + "dotenv-expand", // `dotenv-expand:6.0.0+` has breaking changes (#6858) // ESM Only => https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-move-my-commonjs-project-to-esm "node-fetch", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64166e7158caf3..cde7dfb03825ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ on: - main - release/* - feat/* + - fix/* + - perf/* pull_request: workflow_dispatch: @@ -20,6 +22,7 @@ concurrency: jobs: build: + timeout-minutes: 20 runs-on: ${{ matrix.os }} strategy: matrix: @@ -35,7 +38,7 @@ jobs: name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}" steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install pnpm uses: pnpm/action-setup@v2 @@ -43,7 +46,7 @@ jobs: version: 6 - name: Set node version to ${{ matrix.node_version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} cache: "pnpm" @@ -67,10 +70,11 @@ jobs: run: pnpm run test-build -- --runInBand lint: + timeout-minutes: 10 runs-on: ubuntu-latest name: "Lint: node-16, ubuntu-latest" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -80,7 +84,7 @@ jobs: version: 6 - name: Set node version to 16 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16 cache: "pnpm" diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml index 02ac374b06c426..97f9dd3a449c3c 100644 --- a/.github/workflows/issue-close-require.yml +++ b/.github/workflows/issue-close-require.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: need reproduction - uses: actions-cool/issues-helper@v2 + uses: actions-cool/issues-helper@v3 with: actions: "close-issues" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml index a63021952fd73d..b6f3919dfa63a2 100644 --- a/.github/workflows/issue-labeled.yml +++ b/.github/workflows/issue-labeled.yml @@ -10,7 +10,7 @@ jobs: steps: - name: contribution welcome if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted' - uses: actions-cool/issues-helper@v2 + uses: actions-cool/issues-helper@v3 with: actions: "create-comment, remove-labels" token: ${{ secrets.GITHUB_TOKEN }} @@ -21,7 +21,7 @@ jobs: - name: remove pending if: github.event.label.name == 'enhancement' || github.event.label.name == 'bug' || (contains(github.event.label.name, 'pending triage') == false && startsWith(github.event.label.name, 'bug:') == true) - uses: actions-cool/issues-helper@v2 + uses: actions-cool/issues-helper@v3 with: actions: "remove-labels" token: ${{ secrets.GITHUB_TOKEN }} @@ -30,7 +30,7 @@ jobs: - name: need reproduction if: github.event.label.name == 'need reproduction' - uses: actions-cool/issues-helper@v2 + uses: actions-cool/issues-helper@v3 with: actions: "create-comment, remove-labels" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index e20c3e3c8e8138..1f24f316952ea0 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -11,11 +11,11 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2 + - uses: dessant/lock-threads@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} - issue-lock-inactive-days: "14" - #issue-lock-comment: | + issue-inactive-days: "14" + #issue-comment: | # This issue has been locked since it has been closed for more than 14 days. # # If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions). diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000000000..c58c28adac7b40 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +name: Publish Package + +on: + push: + tags: + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + - "plugin-*" # Push events to matching plugin-*, i.e. plugin-(vue|vue-jsx|react|legacy)@1.0.0 + - "create-vite*" # # Push events to matching create-vite*, i.e. create-vite@1.0.0 + +jobs: + publish: + # prevents this action from running on forks + if: github.repository == 'vitejs/vite' + runs-on: ubuntu-latest + environment: Release + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 6 + + - name: Set node version to 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org/ + cache: "pnpm" + + - name: Install deps + run: pnpm install + + - name: Creating .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish package + run: pnpm run ci-publish -- ${{ github.ref_name }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 5ed9495899340a..21af4792d4741a 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -1,4 +1,4 @@ -name: release +name: Add GitHub Release Tag on: push: @@ -13,7 +13,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get pkgName for tag id: tag diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000000000..4abbb42e5ef159 --- /dev/null +++ b/.npmrc @@ -0,0 +1,7 @@ +hoist-pattern[]=*eslint* +hoist-pattern[]=*babel* +hoist-pattern[]=*jest* +hoist-pattern[]=@emotion/* +hoist-pattern[]=postcss +hoist-pattern[]=pug +hoist-pattern[]=source-map-support diff --git a/.prettierignore b/.prettierignore index 1692b9d26cfa20..c624a3a21eecfe 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ pnpm-lock.yaml pnpm-workspace.yaml packages/playground/tsconfig-json-load-error/has-error/tsconfig.json packages/playground/html/invalid.html +packages/playground/worker/classic-worker.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4d1c076df2d544..b105499159bebb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,10 +10,42 @@ To develop and test the core `vite` package: 1. Run `pnpm i` in Vite's root folder -2. Go to `packages/vite` and run `pnpm run dev`. This starts `rollup` in watch mode. +2. Run `pnpm run build` in Vite's root folder. + +3. If you are developing Vite itself, you can go to `packages/vite` and run `pnpm run dev` to automatically rebuild Vite whenever you change its code. You can alternatively use [Vite.js Docker Dev](https://github.com/nystudio107/vitejs-docker-dev) for a containerized Docker setup for Vite.js development. +## Debugging + +If you want to use break point and explore code execution you can use the ["Run and debug"](https://code.visualstudio.com/docs/editor/debugging) feature from vscode. + +1. Add a `debugger` statement where you want to stop the code execution. + +2. Click on the "Run and Debug" icon in the activity bar of the editor. + +3. Click on the "JavaScript Debug Terminal" button. + +4. It will open a terminal, then go to `packages/playground/xxx` and run `pnpm run dev`. + +5. The execution will stop and you'll use the [Debug toolbar](https://code.visualstudio.com/docs/editor/debugging#_debug-actions) to continue, step over, restart the process... + +### Debugging errors in Jest tests using Playwright (Chromium) + +Some errors are masked and hidden away because of the layers of abstraction and sandboxed nature added by Jest, Playwright, and Chromium. In order to see what's actually going wrong and the contents of the devtools console in those instances, follow this setup: + +1. Add a `debugger` statement to the `scripts/jestPerTestSetup.ts` -> `afterAll` hook. This will pause execution before the tests quit and the Playwright browser instance exits. + +1. Run the tests with the `debug-serve` script command which will enable remote debugging: `pnpm run debug-serve -- --runInBand resolve`. + +1. Wait for inspector devtools to open in your browser and the debugger to attach. + +1. In the sources panel in the right column, click the play button to resume execution and allow the tests to run which will open a Chromium instance. + +1. Focusing the Chomium instance, you can open the browser devtools and inspect the console there to find the underlying problems. + +1. To close everything, just stop the test process back in your terminal. + ## Testing Vite against external packages You may wish to test your locally-modified copy of Vite against another package that is built with Vite. For pnpm, after building Vite, you can use [`pnpm.overrides`](https://pnpm.io/package_json#pnpmoverrides). Please note that `pnpm.overrides` must be specified in the root `package.json` and you must first list the package as a dependency in the root `package.json`: @@ -37,6 +69,8 @@ And re-run `pnpm install` to link the package. Each package under `packages/playground/` contains a `__tests__` directory. The tests are run using [Jest](https://jestjs.io/) + [Playwright](https://playwright.dev/) with custom integrations to make writing tests simple. The detailed setup is inside `jest.config.js` and `scripts/jest*` files. +Before running the tests, make sure that [Vite has been built](#repo-setup). On Windows, you may want to [activate Developer Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) to solve [issues with symlink creation for non-admins](https://github.com/vitejs/vite/issues/7390). + Each test can be run under either dev server mode or build mode. - `pnpm test` by default runs every test in both serve and build mode. @@ -188,14 +222,14 @@ We already have many config options, and we should avoid fixing an issue by addi If you would like to start a translation in your language, you are welcome to contribute! Please join [the #translations channel in Vite Land](https://chat.vitejs.dev) to discuss and coordinate with others. -The english docs are embeded in the main Vite repo, to allow contributors to work on docs, tests and implementation in the same PR. Translations are done by forking the main repo. +The english docs are embedded in the main Vite repo, to allow contributors to work on docs, tests and implementation in the same PR. Translations are done by forking the main repo. ### How to start a translation repo 1. In order to get all doc files, you first need to clone this repo in your personal account. 2. Keep all the files in `docs/` and remove everything else. - - You should setup your translation site based on all the files in `docs/` folder as a Vitepress project. + - You should setup your translation site based on all the files in `docs/` folder as a VitePress project. (that said, `package.json` is need). - Refresh git history by removing `.git` and then `git init` @@ -204,7 +238,7 @@ The english docs are embeded in the main Vite repo, to allow contributors to wor - During this stage, you may be translating documents and synchronizing updates at the same time, but don't worry about that, it's very common in translation contribution. -4. Push your commits to your Github repo. you can setup a netlify preview as well. -5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a Github Action, automatically track English docs update later. +4. Push your commits to your GitHub repo. you can setup a netlify preview as well. +5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a GitHub Action, automatically track English docs update later. -We recommend talking with others in Vite Land so you find more contributors for your language to share the maintainance work. Once the translation is done, communicate it to the Vite team so the repo can be moved to the official vitejs org in GitHub. +We recommend talking with others in Vite Land so you find more contributors for your language to share the maintenance work. Once the translation is done, communicate it to the Vite team so the repo can be moved to the official vitejs org in GitHub. diff --git a/README.md b/README.md index be96a1bcf73ada..546014a12c7116 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,6 @@ In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/g [Read the Docs to Learn More](https://vitejs.dev). -## Migrating from 1.x - -Check out the [Migration Guide](https://vitejs.dev/guide/migration.html) if you are upgrading from 1.x. - ## Packages | Package | Version (click for changelogs) | @@ -55,3 +51,11 @@ See [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.m ## License MIT + +## Sponsors + +

+ + sponsors + +

diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index fc635028f95a73..ee76a29986d3fb 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -7,6 +7,9 @@ module.exports = { title: 'Vite', description: 'Next Generation Frontend Tooling', head: [['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }]], + vue: { + reactivityTransform: true + }, themeConfig: { repo: 'vitejs/vite', logo: '/logo.svg', diff --git a/docs/.vitepress/theme/SponsorsGroup.vue b/docs/.vitepress/theme/SponsorsGroup.vue new file mode 100644 index 00000000000000..691f5f5b0f1dc2 --- /dev/null +++ b/docs/.vitepress/theme/SponsorsGroup.vue @@ -0,0 +1,137 @@ + + + + + + + diff --git a/docs/.vitepress/theme/SponsorsSidebar.vue b/docs/.vitepress/theme/SponsorsSidebar.vue new file mode 100644 index 00000000000000..bb27c8b5ee157d --- /dev/null +++ b/docs/.vitepress/theme/SponsorsSidebar.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index 5d0a1b7a652039..babdc165f30ed8 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,7 +1,6 @@ import Theme from 'vitepress/theme' import { h } from 'vue' -import sponsors from './sponsors.json' -import './sponsors.css' +import SponsorsSidebar from './SponsorsSidebar.vue' import './custom.css' export default { @@ -9,29 +8,7 @@ export default { Layout() { return h(Theme.Layout, null, { 'sidebar-bottom': () => - h('div', { class: 'sponsors sidebar' }, [ - h( - 'a', - { - href: 'https://github.com/sponsors/yyx990803', - target: '_blank', - rel: 'noopener' - }, - [h('span', 'Sponsors')] - ), - ...sponsors.map(({ href, src, name, id }) => - h( - 'a', - { - href, - target: '_blank', - rel: 'noopener', - 'aria-label': 'sponsor-img' - }, - [h('img', { src, alt: name, id: `sponsor-${id}` })] - ) - ) - ]) + h('div', { class: 'sponsors sidebar' }, [h(SponsorsSidebar)]) }) } } diff --git a/docs/.vitepress/theme/sponsors.css b/docs/.vitepress/theme/sponsors.css deleted file mode 100644 index a512ed577f583a..00000000000000 --- a/docs/.vitepress/theme/sponsors.css +++ /dev/null @@ -1,56 +0,0 @@ -.sponsors { - padding: 0 1.5rem 2rem; - font-size: 0.8rem; -} - -.sponsors a { - color: #999; - margin: 1em; - display: block; -} - -.sponsors img { - max-width: 160px; - max-height: 40px; -} - -.sponsors.frontpage { - text-align: center; -} - -.sponsors.frontpage img { - display: inline-block; - vertical-align: middle; -} - -.sponsors.frontpage h2 { - color: #999; - font-size: 1.2rem; - border: none; -} - -.sponsors.sidebar a img { - max-height: 36px; -} - -.platinum-sponsors { - margin-bottom: 1.5em; -} - -.platinum-sponsors a img { - max-width: 240px; - max-height: 60px; -} - -.gold-sponsors { - display: flex; - flex-wrap: wrap; - justify-content: space-evenly; - align-items: center; -} - -/* special cases */ -#sponsor-mux { - padding: 5px 0; - min-height: 36px; -} diff --git a/docs/.vitepress/theme/sponsors.json b/docs/.vitepress/theme/sponsors.json deleted file mode 100644 index 8c6dbef4df7057..00000000000000 --- a/docs/.vitepress/theme/sponsors.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "id": "stackblitz", - "name": "StackBlitz", - "href": "https://stackblitz.com/", - "src": "/stackblitz.svg", - "tier": "platinum" - }, - { - "id": "tailwind", - "name": "Tailwind Labs", - "href": "https://tailwindcss.com", - "src": "/tailwind-labs.svg" - }, - { - "id": "vuejobs", - "name": "Vue Jobs", - "href": "https://vuejobs.com/?ref=vuejs", - "src": "/vuejobs.png" - }, - { - "id": "mux", - "name": "Mux", - "href": "https://mux.com", - "src": "/mux.svg" - }, - { - "id": "plaid", - "name": "Plaid Inc.", - "href": "https://plaid.co.jp/", - "src": "/plaid.svg" - }, - { - "id": "divriots", - "name": "divriots", - "href": "https://divriots.com/", - "src": "/divriots.png" - }, - { - "id": "finclip", - "name": "FinClip", - "href": "https://finclip.com/?from=vite", - "src": "/finclip.png" - } -] diff --git a/docs/blog/announcing-vite2.md b/docs/blog/announcing-vite2.md index 0bf520dfdfcb9a..0007205debba4a 100644 --- a/docs/blog/announcing-vite2.md +++ b/docs/blog/announcing-vite2.md @@ -34,7 +34,7 @@ The [programmatic API](https://vitejs.dev/guide/api-javascript.html) has also be ### esbuild Powered Dep Pre-Bundling -Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered Macbook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup. +Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered MacBook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup. ### First-class CSS Support diff --git a/docs/config/index.md b/docs/config/index.md index bc73d39694c5fa..d7560e58736a43 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -27,7 +27,8 @@ You can also explicitly specify a config file to use with the `--config` CLI opt vite --config my-config.js ``` -Note that Vite will replace `__filename`, `__dirname`, and `import.meta.url`. Using these as variable names will result in an error: +::: tip NOTE +Vite will replace `__filename`, `__dirname`, and `import.meta.url` in **CommonJS** and **TypeScript** config files. Using these as variable names will result in an error: ```js const __filename = "value" @@ -35,6 +36,8 @@ const __filename = "value" const "path/vite.config.js" = "value" ``` +::: + ### Config Intellisense Since Vite ships with TypeScript typings, you can leverage your IDE's intellisense with jsdoc type hints: @@ -96,6 +99,22 @@ export default defineConfig(async ({ command, mode }) => { }) ``` +### Environment Variables + +Vite doesn't load `.env` files by default as the files to load can only be determined after evaluating the Vite config, for example, the `root` and `envDir` options affects the loading behaviour. However, you can use the exported `loadEnv` helper to load the specific `.env` file if needed. + +```js +import { defineConfig, loadEnv } from 'vite' + +export default defineConfig(({ command, mode }) => { + // Load env file based on `mode` in the current working directory + const env = loadEnv(mode, process.cwd()) + return { + // build specific config + } +}) +``` + ## Shared Options ### root @@ -137,11 +156,15 @@ export default defineConfig(async ({ command, mode }) => { - Starting from `2.0.0-beta.70`, string values will be used as raw expressions, so if defining a string constant, it needs to be explicitly quoted (e.g. with `JSON.stringify`). + - To be consistent with [esbuild behavior](https://esbuild.github.io/api/#define), expressions must either be a JSON object (null, boolean, number, string, array, or object) or a single identifier. + - Replacements are performed only when the match is surrounded by word boundaries (`\b`). + ::: warning Because it's implemented as straightforward text replacements without any syntax analysis, we recommend using `define` for CONSTANTS only. For example, `process.env.FOO` and `__APP_VERSION__` are good fits. But `process` or `global` should not be put into this option. Variables can be shimmed or polyfilled instead. + ::: ::: tip NOTE For TypeScript users, make sure to add the type declarations in the `env.d.ts` or `vite-env.d.ts` file to get type checks and Intellisense. @@ -223,6 +246,10 @@ export default defineConfig(async ({ command, mode }) => { Vite has a list of "allowed conditions" and will match the first condition that is in the allowed list. The default allowed conditions are: `import`, `module`, `browser`, `default`, and `production/development` based on current mode. The `resolve.conditions` config option allows specifying additional allowed conditions. + :::warning Resolving subpath exports + Export keys ending with "/" is deprecated by Node and may not work well. Please contact the package author to use [`*` subpath patterns](https://nodejs.org/api/packages.html#package-entry-points) instead. + ::: + ### resolve.mainFields - **Type:** `string[]` @@ -277,7 +304,7 @@ export default defineConfig(async ({ command, mode }) => { - **Type:** `string | (postcss.ProcessOptions & { plugins?: postcss.Plugin[] })` - Inline PostCSS config (expects the same format as `postcss.config.js`), or a custom path to search PostCSS config from (default is project root). The search is done using [postcss-load-config](https://github.com/postcss/postcss-load-config). + Inline PostCSS config (expects the same format as `postcss.config.js`), or a custom directory to search PostCSS config from (default is project root). The search is done using [postcss-load-config](https://github.com/postcss/postcss-load-config) and only the supported config file names are loaded. Note if an inline config is provided, Vite will not search for other PostCSS config sources. @@ -285,7 +312,7 @@ export default defineConfig(async ({ command, mode }) => { - **Type:** `Record` - Specify options to pass to CSS pre-processors. Example: + Specify options to pass to CSS pre-processors. The file extensions are used as keys for the options. Example: ```js export default defineConfig({ @@ -293,12 +320,23 @@ export default defineConfig(async ({ command, mode }) => { preprocessorOptions: { scss: { additionalData: `$injectedColor: orange;` + }, + styl: { + additionalData: `$injectedColor ?= orange` } } } }) ``` +### css.devSourcemap + +- **Experimental** +- **Type:** `boolean` +- **Default:** `false` + + Whether to enable sourcemaps during dev. + ### json.namedExports - **Type:** `boolean` @@ -319,7 +357,7 @@ export default defineConfig(async ({ command, mode }) => { - **Type:** `ESBuildOptions | false` - `ESBuildOptions` extends [ESbuild's own transform options](https://esbuild.github.io/api/#transform-api). The most common use case is customizing JSX: + `ESBuildOptions` extends [esbuild's own transform options](https://esbuild.github.io/api/#transform-api). The most common use case is customizing JSX: ```js export default defineConfig({ @@ -330,9 +368,9 @@ export default defineConfig(async ({ command, mode }) => { }) ``` - By default, ESBuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, both of which expect type of `string | RegExp | (string | RegExp)[]`. + By default, esbuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either. - In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by ESBuild: + In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by esbuild: ```js export default defineConfig({ @@ -342,14 +380,14 @@ export default defineConfig(async ({ command, mode }) => { }) ``` - Set to `false` to disable ESbuild transforms. + Set to `false` to disable esbuild transforms. ### assetsInclude - **Type:** `string | RegExp | (string | RegExp)[]` - **Related:** [Static Asset Handling](/guide/assets) - Specify additional [picomatch patterns](https://github.com/micromatch/picomatch) to be treated as static assets so that: + Specify additional [picomatch patterns](https://github.com/micromatch/picomatch#globbing-features) to be treated as static assets so that: - They will be excluded from the plugin transform pipeline when referenced from HTML or directly requested over `fetch` or XHR. @@ -482,6 +520,11 @@ export default defineConfig(async ({ command, mode }) => { configure: (proxy, options) => { // proxy will be an instance of 'http-proxy' } + }, + // Proxying websockets or socket.io + '/socket.io': { + target: 'ws://localhost:3000', + ws: true } } } @@ -494,6 +537,12 @@ export default defineConfig(async ({ command, mode }) => { Configure CORS for the dev server. This is enabled by default and allows any origin. Pass an [options object](https://github.com/expressjs/cors) to fine tune the behavior or `false` to disable. +### server.headers + +- **Type:** `OutgoingHttpHeaders` + + Specify server response headers. + ### server.force - **Type:** `boolean` @@ -511,7 +560,7 @@ export default defineConfig(async ({ command, mode }) => { `clientPort` is an advanced option that overrides the port only on the client side, allowing you to serve the websocket on a different port than the client code looks for it on. Useful if you're using an SSL proxy in front of your dev server. - When using `server.middlewareMode` or `server.https`, assigning `server.hmr.server` to your HTTP(S) server will process HMR connection requests through your server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port. + If specifying `server.hmr.server`, Vite will process HMR connection requests through the provided server. If not in middleware mode, Vite will attempt to process HMR connection requests through the existing server. This can be helpful when using self-signed certificates or when you want to expose Vite over a network on a single port. ### server.watch @@ -575,6 +624,12 @@ async function createServer() { createServer() ``` +### server.base + +- **Type:** `string | undefined` + + Prepend this folder to http requests, for use when proxying vite as a subfolder. Should start and end with the `/` character. + ### server.fs.strict - **Type:** `boolean` @@ -592,6 +647,7 @@ createServer() - contains `workspaces` field in `package.json` - contains one of the following file + - `lerna.json` - `pnpm-workspace.yaml` Accepts a path to specify the custom workspace root. Could be a absolute path or a path relative to [project root](/guide/#index-html-and-project-root). For example: @@ -766,19 +822,19 @@ export default defineConfig({ ### build.manifest -- **Type:** `boolean` +- **Type:** `boolean | string` - **Default:** `false` - **Related:** [Backend Integration](/guide/backend-integration) - When set to `true`, the build will also generate a `manifest.json` file that contains a mapping of non-hashed asset filenames to their hashed versions, which can then be used by a server framework to render the correct asset links. + When set to `true`, the build will also generate a `manifest.json` file that contains a mapping of non-hashed asset filenames to their hashed versions, which can then be used by a server framework to render the correct asset links. When the value is a string, it will be used as the manifest file name. ### build.ssrManifest -- **Type:** `boolean` +- **Type:** `boolean | string` - **Default:** `false` - **Related:** [Server-Side Rendering](/guide/ssr) - When set to `true`, the build will also generate a SSR manifest for determining style links and asset preload directives in production. + When set to `true`, the build will also generate a SSR manifest for determining style links and asset preload directives in production. When the value is a string, it will be used as the manifest file name. ### build.ssr @@ -793,7 +849,7 @@ export default defineConfig({ - **Type:** `boolean | 'terser' | 'esbuild'` - **Default:** `'esbuild'` - Set to `false` to disable minification, or specify the minifier to use. The default is [Esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks) + Set to `false` to disable minification, or specify the minifier to use. The default is [esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks) Note the `build.minify` option is not available when using the `'es'` format in lib mode. @@ -917,9 +973,9 @@ export default defineConfig({ - **Type:** `string | string[]` - By default, Vite will crawl your index.html to detect dependencies that need to be pre-bundled. If build.rollupOptions.input is specified, Vite will crawl those entry points instead. + By default, Vite will crawl all your `.html` files to detect dependencies that need to be pre-bundled (ignoring `node_modules`, `build.outDir`, `__tests__` and `coverage`). If `build.rollupOptions.input` is specified, Vite will crawl those entry points instead. - If neither of these fit your needs, you can specify custom entries using this option - the value should be a [fast-glob pattern](https://github.com/mrmlnc/fast-glob#basic-syntax) or array of patterns that are relative from Vite project root. This will overwrite default entries inference. + If neither of these fit your needs, you can specify custom entries using this option - the value should be a [fast-glob pattern](https://github.com/mrmlnc/fast-glob#basic-syntax) or array of patterns that are relative from Vite project root. This will overwrite default entries inference. Only `node_modules` and `build.outDir` folders will be ignored by default when `optimizeDeps.entries` is explicitily defined. If other folders needs to be ignored, you can use an ignore pattern as part of the entries list, marked with an initial `!`. ### optimizeDeps.exclude diff --git a/docs/guide/api-hmr.md b/docs/guide/api-hmr.md index f4ddf59d8abcd1..46eabab04e8868 100644 --- a/docs/guide/api-hmr.md +++ b/docs/guide/api-hmr.md @@ -123,3 +123,11 @@ The following HMR events are dispatched by Vite automatically: - `'vite:error'` when an error occurs (e.g. syntax error) Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details. + +## `hot.send(event, data)` + +Send custom events back to Vite's dev server. + +If called before connected, the data will be buffered and sent once the connection is established. + +See [Client-server Communication](/guide/api-plugin.html#client-server-communication) for more details. diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index 1651923c06cdcb..0128be26bd92ba 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -1,6 +1,6 @@ # JavaScript API -Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VSCode to leverage the intellisense and validation. +Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VS Code to leverage the intellisense and validation. ## `createServer` @@ -94,7 +94,7 @@ interface ViteDevServer { */ ssrLoadModule( url: string, - options?: { isolated?: boolean } + options?: { fixStacktrace?: boolean } ): Promise> /** * Fix ssr error stacktrace. diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index cba57ca6653309..4a5b1c07c7893e 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -36,9 +36,7 @@ If your plugin is only going to work for a particular framework, its name should - `vite-plugin-react-` prefix for React Plugins - `vite-plugin-svelte-` prefix for Svelte Plugins -Vite convention for virtual modules is to prefix the user-facing path with `virtual:`. If possible the plugin name should be used as a namespace to avoid collisions with other plugins in the ecosystem. For example, a `vite-plugin-posts` could ask users to import a `virtual:posts` or `virtual:posts/helpers` virtual modules to get build time information. Internally, plugins that use virtual modules should prefix the module ID with `\0` while resolving the id, a convention from the rollup ecosystem. This prevents other plugins from trying to process the id (like node resolution), and core features like sourcemaps can use this info to differentiate between virtual modules and regular files. `\0` is not a permitted char in import URLs so we have to replace them during import analysis. A `\0{id}` virtual id ends up encoded as `/@id/__x00__{id}` during dev in the browser. The id will be decoded back before entering the plugins pipeline, so this is not seen by plugins hooks code. - -Note that modules directly derived from a real file, as in the case of a script module in a Single File Component (like a .vue or .svelte SFC) don't need to follow this convention. SFCs generally generate a set of submodules when processed but the code in these can be mapped back to the filesystem. Using `\0` for these submodules would prevent sourcemaps from working correctly. +See also [Virtual Modules Convention](#virtual-modules-convention). ## Plugins config @@ -84,8 +82,35 @@ export default defineConfig({ It is common convention to author a Vite/Rollup plugin as a factory function that returns the actual plugin object. The function can accept options which allows users to customize the behavior of the plugin. ::: +### Transforming Custom File Types + +```js +const fileRegex = /\.(my-file-ext)$/ + +export default function myPlugin() { + return { + name: 'transform-file', + + transform(src, id) { + if (fileRegex.test(id)) { + return { + code: compileFileToJS(src), + map: null // provide source map if available + } + } + } + } +} +``` + ### Importing a Virtual File +See the example in the [next section](#virtual-modules-convention). + +## Virtual Modules Convention + +Virtual modules are a useful scheme that allows you to pass build time information to the source files using normal ESM import syntax. + ```js export default function myPlugin() { const virtualModuleId = '@my-virtual-module' @@ -115,26 +140,9 @@ import { msg } from '@my-virtual-module' console.log(msg) ``` -### Transforming Custom File Types - -```js -const fileRegex = /\.(my-file-ext)$/ - -export default function myPlugin() { - return { - name: 'transform-file', +Virtual modules in Vite (and Rollup) are prefixed with `virtual:` for the user-facing path by convention. If possible the plugin name should be used as a namespace to avoid collisions with other plugins in the ecosystem. For example, a `vite-plugin-posts` could ask users to import a `virtual:posts` or `virtual:posts/helpers` virtual modules to get build time information. Internally, plugins that use virtual modules should prefix the module ID with `\0` while resolving the id, a convention from the rollup ecosystem. This prevents other plugins from trying to process the id (like node resolution), and core features like sourcemaps can use this info to differentiate between virtual modules and regular files. `\0` is not a permitted char in import URLs so we have to replace them during import analysis. A `\0{id}` virtual id ends up encoded as `/@id/__x00__{id}` during dev in the browser. The id will be decoded back before entering the plugins pipeline, so this is not seen by plugins hooks code. - transform(src, id) { - if (fileRegex.test(id)) { - return { - code: compileFileToJS(src), - map: null // provide source map if available - } - } - } - } -} -``` +Note that modules directly derived from a real file, as in the case of a script module in a Single File Component (like a .vue or .svelte SFC) don't need to follow this convention. SFCs generally generate a set of submodules when processed but the code in these can be mapped back to the filesystem. Using `\0` for these submodules would prevent sourcemaps from working correctly. ## Universal Hooks @@ -450,7 +458,7 @@ In general, as long as a Rollup plugin fits the following criteria then it shoul - It doesn't use the [`moduleParsed`](https://rollupjs.org/guide/en/#moduleparsed) hook. - It doesn't have strong coupling between bundle-phase hooks and output-phase hooks. -If a Rollup plugin only makes sense for the build phase, then it can be specified under `build.rollupOptions.plugins` instead. +If a Rollup plugin only makes sense for the build phase, then it can be specified under `build.rollupOptions.plugins` instead. It will work the same as a Vite plugin with `enforce: 'post'` and `apply: 'build'`. You can also augment an existing Rollup plugin with Vite-only properties: @@ -472,7 +480,7 @@ export default defineConfig({ Check out [Vite Rollup Plugins](https://vite-rollup-plugins.patak.dev) for a list of compatible official Rollup plugins with usage instructions. -## Path normalization +## Path Normalization Vite normalizes paths while resolving ids to use POSIX separators ( / ) while preserving the volume in Windows. On the other hand, Rollup keeps resolved paths untouched by default, so resolved ids have win32 separators ( \\ ) in Windows. However, Rollup plugins use a [`normalizePath` utility function](https://github.com/rollup/plugins/tree/master/packages/pluginutils#normalizepath) from `@rollup/pluginutils` internally, which converts separators to POSIX before performing comparisons. This means that when these plugins are used in Vite, the `include` and `exclude` config pattern and other similar paths against resolved ids comparisons work correctly. @@ -484,3 +492,87 @@ import { normalizePath } from 'vite' normalizePath('foo\\bar') // 'foo/bar' normalizePath('foo/bar') // 'foo/bar' ``` + +## Client-server Communication + +Since Vite 2.9, we provide some utilities for plugins to help handle the communication with clients. + +### Server to Client + +On the plugin side, we could use `server.ws.send` to broadcast events to all the clients: + +```js +// vite.config.js +export default defineConfig({ + plugins: [ + { + // ... + configureServer(server) { + server.ws.send('my:greetings', { msg: 'hello' }) + } + } + ] +}) +``` + +::: tip NOTE +We recommend **alway prefixing** your event names to avoid collisions with other plugins. +::: + +On the client side, use [`hot.on`](/guide/api-hmr.html#hot-on-event-cb) to listen to the events: + +```ts +// client side +if (import.meta.hot) { + import.meta.hot.on('my:greetings', (data) => { + console.log(data.msg) // hello + }) +} +``` + +### Client to Server + +To send events from the client to the server, we can use [`hot.send`](/guide/api-hmr.html#hot-send-event-payload): + +```ts +// client side +if (import.meta.hot) { + import.meta.hot.send('my:from-client', { msg: 'Hey!' }) +} +``` + +Then use `server.ws.on` and listen to the events on the server side: + +```js +// vite.config.js +export default defineConfig({ + plugins: [ + { + // ... + configureServer(server) { + server.ws.on('my:from-client', (data, client) => { + console.log('Message from client:', data.msg) // Hey! + // reply only to the client (if needed) + client.send('my:ack', { msg: 'Hi! I got your message!' }) + }) + } + } + ] +}) +``` + +### TypeScript for Custom Events + +It is possible to type custom events by extending the `CustomEventMap` interface: + +```ts +// events.d.ts +import 'vite/types/customEvent' + +declare module 'vite/types/customEvent' { + interface CustomEventMap { + 'custom:foo': { msg: string } + // 'event-key': payload + } +} +``` diff --git a/docs/guide/assets.md b/docs/guide/assets.md index fd5aa46f49467f..53ac153f9465bd 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -103,8 +103,13 @@ function getImageUrl(name) { } ``` -During the production build, Vite will perform necessary transforms so that the URLs still point to the correct location even after bundling and asset hashing. +During the production build, Vite will perform necessary transforms so that the URLs still point to the correct location even after bundling and asset hashing. However, the URL string must be static so it can be analyzed, otherwise the code will be left as is, which can cause runtime errors if `build.target` does not support `import.meta.url` -::: warning Note: Does not work with SSR +```js +// Vite will not transform this +const imgUrl = new URL(imagePath, import.meta.url).href +``` + +::: warning Does not work with SSR This pattern does not work if you are using Vite for Server-Side Rendering, because `import.meta.url` have different semantics in browsers vs. Node.js. The server bundle also cannot determine the client host URL ahead of time. ::: diff --git a/docs/guide/backend-integration.md b/docs/guide/backend-integration.md index a30831e735fff7..55a4b87f1ac481 100644 --- a/docs/guide/backend-integration.md +++ b/docs/guide/backend-integration.md @@ -33,7 +33,6 @@ If you need a custom integration, you can follow the steps in this guide to conf ```html - ``` diff --git a/docs/guide/build.md b/docs/guide/build.md index aac86a237b6819..8216bcbfbac060 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -43,6 +43,20 @@ module.exports = defineConfig({ For example, you can specify multiple Rollup outputs with plugins that are only applied during build. +## Chunking Strategy + +You can configure how chunks are split using `build.rollupOptions.output.manualChunks` (see [Rollup docs](https://rollupjs.org/guide/en/#outputmanualchunks)). Until Vite 2.8, the default chunking strategy divided the chunks into `index` and `vendor`. It is a good strategy for some SPAs, but it is hard to provide a general solution for every Vite target use case. From Vite 2.9, `manualChunks` is no longer modified by default. You can continue to use the Split Vendor Chunk strategy by adding the `splitVendorChunkPlugin` in your config file: + +```js +// vite.config.js +import { splitVendorChunkPlugin } from 'vite' +module.exports = defineConfig({ + plugins: [splitVendorChunkPlugin()] +}) +``` + +This strategy is also provided as a `splitVendorChunk({ cache: SplitVendorChunkCache })` factory, in case composition with custom logic is needed. `cache.reset()` needs to be called at `buildStart` for build watch mode to work correctly in this case. + ## Rebuild on files changes You can enable rollup watcher with `vite build --watch`. Or, you can directly adjust the underlying [`WatcherOptions`](https://rollupjs.org/guide/en/#watch-options) via `build.watch`: @@ -58,6 +72,8 @@ module.exports = defineConfig({ }) ``` +With the `--watch` flag enabled, changes to the `vite.config.js`, as well as any files to be bundled, will trigger a rebuild. + ## Multi-Page App Suppose you have the following source code structure: @@ -129,6 +145,15 @@ module.exports = defineConfig({ }) ``` +The entry file would contain exports that can be imported by users of your package: + +```js +// lib/main.js +import Foo from './Foo.vue' +import Bar from './Bar.vue' +export { Foo, Bar } +``` + Running `vite build` with this config uses a Rollup preset that is oriented towards shipping libraries and produces two bundle formats: `es` and `umd` (configurable via `build.lib`): ``` diff --git a/docs/guide/dep-pre-bundling.md b/docs/guide/dep-pre-bundling.md index 6864ef55899eba..0afce072e9fcc3 100644 --- a/docs/guide/dep-pre-bundling.md +++ b/docs/guide/dep-pre-bundling.md @@ -3,10 +3,10 @@ When you run `vite` for the first time, you may notice this message: ``` -Optimizable dependencies detected: -react, react-dom -Pre-bundling them to speed up dev server page load... -(this will be run only when your dependencies have changed) +Pre-bundling dependencies: + react + react-dom +(this will be run only when your dependencies or config have changed) ``` ## The Why @@ -28,6 +28,10 @@ This is Vite performing what we call "dependency pre-bundling". This process ser By pre-bundling `lodash-es` into a single module, we now only need one HTTP request instead! +::: tip NOTE +Dependency pre-bundling only applies in development mode, and uses `esbuild` to convert dependencies to ESM. In production builds, `@rollup/plugin-commonjs` is used instead. +::: + ## Automatic Dependency Discovery If an existing cache is not found, Vite will crawl your source code and automatically discover dependency imports (i.e. "bare imports" that expect to be resolved from `node_modules`) and use these found imports as entry points for the pre-bundle. The pre-bundling is performed with `esbuild` so it's typically very fast. @@ -36,11 +40,27 @@ After the server has already started, if a new dependency import is encountered ## Monorepos and Linked Dependencies -In a monorepo setup, a dependency may be a linked package from the same repo. Vite automatically detects dependencies that are not resolved from `node_modules` and treats the linked dep as source code. It will not attempt to bundle the linked dep, and instead will analyze the linked dep's dependency list instead. +In a monorepo setup, a dependency may be a linked package from the same repo. Vite automatically detects dependencies that are not resolved from `node_modules` and treats the linked dep as source code. It will not attempt to bundle the linked dep, and will analyze the linked dep's dependency list instead. + +However, this requires the linked dep to be exported as ESM. If not, you can add the dependency to [`optimizeDeps.include`](/config/#optimizedeps-include) and [`build.commonjsOptions.include`](/config/#build-commonjsoptions) in your config. + +```js +export default defineConfig({ + optimizeDeps: { + include: ['linked-dep'] + }, + build: { + commonjsOptions: { + include: [/linked-dep/, /node_modules/] + } + } +}) +``` + +When making changes to the linked dep, restart the dev server with the `--force` command line option for the changes to take effect. -::: warning Note -Linked dependencies might not work properly in the final build due to differences in dependency resolution. -Use `npm package` instead for all local dependencies to avoid issues in the final bundle. +::: warning Deduping +Due to differences in linked dependency resolution, transitive dependencies can deduplicated incorrectly, causing issues when used in runtime. If you stumble on this issue, use `npm pack` on the linked dependency to fix it. ::: ## Customizing the Behavior @@ -57,7 +77,7 @@ Both `include` and `exclude` can be used to deal with this. If the dependency is Vite caches the pre-bundled dependencies in `node_modules/.vite`. It determines whether it needs to re-run the pre-bundling step based on a few sources: -- The `dependencies` list in your `package.json` +- The `dependencies` list in your `package.json`. - Package manager lockfiles, e.g. `package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`. - Relevant fields in your `vite.config.js`, if present. diff --git a/docs/guide/env-and-mode.md b/docs/guide/env-and-mode.md index 9d6defdf33c778..1649feda8c7501 100644 --- a/docs/guide/env-and-mode.md +++ b/docs/guide/env-and-mode.md @@ -37,7 +37,7 @@ Vite uses [dotenv](https://github.com/motdotla/dotenv) to load additional enviro An env file for a specific mode (e.g. `.env.production`) will take higher priority than a generic one (e.g. `.env`). -In addition, environment variables that already exist when Vite is executed have the highest priority and will not be overwritten by `.env` files. +In addition, environment variables that already exist when Vite is executed have the highest priority and will not be overwritten by `.env` files. For example, when running `VITE_SOME_KEY=123 vite build`. `.env` files are loaded at the start of Vite. Restart the server after making changes. ::: @@ -57,7 +57,7 @@ If you want to customize env variables prefix, see [envPrefix](/config/index#env :::warning SECURITY NOTES -- `.env.*.local` files are local-only and can contain sensitive variables. You should add `.local` to your `.gitignore` to avoid them being checked into git. +- `.env.*.local` files are local-only and can contain sensitive variables. You should add `*.local` to your `.gitignore` to avoid them being checked into git. - Since any variables exposed to your Vite source code will end up in your client bundle, `VITE_*` variables should _not_ contain any sensitive information. ::: @@ -83,7 +83,7 @@ interface ImportMeta { ## Modes -By default, the dev server (`dev` command) runs in `development` mode and the `build` and `serve` commands run in `production` mode. +By default, the dev server (`dev` command) runs in `development` mode and the `build` command run in `production` mode. This means when running `vite build`, it will load the env variables from `.env.production` if there is one: @@ -110,4 +110,4 @@ NODE_ENV=production VITE_APP_TITLE=My App (staging) ``` -Now your staging app should have production-like behavior, but displaying a different title from production. +Now your staging app should have production-like behavior, but display a different title from production. diff --git a/docs/guide/features.md b/docs/guide/features.md index 2053a087517eac..ebed85cd2d529d 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -191,13 +191,13 @@ That said, Vite does provide built-in support for `.scss`, `.sass`, `.less`, `.s ```bash # .scss and .sass -npm install -D sass +npm add -D sass # .less -npm install -D less +npm add -D less # .styl and .stylus -npm install -D stylus +npm add -D stylus ``` If using Vue single file components, this also automatically enables ` +

+ @import CSS from publicDir should load (this should be red) +

+ + + + + ", + ], + "version": 3, + } + `) + }) + + test('linked css', async () => { + const res = await page.request.get( + new URL('./linked.css', page.url()).href, + { + headers: { + accept: 'text/css' + } + } + ) + const css = await res.text() + const lines = css.split('\n') + expect(lines[lines.length - 1].includes('/*')).toBe(false) // expect no sourcemap + }) + + test('linked css with import', async () => { + const res = await page.request.get( + new URL('./linked-with-import.css', page.url()).href, + { + headers: { + accept: 'text/css' + } + } + ) + const css = await res.text() + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA;EACE,UAAU;AACZ;;ACAA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/be-imported.css", + "/root/linked-with-import.css", + ], + "sourcesContent": Array [ + ".be-imported { + color: red; + } + ", + "@import '@/be-imported.css'; + + .linked-with-import { + color: red; + } + ", + ], + "version": 3, + } + `) + }) + + test('imported css', async () => { + const css = await getStyleTagContentIncluding('.imported ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACX,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACb,CAAC;", + "sources": Array [ + "/root/imported.css", + ], + "sourcesContent": Array [ + ".imported { + color: red; + } + ", + ], + "version": 3, + } + `) + }) + + test('imported css with import', async () => { + const css = await getStyleTagContentIncluding('.imported-with-import ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA;EACE,UAAU;AACZ;;ACAA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/be-imported.css", + "/root/imported-with-import.css", + ], + "sourcesContent": Array [ + ".be-imported { + color: red; + } + ", + "@import '@/be-imported.css'; + + .imported-with-import { + color: red; + } + ", + ], + "version": 3, + } + `) + }) + + test('imported sass', async () => { + const css = await getStyleTagContentIncluding('.imported-sass ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AACE;EACE", + "sources": Array [ + "/root/imported.sass", + ], + "sourcesContent": Array [ + ".imported + &-sass + color: red + ", + ], + "version": 3, + } + `) + }) + + test('imported sass module', async () => { + const css = await getStyleTagContentIncluding('._imported-sass-module_') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AACE;EACE", + "sources": Array [ + "/root/imported.module.sass", + ], + "sourcesContent": Array [ + ".imported + &-sass-module + color: red + ", + ], + "version": 3, + } + `) + }) + + test('imported less', async () => { + const css = await getStyleTagContentIncluding('.imported-less ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AACE;EACE", + "sources": Array [ + "/root/imported.less", + ], + "sourcesContent": Array [ + ".imported { + &-less { + color: @color; + } + } + ", + ], + "version": 3, + } + `) + }) + + test('imported stylus', async () => { + const css = await getStyleTagContentIncluding('.imported-stylus ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AACE;EACE,cAAM", + "sources": Array [ + "/root/imported.styl", + ], + "sourcesContent": Array [ + ".imported + &-stylus + color blue-red-mixed + ", + ], + "version": 3, + } + `) + }) + + test('should not output missing source file warning', () => { + serverLogs.forEach((log) => { + expect(log).not.toMatch(/Sourcemap for .+ points to missing source files/) + }) + }) +} else { + test('this file only includes test for serve', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/css-sourcemap/be-imported.css b/packages/playground/css-sourcemap/be-imported.css new file mode 100644 index 00000000000000..a29e5f77e3cb5d --- /dev/null +++ b/packages/playground/css-sourcemap/be-imported.css @@ -0,0 +1,3 @@ +.be-imported { + color: red; +} diff --git a/packages/playground/css-sourcemap/imported-with-import.css b/packages/playground/css-sourcemap/imported-with-import.css new file mode 100644 index 00000000000000..6a1ed3c3772698 --- /dev/null +++ b/packages/playground/css-sourcemap/imported-with-import.css @@ -0,0 +1,5 @@ +@import '@/be-imported.css'; + +.imported-with-import { + color: red; +} diff --git a/packages/playground/css-sourcemap/imported.css b/packages/playground/css-sourcemap/imported.css new file mode 100644 index 00000000000000..9c9b32924962dc --- /dev/null +++ b/packages/playground/css-sourcemap/imported.css @@ -0,0 +1,3 @@ +.imported { + color: red; +} diff --git a/packages/playground/css-sourcemap/imported.less b/packages/playground/css-sourcemap/imported.less new file mode 100644 index 00000000000000..e71b15eb102441 --- /dev/null +++ b/packages/playground/css-sourcemap/imported.less @@ -0,0 +1,5 @@ +.imported { + &-less { + color: @color; + } +} diff --git a/packages/playground/css-sourcemap/imported.module.sass b/packages/playground/css-sourcemap/imported.module.sass new file mode 100644 index 00000000000000..448a5e7e31f75a --- /dev/null +++ b/packages/playground/css-sourcemap/imported.module.sass @@ -0,0 +1,3 @@ +.imported + &-sass-module + color: red diff --git a/packages/playground/css-sourcemap/imported.sass b/packages/playground/css-sourcemap/imported.sass new file mode 100644 index 00000000000000..06fa634d5dd4e9 --- /dev/null +++ b/packages/playground/css-sourcemap/imported.sass @@ -0,0 +1,3 @@ +.imported + &-sass + color: red diff --git a/packages/playground/css-sourcemap/imported.styl b/packages/playground/css-sourcemap/imported.styl new file mode 100644 index 00000000000000..83c7cf517acf4d --- /dev/null +++ b/packages/playground/css-sourcemap/imported.styl @@ -0,0 +1,3 @@ +.imported + &-stylus + color blue-red-mixed diff --git a/packages/playground/css-sourcemap/index.html b/packages/playground/css-sourcemap/index.html new file mode 100644 index 00000000000000..a943c1d113a9b4 --- /dev/null +++ b/packages/playground/css-sourcemap/index.html @@ -0,0 +1,45 @@ + + + + + +
+

CSS Sourcemap

+ +

<inline>

+ +

<linked>: no import

+

<linked>: with import

+ +

<imported>: no import

+

<imported>: with import

+ +

<imported sass>

+

<imported sass> with module

+ +

<imported less> with string additionalData

+ +

<imported stylus>

+
+ + + + diff --git a/packages/playground/css-sourcemap/linked-with-import.css b/packages/playground/css-sourcemap/linked-with-import.css new file mode 100644 index 00000000000000..6f65d92441fa49 --- /dev/null +++ b/packages/playground/css-sourcemap/linked-with-import.css @@ -0,0 +1,5 @@ +@import '@/be-imported.css'; + +.linked-with-import { + color: red; +} diff --git a/packages/playground/css-sourcemap/linked.css b/packages/playground/css-sourcemap/linked.css new file mode 100644 index 00000000000000..e3b67c83872ac0 --- /dev/null +++ b/packages/playground/css-sourcemap/linked.css @@ -0,0 +1,3 @@ +.linked { + color: red; +} diff --git a/packages/playground/css-sourcemap/package.json b/packages/playground/css-sourcemap/package.json new file mode 100644 index 00000000000000..c7e9e61372cefa --- /dev/null +++ b/packages/playground/css-sourcemap/package.json @@ -0,0 +1,17 @@ +{ + "name": "test-css-sourcemap", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../vite/bin/vite", + "preview": "vite preview" + }, + "devDependencies": { + "less": "^4.1.2", + "magic-string": "^0.25.7", + "sass": "^1.43.4", + "stylus": "^0.55.0" + } +} diff --git a/packages/playground/css-sourcemap/vite.config.js b/packages/playground/css-sourcemap/vite.config.js new file mode 100644 index 00000000000000..4fbeaa9a13aeb0 --- /dev/null +++ b/packages/playground/css-sourcemap/vite.config.js @@ -0,0 +1,61 @@ +const MagicString = require('magic-string') + +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + resolve: { + alias: { + '@': __dirname + } + }, + css: { + devSourcemap: true, + preprocessorOptions: { + less: { + additionalData: '@color: red;' + }, + styl: { + additionalData: (content, filename) => { + const ms = new MagicString(content, { filename }) + + const willBeReplaced = 'blue-red-mixed' + const start = content.indexOf(willBeReplaced) + ms.overwrite(start, start + willBeReplaced.length, 'purple') + + const map = ms.generateMap({ hires: true }) + map.file = filename + map.sources = [filename] + + return { + content: ms.toString(), + map + } + } + } + } + }, + build: { + sourcemap: true + }, + plugins: [ + { + name: 'virtual-html', + configureServer(server) { + server.middlewares.use(async (req, res, next) => { + if (req.url === '/virtual.html') { + const t = await server.transformIndexHtml( + '/virtual.html', + '

virtual html

' + ) + res.setHeader('Content-Type', 'text/html') + res.statusCode = 200 + res.end(t) + return + } + next() + }) + } + } + ] +} diff --git a/packages/playground/css/__tests__/css.spec.ts b/packages/playground/css/__tests__/css.spec.ts index f1eb66e097ad86..ddb5c8c69d0e48 100644 --- a/packages/playground/css/__tests__/css.spec.ts +++ b/packages/playground/css/__tests__/css.spec.ts @@ -13,6 +13,14 @@ import { // note: tests should retrieve the element at the beginning of test and reuse it // in later assertions to ensure CSS HMR doesn't reload the page +test('imported css', async () => { + const css = await page.textContent('.imported-css') + expect(css).toContain('.imported {') + const glob = await page.textContent('.imported-css-glob') + expect(glob).toContain('.dir-import') + const globEager = await page.textContent('.imported-css-globEager') + expect(globEager).toContain('.dir-import') +}) test('linked css', async () => { const linked = await page.$('.linked') @@ -46,6 +54,12 @@ test('css import from js', async () => { await untilUpdated(() => getColor(atImport), 'blue') }) +test('css import asset with space', async () => { + const importedWithSpace = await page.$('.import-with-space') + + expect(await getBg(importedWithSpace)).toMatch(/.*ok\..*png/) +}) + test('postcss config', async () => { const imported = await page.$('.postcss .nesting') expect(await getColor(imported)).toBe('pink') @@ -310,7 +324,7 @@ test('PostCSS dir-dependency', async () => { } }) -test('Url separation', async () => { +test('URL separation', async () => { const urlSeparated = await page.$('.url-separated') const baseUrl = 'url(images/dog.webp)' const cases = new Array(5) @@ -356,3 +370,16 @@ test('minify css', async () => { expect(cssFile).toMatch('rgba(') expect(cssFile).not.toMatch('#ffff00b3') }) + +test('?raw', async () => { + const rawImportCss = await page.$('.raw-imported-css') + + expect(await rawImportCss.textContent()).toBe( + require('fs').readFileSync(require.resolve('../raw-imported.css'), 'utf-8') + ) +}) + +test('import css in less', async () => { + expect(await getColor('.css-in-less')).toBe('yellow') + expect(await getColor('.css-in-less-2')).toBe('blue') +}) diff --git a/packages/playground/css/__tests__/postcss-plugins-different-dir.spec.ts b/packages/playground/css/__tests__/postcss-plugins-different-dir.spec.ts new file mode 100644 index 00000000000000..19e9a43ae4ff6e --- /dev/null +++ b/packages/playground/css/__tests__/postcss-plugins-different-dir.spec.ts @@ -0,0 +1,29 @@ +import { getColor, getBgColor } from '../../testUtils' +import { createServer } from 'vite' +import path from 'path' + +// Regression test for https://github.com/vitejs/vite/issues/4000 +test('postcss plugins in different dir', async () => { + const port = 5006 + const server = await createServer({ + root: path.join(__dirname, '..', '..', 'tailwind'), + logLevel: 'silent', + server: { + port, + strictPort: true + }, + build: { + // skip transpilation during tests to make it faster + target: 'esnext' + } + }) + await server.listen() + try { + await page.goto(`http://localhost:${port}`) + const tailwindStyle = await page.$('.tailwind-style') + expect(await getBgColor(tailwindStyle)).toBe('rgb(254, 226, 226)') + expect(await getColor(tailwindStyle)).toBe('rgb(136, 136, 136)') + } finally { + await server.close() + } +}) diff --git a/packages/playground/css/css-dep/package.json b/packages/playground/css/css-dep/package.json index 2f5856f51db4fa..451510a672485f 100644 --- a/packages/playground/css/css-dep/package.json +++ b/packages/playground/css/css-dep/package.json @@ -1,5 +1,6 @@ { "name": "css-dep", + "private": true, "version": "1.0.0", "main": "index.js", "style": "index.css", diff --git a/packages/playground/css/folder with space/ok.png b/packages/playground/css/folder with space/ok.png new file mode 100644 index 00000000000000..a8d1e52510c41c Binary files /dev/null and b/packages/playground/css/folder with space/ok.png differ diff --git a/packages/playground/css/folder with space/space.css b/packages/playground/css/folder with space/space.css new file mode 100644 index 00000000000000..55a8532da32a94 --- /dev/null +++ b/packages/playground/css/folder with space/space.css @@ -0,0 +1,5 @@ +.import-with-space { + color: green; + background: url(spacefolder/ok.png); + background-position: center; +} diff --git a/packages/playground/css/glob-import/bar.css b/packages/playground/css/glob-import/bar.css new file mode 100644 index 00000000000000..a273f4970dcfa9 --- /dev/null +++ b/packages/playground/css/glob-import/bar.css @@ -0,0 +1,3 @@ +.dir-import-2 { + color: grey; +} diff --git a/packages/playground/css/glob-import/foo.css b/packages/playground/css/glob-import/foo.css new file mode 100644 index 00000000000000..03bd30eef45556 --- /dev/null +++ b/packages/playground/css/glob-import/foo.css @@ -0,0 +1,3 @@ +.dir-import { + color: grey; +} diff --git a/packages/playground/css/imported.css b/packages/playground/css/imported.css index 65743d08b932a7..7d582995fab9fd 100644 --- a/packages/playground/css/imported.css +++ b/packages/playground/css/imported.css @@ -1,4 +1,5 @@ @import './imported-at-import.css'; +@import 'spacefolder/space.css'; .imported { color: green; diff --git a/packages/playground/css/index.html b/packages/playground/css/index.html index 7a79bb1629f989..d08bc232752e8b 100644 --- a/packages/playground/css/index.html +++ b/packages/playground/css/index.html @@ -10,8 +10,14 @@

CSS

@import in import from js: This should be purple

+

+ @import from file with space: This should be green and have a background + image +

Imported css string:


+  

+  

 
   

PostCSS nesting plugin: this should be pink @@ -99,11 +105,26 @@

CSS

- Url separation preservation: should have valid background-image + URL separation preservation: should have valid background-image

Inlined import - this should NOT be red.

+ +
+ test import css in less, this color will be yellow +
+
+ test for import less in less, this color will be blue +
+ +
+ test import css in scss, this color will be orange +
+

+
+  

Raw Support

+

 
 
 
diff --git a/packages/playground/css/less.less b/packages/playground/css/less.less
index f8870e06f3a72c..69ffa830862014 100644
--- a/packages/playground/css/less.less
+++ b/packages/playground/css/less.less
@@ -1,4 +1,5 @@
 @import '@/nested/nested';
+@import './nested/css-in-less.less';
 
 @color: blue;
 
diff --git a/packages/playground/css/main.js b/packages/playground/css/main.js
index 24a278c8687940..6edd840a87c5e7 100644
--- a/packages/playground/css/main.js
+++ b/packages/playground/css/main.js
@@ -12,6 +12,9 @@ text('.imported-less', less)
 import stylus from './stylus.styl'
 text('.imported-stylus', stylus)
 
+import rawCss from './raw-imported.css?raw'
+text('.raw-imported-css', rawCss)
+
 import mod from './mod.module.css'
 document.querySelector('.modules').classList.add(mod['apply-color'])
 text('.modules-code', JSON.stringify(mod, null, 2))
@@ -68,3 +71,13 @@ if (import.meta.env.DEV) {
 // inlined
 import inlined from './inlined.css?inline'
 text('.inlined-code', inlined)
+
+// glob
+const glob = import.meta.glob('./glob-import/*.css')
+Promise.all(Object.keys(glob).map((key) => glob[key]())).then((res) => {
+  text('.imported-css-glob', JSON.stringify(res, null, 2))
+})
+
+// globEager
+const globEager = import.meta.globEager('./glob-import/*.css')
+text('.imported-css-globEager', JSON.stringify(globEager, null, 2))
diff --git a/packages/playground/css/nested/_index.scss b/packages/playground/css/nested/_index.scss
index 6f2103c79fc2c8..48d630b573ae1b 100644
--- a/packages/playground/css/nested/_index.scss
+++ b/packages/playground/css/nested/_index.scss
@@ -1,3 +1,5 @@
+@import './css-in-scss.css';
+
 .sass-at-import {
   color: olive;
   background: url(./icon.png) 10px no-repeat;
diff --git a/packages/playground/css/nested/css-in-less-2.less b/packages/playground/css/nested/css-in-less-2.less
new file mode 100644
index 00000000000000..443d17da34c0da
--- /dev/null
+++ b/packages/playground/css/nested/css-in-less-2.less
@@ -0,0 +1,3 @@
+.css-in-less-2 {
+  color: blue;
+}
diff --git a/packages/playground/css/nested/css-in-less.css b/packages/playground/css/nested/css-in-less.css
new file mode 100644
index 00000000000000..b174a601b1356c
--- /dev/null
+++ b/packages/playground/css/nested/css-in-less.css
@@ -0,0 +1,3 @@
+.css-in-less {
+  color: yellow;
+}
diff --git a/packages/playground/css/nested/css-in-less.less b/packages/playground/css/nested/css-in-less.less
new file mode 100644
index 00000000000000..abdd904b43016a
--- /dev/null
+++ b/packages/playground/css/nested/css-in-less.less
@@ -0,0 +1,4 @@
+@import url('./css-in-less.css');
+@import './css-in-less.css';
+
+@import './css-in-less-2.less';
diff --git a/packages/playground/css/nested/css-in-scss.css b/packages/playground/css/nested/css-in-scss.css
new file mode 100644
index 00000000000000..a63e49e4d6a1fd
--- /dev/null
+++ b/packages/playground/css/nested/css-in-scss.css
@@ -0,0 +1,3 @@
+.css-in-scss {
+  color: orange;
+}
diff --git a/packages/playground/css/package.json b/packages/playground/css/package.json
index 13a58874578c09..b45063100be089 100644
--- a/packages/playground/css/package.json
+++ b/packages/playground/css/package.json
@@ -10,6 +10,7 @@
   },
   "devDependencies": {
     "css-dep": "link:./css-dep",
+    "fast-glob": "^3.2.11",
     "less": "^4.1.2",
     "postcss-nested": "^5.0.6",
     "sass": "^1.43.4",
diff --git a/packages/playground/css/pkg-dep/package.json b/packages/playground/css/pkg-dep/package.json
index e31c3b33e1e0da..51a2b384e9dd0e 100644
--- a/packages/playground/css/pkg-dep/package.json
+++ b/packages/playground/css/pkg-dep/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep",
+  "private": true,
   "version": "1.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/css/raw-imported.css b/packages/playground/css/raw-imported.css
new file mode 100644
index 00000000000000..ac0aee96390c33
--- /dev/null
+++ b/packages/playground/css/raw-imported.css
@@ -0,0 +1,3 @@
+.raw-imported {
+  color: yellow;
+}
diff --git a/packages/playground/css/vite.config.js b/packages/playground/css/vite.config.js
index e4dc8d5a9f265f..639a1302debb88 100644
--- a/packages/playground/css/vite.config.js
+++ b/packages/playground/css/vite.config.js
@@ -1,4 +1,5 @@
 const path = require('path')
+
 /**
  * @type {import('vite').UserConfig}
  */
@@ -8,7 +9,8 @@ module.exports = {
   },
   resolve: {
     alias: {
-      '@': __dirname
+      '@': __dirname,
+      spacefolder: __dirname + '/folder with space'
     }
   },
   css: {
diff --git a/packages/playground/define/__tests__/define.spec.ts b/packages/playground/define/__tests__/define.spec.ts
index f5eb78ea4e2766..709f7a935dc8c1 100644
--- a/packages/playground/define/__tests__/define.spec.ts
+++ b/packages/playground/define/__tests__/define.spec.ts
@@ -20,4 +20,7 @@ test('string', async () => {
   expect(await page.textContent('.spread-array')).toBe(
     JSON.stringify([...defines.__STRING__])
   )
+  // html would't need to define replacement
+  expect(await page.textContent('.exp-define')).toBe('__EXP__')
+  expect(await page.textContent('.import-json')).toBe('__EXP__')
 })
diff --git a/packages/playground/define/data.json b/packages/playground/define/data.json
new file mode 100644
index 00000000000000..491b781c2d97d3
--- /dev/null
+++ b/packages/playground/define/data.json
@@ -0,0 +1,3 @@
+{
+  "foo": "__EXP__"
+}
diff --git a/packages/playground/define/index.html b/packages/playground/define/index.html
index bf6a9c59689396..da78d192216b11 100644
--- a/packages/playground/define/index.html
+++ b/packages/playground/define/index.html
@@ -9,6 +9,8 @@ 

Define

process as property:

spread object:

spread array:

+

define variable in html: __EXP__

+

import json:

diff --git a/packages/playground/env-nested/package.json b/packages/playground/env-nested/package.json new file mode 100644 index 00000000000000..8fecc69a41c2f4 --- /dev/null +++ b/packages/playground/env-nested/package.json @@ -0,0 +1,11 @@ +{ + "name": "test-env-nested", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../vite/bin/vite", + "preview": "vite preview" + } +} diff --git a/packages/playground/env-nested/vite.config.js b/packages/playground/env-nested/vite.config.js new file mode 100644 index 00000000000000..0e46100698650d --- /dev/null +++ b/packages/playground/env-nested/vite.config.js @@ -0,0 +1,5 @@ +const { defineConfig } = require('vite') + +module.exports = defineConfig({ + envDir: './envs' +}) diff --git a/packages/playground/fs-serve/__tests__/fs-serve.spec.ts b/packages/playground/fs-serve/__tests__/fs-serve.spec.ts index c618186b9bcd64..eba1e441881710 100644 --- a/packages/playground/fs-serve/__tests__/fs-serve.spec.ts +++ b/packages/playground/fs-serve/__tests__/fs-serve.spec.ts @@ -23,6 +23,15 @@ describe('main', () => { expect(await page.textContent('.safe-fetch-status')).toBe('200') }) + test('safe fetch with special characters', async () => { + expect( + await page.textContent('.safe-fetch-subdir-special-characters') + ).toMatch('KEY=safe') + expect( + await page.textContent('.safe-fetch-subdir-special-characters-status') + ).toBe('200') + }) + test('unsafe fetch', async () => { expect(await page.textContent('.unsafe-fetch')).toMatch('403 Restricted') expect(await page.textContent('.unsafe-fetch-status')).toBe('403') @@ -33,6 +42,13 @@ describe('main', () => { expect(await page.textContent('.safe-fs-fetch-status')).toBe('200') }) + test('safe fs fetch with special characters', async () => { + expect(await page.textContent('.safe-fs-fetch-special-characters')).toBe( + stringified + ) + expect(await page.textContent('.safe-fs-fetch-status')).toBe('200') + }) + test('unsafe fs fetch', async () => { expect(await page.textContent('.unsafe-fs-fetch')).toBe('') expect(await page.textContent('.unsafe-fs-fetch-status')).toBe('403') diff --git a/packages/playground/fs-serve/root/src/index.html b/packages/playground/fs-serve/root/src/index.html index c8b294e86ab0ea..951e14ad2cce91 100644 --- a/packages/playground/fs-serve/root/src/index.html +++ b/packages/playground/fs-serve/root/src/index.html @@ -8,6 +8,12 @@

Safe Fetch


 

 
+

Safe Fetch Subdirectory

+

+

+

+

+
 

Unsafe Fetch


 

@@ -15,6 +21,8 @@ 

Unsafe Fetch

Safe /@fs/ Fetch


 

+

+

 
 

Unsafe /@fs/ Fetch


@@ -42,6 +50,25 @@ 

Denied

.then((data) => { text('.safe-fetch', JSON.stringify(data)) }) + // inside allowed dir, safe fetch + fetch('/src/subdir/safe.txt') + .then((r) => { + text('.safe-fetch-subdir-status', r.status) + return r.text() + }) + .then((data) => { + text('.safe-fetch-subdir', JSON.stringify(data)) + }) + + // inside allowed dir, with special characters, safe fetch + fetch('/src/special%20characters%20%C3%A5%C3%A4%C3%B6/safe.txt') + .then((r) => { + text('.safe-fetch-subdir-special-characters-status', r.status) + return r.text() + }) + .then((data) => { + text('.safe-fetch-subdir-special-characters', JSON.stringify(data)) + }) // outside of allowed dir, treated as unsafe fetch('/unsafe.txt') @@ -79,6 +106,20 @@

Denied

console.error(e) }) + // not imported before, inside root with special characters, treated as safe + fetch( + '/@fs/' + + ROOT + + '/root/src/special%20characters%20%C3%A5%C3%A4%C3%B6/safe.json' + ) + .then((r) => { + text('.safe-fs-fetch-special-characters-status', r.status) + return r.json() + }) + .then((data) => { + text('.safe-fs-fetch-special-characters', JSON.stringify(data)) + }) + // .env, denied by default fetch('/@fs/' + ROOT + '/root/.env') .then((r) => { diff --git "a/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.json" "b/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.json" new file mode 100644 index 00000000000000..84f96593c10bad --- /dev/null +++ "b/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.json" @@ -0,0 +1,3 @@ +{ + "msg": "safe" +} diff --git "a/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.txt" "b/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.txt" new file mode 100644 index 00000000000000..3f3d0607101642 --- /dev/null +++ "b/packages/playground/fs-serve/root/src/special characters \303\245\303\244\303\266/safe.txt" @@ -0,0 +1 @@ +KEY=safe diff --git a/packages/playground/fs-serve/root/src/subdir/safe.txt b/packages/playground/fs-serve/root/src/subdir/safe.txt new file mode 100644 index 00000000000000..3f3d0607101642 --- /dev/null +++ b/packages/playground/fs-serve/root/src/subdir/safe.txt @@ -0,0 +1 @@ +KEY=safe diff --git a/packages/playground/glob-import/__tests__/glob-import.spec.ts b/packages/playground/glob-import/__tests__/glob-import.spec.ts index 3a2425736548ea..ebdf6c0ab29193 100644 --- a/packages/playground/glob-import/__tests__/glob-import.spec.ts +++ b/packages/playground/glob-import/__tests__/glob-import.spec.ts @@ -7,6 +7,9 @@ import { } from '../../testUtils' const filteredResult = { + './alias.js': { + default: 'hi' + }, './foo.js': { msg: 'foo' } @@ -30,11 +33,19 @@ const json = isBuild const allResult = { // JSON file should be properly transformed + '/dir/alias.js': { + default: 'hi' + }, '/dir/baz.json': json, '/dir/foo.js': { msg: 'foo' }, '/dir/index.js': { + globWithAlias: { + './alias.js': { + default: 'hi' + } + }, modules: filteredResult }, '/dir/nested/bar.js': { @@ -55,6 +66,12 @@ const rawResult = { } } +const relativeRawResult = { + '../glob-import/dir/baz.json': { + msg: 'baz' + } +} + test('should work', async () => { expect(await page.textContent('.result')).toBe( JSON.stringify(allResult, null, 2) @@ -70,6 +87,12 @@ test('import glob raw', async () => { ) }) +test('import relative glob raw', async () => { + expect(await page.textContent('.relative-glob-raw')).toBe( + JSON.stringify(relativeRawResult, null, 2) + ) +}) + if (!isBuild) { test('hmr for adding/removing files', async () => { addFile('dir/a.js', '') @@ -80,6 +103,7 @@ if (!isBuild) { '/dir/a.js': {}, ...allResult, '/dir/index.js': { + ...allResult['/dir/index.js'], modules: { './a.js': {}, ...allResult['/dir/index.js'].modules @@ -102,6 +126,7 @@ if (!isBuild) { }, ...allResult, '/dir/index.js': { + ...allResult['/dir/index.js'], modules: { './a.js': { msg: 'a' diff --git a/packages/playground/glob-import/dir/alias.js b/packages/playground/glob-import/dir/alias.js new file mode 100644 index 00000000000000..9c533d93b9a98a --- /dev/null +++ b/packages/playground/glob-import/dir/alias.js @@ -0,0 +1 @@ +export default 'hi' diff --git a/packages/playground/glob-import/dir/index.js b/packages/playground/glob-import/dir/index.js index d13d470e2b2b80..fb87f69f0f3a61 100644 --- a/packages/playground/glob-import/dir/index.js +++ b/packages/playground/glob-import/dir/index.js @@ -1,3 +1,4 @@ const modules = import.meta.globEager('./*.(js|ts)') +const globWithAlias = import.meta.globEager('@dir/al*.js') -export { modules } +export { modules, globWithAlias } diff --git a/packages/playground/glob-import/index.html b/packages/playground/glob-import/index.html index bb5e2f3c18f752..64f456aeb4d6a2 100644 --- a/packages/playground/glob-import/index.html +++ b/packages/playground/glob-import/index.html @@ -1,6 +1,7 @@

 

 

+

 
 
 
+
+
diff --git a/packages/playground/glob-import/vite.config.ts b/packages/playground/glob-import/vite.config.ts
new file mode 100644
index 00000000000000..abc75b51656503
--- /dev/null
+++ b/packages/playground/glob-import/vite.config.ts
@@ -0,0 +1,10 @@
+import path from 'path'
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+  resolve: {
+    alias: {
+      '@dir': path.resolve(__dirname, './dir/')
+    }
+  }
+})
diff --git a/packages/playground/hmr/__tests__/hmr.spec.ts b/packages/playground/hmr/__tests__/hmr.spec.ts
index 8244ecb20472e6..6ddc2345ae4fb4 100644
--- a/packages/playground/hmr/__tests__/hmr.spec.ts
+++ b/packages/playground/hmr/__tests__/hmr.spec.ts
@@ -16,7 +16,7 @@ if (!isBuild) {
   test('self accept', async () => {
     const el = await page.$('.app')
 
-    editFile('hmr.js', (code) => code.replace('const foo = 1', 'const foo = 2'))
+    editFile('hmr.ts', (code) => code.replace('const foo = 1', 'const foo = 2'))
     await untilUpdated(() => el.textContent(), '2')
 
     expect(browserLogs).toMatchObject([
@@ -24,11 +24,11 @@ if (!isBuild) {
       'foo was: 1',
       '(self-accepting 1) foo is now: 2',
       '(self-accepting 2) foo is now: 2',
-      '[vite] hot updated: /hmr.js'
+      '[vite] hot updated: /hmr.ts'
     ])
     browserLogs.length = 0
 
-    editFile('hmr.js', (code) => code.replace('const foo = 2', 'const foo = 3'))
+    editFile('hmr.ts', (code) => code.replace('const foo = 2', 'const foo = 3'))
     await untilUpdated(() => el.textContent(), '3')
 
     expect(browserLogs).toMatchObject([
@@ -36,7 +36,7 @@ if (!isBuild) {
       'foo was: 2',
       '(self-accepting 1) foo is now: 3',
       '(self-accepting 2) foo is now: 3',
-      '[vite] hot updated: /hmr.js'
+      '[vite] hot updated: /hmr.ts'
     ])
     browserLogs.length = 0
   })
@@ -57,7 +57,7 @@ if (!isBuild) {
       '(single dep) nested foo is now: 1',
       '(multi deps) foo is now: 2',
       '(multi deps) nested foo is now: 1',
-      '[vite] hot updated: /hmrDep.js via /hmr.js'
+      '[vite] hot updated: /hmrDep.js via /hmr.ts'
     ])
     browserLogs.length = 0
 
@@ -74,7 +74,7 @@ if (!isBuild) {
       '(single dep) nested foo is now: 1',
       '(multi deps) foo is now: 3',
       '(multi deps) nested foo is now: 1',
-      '[vite] hot updated: /hmrDep.js via /hmr.js'
+      '[vite] hot updated: /hmrDep.js via /hmr.ts'
     ])
     browserLogs.length = 0
   })
@@ -95,7 +95,7 @@ if (!isBuild) {
       '(single dep) nested foo is now: 2',
       '(multi deps) foo is now: 3',
       '(multi deps) nested foo is now: 2',
-      '[vite] hot updated: /hmrDep.js via /hmr.js'
+      '[vite] hot updated: /hmrDep.js via /hmr.ts'
     ])
     browserLogs.length = 0
 
@@ -112,7 +112,7 @@ if (!isBuild) {
       '(single dep) nested foo is now: 3',
       '(multi deps) foo is now: 3',
       '(multi deps) nested foo is now: 3',
-      '[vite] hot updated: /hmrDep.js via /hmr.js'
+      '[vite] hot updated: /hmrDep.js via /hmr.ts'
     ])
     browserLogs.length = 0
   })
@@ -123,11 +123,16 @@ if (!isBuild) {
     await untilUpdated(() => el.textContent(), 'edited')
   })
 
+  test('plugin client-server communication', async () => {
+    const el = await page.$('.custom-communication')
+    await untilUpdated(() => el.textContent(), '3')
+  })
+
   test('full-reload encodeURI path', async () => {
     await page.goto(
       viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html'
     )
-    let el = await page.$('#app')
+    const el = await page.$('#app')
     expect(await el.textContent()).toBe('title')
     await editFile(
       'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
@@ -139,4 +144,20 @@ if (!isBuild) {
       'title2'
     )
   })
+
+  test('CSS update preserves query params', async () => {
+    await page.goto(viteTestUrl)
+
+    editFile('global.css', (code) => code.replace('white', 'tomato'))
+
+    const elprev = await page.$('.css-prev')
+    const elpost = await page.$('.css-post')
+    await untilUpdated(() => elprev.textContent(), 'param=required')
+    await untilUpdated(() => elpost.textContent(), 'param=required')
+    const textprev = await elprev.textContent()
+    const textpost = await elpost.textContent()
+    expect(textprev).not.toBe(textpost)
+    expect(textprev).not.toMatch('direct')
+    expect(textpost).not.toMatch('direct')
+  })
 }
diff --git a/packages/playground/hmr/event.d.ts b/packages/playground/hmr/event.d.ts
new file mode 100644
index 00000000000000..151a9cc3b861cd
--- /dev/null
+++ b/packages/playground/hmr/event.d.ts
@@ -0,0 +1,9 @@
+import 'vite/types/customEvent'
+
+declare module 'vite/types/customEvent' {
+  interface CustomEventMap {
+    'custom:foo': { msg: string }
+    'custom:remote-add': { a: number; b: number }
+    'custom:remote-add-result': { result: string }
+  }
+}
diff --git a/packages/playground/hmr/global.css b/packages/playground/hmr/global.css
new file mode 100644
index 00000000000000..5b6976fbff5506
--- /dev/null
+++ b/packages/playground/hmr/global.css
@@ -0,0 +1,3 @@
+body {
+  background: white;
+}
diff --git a/packages/playground/hmr/hmr.js b/packages/playground/hmr/hmr.ts
similarity index 63%
rename from packages/playground/hmr/hmr.js
rename to packages/playground/hmr/hmr.ts
index e8da1ecbabf98b..113b87bc5865d4 100644
--- a/packages/playground/hmr/hmr.js
+++ b/packages/playground/hmr/hmr.ts
@@ -35,15 +35,34 @@ if (import.meta.hot) {
 
   import.meta.hot.on('vite:beforeUpdate', (event) => {
     console.log(`>>> vite:beforeUpdate -- ${event.type}`)
+
+    const cssUpdate = event.updates.find(
+      (update) =>
+        update.type === 'css-update' && update.path.match('global.css')
+    )
+    if (cssUpdate) {
+      const el = document.querySelector('#global-css') as HTMLLinkElement
+      text('.css-prev', el.href)
+      // We don't have a vite:afterUpdate event, but updates are currently sync
+      setTimeout(() => {
+        text('.css-post', el.href)
+      }, 0)
+    }
   })
 
   import.meta.hot.on('vite:error', (event) => {
     console.log(`>>> vite:error -- ${event.type}`)
   })
 
-  import.meta.hot.on('foo', ({ msg }) => {
+  import.meta.hot.on('custom:foo', ({ msg }) => {
     text('.custom', msg)
   })
+
+  // send custom event to server to calculate 1 + 2
+  import.meta.hot.send('custom:remote-add', { a: 1, b: 2 })
+  import.meta.hot.on('custom:remote-add-result', ({ result }) => {
+    text('.custom-communication', result)
+  })
 }
 
 function text(el, text) {
diff --git a/packages/playground/hmr/index.html b/packages/playground/hmr/index.html
index 2b060949d38af0..0add7c26011a01 100644
--- a/packages/playground/hmr/index.html
+++ b/packages/playground/hmr/index.html
@@ -1,6 +1,10 @@
-
+
+
 
 
+
+
+
diff --git a/packages/playground/hmr/tsconfig.json b/packages/playground/hmr/tsconfig.json new file mode 100644 index 00000000000000..41b16fdc65ec8c --- /dev/null +++ b/packages/playground/hmr/tsconfig.json @@ -0,0 +1,15 @@ +{ + "include": ["."], + "exclude": ["**/dist/**"], + "compilerOptions": { + "target": "es2019", + "module": "esnext", + "outDir": "dist", + "allowJs": true, + "esModuleInterop": true, + "moduleResolution": "node", + "baseUrl": ".", + "jsx": "preserve", + "types": ["vite/client", "jest", "node"] + } +} diff --git a/packages/playground/hmr/vite.config.js b/packages/playground/hmr/vite.config.js deleted file mode 100644 index c34637844e2170..00000000000000 --- a/packages/playground/hmr/vite.config.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @type {import('vite').UserConfig} - */ -module.exports = { - plugins: [ - { - name: 'mock-custom', - async handleHotUpdate({ file, read, server }) { - if (file.endsWith('customFile.js')) { - const content = await read() - const msg = content.match(/export const msg = '(\w+)'/)[1] - server.ws.send({ - type: 'custom', - event: 'foo', - data: { - msg - } - }) - } - } - } - ] -} diff --git a/packages/playground/hmr/vite.config.ts b/packages/playground/hmr/vite.config.ts new file mode 100644 index 00000000000000..ef5d3cf36a2fcb --- /dev/null +++ b/packages/playground/hmr/vite.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from 'vite' + +export default defineConfig({ + plugins: [ + { + name: 'mock-custom', + async handleHotUpdate({ file, read, server }) { + if (file.endsWith('customFile.js')) { + const content = await read() + const msg = content.match(/export const msg = '(\w+)'/)[1] + server.ws.send('custom:foo', { msg }) + } + }, + configureServer(server) { + server.ws.on('custom:remote-add', ({ a, b }, client) => { + client.send('custom:remote-add-result', { result: a + b }) + }) + } + } + ] +}) diff --git a/packages/playground/html/__tests__/html.spec.ts b/packages/playground/html/__tests__/html.spec.ts index 1a663efb146977..834db1f6126cad 100644 --- a/packages/playground/html/__tests__/html.spec.ts +++ b/packages/playground/html/__tests__/html.spec.ts @@ -197,25 +197,6 @@ describe('noBody', () => { }) }) -describe('importAsString', () => { - // The build-html plugin should not alter HTML that is not an input. - test('not transformed', async () => { - const messages = [] - function addConsoleMessage(message) { - messages.push(message.args()[0]) - } - - page.on('console', addConsoleMessage) - await page.goto(viteTestUrl + '/index.html') - await page.waitForLoadState() - page.off('console', addConsoleMessage) - - const result = messages.map((m) => m.toString()).join('\n') - expect(result).toMatch('Some imported HTML') - expect(result).not.toMatch('This is injected') - }) -}) - describe('unicode path', () => { test('direct access', async () => { await page.goto( @@ -250,7 +231,7 @@ if (!isBuild) { await editFile('invalid.html', (content) => { return content.replace('
Good') }) - const content = await page.waitForSelector('text=Good Html') + const content = await page.waitForSelector('text=Good HTML') expect(content).toBeTruthy() }) }) diff --git a/packages/playground/html/importAsString.html b/packages/playground/html/importAsString.html deleted file mode 100644 index a9f57d697bef91..00000000000000 --- a/packages/playground/html/importAsString.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Some imported HTML - - diff --git a/packages/playground/html/invalid.html b/packages/playground/html/invalid.html index 5b5cf429687466..8acea73f16bdad 100644 --- a/packages/playground/html/invalid.html +++ b/packages/playground/html/invalid.html @@ -1 +1 @@ -
+
diff --git a/packages/playground/html/main.js b/packages/playground/html/main.js index c44ec322c965f7..cd769880553ced 100644 --- a/packages/playground/html/main.js +++ b/packages/playground/html/main.js @@ -1,6 +1,4 @@ import { msg } from './shared' -import asString from './importAsString.html' import './common.css' console.log(msg + ' from main') -console.log('loaded string ' + asString) diff --git a/packages/playground/html/vite.config.js b/packages/playground/html/vite.config.js index 7dc01af7d9ca79..1703e02cc05366 100644 --- a/packages/playground/html/vite.config.js +++ b/packages/playground/html/vite.config.js @@ -157,18 +157,6 @@ ${ } ] } - }, - { - // Emulate rollup-plugin-string - name: 'import-as-string-module', - transform(code, id) { - if (id.endsWith('importAsString.html')) { - return { - code: `export default ${JSON.stringify(code)}`, - map: { mappings: '' } - } - } - } } ] } diff --git a/packages/playground/js-sourcemap/__tests__/build.spec.ts b/packages/playground/js-sourcemap/__tests__/build.spec.ts new file mode 100644 index 00000000000000..e36c1f52d2c1f8 --- /dev/null +++ b/packages/playground/js-sourcemap/__tests__/build.spec.ts @@ -0,0 +1,13 @@ +import { isBuild } from 'testUtils' + +if (isBuild) { + test('should not output sourcemap warning (#4939)', () => { + serverLogs.forEach((log) => { + expect(log).not.toMatch('Sourcemap is likely to be incorrect') + }) + }) +} else { + test('this file only includes test for build', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/js-sourcemap/__tests__/serve.spec.ts b/packages/playground/js-sourcemap/__tests__/serve.spec.ts new file mode 100644 index 00000000000000..a1ffdddc37ecd5 --- /dev/null +++ b/packages/playground/js-sourcemap/__tests__/serve.spec.ts @@ -0,0 +1,44 @@ +import { URL } from 'url' +import { + extractSourcemap, + formatSourcemapForSnapshot, + isBuild +} from 'testUtils' + +if (!isBuild) { + test('js', async () => { + const res = await page.request.get(new URL('./foo.js', page.url()).href) + const js = await res.text() + const lines = js.split('\n') + expect(lines[lines.length - 1].includes('//')).toBe(false) // expect no sourcemap + }) + + test('ts', async () => { + const res = await page.request.get(new URL('./bar.ts', page.url()).href) + const js = await res.text() + const map = extractSourcemap(js) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAO,aAAM,MAAM;", + "sources": Array [ + "/root/bar.ts", + ], + "sourcesContent": Array [ + "export const bar = 'bar' + ", + ], + "version": 3, + } + `) + }) + + test('should not output missing source file warning', () => { + serverLogs.forEach((log) => { + expect(log).not.toMatch(/Sourcemap for .+ points to missing source files/) + }) + }) +} else { + test('this file only includes test for serve', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/js-sourcemap/bar.ts b/packages/playground/js-sourcemap/bar.ts new file mode 100644 index 00000000000000..1fc11814f22e80 --- /dev/null +++ b/packages/playground/js-sourcemap/bar.ts @@ -0,0 +1 @@ +export const bar = 'bar' diff --git a/packages/playground/js-sourcemap/foo.js b/packages/playground/js-sourcemap/foo.js new file mode 100644 index 00000000000000..cb356468240d50 --- /dev/null +++ b/packages/playground/js-sourcemap/foo.js @@ -0,0 +1 @@ +export const foo = 'foo' diff --git a/packages/playground/js-sourcemap/index.html b/packages/playground/js-sourcemap/index.html new file mode 100644 index 00000000000000..025b161011a3fa --- /dev/null +++ b/packages/playground/js-sourcemap/index.html @@ -0,0 +1,6 @@ +
+

JS Sourcemap

+
+ + + diff --git a/packages/playground/js-sourcemap/package.json b/packages/playground/js-sourcemap/package.json new file mode 100644 index 00000000000000..e5a97aea80830f --- /dev/null +++ b/packages/playground/js-sourcemap/package.json @@ -0,0 +1,11 @@ +{ + "name": "test-js-sourcemap", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../vite/bin/vite", + "preview": "vite preview" + } +} diff --git a/packages/playground/js-sourcemap/vite.config.js b/packages/playground/js-sourcemap/vite.config.js new file mode 100644 index 00000000000000..bc9d1748cab964 --- /dev/null +++ b/packages/playground/js-sourcemap/vite.config.js @@ -0,0 +1,8 @@ +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + build: { + sourcemap: true + } +} diff --git a/packages/playground/json/index.html b/packages/playground/json/index.html index 4f6e2b6ae57466..cf16636f91cb68 100644 --- a/packages/playground/json/index.html +++ b/packages/playground/json/index.html @@ -19,6 +19,9 @@

Importing as URL

Raw Import


 
+

JSON Module

+

+
 
diff --git a/packages/playground/legacy/main.js b/packages/playground/legacy/main.js
index dc458c199b8754..31579b4717810d 100644
--- a/packages/playground/legacy/main.js
+++ b/packages/playground/legacy/main.js
@@ -1,3 +1,5 @@
+import './style.css'
+
 async function run() {
   const { fn } = await import('./async.js')
   fn()
@@ -19,6 +21,12 @@ text('#env', `is legacy: ${isLegacy}`)
 // Iterators
 text('#iterators', [...new Set(['hello'])].join(''))
 
+// structuredClone is supported core.js v3.20.0+
+text(
+  '#features-after-corejs-3',
+  JSON.stringify(structuredClone({ foo: 'foo' }))
+)
+
 // babel-helpers
 // Using `String.raw` to inject `@babel/plugin-transform-template-literals`
 // helpers.
diff --git a/packages/playground/legacy/package.json b/packages/playground/legacy/package.json
index 177aa5a0a5078b..3a3315c42aa832 100644
--- a/packages/playground/legacy/package.json
+++ b/packages/playground/legacy/package.json
@@ -10,6 +10,7 @@
     "preview": "vite preview"
   },
   "devDependencies": {
-    "@vitejs/plugin-legacy": "workspace:*"
+    "@vitejs/plugin-legacy": "workspace:*",
+    "express": "^4.17.1"
   }
 }
diff --git a/packages/playground/legacy/style.css b/packages/playground/legacy/style.css
new file mode 100644
index 00000000000000..7bcb57b6187df5
--- /dev/null
+++ b/packages/playground/legacy/style.css
@@ -0,0 +1,3 @@
+#app {
+  color: red;
+}
diff --git a/packages/playground/legacy/vite.config.js b/packages/playground/legacy/vite.config.js
index da8addec974673..90d3be7f7c56a0 100644
--- a/packages/playground/legacy/vite.config.js
+++ b/packages/playground/legacy/vite.config.js
@@ -10,6 +10,7 @@ module.exports = {
   ],
 
   build: {
+    cssCodeSplit: false,
     manifest: true,
     rollupOptions: {
       output: {
diff --git a/packages/playground/multiple-entrypoints/package.json b/packages/playground/multiple-entrypoints/package.json
index 7b4dab889c472e..6c338a64518ddb 100644
--- a/packages/playground/multiple-entrypoints/package.json
+++ b/packages/playground/multiple-entrypoints/package.json
@@ -7,5 +7,9 @@
     "build": "vite build",
     "debug": "node --inspect-brk ../../vite/bin/vite",
     "preview": "vite preview"
+  },
+  "devDependencies": {
+    "fast-glob": "^3.2.11",
+    "sass": "^1.43.4"
   }
 }
diff --git a/packages/playground/nested-deps/test-package-a/package.json b/packages/playground/nested-deps/test-package-a/package.json
index 5055f3dd623043..688fab78bab766 100644
--- a/packages/playground/nested-deps/test-package-a/package.json
+++ b/packages/playground/nested-deps/test-package-a/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-a",
+  "private": true,
   "version": "2.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/nested-deps/test-package-b/package.json b/packages/playground/nested-deps/test-package-b/package.json
index 342cf2ded23e3b..6e32e8eba153a1 100644
--- a/packages/playground/nested-deps/test-package-b/package.json
+++ b/packages/playground/nested-deps/test-package-b/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-b",
+  "private": true,
   "version": "1.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/nested-deps/test-package-c/package.json b/packages/playground/nested-deps/test-package-c/package.json
index b90462db110bfc..47672d07b3881f 100644
--- a/packages/playground/nested-deps/test-package-c/package.json
+++ b/packages/playground/nested-deps/test-package-c/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-c",
+  "private": true,
   "version": "1.0.0",
   "main": "index.js",
   "module": "index-es.js"
diff --git a/packages/playground/nested-deps/test-package-d/package.json b/packages/playground/nested-deps/test-package-d/package.json
index e97830636596fc..e9f522c2c5ddf6 100644
--- a/packages/playground/nested-deps/test-package-d/package.json
+++ b/packages/playground/nested-deps/test-package-d/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-d",
+  "private": true,
   "version": "1.0.0",
   "main": "index.js",
   "dependencies": {
diff --git a/packages/playground/nested-deps/test-package-d/test-package-d-nested/package.json b/packages/playground/nested-deps/test-package-d/test-package-d-nested/package.json
index deb92dc84767fd..50f1123b6f7ff7 100644
--- a/packages/playground/nested-deps/test-package-d/test-package-d-nested/package.json
+++ b/packages/playground/nested-deps/test-package-d/test-package-d-nested/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-d-nested",
+  "private": true,
   "version": "1.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/nested-deps/test-package-e/package.json b/packages/playground/nested-deps/test-package-e/package.json
index 27b85d976f9160..45779d1a7676ad 100644
--- a/packages/playground/nested-deps/test-package-e/package.json
+++ b/packages/playground/nested-deps/test-package-e/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-e",
+  "private": true,
   "version": "0.1.0",
   "main": "index.js",
   "dependencies": {
diff --git a/packages/playground/nested-deps/test-package-e/test-package-e-excluded/package.json b/packages/playground/nested-deps/test-package-e/test-package-e-excluded/package.json
index 09dd3a1469ce19..8722324da53499 100644
--- a/packages/playground/nested-deps/test-package-e/test-package-e-excluded/package.json
+++ b/packages/playground/nested-deps/test-package-e/test-package-e-excluded/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-e-excluded",
+  "private": true,
   "version": "0.1.0",
   "main": "index.js"
 }
diff --git a/packages/playground/nested-deps/test-package-e/test-package-e-included/package.json b/packages/playground/nested-deps/test-package-e/test-package-e-included/package.json
index 3c984f175ca382..37198ee7d6a7c7 100644
--- a/packages/playground/nested-deps/test-package-e/test-package-e-included/package.json
+++ b/packages/playground/nested-deps/test-package-e/test-package-e-included/package.json
@@ -1,5 +1,6 @@
 {
   "name": "test-package-e-included",
+  "private": true,
   "version": "0.1.0",
   "main": "index.js",
   "dependencies": {
diff --git a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts
index 706998c288fa50..d95a6d984cd9aa 100644
--- a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts
+++ b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts
@@ -46,7 +46,7 @@ test('dedupe', async () => {
   expect(await page.textContent('.dedupe button')).toBe('count is 1')
 })
 
-test('cjs borwser field (axios)', async () => {
+test('cjs browser field (axios)', async () => {
   expect(await page.textContent('.cjs-browser-field')).toBe('pong')
 })
 
@@ -62,6 +62,16 @@ test('import * from optimized dep', async () => {
   expect(await page.textContent('.import-star')).toMatch(`[success]`)
 })
 
+test('import from dep with .notjs files', async () => {
+  expect(await page.textContent('.not-js')).toMatch(`[success]`)
+})
+
+test('dep with dynamic import', async () => {
+  expect(await page.textContent('.dep-with-dynamic-import')).toMatch(
+    `[success]`
+  )
+})
+
 test('dep with css import', async () => {
   expect(await getColor('h1')).toBe('red')
 })
@@ -87,3 +97,11 @@ test('import from hidden dir', async () => {
 test('import optimize-excluded package that imports optimized-included package', async () => {
   expect(await page.textContent('.nested-include')).toBe('nested-include')
 })
+
+test('import aliased package with colon', async () => {
+  expect(await page.textContent('.url')).toBe('vitejs.dev')
+})
+
+test('variable names are reused in different scripts', async () => {
+  expect(await page.textContent('.reused-variable-names')).toBe('reused')
+})
diff --git a/packages/playground/optimize-deps/dep-cjs-compiled-from-cjs/package.json b/packages/playground/optimize-deps/dep-cjs-compiled-from-cjs/package.json
index c27c7b3b73cf91..8fbd661730eafd 100644
--- a/packages/playground/optimize-deps/dep-cjs-compiled-from-cjs/package.json
+++ b/packages/playground/optimize-deps/dep-cjs-compiled-from-cjs/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep-cjs-compiled-from-cjs",
+  "private": true,
   "version": "0.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/optimize-deps/dep-cjs-compiled-from-esm/package.json b/packages/playground/optimize-deps/dep-cjs-compiled-from-esm/package.json
index cd016d330d1095..27ba12a1ec6f7b 100644
--- a/packages/playground/optimize-deps/dep-cjs-compiled-from-esm/package.json
+++ b/packages/playground/optimize-deps/dep-cjs-compiled-from-esm/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep-cjs-compiled-from-esm",
+  "private": true,
   "version": "0.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/optimize-deps/dep-esbuild-plugin-transform/package.json b/packages/playground/optimize-deps/dep-esbuild-plugin-transform/package.json
index 883bc5176e91c0..4adb0e7032ae20 100644
--- a/packages/playground/optimize-deps/dep-esbuild-plugin-transform/package.json
+++ b/packages/playground/optimize-deps/dep-esbuild-plugin-transform/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep-esbuild-plugin-transform",
+  "private": true,
   "version": "0.0.0",
   "main": "index.js"
 }
diff --git a/packages/playground/optimize-deps/dep-linked-include/package.json b/packages/playground/optimize-deps/dep-linked-include/package.json
index d1a21edfd44d55..0cfabdb9a2f2b9 100644
--- a/packages/playground/optimize-deps/dep-linked-include/package.json
+++ b/packages/playground/optimize-deps/dep-linked-include/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep-linked-include",
+  "private": true,
   "version": "0.0.0",
   "main": "index.mjs",
   "dependencies": {
diff --git a/packages/playground/optimize-deps/dep-linked/package.json b/packages/playground/optimize-deps/dep-linked/package.json
index d1d90cd7ff688b..915340f10ae4a0 100644
--- a/packages/playground/optimize-deps/dep-linked/package.json
+++ b/packages/playground/optimize-deps/dep-linked/package.json
@@ -1,5 +1,6 @@
 {
   "name": "dep-linked",
+  "private": true,
   "version": "0.0.0",
   "main": "index.js",
   "dependencies": {
diff --git a/packages/playground/optimize-deps/dep-not-js/foo.js b/packages/playground/optimize-deps/dep-not-js/foo.js
new file mode 100644
index 00000000000000..3d809780820c7b
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-not-js/foo.js
@@ -0,0 +1 @@
+export const foo = '[success] imported from .notjs file'
diff --git a/packages/playground/optimize-deps/dep-not-js/index.notjs b/packages/playground/optimize-deps/dep-not-js/index.notjs
new file mode 100644
index 00000000000000..b4ef3a6936a797
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-not-js/index.notjs
@@ -0,0 +1,4 @@
+
+import { foo } from './foo'
+export const notjsValue = foo
+
diff --git a/packages/playground/optimize-deps/dep-not-js/package.json b/packages/playground/optimize-deps/dep-not-js/package.json
new file mode 100644
index 00000000000000..39ebafb6217b6e
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-not-js/package.json
@@ -0,0 +1,6 @@
+{
+  "name": "dep-not-js",
+  "private": true,
+  "version": "1.0.0",
+  "main": "index.notjs"
+}
diff --git a/packages/playground/optimize-deps/dep-with-dynamic-import/dynamic.js b/packages/playground/optimize-deps/dep-with-dynamic-import/dynamic.js
new file mode 100644
index 00000000000000..ea435dc36b7d48
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-with-dynamic-import/dynamic.js
@@ -0,0 +1 @@
+export const foo = '[success] dependency with dynamic import'
diff --git a/packages/playground/optimize-deps/dep-with-dynamic-import/index.js b/packages/playground/optimize-deps/dep-with-dynamic-import/index.js
new file mode 100644
index 00000000000000..68a78d10d6e2d2
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-with-dynamic-import/index.js
@@ -0,0 +1,4 @@
+export const lazyFoo = async function () {
+  const { foo } = await import('./dynamic.js')
+  return foo
+}
diff --git a/packages/playground/optimize-deps/dep-with-dynamic-import/package.json b/packages/playground/optimize-deps/dep-with-dynamic-import/package.json
new file mode 100644
index 00000000000000..81c5d2dda6a62a
--- /dev/null
+++ b/packages/playground/optimize-deps/dep-with-dynamic-import/package.json
@@ -0,0 +1,6 @@
+{
+  "name": "dep-with-dynamic-import",
+  "private": true,
+  "version": "0.0.0",
+  "main": "index.js"
+}
diff --git a/packages/playground/optimize-deps/index.html b/packages/playground/optimize-deps/index.html
index dfb274656f1baf..2be896d00acba9 100644
--- a/packages/playground/optimize-deps/index.html
+++ b/packages/playground/optimize-deps/index.html
@@ -38,6 +38,12 @@ 

Optimizing force included dep even when it's linked

import * as ...

+

Import from dependency with .notjs files

+
+ +

Import from dependency with dynamic import

+
+

Dep w/ special file format supported via plugins

@@ -53,6 +59,18 @@

Dep from hidden dir

Nested include

Module path:
+

Alias with colon

+
URL:
+ +

Reused variable names

+
This should show reused:
+ + + + + + diff --git a/packages/playground/optimize-deps/nested-exclude/nested-include/package.json b/packages/playground/optimize-deps/nested-exclude/nested-include/package.json index 10c83e498f1984..581ef4dada69ce 100644 --- a/packages/playground/optimize-deps/nested-exclude/nested-include/package.json +++ b/packages/playground/optimize-deps/nested-exclude/nested-include/package.json @@ -1,5 +1,6 @@ { "name": "nested-include", + "private": true, "version": "1.0.0", "main": "index.js" } diff --git a/packages/playground/optimize-deps/nested-exclude/package.json b/packages/playground/optimize-deps/nested-exclude/package.json index 11161cc303af6c..57dfc20ea1f801 100644 --- a/packages/playground/optimize-deps/nested-exclude/package.json +++ b/packages/playground/optimize-deps/nested-exclude/package.json @@ -1,5 +1,6 @@ { "name": "nested-exclude", + "private": true, "version": "1.0.0", "main": "index.js", "dependencies": { diff --git a/packages/playground/optimize-deps/package.json b/packages/playground/optimize-deps/package.json index 0606343e0dce3c..2752e691da6fb2 100644 --- a/packages/playground/optimize-deps/package.json +++ b/packages/playground/optimize-deps/package.json @@ -17,12 +17,15 @@ "dep-esbuild-plugin-transform": "file:./dep-esbuild-plugin-transform", "dep-linked": "link:./dep-linked", "dep-linked-include": "link:./dep-linked-include", + "dep-not-js": "file:./dep-not-js", + "dep-with-dynamic-import": "file:./dep-with-dynamic-import", "lodash-es": "^4.17.21", "nested-exclude": "file:./nested-exclude", "phoenix": "^1.6.2", "react": "^17.0.2", "react-dom": "^17.0.2", "resolve-linked": "workspace:0.0.0", + "url": "^0.11.0", "vue": "^3.2.25", "vuex": "^4.0.0" }, diff --git a/packages/playground/optimize-deps/vite.config.js b/packages/playground/optimize-deps/vite.config.js index 45a50aaf85ede6..a989cf1961de11 100644 --- a/packages/playground/optimize-deps/vite.config.js +++ b/packages/playground/optimize-deps/vite.config.js @@ -1,3 +1,4 @@ +const fs = require('fs') const vue = require('@vitejs/plugin-vue') /** @@ -5,7 +6,10 @@ const vue = require('@vitejs/plugin-vue') */ module.exports = { resolve: { - dedupe: ['react'] + dedupe: ['react'], + alias: { + 'node:url': 'url' + } }, optimizeDeps: { @@ -36,6 +40,7 @@ module.exports = { plugins: [ vue(), + notjs(), // for axios request test { name: 'mock', @@ -48,3 +53,39 @@ module.exports = { } ] } + +// Handles .notjs file, basically remove wrapping and tags +function notjs() { + return { + name: 'notjs', + config() { + return { + optimizeDeps: { + extensions: ['.notjs'], + esbuildOptions: { + plugins: [ + { + name: 'esbuild-notjs', + setup(build) { + build.onLoad({ filter: /\.notjs$/ }, ({ path }) => { + let contents = fs.readFileSync(path, 'utf-8') + contents = contents + .replace('', '') + .replace('', '') + return { contents, loader: 'js' } + }) + } + } + ] + } + } + } + }, + transform(code, id) { + if (id.endsWith('.notjs')) { + code = code.replace('', '').replace('', '') + return { code } + } + } + } +} diff --git a/packages/playground/optimize-missing-deps/missing-dep/package.json b/packages/playground/optimize-missing-deps/missing-dep/package.json index 5d91f3518a5f5b..bbfc8ba2c87a57 100644 --- a/packages/playground/optimize-missing-deps/missing-dep/package.json +++ b/packages/playground/optimize-missing-deps/missing-dep/package.json @@ -1,5 +1,6 @@ { "name": "missing-dep", + "private": true, "version": "0.0.0", "main": "index.js", "dependencies": { diff --git a/packages/playground/optimize-missing-deps/multi-entry-dep/package.json b/packages/playground/optimize-missing-deps/multi-entry-dep/package.json index bf9ac7212de92c..ac4f3e542d152b 100644 --- a/packages/playground/optimize-missing-deps/multi-entry-dep/package.json +++ b/packages/playground/optimize-missing-deps/multi-entry-dep/package.json @@ -1,5 +1,6 @@ { "name": "multi-entry-dep", + "private": true, "version": "0.0.0", "main": "index.js", "browser": { diff --git a/packages/playground/package.json b/packages/playground/package.json index 16398f7a310961..75b1d15d299319 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -1,8 +1,9 @@ { "name": "vite-playground", - "version": "1.0.0", "private": true, + "version": "1.0.0", "devDependencies": { + "convert-source-map": "^1.8.0", "css-color-names": "^1.0.1" } } diff --git a/packages/playground/preserve-symlinks/moduleA/package.json b/packages/playground/preserve-symlinks/moduleA/package.json index f971888a4a519e..3df68a0a78a164 100644 --- a/packages/playground/preserve-symlinks/moduleA/package.json +++ b/packages/playground/preserve-symlinks/moduleA/package.json @@ -1,5 +1,6 @@ { "name": "@symlinks/moduleA", + "private": true, "version": "0.0.0", "main": "linked.js" } diff --git a/packages/playground/preserve-symlinks/package.json b/packages/playground/preserve-symlinks/package.json index 0857c5006ba8d1..00a8ef23a3b05e 100644 --- a/packages/playground/preserve-symlinks/package.json +++ b/packages/playground/preserve-symlinks/package.json @@ -1,5 +1,6 @@ { "name": "preserve-symlinks", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite --force", diff --git a/packages/playground/resolve-config/package.json b/packages/playground/resolve-config/package.json index 857293b5e65275..5459dad99003cd 100644 --- a/packages/playground/resolve-config/package.json +++ b/packages/playground/resolve-config/package.json @@ -1,5 +1,6 @@ { "name": "resolve-config", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite --force", diff --git a/packages/playground/resolve-linked/package.json b/packages/playground/resolve-linked/package.json index 8042ce78119b8f..204cfd931c63ab 100644 --- a/packages/playground/resolve-linked/package.json +++ b/packages/playground/resolve-linked/package.json @@ -1,6 +1,6 @@ { "name": "resolve-linked", - "version": "0.0.0", "private": true, + "version": "0.0.0", "main": "src/index.js" } diff --git a/packages/playground/resolve/__tests__/resolve.spec.ts b/packages/playground/resolve/__tests__/resolve.spec.ts index 97e4a5dd0add7b..2deb2fab7f8d40 100644 --- a/packages/playground/resolve/__tests__/resolve.spec.ts +++ b/packages/playground/resolve/__tests__/resolve.spec.ts @@ -16,6 +16,13 @@ test('deep import with exports field', async () => { expect(await page.textContent('.exports-deep')).toMatch('[success]') }) +test('deep import with query with exports field', async () => { + // since it is imported with `?url` it should return a url + expect(await page.textContent('.exports-deep-query')).toMatch( + isBuild ? /base64/ : '/exports-path/deep.json' + ) +}) + test('deep import with exports field + exposed dir', async () => { expect(await page.textContent('.exports-deep-exposed-dir')).toMatch( '[success]' @@ -54,6 +61,12 @@ test('dont add extension to directory name (./dir-with-ext.js/index.js)', async expect(await page.textContent('.dir-with-ext')).toMatch('[success]') }) +test('do not resolve to the `module` field if the importer is a `require` call', async () => { + expect(await page.textContent('.require-pkg-with-module-field')).toMatch( + '[success]' + ) +}) + test('a ts module can import another ts module using its corresponding js file name', async () => { expect(await page.textContent('.ts-extension')).toMatch('[success]') }) diff --git a/packages/playground/resolve/browser-field/package.json b/packages/playground/resolve/browser-field/package.json index 6c4901f42b387b..006f9b4b5f4fc6 100644 --- a/packages/playground/resolve/browser-field/package.json +++ b/packages/playground/resolve/browser-field/package.json @@ -1,5 +1,6 @@ { "name": "resolve-browser-field", + "private": true, "version": "1.0.0", "//": "real world example: https://github.com/axios/axios/blob/3f2ef030e001547eb06060499f8a2e3f002b5a14/package.json#L71-L73", "main": "out/cjs.node.js", diff --git a/packages/playground/resolve/custom-condition/package.json b/packages/playground/resolve/custom-condition/package.json index 1b107f323109ec..490a420fe2dbfc 100644 --- a/packages/playground/resolve/custom-condition/package.json +++ b/packages/playground/resolve/custom-condition/package.json @@ -1,5 +1,6 @@ { "name": "resolve-custom-condition", + "private": true, "version": "1.0.0", "main": "index.js", "exports": { diff --git a/packages/playground/resolve/custom-main-field/package.json b/packages/playground/resolve/custom-main-field/package.json index 64b0e5134f4ca5..bb948c3261eb1c 100644 --- a/packages/playground/resolve/custom-main-field/package.json +++ b/packages/playground/resolve/custom-main-field/package.json @@ -1,5 +1,6 @@ { "name": "resolve-custom-main-field", + "private": true, "version": "1.0.0", "main": "index.js", "custom": "index.custom.js" diff --git a/packages/playground/resolve/exports-env/package.json b/packages/playground/resolve/exports-env/package.json index 766a6c7d40481d..f9e635b5a19c24 100644 --- a/packages/playground/resolve/exports-env/package.json +++ b/packages/playground/resolve/exports-env/package.json @@ -1,5 +1,6 @@ { "name": "resolve-exports-env", + "private": true, "version": "1.0.0", "exports": { "import": { diff --git a/packages/playground/resolve/exports-path/deep.json b/packages/playground/resolve/exports-path/deep.json new file mode 100644 index 00000000000000..97e19265d6c843 --- /dev/null +++ b/packages/playground/resolve/exports-path/deep.json @@ -0,0 +1,3 @@ +{ + "foo": "json" +} diff --git a/packages/playground/resolve/exports-path/package.json b/packages/playground/resolve/exports-path/package.json index 603a18e67e75d4..7355da2f63f616 100644 --- a/packages/playground/resolve/exports-path/package.json +++ b/packages/playground/resolve/exports-path/package.json @@ -1,5 +1,6 @@ { "name": "resolve-exports-path", + "private": true, "version": "1.0.0", "exports": { ".": { @@ -7,6 +8,7 @@ "require": "./cjs.js" }, "./deep.js": "./deep.js", + "./deep.json": "./deep.json", "./dir/": "./dir/", "./dir-mapped/*": { "import": "./dir/*", diff --git a/packages/playground/resolve/index.html b/packages/playground/resolve/index.html index db0a4bc54f1ad7..1920ebb675d24c 100644 --- a/packages/playground/resolve/index.html +++ b/packages/playground/resolve/index.html @@ -12,6 +12,9 @@

Entry resolving with exports field

Deep import with exports field

fail

+

Deep import with query with exports field

+

fail

+

Deep import with exports field + exposed directory

fail

@@ -38,12 +41,26 @@

fail

+

+ A ts module can import another tsx module using its corresponding jsx file + name +

+

fail

+ +

+ A ts module can import another tsx module using its corresponding js file name +

+

fail

+

Resolve file name containing dot

fail

Browser Field

fail

+

Don't resolve to the `module` field if the importer is a `require` call

+

fail

+

CSS Entry

@@ -100,6 +117,10 @@

resolve package that contains # in path

import { msg as deepMsg } from 'resolve-exports-path/deep.js' text('.exports-deep', deepMsg) + // deep import w/ exports w/ query + import deepPath from 'resolve-exports-path/deep.json?url' + text('.exports-deep-query', deepPath) + // deep import w/ exposed dir import { msg as exposedDirMsg } from 'resolve-exports-path/dir/dir' text('.exports-deep-exposed-dir', exposedDirMsg) @@ -130,6 +151,12 @@

resolve package that contains # in path

import { msg as tsExtensionMsg } from './ts-extension' text('.ts-extension', tsExtensionMsg) + import { msgJsx as tsJsxExtensionMsg } from './ts-extension' + text('.jsx-extension', tsJsxExtensionMsg) + + import { msgTsx as tsTsxExtensionMsg } from './ts-extension' + text('.tsx-extension', tsTsxExtensionMsg) + // filename with dot import { bar } from './util/bar.util' text('.dot', bar()) @@ -144,10 +171,11 @@

resolve package that contains # in path

import e from 'resolve-browser-field/ext-index/index.js' import f from 'resolve-browser-field/ext-index' import g from 'resolve-browser-field/no-ext-index/index.js' // no substitution + import h from 'resolve-browser-field/no-ext?query' import { ra, rb, rc, rd, re, rf, rg } from 'resolve-browser-field/relative' - const success = [main, a, c, d, e, f, ra, rc, rd, re, rf] + const success = [main, a, c, d, e, f, h, ra, rc, rd, re, rf] const noSuccess = [b, g, rb, rg] if ( @@ -157,6 +185,9 @@

resolve package that contains # in path

text('.browser', main) } + import { msg as requireButWithModuleFieldMsg } from 'require-pkg-with-module-field' + text('.require-pkg-with-module-field', requireButWithModuleFieldMsg) + import { msg as customExtMsg } from './custom-ext' text('.custom-ext', customExtMsg) diff --git a/packages/playground/resolve/inline-package/package.json b/packages/playground/resolve/inline-package/package.json index 335e35a9236d5b..bbbb6b0b0381d8 100644 --- a/packages/playground/resolve/inline-package/package.json +++ b/packages/playground/resolve/inline-package/package.json @@ -1,6 +1,7 @@ { "name": "inline-package", "private": true, + "version": "0.0.0", "sideEffects": false, "main": "./inline" } diff --git a/packages/playground/resolve/package.json b/packages/playground/resolve/package.json index 5e0f53b4c8468a..dda4476bc6ae82 100644 --- a/packages/playground/resolve/package.json +++ b/packages/playground/resolve/package.json @@ -12,6 +12,7 @@ "@babel/runtime": "^7.16.0", "es5-ext": "0.10.53", "normalize.css": "^8.0.1", + "require-pkg-with-module-field": "link:./require-pkg-with-module-field", "resolve-browser-field": "link:./browser-field", "resolve-custom-condition": "link:./custom-condition", "resolve-custom-main-field": "link:./custom-main-field", diff --git a/packages/playground/resolve/require-pkg-with-module-field/dep.cjs b/packages/playground/resolve/require-pkg-with-module-field/dep.cjs new file mode 100644 index 00000000000000..3fb20b76d48b79 --- /dev/null +++ b/packages/playground/resolve/require-pkg-with-module-field/dep.cjs @@ -0,0 +1,5 @@ +const BigNumber = require('bignumber.js') + +const x = new BigNumber('1111222233334444555566') + +module.exports = x.toString() diff --git a/packages/playground/resolve/require-pkg-with-module-field/index.cjs b/packages/playground/resolve/require-pkg-with-module-field/index.cjs new file mode 100644 index 00000000000000..da215f306d1ac1 --- /dev/null +++ b/packages/playground/resolve/require-pkg-with-module-field/index.cjs @@ -0,0 +1,8 @@ +const dep = require('./dep.cjs') + +const msg = + dep === '1.111222233334444555566e+21' + ? '[success] require-pkg-with-module-field' + : '[failed] require-pkg-with-module-field' + +exports.msg = msg diff --git a/packages/playground/resolve/require-pkg-with-module-field/package.json b/packages/playground/resolve/require-pkg-with-module-field/package.json new file mode 100644 index 00000000000000..e409343a7567d5 --- /dev/null +++ b/packages/playground/resolve/require-pkg-with-module-field/package.json @@ -0,0 +1,9 @@ +{ + "name": "require-pkg-with-module-field", + "private": true, + "version": "1.0.0", + "main": "./index.cjs", + "dependencies": { + "bignumber.js": "9.0.2" + } +} diff --git a/packages/playground/resolve/ts-extension/hellojsx.tsx b/packages/playground/resolve/ts-extension/hellojsx.tsx new file mode 100644 index 00000000000000..a8f610b399b17a --- /dev/null +++ b/packages/playground/resolve/ts-extension/hellojsx.tsx @@ -0,0 +1 @@ +export const msgJsx = '[success] use .jsx extension to import a tsx module' diff --git a/packages/playground/resolve/ts-extension/hellotsx.tsx b/packages/playground/resolve/ts-extension/hellotsx.tsx new file mode 100644 index 00000000000000..b7461ca71ded6c --- /dev/null +++ b/packages/playground/resolve/ts-extension/hellotsx.tsx @@ -0,0 +1 @@ +export const msgTsx = '[success] use .js extension to import a tsx module' diff --git a/packages/playground/resolve/ts-extension/index.ts b/packages/playground/resolve/ts-extension/index.ts index e095619ee4d716..bdb326f8778e64 100644 --- a/packages/playground/resolve/ts-extension/index.ts +++ b/packages/playground/resolve/ts-extension/index.ts @@ -1,3 +1,5 @@ import { msg } from './hello.js' +import { msgJsx } from './hellojsx.jsx' +import { msgTsx } from './hellotsx.js' -export { msg } +export { msg, msgJsx, msgTsx } diff --git a/packages/playground/resolve/vite.config.js b/packages/playground/resolve/vite.config.js index be1b75e431383a..0550d1ecf6f044 100644 --- a/packages/playground/resolve/vite.config.js +++ b/packages/playground/resolve/vite.config.js @@ -40,5 +40,8 @@ module.exports = { } } } - ] + ], + optimizeDeps: { + include: ['require-pkg-with-module-field'] + } } diff --git a/packages/playground/ssr-deps/define-properties-exports/package.json b/packages/playground/ssr-deps/define-properties-exports/package.json index 7555314741d981..3cf10f8cced539 100644 --- a/packages/playground/ssr-deps/define-properties-exports/package.json +++ b/packages/playground/ssr-deps/define-properties-exports/package.json @@ -1,5 +1,5 @@ { "name": "define-properties-exports", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/define-property-exports/package.json b/packages/playground/ssr-deps/define-property-exports/package.json index 02373646db832e..38ef7fdf5f410a 100644 --- a/packages/playground/ssr-deps/define-property-exports/package.json +++ b/packages/playground/ssr-deps/define-property-exports/package.json @@ -1,5 +1,5 @@ { "name": "define-property-exports", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/forwarded-export/package.json b/packages/playground/ssr-deps/forwarded-export/package.json index 49b7f792ba9c1d..1a0a62e0b4472d 100644 --- a/packages/playground/ssr-deps/forwarded-export/package.json +++ b/packages/playground/ssr-deps/forwarded-export/package.json @@ -1,5 +1,5 @@ { "name": "forwarded-export", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/object-assigned-exports/package.json b/packages/playground/ssr-deps/object-assigned-exports/package.json index cdbb4d04c95bbf..a385dc9b7ec1b7 100644 --- a/packages/playground/ssr-deps/object-assigned-exports/package.json +++ b/packages/playground/ssr-deps/object-assigned-exports/package.json @@ -1,5 +1,5 @@ { "name": "object-assigned-exports", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/only-object-assigned-exports/package.json b/packages/playground/ssr-deps/only-object-assigned-exports/package.json index b74c5215385df3..22a071b59e411d 100644 --- a/packages/playground/ssr-deps/only-object-assigned-exports/package.json +++ b/packages/playground/ssr-deps/only-object-assigned-exports/package.json @@ -1,5 +1,5 @@ { "name": "only-object-assigned-exports", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/primitive-export/package.json b/packages/playground/ssr-deps/primitive-export/package.json index c7a766db70b2e1..d86685f6b9a8f1 100644 --- a/packages/playground/ssr-deps/primitive-export/package.json +++ b/packages/playground/ssr-deps/primitive-export/package.json @@ -1,5 +1,5 @@ { "name": "primitive-export", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/read-file-content/package.json b/packages/playground/ssr-deps/read-file-content/package.json index 1350dd365c3aa0..6145e7821f7067 100644 --- a/packages/playground/ssr-deps/read-file-content/package.json +++ b/packages/playground/ssr-deps/read-file-content/package.json @@ -1,5 +1,5 @@ { "name": "read-file-content", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/require-absolute/package.json b/packages/playground/ssr-deps/require-absolute/package.json index 54b14f125760d0..352f550e184745 100644 --- a/packages/playground/ssr-deps/require-absolute/package.json +++ b/packages/playground/ssr-deps/require-absolute/package.json @@ -1,5 +1,5 @@ { "name": "require-absolute", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-deps/ts-transpiled-exports/package.json b/packages/playground/ssr-deps/ts-transpiled-exports/package.json index f975d9d736c7f2..7dbeff43974e42 100644 --- a/packages/playground/ssr-deps/ts-transpiled-exports/package.json +++ b/packages/playground/ssr-deps/ts-transpiled-exports/package.json @@ -1,5 +1,5 @@ { "name": "ts-transpiled-exports", - "version": "0.0.0", - "private": true + "private": true, + "version": "0.0.0" } diff --git a/packages/playground/ssr-vue/dep-import-type/package.json b/packages/playground/ssr-vue/dep-import-type/package.json index b58c873340ebe2..935f28eb7f7157 100644 --- a/packages/playground/ssr-vue/dep-import-type/package.json +++ b/packages/playground/ssr-vue/dep-import-type/package.json @@ -1,5 +1,6 @@ { "name": "dep-import-type", + "private": true, "version": "0.0.0", "main": "index.js" } diff --git a/packages/playground/ssr-vue/src/pages/Home.vue b/packages/playground/ssr-vue/src/pages/Home.vue index 3ca0ca985fe6ed..32a33882cc2324 100644 --- a/packages/playground/ssr-vue/src/pages/Home.vue +++ b/packages/playground/ssr-vue/src/pages/Home.vue @@ -13,7 +13,7 @@
encrypted message: -

{{ encryptedMsg }}

+

diff --git a/packages/playground/tailwind-sourcemap/__tests__/build.spec.ts b/packages/playground/tailwind-sourcemap/__tests__/build.spec.ts new file mode 100644 index 00000000000000..e36c1f52d2c1f8 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/__tests__/build.spec.ts @@ -0,0 +1,13 @@ +import { isBuild } from 'testUtils' + +if (isBuild) { + test('should not output sourcemap warning (#4939)', () => { + serverLogs.forEach((log) => { + expect(log).not.toMatch('Sourcemap is likely to be incorrect') + }) + }) +} else { + test('this file only includes test for build', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/tailwind-sourcemap/__tests__/serve.spec.ts b/packages/playground/tailwind-sourcemap/__tests__/serve.spec.ts new file mode 100644 index 00000000000000..d961f75e4536e5 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/__tests__/serve.spec.ts @@ -0,0 +1,13 @@ +import { isBuild } from 'testUtils' + +if (!isBuild) { + test('should not output missing source file warning', () => { + serverLogs.forEach((log) => { + expect(log).not.toMatch(/Sourcemap for .+ points to missing source files/) + }) + }) +} else { + test('this file only includes test for serve', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/tailwind-sourcemap/index.html b/packages/playground/tailwind-sourcemap/index.html new file mode 100644 index 00000000000000..95c8c5da7716d1 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/index.html @@ -0,0 +1,9 @@ +
+

Tailwind Sourcemap

+ +

foo

+
+ + diff --git a/packages/playground/tailwind-sourcemap/package.json b/packages/playground/tailwind-sourcemap/package.json new file mode 100644 index 00000000000000..5c374f3bf47f1b --- /dev/null +++ b/packages/playground/tailwind-sourcemap/package.json @@ -0,0 +1,14 @@ +{ + "name": "test-tailwind-sourcemap", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../vite/bin/vite", + "preview": "vite preview" + }, + "dependencies": { + "tailwindcss": "^3.0.23" + } +} diff --git a/packages/playground/tailwind-sourcemap/postcss.config.js b/packages/playground/tailwind-sourcemap/postcss.config.js new file mode 100644 index 00000000000000..eab3760cbc7b42 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + tailwindcss: { config: __dirname + '/tailwind.config.js' } + } +} diff --git a/packages/playground/tailwind-sourcemap/tailwind.config.js b/packages/playground/tailwind-sourcemap/tailwind.config.js new file mode 100644 index 00000000000000..f89a536ccd742f --- /dev/null +++ b/packages/playground/tailwind-sourcemap/tailwind.config.js @@ -0,0 +1,7 @@ +module.exports = { + content: ['./index.html'], + theme: { + extend: {} + }, + plugins: [] +} diff --git a/packages/playground/tailwind-sourcemap/tailwind.css b/packages/playground/tailwind-sourcemap/tailwind.css new file mode 100644 index 00000000000000..b5c61c956711f9 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/packages/playground/tailwind-sourcemap/vite.config.js b/packages/playground/tailwind-sourcemap/vite.config.js new file mode 100644 index 00000000000000..70fea77247bcd4 --- /dev/null +++ b/packages/playground/tailwind-sourcemap/vite.config.js @@ -0,0 +1,11 @@ +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + css: { + devSourcemap: true + }, + build: { + sourcemap: true + } +} diff --git a/packages/playground/tailwind/__test__/tailwind.spec.ts b/packages/playground/tailwind/__test__/tailwind.spec.ts index 105eb245bf207e..47f6b7ccf49037 100644 --- a/packages/playground/tailwind/__test__/tailwind.spec.ts +++ b/packages/playground/tailwind/__test__/tailwind.spec.ts @@ -5,7 +5,7 @@ test('should render', async () => { }) if (!isBuild) { - test('regenerate CSS and HMR', async () => { + test('regenerate CSS and HMR (glob pattern)', async () => { browserLogs.length = 0 const el = await page.$('#pagetitle') const el2 = await page.$('#helloroot') @@ -37,4 +37,24 @@ if (!isBuild) { browserLogs.length = 0 }) + + test('regenerate CSS and HMR (relative path)', async () => { + browserLogs.length = 0 + const el = await page.$('h1') + + expect(await getColor(el)).toBe('black') + + editFile('src/App.vue', (code) => + code.replace('text-black', 'text-[rgb(11,22,33)]') + ) + + await untilUpdated(() => getColor(el), 'rgb(11, 22, 33)') + + expect(browserLogs).toMatchObject([ + '[vite] css hot updated: /index.css', + '[vite] hot updated: /src/App.vue' + ]) + + browserLogs.length = 0 + }) } diff --git a/packages/playground/tailwind/src/App.vue b/packages/playground/tailwind/src/App.vue index b032d5e0db77e3..25835fc414a06f 100644 --- a/packages/playground/tailwind/src/App.vue +++ b/packages/playground/tailwind/src/App.vue @@ -1,6 +1,6 @@ diff --git a/packages/playground/vue/workerTest.js b/packages/playground/vue/workerTest.js new file mode 100644 index 00000000000000..fcde5e19b30677 --- /dev/null +++ b/packages/playground/vue/workerTest.js @@ -0,0 +1 @@ +self.postMessage('worker load!') diff --git a/packages/playground/wasm/__tests__/wasm.spec.ts b/packages/playground/wasm/__tests__/wasm.spec.ts index b292f0ddc6e7f8..112617212251fa 100644 --- a/packages/playground/wasm/__tests__/wasm.spec.ts +++ b/packages/playground/wasm/__tests__/wasm.spec.ts @@ -9,3 +9,7 @@ test('should work when output', async () => { await page.click('.output-wasm .run') await untilUpdated(() => page.textContent('.output-wasm .result'), '24') }) + +test('should work when wasm in worker', async () => { + await untilUpdated(() => page.textContent('.worker-wasm .result'), '3') +}) diff --git a/packages/playground/wasm/add.wasm b/packages/playground/wasm/add.wasm new file mode 100644 index 00000000000000..76e95b227902b0 Binary files /dev/null and b/packages/playground/wasm/add.wasm differ diff --git a/packages/playground/wasm/index.html b/packages/playground/wasm/index.html index 27bdc8167e064e..ecb0b66e913fbb 100644 --- a/packages/playground/wasm/index.html +++ b/packages/playground/wasm/index.html @@ -12,9 +12,20 @@

When wasm is output, result should be 24

+
+

worker wasm

+ +
+ + .classname { + color: green; + } + + diff --git a/packages/playground/worker/module-and-worker.js b/packages/playground/worker/module-and-worker.js new file mode 100644 index 00000000000000..659e556f08e4a6 --- /dev/null +++ b/packages/playground/worker/module-and-worker.js @@ -0,0 +1,5 @@ +import constant from './modules/module' + +self.postMessage(constant) + +export const module = 'module and worker' diff --git a/packages/playground/worker/newUrl/module.js b/packages/playground/worker/modules/module.js similarity index 100% rename from packages/playground/worker/newUrl/module.js rename to packages/playground/worker/modules/module.js diff --git a/packages/playground/worker/modules/module1.js b/packages/playground/worker/modules/module1.js new file mode 100644 index 00000000000000..191db09d29c44f --- /dev/null +++ b/packages/playground/worker/modules/module1.js @@ -0,0 +1 @@ +export const msg1 = 'module1' diff --git a/packages/playground/worker/modules/module2.js b/packages/playground/worker/modules/module2.js new file mode 100644 index 00000000000000..60447933b8b16e --- /dev/null +++ b/packages/playground/worker/modules/module2.js @@ -0,0 +1,3 @@ +export * from './module' +export * from './module1' +export const msg2 = 'module2' diff --git a/packages/playground/worker/modules/module3.js b/packages/playground/worker/modules/module3.js new file mode 100644 index 00000000000000..33355423bc030e --- /dev/null +++ b/packages/playground/worker/modules/module3.js @@ -0,0 +1,2 @@ +export * from './module' +export const msg3 = 'module3' diff --git a/packages/playground/worker/test-plugin.tsx b/packages/playground/worker/modules/test-plugin.tsx similarity index 100% rename from packages/playground/worker/test-plugin.tsx rename to packages/playground/worker/modules/test-plugin.tsx diff --git a/packages/playground/worker/workerImport.js b/packages/playground/worker/modules/workerImport.js similarity index 100% rename from packages/playground/worker/workerImport.js rename to packages/playground/worker/modules/workerImport.js diff --git a/packages/playground/worker/my-worker.ts b/packages/playground/worker/my-worker.ts index 550382be72c331..dd6061885128c7 100644 --- a/packages/playground/worker/my-worker.ts +++ b/packages/playground/worker/my-worker.ts @@ -1,5 +1,5 @@ -import { msg, mode } from './workerImport' -import { bundleWithPlugin } from './test-plugin' +import { msg, mode } from './modules/workerImport' +import { bundleWithPlugin } from './modules/test-plugin' self.onmessage = (e) => { if (e.data === 'ping') { diff --git a/packages/playground/worker/newUrl/url-worker.js b/packages/playground/worker/newUrl/url-worker.js deleted file mode 100644 index afd91bfe613dc2..00000000000000 --- a/packages/playground/worker/newUrl/url-worker.js +++ /dev/null @@ -1,3 +0,0 @@ -import constant from './module' - -self.postMessage(constant) diff --git a/packages/playground/worker/package.json b/packages/playground/worker/package.json index 131df8c4cbf336..ba4e7fe87e4a98 100644 --- a/packages/playground/worker/package.json +++ b/packages/playground/worker/package.json @@ -5,8 +5,20 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite", - "preview": "vite preview" + "preview": "vite preview", + "dev:es": "vite --config ./vite.config-es.js dev", + "build:es": "vite --config ./vite.config-es.js build", + "preview:es": "vite --config ./vite.config-es.js preview", + "dev:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview", + "dev:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview", + "dev:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview", + "debug": "node --inspect-brk ../../vite/bin/vite" }, "devDependencies": { "@vitejs/plugin-vue-jsx": "workspace:*" diff --git a/packages/playground/worker/possible-ts-output-worker.mjs b/packages/playground/worker/possible-ts-output-worker.mjs index 2bcce3faa8a50e..25f1a447617cd9 100644 --- a/packages/playground/worker/possible-ts-output-worker.mjs +++ b/packages/playground/worker/possible-ts-output-worker.mjs @@ -1,4 +1,4 @@ -import { msg, mode } from './workerImport' +import { msg, mode } from './modules/workerImport' self.onmessage = (e) => { if (e.data === 'ping') { diff --git a/packages/playground/worker/public/classic.js b/packages/playground/worker/public/classic.js new file mode 100644 index 00000000000000..c074cc050c2587 --- /dev/null +++ b/packages/playground/worker/public/classic.js @@ -0,0 +1 @@ +self.constant = 'A classic' diff --git a/packages/playground/worker/sub-worker.js b/packages/playground/worker/sub-worker.js new file mode 100644 index 00000000000000..eff49dfbb46ba6 --- /dev/null +++ b/packages/playground/worker/sub-worker.js @@ -0,0 +1,5 @@ +self.onmessage = (event) => { + if (event.data === 'ping') { + self.postMessage(`pong ${import.meta.url}`) + } +} diff --git a/packages/playground/worker/newUrl/url-shared-worker.js b/packages/playground/worker/url-shared-worker.js similarity index 69% rename from packages/playground/worker/newUrl/url-shared-worker.js rename to packages/playground/worker/url-shared-worker.js index f52de169243056..3535d5c277ec84 100644 --- a/packages/playground/worker/newUrl/url-shared-worker.js +++ b/packages/playground/worker/url-shared-worker.js @@ -1,4 +1,4 @@ -import constant from './module' +import constant from './modules/module' self.onconnect = (event) => { const port = event.ports[0] diff --git a/packages/playground/worker/url-worker.js b/packages/playground/worker/url-worker.js new file mode 100644 index 00000000000000..c25cbefdff89ec --- /dev/null +++ b/packages/playground/worker/url-worker.js @@ -0,0 +1 @@ +self.postMessage('A string' + import.meta.env.BASE_URL + import.meta.url) diff --git a/packages/playground/worker/vite.config-es.js b/packages/playground/worker/vite.config-es.js new file mode 100644 index 00000000000000..a65dece2d0db21 --- /dev/null +++ b/packages/playground/worker/vite.config-es.js @@ -0,0 +1,29 @@ +const vueJsx = require('@vitejs/plugin-vue-jsx') +const vite = require('vite') +const path = require('path') + +module.exports = vite.defineConfig({ + base: '/es/', + enforce: 'pre', + worker: { + format: 'es', + plugins: [vueJsx()] + }, + build: { + outDir: 'dist/es' + }, + plugins: [ + { + name: 'resolve-format-es', + + transform(code, id) { + if (id.includes('main.js')) { + return code.replace( + `/* flag: will replace in vite config import("./format-es.js") */`, + `import("./main-format-es")` + ) + } + } + } + ] +}) diff --git a/packages/playground/worker/vite.config-sourcemap.js b/packages/playground/worker/vite.config-sourcemap.js new file mode 100644 index 00000000000000..ea1c66a33a44d7 --- /dev/null +++ b/packages/playground/worker/vite.config-sourcemap.js @@ -0,0 +1,24 @@ +const vueJsx = require('@vitejs/plugin-vue-jsx') +const vite = require('vite') + +module.exports = vite.defineConfig((sourcemap) => { + sourcemap = process.env.WORKER_MODE || sourcemap + if (sourcemap === 'sourcemap') { + sourcemap = true + } + return { + base: `/iife-${ + typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap + }/`, + worker: { + format: 'iife', + plugins: [vueJsx()] + }, + build: { + outDir: `dist/iife-${ + typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap + }/`, + sourcemap: sourcemap + } + } +}) diff --git a/packages/playground/worker/vite.config.js b/packages/playground/worker/vite.config.js new file mode 100644 index 00000000000000..b7760bc4d7a240 --- /dev/null +++ b/packages/playground/worker/vite.config.js @@ -0,0 +1,13 @@ +const vueJsx = require('@vitejs/plugin-vue-jsx') +const vite = require('vite') + +module.exports = vite.defineConfig({ + base: '/iife/', + worker: { + format: 'iife', + plugins: [vueJsx()] + }, + build: { + outDir: 'dist/iife' + } +}) diff --git a/packages/playground/worker/vite.config.ts b/packages/playground/worker/vite.config.ts deleted file mode 100644 index 6bf980f46e2362..00000000000000 --- a/packages/playground/worker/vite.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import vueJsx from '@vitejs/plugin-vue-jsx' -import { defineConfig } from 'vite' - -export default defineConfig({ - build: { - target: process.env.NODE_ENV === 'production' ? 'chrome60' : 'esnext' - }, - worker: { - plugins: [vueJsx()] - } -}) diff --git a/packages/playground/worker/worker-nested-worker.js b/packages/playground/worker/worker-nested-worker.js new file mode 100644 index 00000000000000..6d4d1e4969005f --- /dev/null +++ b/packages/playground/worker/worker-nested-worker.js @@ -0,0 +1,13 @@ +import SubWorker from './sub-worker?worker' + +const subWorker = new SubWorker() + +self.onmessage = (event) => { + if (event.data === 'ping') { + subWorker.postMessage('ping') + } +} + +subWorker.onmessage = (event) => { + self.postMessage(event.data) +} diff --git a/packages/playground/worker/worker/main-classic.js b/packages/playground/worker/worker/main-classic.js new file mode 100644 index 00000000000000..4ef7776a56876e --- /dev/null +++ b/packages/playground/worker/worker/main-classic.js @@ -0,0 +1,28 @@ +// prettier-ignore +function text(el, text) { + document.querySelector(el).textContent = text +} + +let classicWorker = new Worker( + new URL('../classic-worker.js', import.meta.url) /* , */ + // test comment +) + +// just test for case: ') ... ,' mean no worker options parmas +classicWorker = new Worker(new URL('../classic-worker.js', import.meta.url)) + +classicWorker.addEventListener('message', ({ data }) => { + text('.classic-worker', JSON.stringify(data)) +}) +classicWorker.postMessage('ping') + +const classicSharedWorker = new SharedWorker( + new URL('../classic-shared-worker.js', import.meta.url), + { + type: 'classic' + } +) +classicSharedWorker.port.addEventListener('message', (ev) => { + text('.classic-shared-worker', JSON.stringify(ev.data)) +}) +classicSharedWorker.port.start() diff --git a/packages/playground/worker/worker/main-format-es.js b/packages/playground/worker/worker/main-format-es.js new file mode 100644 index 00000000000000..801c13469151a3 --- /dev/null +++ b/packages/playground/worker/worker/main-format-es.js @@ -0,0 +1,41 @@ +// run when format es +import NestedWorker from '../emit-chunk-nested-worker?worker' + +function text(el, text) { + document.querySelector(el).textContent = text +} + +text('.format-es', 'format es:') + +const nestedWorker = new NestedWorker() +const dataList = [] +nestedWorker.addEventListener('message', (ev) => { + dataList.push(ev.data) + text( + '.emti-chunk-worker', + JSON.stringify( + dataList.sort( + (a, b) => JSON.stringify(a).length - JSON.stringify(b).length + ) + ) + ) +}) + +const dynamicImportWorker = new Worker( + new URL('../emit-chunk-dynamic-import-worker.js', import.meta.url), + { + type: 'module' + } +) +dynamicImportWorker.addEventListener('message', (ev) => { + text('.emti-chunk-dynamic-import-worker', JSON.stringify(ev.data)) +}) + +const moduleWorker = new Worker( + new URL('../module-and-worker.js', import.meta.url), + { type: 'module' } +) + +moduleWorker.addEventListener('message', (ev) => { + text('.module-and-worker-worker', JSON.stringify(ev.data)) +}) diff --git a/packages/playground/worker/worker/main-module.js b/packages/playground/worker/worker/main-module.js new file mode 100644 index 00000000000000..417cf1728c4b09 --- /dev/null +++ b/packages/playground/worker/worker/main-module.js @@ -0,0 +1,85 @@ +import myWorker from '../my-worker?worker' +import InlineWorker from '../my-worker?worker&inline' +import mySharedWorker from '../my-shared-worker?sharedworker&name=shared' +import TSOutputWorker from '../possible-ts-output-worker?worker' +import NestedWorker from '../worker-nested-worker?worker' +import { mode } from '../modules/workerImport' + +function text(el, text) { + document.querySelector(el).textContent = text +} + +document.querySelector('.mode-true').textContent = mode + +const worker = new myWorker() +worker.addEventListener('message', (e) => { + text('.pong', e.data.msg) + text('.mode', e.data.mode) + text('.bundle-with-plugin', e.data.bundleWithPlugin) +}) + +document.querySelector('.ping').addEventListener('click', () => { + worker.postMessage('ping') +}) + +const inlineWorker = new InlineWorker() +inlineWorker.addEventListener('message', (e) => { + text('.pong-inline', e.data.msg) +}) + +document.querySelector('.ping-inline').addEventListener('click', () => { + console.log('111') + inlineWorker.postMessage('ping') +}) + +const sharedWorker = new mySharedWorker() +document.querySelector('.tick-shared').addEventListener('click', () => { + sharedWorker.port.postMessage('tick') +}) + +sharedWorker.port.addEventListener('message', (event) => { + text('.tick-count', event.data) +}) + +sharedWorker.port.start() + +const tsOutputWorker = new TSOutputWorker() +tsOutputWorker.addEventListener('message', (e) => { + text('.pong-ts-output', e.data.msg) +}) + +document.querySelector('.ping-ts-output').addEventListener('click', () => { + tsOutputWorker.postMessage('ping') +}) + +const nestedWorker = new NestedWorker() +nestedWorker.addEventListener('message', (ev) => { + if (typeof ev.data === 'string') { + text('.nested-worker', JSON.stringify(ev.data)) + } +}) +nestedWorker.postMessage('ping') + +const workerOptions = { type: 'module' } +// url import worker +const w = new Worker( + new URL('../url-worker.js', import.meta.url), + /* @vite-ignore */ workerOptions +) +w.addEventListener('message', (ev) => + text('.worker-import-meta-url', JSON.stringify(ev.data)) +) + +const genWorkerName = () => 'module' +const w2 = new SharedWorker( + new URL('../url-shared-worker.js', import.meta.url), + { + /* @vite-ignore */ + name: genWorkerName(), + type: 'module' + } +) +w2.port.addEventListener('message', (ev) => { + text('.shared-worker-import-meta-url', JSON.stringify(ev.data)) +}) +w2.port.start() diff --git a/packages/playground/worker/worker/main.js b/packages/playground/worker/worker/main.js new file mode 100644 index 00000000000000..953b5ef1bf3b53 --- /dev/null +++ b/packages/playground/worker/worker/main.js @@ -0,0 +1,3 @@ +/* flag: will replace in vite config import("./format-es.js") */ +import('./main-module') +import('./main-classic') diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md index 4a97f73fa2b1a3..ced87d2efd665c 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,35 @@ +## 1.8.0 (2022-03-30) + +* fix(deps): update all non-major dependencies (#6782) ([e38be3e](https://github.com/vitejs/vite/commit/e38be3e)), closes [#6782](https://github.com/vitejs/vite/issues/6782) +* fix(deps): update all non-major dependencies (#7392) ([b63fc3b](https://github.com/vitejs/vite/commit/b63fc3b)), closes [#7392](https://github.com/vitejs/vite/issues/7392) +* fix(plugin-legacy): always fallback legacy build when CSP (#6535) ([a118a1d](https://github.com/vitejs/vite/commit/a118a1d)), closes [#6535](https://github.com/vitejs/vite/issues/6535) +* fix(plugin-legacy): polyfill latest features (#7514) ([cb388e2](https://github.com/vitejs/vite/commit/cb388e2)), closes [#7514](https://github.com/vitejs/vite/issues/7514) +* fix(plugin-legacy): require Vite 2.8.0 (#6272) (#6869) ([997b8f1](https://github.com/vitejs/vite/commit/997b8f1)), closes [#6272](https://github.com/vitejs/vite/issues/6272) [#6869](https://github.com/vitejs/vite/issues/6869) +* chore(deps): update all non-major dependencies (#6905) ([839665c](https://github.com/vitejs/vite/commit/839665c)), closes [#6905](https://github.com/vitejs/vite/issues/6905) +* docs(vite-legacy): Note about using `regenerator-runtime` in Content Security Policy environment (#7 ([0fd6422](https://github.com/vitejs/vite/commit/0fd6422)), closes [#7234](https://github.com/vitejs/vite/issues/7234) +* workflow: separate version bumping and publishing on release (#6879) ([fe8ef39](https://github.com/vitejs/vite/commit/fe8ef39)), closes [#6879](https://github.com/vitejs/vite/issues/6879) +* release: plugin-legacy@1.7.1 ([19a58dd](https://github.com/vitejs/vite/commit/19a58dd)) + + + +## [1.7.1](https://github.com/vitejs/vite/compare/plugin-legacy@1.7.0...plugin-legacy@1.7.1) (2022-02-11) + +### Bug Fixes + +* require Vite 2.8.0 ([#6272](https://github.com/vitejs/vite/issues/6272)) ([#6869](https://github.com/vitejs/vite/issues/6869)) ([997b8f1](https://github.com/vitejs/vite/commit/997b8f11cb156cc374ae991875a09534b5489a93)) + + + +# [1.7.0](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.4...plugin-legacy@1.7.0) (2022-02-09) + + +### Bug Fixes + +* don't force terser on non-legacy (fix [#6266](https://github.com/vitejs/vite/issues/6266)) ([#6272](https://github.com/vitejs/vite/issues/6272)) ([1da104e](https://github.com/vitejs/vite/commit/1da104e8597e2965313e8cd582d032bca551e4ee)) +* **legacy:** fix conflict with the modern build on css emitting ([#6584](https://github.com/vitejs/vite/issues/6584)) ([f48255e](https://github.com/vitejs/vite/commit/f48255e6e0058e973b949fb4a2372974f0480e11)), closes [#3296](https://github.com/vitejs/vite/issues/3296) [#3317](https://github.com/vitejs/vite/issues/3317) [/github.com/vitejs/vite/commit/6bce1081991501f3779bff1a81e5dd1e63e5d38e#diff-2cfbd4f4d8c32727cd8e1a561cffbde0b384a3ce0789340440e144f9d64c10f6R262-R263](https://github.com//github.com/vitejs/vite/commit/6bce1081991501f3779bff1a81e5dd1e63e5d38e/issues/diff-2cfbd4f4d8c32727cd8e1a561cffbde0b384a3ce0789340440e144f9d64c10f6R262-R263) + + + ## [1.6.4](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.3...plugin-legacy@1.6.4) (2021-12-07) diff --git a/packages/plugin-legacy/README.md b/packages/plugin-legacy/README.md index c56b769061e267..ec7e630c87755a 100644 --- a/packages/plugin-legacy/README.md +++ b/packages/plugin-legacy/README.md @@ -165,7 +165,9 @@ The legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https - `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=` - `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=` -- `sha256-T9h4ixy0FtNsCwAyTfBtIY6uV5ZhMeNQIlL42GAKEME=` +- `sha256-xYj09txJ9OsgySe5ommpqul6FiaJZRrwe3KTD7wbV6w=` +- `sha256-4m6wOIrq/wFDmi9Xh3mFM2mwI4ik9n3TMgHk6xDtLxk=` +- `sha256-uS7/g9fhQwNZS1f/MqYqqKv8y9hCu36IfX9XZB5L7YY=` These values (without the `sha256-` prefix) can also be retrieved via @@ -173,6 +175,8 @@ These values (without the `sha256-` prefix) can also be retrieved via const { cspHashes } = require('@vitejs/plugin-legacy') ``` +When using the `regenerator-runtime` polyfill, it will attempt to use the `globalThis` object to register itself. If `globalThis` is not available (it is [fairly new](https://caniuse.com/?search=globalThis) and not widely supported, including IE 11), it attempts to perform dynamic `Function(...)` call which violates the CSP. To avoid dynamic `eval` in the absence of `globalThis` consider adding `core-js/proposals/global-this` to `additionalLegacyPolyfills` to define it. + ## References - [Vue CLI modern mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode) diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 6454f213101b6e..41f7157ebfc533 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -18,7 +18,11 @@ const safari10NoModuleFix = `!function(){var e=document,t=e.createElement("scrip const legacyPolyfillId = 'vite-legacy-polyfill' const legacyEntryId = 'vite-legacy-entry' const systemJSInlineCode = `System.import(document.getElementById('${legacyEntryId}').getAttribute('data-src'))` -const dynamicFallbackInlineCode = `!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("${legacyPolyfillId}"),n=document.createElement("script");n.src=e.src,n.onload=function(){${systemJSInlineCode}},document.body.appendChild(n)}}();` + +const detectDynamicImportVarName = '__vite_is_dynamic_import_support' +const detectDynamicImportVarInitCode = `var ${detectDynamicImportVarName}=false;` +const detectDynamicImportCode = `try{import("_").catch(()=>1);}catch(e){}window.${detectDynamicImportVarName}=true;` +const dynamicFallbackInlineCode = `!function(){if(window.${detectDynamicImportVarName})return;console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("${legacyPolyfillId}"),n=document.createElement("script");n.src=e.src,n.onload=function(){${systemJSInlineCode}},document.body.appendChild(n)}();` const forceDynamicImportUsage = `export function __vite_legacy_guard(){import('data:text/javascript,')};` @@ -286,6 +290,14 @@ function viteLegacyPlugin(options = {}) { // entirely. opts.__vite_force_terser__ = true + // @ts-ignore + // In the `generateBundle` hook, + // we'll delete the assets from the legacy bundle to avoid emitting duplicate assets. + // But that's still a waste of computing resource. + // So we add this flag to avoid emitting the asset in the first place whenever possible. + opts.__vite_skip_asset_emit__ = true + + // @ts-ignore avoid emitting assets for legacy bundle const needPolyfills = options.polyfills !== false && !Array.isArray(options.polyfills) @@ -318,7 +330,10 @@ function viteLegacyPlugin(options = {}) { loose: false, useBuiltIns: needPolyfills ? 'usage' : false, corejs: needPolyfills - ? { version: 3, proposals: false } + ? { + version: require('core-js/package.json').version, + proposals: false + } : undefined, shippedProposals: true, ignoreBrowserslistConfig: options.ignoreBrowserslistConfig @@ -422,6 +437,18 @@ function viteLegacyPlugin(options = {}) { // 5. inject dynamic import fallback entry if (genDynamicFallback && legacyPolyfillFilename && legacyEntryFilename) { + tags.push({ + tag: 'script', + attrs: { type: 'module' }, + children: detectDynamicImportVarInitCode, + injectTo: 'head' + }) + tags.push({ + tag: 'script', + attrs: { type: 'module' }, + children: detectDynamicImportCode, + injectTo: 'head' + }) tags.push({ tag: 'script', attrs: { type: 'module' }, @@ -687,5 +714,7 @@ viteLegacyPlugin.default = viteLegacyPlugin viteLegacyPlugin.cspHashes = [ createHash('sha256').update(safari10NoModuleFix).digest('base64'), createHash('sha256').update(systemJSInlineCode).digest('base64'), + createHash('sha256').update(detectDynamicImportVarInitCode).digest('base64'), + createHash('sha256').update(detectDynamicImportCode).digest('base64'), createHash('sha256').update(dynamicFallbackInlineCode).digest('base64') ] diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index d71fa06de0eec8..aa8c478e4dae18 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "1.6.4", + "version": "1.8.0", "license": "MIT", "author": "Evan You", "files": [ @@ -9,10 +9,6 @@ ], "main": "index.js", "types": "index.d.ts", - "scripts": { - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-legacy", - "release": "ts-node ../../scripts/release.ts --skipBuild" - }, "engines": { "node": ">=12.0.0" }, @@ -26,13 +22,13 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { - "@babel/standalone": "^7.16.6", - "core-js": "^3.20.1", - "magic-string": "^0.25.7", + "@babel/standalone": "^7.17.8", + "core-js": "^3.21.1", + "magic-string": "^0.26.1", "regenerator-runtime": "^0.13.9", - "systemjs": "^6.11.0" + "systemjs": "^6.12.1" }, "peerDependencies": { - "vite": "^2.7.8" + "vite": "^2.8.0" } } diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index 2d98ec15ac7c10..c05c0989d6beb4 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -1,3 +1,23 @@ +## 1.3.0 (2022-03-30) + +* feat(plugin-react): adding jsxPure option (#7088) ([d451435](https://github.com/vitejs/vite/commit/d451435)), closes [#7088](https://github.com/vitejs/vite/issues/7088) +* fix(deps): update all non-major dependencies (#6782) ([e38be3e](https://github.com/vitejs/vite/commit/e38be3e)), closes [#6782](https://github.com/vitejs/vite/issues/6782) +* fix(deps): update all non-major dependencies (#7392) ([b63fc3b](https://github.com/vitejs/vite/commit/b63fc3b)), closes [#7392](https://github.com/vitejs/vite/issues/7392) +* chore: fix publish, build vite before plugin-react and plugin-vue (#6988) ([620a9bd](https://github.com/vitejs/vite/commit/620a9bd)), closes [#6988](https://github.com/vitejs/vite/issues/6988) +* chore(deps): update all non-major dependencies (#6905) ([839665c](https://github.com/vitejs/vite/commit/839665c)), closes [#6905](https://github.com/vitejs/vite/issues/6905) +* workflow: separate version bumping and publishing on release (#6879) ([fe8ef39](https://github.com/vitejs/vite/commit/fe8ef39)), closes [#6879](https://github.com/vitejs/vite/issues/6879) + + + +# [1.2.0](https://github.com/vitejs/vite/compare/plugin-react@1.1.4...plugin-react@1.2.0) (2022-02-09) + + +### Features + +* **plugin-react:** ensure `overrides` array exists before `api.reactBabel` hooks are called ([#6750](https://github.com/vitejs/vite/issues/6750)) ([104bdb5](https://github.com/vitejs/vite/commit/104bdb5b5e44e79bf3456cabe15f3753f7c1ef28)) + + + ## [1.1.4](https://github.com/vitejs/vite/compare/plugin-react@1.1.3...plugin-react@1.1.4) (2022-01-04) diff --git a/packages/plugin-react/README.md b/packages/plugin-react/README.md index 588f947ec8b08c..e8d27d0e57242b 100644 --- a/packages/plugin-react/README.md +++ b/packages/plugin-react/README.md @@ -75,7 +75,7 @@ react({ }) ``` -This option does not enable _code transformation_. That is handled by ESBuild. +This option does not enable _code transformation_. That is handled by esbuild. **Note:** TypeScript syntax is handled automatically. diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 3904a9fd79f94a..8313fc5a81d648 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react", - "version": "1.1.4", + "version": "1.3.0", "license": "MIT", "author": "Evan You", "contributors": [ @@ -15,10 +15,10 @@ "scripts": { "dev": "tsc -p . -w --incremental", "build": "rimraf dist && run-s build-bundle build-types", - "build-bundle": "esbuild src/index.ts --bundle --platform=node --target=node12 --external:@babel/* --external:@rollup/* --external:resolve --external:react-refresh/* --outfile=dist/index.js", + "build-bundle": "esbuild src/index.ts --bundle --platform=node --target=node12 --external:@babel/* --external:@rollup/* --external:resolve --external:react-refresh/* --outfile=dist/index.js && npm run patch-dist", + "patch-dist": "ts-node ../../scripts/patchEsbuildDist.ts dist/index.js viteReact", "build-types": "tsc -p . --emitDeclarationOnly --outDir temp && api-extractor run && rimraf temp", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-react", - "release": "ts-node ../../scripts/release.ts" + "prepublishOnly": "(cd ../vite && npm run build) && npm run build" }, "engines": { "node": ">=12.0.0" @@ -33,13 +33,13 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-react#readme", "dependencies": { - "@babel/core": "^7.16.5", - "@babel/plugin-transform-react-jsx": "^7.16.5", - "@babel/plugin-transform-react-jsx-development": "^7.16.5", - "@babel/plugin-transform-react-jsx-self": "^7.16.5", - "@babel/plugin-transform-react-jsx-source": "^7.16.5", - "@rollup/pluginutils": "^4.1.2", + "@babel/core": "^7.17.8", + "@babel/plugin-transform-react-jsx": "^7.17.3", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-jsx-self": "^7.16.7", + "@babel/plugin-transform-react-jsx-source": "^7.16.7", + "@rollup/pluginutils": "^4.2.0", "react-refresh": "^0.11.0", - "resolve": "^1.20.0" + "resolve": "^1.22.0" } } diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index dc7be2580f2753..76f6c6c2a799f3 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -32,6 +32,12 @@ export interface Options { * @default "react" */ jsxImportSource?: string + /** + * Set this to `true` to annotate the JSX factory with `\/* @__PURE__ *\/`. + * This option is ignored when `jsxRuntime` is not `"automatic"`. + * @default true + */ + jsxPure?: boolean /** * Babel configuration applied in both dev and prod. @@ -60,6 +66,7 @@ export type BabelOptions = Omit< export interface ReactBabelOptions extends BabelOptions { plugins: Extract presets: Extract + overrides: Extract parserOpts: ParserOptions & { plugins: Extract } @@ -95,6 +102,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] { babelOptions.plugins ||= [] babelOptions.presets ||= [] + babelOptions.overrides ||= [] babelOptions.parserOpts ||= {} as any babelOptions.parserOpts.plugins ||= opts.parserPlugins || [] @@ -193,7 +201,8 @@ export default function viteReact(opts: Options = {}): PluginOption[] { ), { runtime: 'automatic', - importSource: opts.jsxImportSource + importSource: opts.jsxImportSource, + pure: opts.jsxPure !== false } ]) @@ -366,5 +375,8 @@ function loadPlugin(path: string): Promise { } // overwrite for cjs require('...')() usage -module.exports = viteReact -viteReact['default'] = viteReact +// The following lines are inserted by scripts/patchEsbuildDist.ts, +// this doesn't bundle correctly after esbuild 0.14.4 +// +// module.exports = viteReact +// viteReact['default'] = viteReact diff --git a/packages/plugin-react/src/jsx-runtime/restore-jsx.ts b/packages/plugin-react/src/jsx-runtime/restore-jsx.ts index 5cc7042a32c55e..268153f4ba5d45 100644 --- a/packages/plugin-react/src/jsx-runtime/restore-jsx.ts +++ b/packages/plugin-react/src/jsx-runtime/restore-jsx.ts @@ -57,7 +57,8 @@ export async function restoreJSX( parserOpts: { plugins: ['jsx'] }, - plugins: [await babelRestoreJSX] + // @ts-ignore + plugins: [(await babelRestoreJSX).default] }) return [result?.ast, isCommonJS] diff --git a/packages/plugin-vue-jsx/CHANGELOG.md b/packages/plugin-vue-jsx/CHANGELOG.md index d725541886ae3a..3a1b9e681b45ea 100644 --- a/packages/plugin-vue-jsx/CHANGELOG.md +++ b/packages/plugin-vue-jsx/CHANGELOG.md @@ -1,3 +1,40 @@ +## 1.3.9 (2022-03-30) + +* fix(deps): update all non-major dependencies (#7392) ([b63fc3b](https://github.com/vitejs/vite/commit/b63fc3b)), closes [#7392](https://github.com/vitejs/vite/issues/7392) +* chore(deps): update all non-major dependencies (#6905) ([839665c](https://github.com/vitejs/vite/commit/839665c)), closes [#6905](https://github.com/vitejs/vite/issues/6905) + + + +## [1.3.8](https://github.com/vitejs/vite/compare/plugin-vue@2.2.4...plugin-vue@1.3.8) (2022-02-28) + + + +## [1.3.7](https://github.com/vitejs/vite/compare/plugin-vue@2.2.0...plugin-vue@1.3.7) (2022-02-14) + + +### Bug Fixes + +* **deps:** update all non-major dependencies ([#6782](https://github.com/vitejs/vite/issues/6782)) ([e38be3e](https://github.com/vitejs/vite/commit/e38be3e6ca7bf79319d5d7188e1d347b1d6091ef)) + + + +## [1.3.6](https://github.com/vitejs/vite/compare/plugin-vue@2.2.0...plugin-vue@1.3.6) (2022-02-12) + + +### Bug Fixes + +* **deps:** update all non-major dependencies ([#6782](https://github.com/vitejs/vite/issues/6782)) ([e38be3e](https://github.com/vitejs/vite/commit/e38be3e6ca7bf79319d5d7188e1d347b1d6091ef)) + + + +## [1.3.5](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.4...plugin-vue-jsx@1.3.5) (2022-02-12) + + + +## [1.3.4](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.3...plugin-vue-jsx@1.3.4) (2022-02-09) + + + ## [1.3.3](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.2...plugin-vue-jsx@1.3.3) (2021-12-20) diff --git a/packages/plugin-vue-jsx/index.js b/packages/plugin-vue-jsx/index.js index 56c50fe2ff5e6d..248270765d19a1 100644 --- a/packages/plugin-vue-jsx/index.js +++ b/packages/plugin-vue-jsx/index.js @@ -95,10 +95,13 @@ function vueJsxPlugin(options = {}) { } = options const filter = createFilter(include || /\.[jt]sx$/, exclude) + const [filepath] = id.split('?') - if (filter(id)) { + // use id for script blocks in Vue SFCs (e.g. `App.vue?vue&type=script&lang.jsx`) + // use filepath for plain jsx files (e.g. App.jsx) + if (filter(id) || filter(filepath)) { const plugins = [importMeta, [jsx, babelPluginOptions], ...babelPlugins] - if (id.endsWith('.tsx')) { + if (id.endsWith('.tsx') || filepath.endsWith('.tsx')) { plugins.push([ require('@babel/plugin-transform-typescript'), // @ts-ignore diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index 0e85320dc50f19..c6a352eccc99a0 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue-jsx", - "version": "1.3.3", + "version": "1.3.9", "license": "MIT", "author": "Evan You", "files": [ @@ -9,10 +9,6 @@ ], "main": "index.js", "types": "index.d.ts", - "scripts": { - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-vue-jsx", - "release": "ts-node ../../scripts/release.ts --skipBuild" - }, "engines": { "node": ">=12.0.0" }, @@ -26,10 +22,10 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx#readme", "dependencies": { - "@babel/core": "^7.16.5", + "@babel/core": "^7.17.8", "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-typescript": "^7.16.1", - "@rollup/pluginutils": "^4.1.2", + "@babel/plugin-transform-typescript": "^7.16.8", + "@rollup/pluginutils": "^4.2.0", "@vue/babel-plugin-jsx": "^1.1.1", "hash-sum": "^2.0.0" } diff --git a/packages/plugin-vue/CHANGELOG.md b/packages/plugin-vue/CHANGELOG.md index ed5f600a645818..135daffbfaaa67 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,3 +1,73 @@ +## 2.3.1 (2022-03-30) + +* chore(plugin-vue): revert #7527, lower vite peer dep ([447bbeb](https://github.com/vitejs/vite/commit/447bbeb)), closes [#7527](https://github.com/vitejs/vite/issues/7527) + + + +## 2.3.0 (2022-03-30) + +* chore(plugin-vue): bump vite peer dep to 2.9.0 (#7472) ([12fd1d9](https://github.com/vitejs/vite/commit/12fd1d9)), closes [#7472](https://github.com/vitejs/vite/issues/7472) +* feat(css): css.devSourcemap option (#7471) ([57f14cb](https://github.com/vitejs/vite/commit/57f14cb)), closes [#7471](https://github.com/vitejs/vite/issues/7471) +* fix(plugin-vue): respect __VUE_PROD_DEVTOOLS__ setting (#4984) ([90e812a](https://github.com/vitejs/vite/commit/90e812a)), closes [#4984](https://github.com/vitejs/vite/issues/4984) + + + +## 2.3.0-beta.0 (2022-03-22) + +* fix(deps): update all non-major dependencies (#7392) ([b63fc3b](https://github.com/vitejs/vite/commit/b63fc3b)), closes [#7392](https://github.com/vitejs/vite/issues/7392) +* feat: css sourcemap support during dev (#7173) ([38a655f](https://github.com/vitejs/vite/commit/38a655f)), closes [#7173](https://github.com/vitejs/vite/issues/7173) +* chore(deps): update all non-major dependencies (#6905) ([839665c](https://github.com/vitejs/vite/commit/839665c)), closes [#6905](https://github.com/vitejs/vite/issues/6905) +* docs(vue): add transformAssetUrls example (#7232) ([08e928c](https://github.com/vitejs/vite/commit/08e928c)), closes [#7232](https://github.com/vitejs/vite/issues/7232) + + + +## [2.2.4](https://github.com/vitejs/vite/compare/plugin-vue@2.2.3...plugin-vue@2.2.4) (2022-02-28) + + + +## [2.2.3](https://github.com/vitejs/vite/compare/plugin-vue@2.2.2...plugin-vue@2.2.3) (2022-02-28) + + +### Bug Fixes + +* **plugin-vue:** setup jsx script no hmr ([#6568](https://github.com/vitejs/vite/issues/6568)) ([c84601c](https://github.com/vitejs/vite/commit/c84601cee5232bad0f65c8fcc663e38bb457a0b3)) + + + +## [2.2.2](https://github.com/vitejs/vite/compare/plugin-vue@2.2.1...plugin-vue@2.2.2) (2022-02-18) + + + +## [2.2.1](https://github.com/vitejs/vite/compare/plugin-vue@2.2.0...plugin-vue@2.2.1) (2022-02-18) + + +### Bug Fixes + +* adjust vue template sourcemap ([#6972](https://github.com/vitejs/vite/issues/6972)) ([a774303](https://github.com/vitejs/vite/commit/a7743039f263f41e1c3971e324f893a5ef5e5508)) +* **deps:** update all non-major dependencies ([#6782](https://github.com/vitejs/vite/issues/6782)) ([e38be3e](https://github.com/vitejs/vite/commit/e38be3e6ca7bf79319d5d7188e1d347b1d6091ef)) + + + +# [2.2.0](https://github.com/vitejs/vite/compare/plugin-vue@2.1.0...plugin-vue@2.2.0) (2022-02-09) + + +### Bug Fixes + +* plugin-vue `options.compiler` field ([#6588](https://github.com/vitejs/vite/issues/6588)) ([caec019](https://github.com/vitejs/vite/commit/caec01998a9599d255761f3efc1c49827aadac0d)), closes [#6587](https://github.com/vitejs/vite/issues/6587) + + + +# [2.1.0](https://github.com/vitejs/vite/compare/plugin-vue@2.0.1...plugin-vue@2.1.0) (2022-01-21) + + +### Bug Fixes + +* **plugin-vue:** compiler is null on rollup ([#6566](https://github.com/vitejs/vite/issues/6566)) ([b289b2d](https://github.com/vitejs/vite/commit/b289b2d433f94949730e1f041f3c8e16c417e9d0)) +* **plugin-vue:** make cssm code tree shakeable ([#6353](https://github.com/vitejs/vite/issues/6353)) ([3fb4118](https://github.com/vitejs/vite/commit/3fb4118026e2745140894afb9755298656750f43)) +* update the vue version in the error message ([#6252](https://github.com/vitejs/vite/issues/6252)) ([6a47083](https://github.com/vitejs/vite/commit/6a47083df14cb8d2584a86abda8a5e89a731c170)) + + + ## [2.0.1](https://github.com/vitejs/vite/compare/plugin-vue@2.0.0...plugin-vue@2.0.1) (2021-12-14) @@ -48,7 +118,7 @@ ### Bug Fixes -* **plugin-vue:** fix hmr issue in vuejs/vue-next[#4358](https://github.com/vitejs/vite/issues/4358) ([709e4b0](https://github.com/vitejs/vite/commit/709e4b0428d8cdc8299b22898c76e58d66ca92c9)) +* **plugin-vue:** fix hmr issue in vuejs/core[#4358](https://github.com/vitejs/vite/issues/4358) ([709e4b0](https://github.com/vitejs/vite/commit/709e4b0428d8cdc8299b22898c76e58d66ca92c9)) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index b8889fbaae35a6..a232982e8aed59 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -32,7 +32,7 @@ export interface Options { /** * Enable Vue reactivity transform (experimental, requires vue@^3.2.25). - * https://github.com/vuejs/vue-next/tree/master/packages/reactivity-transform + * https://github.com/vuejs/core/tree/master/packages/reactivity-transform * * - `true`: transform will be enabled for all vue,js(x),ts(x) files except * those inside node_modules @@ -51,7 +51,7 @@ export interface Options { } ``` -## Example for passing options to `@vue/compiler-dom`: +## Example for passing options to `vue/compiler-sfc`: ```ts import vue from '@vitejs/plugin-vue' @@ -62,6 +62,16 @@ export default { template: { compilerOptions: { // ... + }, + transformAssetUrls: { + // default tags + tags: { + video: ['src', 'poster'], + source: ['src'], + img: ['src'], + image: ['xlink:href', 'href'], + use: ['xlink:href', 'href'] + } } } }) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 8e76dc4c1ec2fd..39b3bc87a8b1df 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "2.0.1", + "version": "2.3.1", "license": "MIT", "author": "Evan You", "files": [ @@ -13,10 +13,10 @@ "dev-types": "tsc -p . -w --incremental --emitDeclarationOnly", "dev-watch": "esbuild src/index.ts --watch --bundle --platform=node --target=node12 --external:@vue/compiler-sfc --external:vue/compiler-sfc --external:vite --outfile=dist/index.js", "build": "rimraf dist && run-s build-bundle build-types", - "build-bundle": "esbuild src/index.ts --bundle --platform=node --target=node12 --external:@vue/compiler-sfc --external:vue/compiler-sfc --external:vite --outfile=dist/index.js", + "build-bundle": "esbuild src/index.ts --bundle --platform=node --target=node12 --external:@vue/compiler-sfc --external:vue/compiler-sfc --external:vite --outfile=dist/index.js & npm run patch-dist", + "patch-dist": "ts-node ../../scripts/patchEsbuildDist.ts dist/index.js vuePlugin", "build-types": "tsc -p . --emitDeclarationOnly --outDir temp && api-extractor run && rimraf temp", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-vue", - "release": "ts-node ../../scripts/release.ts" + "prepublishOnly": "(cd ../vite && npm run build) && npm run build" }, "engines": { "node": ">=12.0.0" @@ -35,13 +35,13 @@ "vue": "^3.2.25" }, "devDependencies": { - "@rollup/pluginutils": "^4.1.2", + "@rollup/pluginutils": "^4.2.0", "@types/hash-sum": "^1.0.0", - "debug": "^4.3.3", + "debug": "^4.3.4", "hash-sum": "^2.0.0", "rollup": "^2.59.0", "slash": "^4.0.0", "source-map": "^0.6.1", - "vue": "^3.2.26" + "vue": "^3.2.31" } } diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index 2bce3950563367..7c2a7ef7ee2f1f 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -40,9 +40,14 @@ export async function handleHotUpdate( if (hasScriptChanged(prevDescriptor, descriptor)) { let scriptModule: ModuleNode | undefined - if (descriptor.script?.lang && !descriptor.script.src) { + if ( + (descriptor.scriptSetup?.lang && !descriptor.scriptSetup.src) || + (descriptor.script?.lang && !descriptor.script.src) + ) { const scriptModuleRE = new RegExp( - `type=script.*&lang\.${descriptor.script.lang}$` + `type=script.*&lang\.${ + descriptor.scriptSetup?.lang || descriptor.script?.lang + }$` ) scriptModule = modules.find((m) => scriptModuleRE.test(m.url)) } diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index f12dbd5b4cc0ef..7bdf63b700fa15 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -42,7 +42,7 @@ export interface Options { /** * Enable Vue reactivity transform (experimental). - * https://github.com/vuejs/vue-next/tree/master/packages/reactivity-transform + * https://github.com/vuejs/core/tree/master/packages/reactivity-transform * - `true`: transform will be enabled for all vue,js(x),ts(x) files except * those inside node_modules * - `string | RegExp`: apply to vue + only matched files (will include @@ -63,7 +63,9 @@ export interface ResolvedOptions extends Options { compiler: typeof _compiler root: string sourceMap: boolean + cssDevSourcemap: boolean devServer?: ViteDevServer + devToolsEnabled?: boolean } export default function vuePlugin(rawOptions: Options = {}): Plugin { @@ -90,6 +92,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { let options: ResolvedOptions = { isProduction: process.env.NODE_ENV === 'production', + compiler: null as any, // to be set in buildStart ...rawOptions, include, exclude, @@ -97,7 +100,8 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { reactivityTransform, root: process.cwd(), sourceMap: true, - compiler: null as any // to be set in configResolved + cssDevSourcemap: false, + devToolsEnabled: process.env.NODE_ENV !== 'production' } // Temporal handling for 2.7 breaking change @@ -135,8 +139,10 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { ...options, root: config.root, sourceMap: config.command === 'build' ? !!config.build.sourcemap : true, + cssDevSourcemap: config.css?.devSourcemap ?? false, isProduction: config.isProduction, - compiler: options.compiler || resolveCompiler(config.root) + devToolsEnabled: + !!config.define!.__VUE_PROD_DEVTOOLS__ || !config.isProduction } }, @@ -144,6 +150,10 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { options.devServer = server }, + buildStart() { + options.compiler = options.compiler || resolveCompiler(options.root) + }, + async resolveId(id) { // component export helper if (id === EXPORT_HELPER_ID) { @@ -232,7 +242,8 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { descriptor, Number(query.index), options, - this + this, + filename ) } } @@ -241,5 +252,8 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { } // overwrite for cjs require('...')() usage -module.exports = vuePlugin -vuePlugin['default'] = vuePlugin +// The following lines are inserted by scripts/patchEsbuildDist.ts, +// this doesn't bundle correctly after esbuild 0.14.4 +// +// module.exports = vuePlugin +// vuePlugin['default'] = vuePlugin diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 29c5cffa4cfa81..44b1de74721efd 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -27,7 +27,7 @@ export async function transformMain( ssr: boolean, asCustomElement: boolean ) { - const { devServer, isProduction } = options + const { devServer, isProduction, devToolsEnabled } = options // prev descriptor is only set and used for hmr const prevDescriptor = getPrevDescriptor(filename) @@ -102,9 +102,12 @@ export async function transformMain( if (hasScoped) { attachedProps.push([`__scopeId`, JSON.stringify(`data-v-${descriptor.id}`)]) } - if (devServer && !isProduction) { + if (devToolsEnabled || (devServer && !isProduction)) { // expose filename during serve for devtools to pickup - attachedProps.push([`__file`, JSON.stringify(filename)]) + attachedProps.push([ + `__file`, + JSON.stringify(isProduction ? path.basename(filename) : filename) + ]) } // HMR @@ -159,7 +162,7 @@ export async function transformMain( const generator = SourceMapGenerator.fromSourceMap( new SourceMapConsumer(map) ) - const offset = scriptCode.match(/\r?\n/g)?.length || 1 + const offset = (scriptCode.match(/\r?\n/g)?.length ?? 0) + 1 const templateMapConsumer = new SourceMapConsumer(templateMap) templateMapConsumer.eachMapping((m) => { generator.addMapping({ @@ -299,7 +302,7 @@ async function genStyleCode( attachedProps: [string, string][] ) { let stylesCode = `` - let hasCSSModules = false + let cssModulesMap: Record | undefined if (descriptor.styles.length) { for (let i = 0; i < descriptor.styles.length; i++) { const style = descriptor.styles[i] @@ -320,12 +323,13 @@ async function genStyleCode( `` in .vue file - // the id will be ./dist/style.css?vue&type=style&index=0&src=xxx&lang.css - id = id.split('?')[0] - const cache = getResolvedCache(id, targetWeb) if (cache) { return cache @@ -818,7 +878,14 @@ function resolveDeepImport( // map relative based on exports data if (exportsField) { if (isObject(exportsField) && !Array.isArray(exportsField)) { - relativeId = resolveExports(data, relativeId, options, targetWeb) + // resolve without postfix (see #7098) + const { file, postfix } = splitFileAndPostfix(relativeId) + const exportsId = resolveExports(data, file, options, targetWeb) + if (exportsId !== undefined) { + relativeId = exportsId + postfix + } else { + relativeId = undefined + } } else { // not exposed relativeId = undefined @@ -830,9 +897,11 @@ function resolveDeepImport( ) } } else if (targetWeb && isObject(browserField)) { - const mapped = mapWithBrowserField(relativeId, browserField) + // resolve without postfix (see #7098) + const { file, postfix } = splitFileAndPostfix(relativeId) + const mapped = mapWithBrowserField(file, browserField) if (mapped) { - relativeId = mapped + relativeId = mapped + postfix } else if (mapped === false) { return (webResolvedImports[id] = browserExternalId) } diff --git a/packages/vite/src/node/plugins/splitVendorChunk.ts b/packages/vite/src/node/plugins/splitVendorChunk.ts new file mode 100644 index 00000000000000..3f7c16067a5f8e --- /dev/null +++ b/packages/vite/src/node/plugins/splitVendorChunk.ts @@ -0,0 +1,131 @@ +import type { UserConfig } from '../../node' +import type { Plugin } from '../plugin' +import type { + OutputOptions, + GetManualChunk, + GetManualChunkApi, + GetModuleInfo +} from 'rollup' +import { isCSSRequest } from './css' + +// Use splitVendorChunkPlugin() to get the same manualChunks strategy as Vite 2.7 +// We don't recommend using this strategy as a general solution moving forward + +// splitVendorChunk is a simple index/vendor strategy that was used in Vite +// until v2.8. It is exposed to let people continue to use it in case it was +// working well for their setups. +// The cache needs to be reset on buildStart for watch mode to work correctly +// Don't use this manualChunks strategy for ssr, lib mode, and 'umd' or 'iife' + +export class SplitVendorChunkCache { + cache: Map + constructor() { + this.cache = new Map() + } + reset() { + this.cache = new Map() + } +} + +export function splitVendorChunk( + options: { cache?: SplitVendorChunkCache } = {} +): GetManualChunk { + const cache = options.cache ?? new SplitVendorChunkCache() + return (id, { getModuleInfo }) => { + if ( + id.includes('node_modules') && + !isCSSRequest(id) && + staticImportedByEntry(id, getModuleInfo, cache.cache) + ) { + return 'vendor' + } + } +} + +function staticImportedByEntry( + id: string, + getModuleInfo: GetModuleInfo, + cache: Map, + importStack: string[] = [] +): boolean { + if (cache.has(id)) { + return cache.get(id) as boolean + } + if (importStack.includes(id)) { + // circular deps! + cache.set(id, false) + return false + } + const mod = getModuleInfo(id) + if (!mod) { + cache.set(id, false) + return false + } + + if (mod.isEntry) { + cache.set(id, true) + return true + } + const someImporterIs = mod.importers.some((importer) => + staticImportedByEntry( + importer, + getModuleInfo, + cache, + importStack.concat(id) + ) + ) + cache.set(id, someImporterIs) + return someImporterIs +} + +export function splitVendorChunkPlugin(): Plugin { + const caches: SplitVendorChunkCache[] = [] + function createSplitVendorChunk(output: OutputOptions, config: UserConfig) { + const cache = new SplitVendorChunkCache() + caches.push(cache) + const build = config.build ?? {} + const format = output?.format + if (!build.ssr && !build.lib && format !== 'umd' && format !== 'iife') { + return splitVendorChunk({ cache }) + } + } + return { + name: 'vite:split-vendor-chunk', + config(config) { + let outputs = config?.build?.rollupOptions?.output + if (outputs) { + outputs = Array.isArray(outputs) ? outputs : [outputs] + for (const output of outputs) { + const viteManualChunks = createSplitVendorChunk(output, config) + if (viteManualChunks) { + if (output.manualChunks) { + if (typeof output.manualChunks === 'function') { + const userManualChunks = output.manualChunks + output.manualChunks = (id: string, api: GetManualChunkApi) => { + return userManualChunks(id, api) ?? viteManualChunks(id, api) + } + } + // else, leave the object form of manualChunks untouched, as + // we can't safely replicate rollup handling. + } else { + output.manualChunks = viteManualChunks + } + } + } + } else { + return { + build: { + rollupOptions: { + output: { + manualChunks: createSplitVendorChunk({}, config) + } + } + } + } + } + }, + buildStart() { + caches.forEach((cache) => cache.reset()) + } + } +} diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index 5ce0936748ea05..4113b7153f9b35 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -6,12 +6,71 @@ import type Rollup from 'rollup' import { ENV_PUBLIC_PATH } from '../constants' import path from 'path' import { onRollupWarning } from '../build' +import type { TransformPluginContext, EmittedFile } from 'rollup' + +interface WorkerCache { + // save worker bundle emitted files avoid overwrites the same file. + // + assets: Map + chunks: Map + // worker bundle don't deps on any more worker runtime info an id only had an result. + // save worker bundled file id to avoid repeated execution of bundles + // + bundle: Map + // nested worker bundle context don't had file what emitted by outside bundle + // save the hash to id to rewrite truth id. + // + emitted: Map +} const WorkerFileId = 'worker_file' +const workerCache = new WeakMap() + +function emitWorkerFile( + ctx: Rollup.TransformPluginContext, + config: ResolvedConfig, + asset: EmittedFile, + type: 'assets' | 'chunks' +): string { + const fileName = asset.fileName! + const workerMap = workerCache.get(config)! + + if (workerMap[type].has(fileName)) { + return workerMap[type].get(fileName)! + } + const hash = ctx.emitFile(asset) + workerMap[type].set(fileName, hash) + workerMap.emitted.set(hash, fileName) + return hash +} + +function emitWorkerAssets( + ctx: Rollup.TransformPluginContext, + config: ResolvedConfig, + asset: EmittedFile +) { + const { format } = config.worker + return emitWorkerFile( + ctx, + config, + asset, + format === 'es' ? 'chunks' : 'assets' + ) +} + +function emitWorkerChunks( + ctx: Rollup.TransformPluginContext, + config: ResolvedConfig, + asset: EmittedFile +) { + return emitWorkerFile(ctx, config, asset, 'chunks') +} export async function bundleWorkerEntry( + ctx: Rollup.TransformPluginContext, config: ResolvedConfig, - id: string + id: string, + query: Record | null ): Promise { // bundle the file as entry to support imports const rollup = require('rollup') as typeof Rollup @@ -25,25 +84,130 @@ export async function bundleWorkerEntry( }, preserveEntrySignatures: false }) - let code: string + let chunk: Rollup.OutputChunk try { - const { output } = await bundle.generate({ + const { + output: [outputChunk, ...outputChunks] + } = await bundle.generate({ format, sourcemap: config.build.sourcemap }) - code = output[0].code + chunk = outputChunk + outputChunks.forEach((outputChunk) => { + if (outputChunk.type === 'asset') { + emitWorkerAssets(ctx, config, outputChunk) + } else if (outputChunk.type === 'chunk') { + emitWorkerChunks(ctx, config, { + fileName: path.posix.join( + config.build.assetsDir, + outputChunk.fileName + ), + source: outputChunk.code, + type: 'asset' + }) + } + }) } finally { await bundle.close() } + return emitSourcemapForWorkerEntry(ctx, config, id, query, chunk) +} + +function emitSourcemapForWorkerEntry( + context: TransformPluginContext, + config: ResolvedConfig, + id: string, + query: Record | null, + chunk: Rollup.OutputChunk +): Buffer { + let { code, map: sourcemap } = chunk + if (sourcemap) { + if (config.build.sourcemap === 'inline') { + // Manually add the sourcemap to the code if configured for inline sourcemaps. + // TODO: Remove when https://github.com/rollup/rollup/issues/3913 is resolved + // Currently seems that it won't be resolved until Rollup 3 + const dataUrl = sourcemap.toUrl() + code += `//# sourceMappingURL=${dataUrl}` + } else if ( + config.build.sourcemap === 'hidden' || + config.build.sourcemap === true + ) { + const basename = path.parse(cleanUrl(id)).name + const data = sourcemap.toString() + const content = Buffer.from(data) + const contentHash = getAssetHash(content) + const fileName = `${basename}.${contentHash}.js.map` + const filePath = path.posix.join(config.build.assetsDir, fileName) + if (!context.cache.has(contentHash)) { + context.cache.set(contentHash, true) + context.emitFile({ + fileName: filePath, + type: 'asset', + source: data + }) + } + + // Emit the comment that tells the JS debugger where it can find the + // sourcemap file. + // 'hidden' causes the sourcemap file to be created but + // the comment in the file to be omitted. + if (config.build.sourcemap === true) { + // inline web workers need to use the full sourcemap path + // non-inline web workers can use a relative path + const sourceMapUrl = query?.inline != null ? filePath : fileName + code += `//# sourceMappingURL=${sourceMapUrl}` + } + } + } + return Buffer.from(code) } +export async function workerFileToUrl( + ctx: Rollup.TransformPluginContext, + config: ResolvedConfig, + id: string, + query: Record | null +): Promise { + const workerMap = workerCache.get(config)! + + let hash = workerMap.bundle.get(id) + if (hash) { + // rewrite truth id, no need to replace by asset plugin + return config.base + workerMap.emitted.get(hash)! + } + const code = await bundleWorkerEntry(ctx, config, id, query) + const basename = path.parse(cleanUrl(id)).name + const contentHash = getAssetHash(code) + const fileName = path.posix.join( + config.build.assetsDir, + `${basename}.${contentHash}.js` + ) + hash = emitWorkerAssets(ctx, config, { + fileName, + type: 'asset', + source: code + }) + workerMap.bundle.set(id, hash) + return `__VITE_ASSET__${hash}__` +} + export function webWorkerPlugin(config: ResolvedConfig): Plugin { const isBuild = config.command === 'build' + const isWorker = config.isWorker return { name: 'vite:worker', + buildStart() { + workerCache.set(config, { + assets: new Map(), + chunks: new Map(), + bundle: new Map(), + emitted: new Map() + }) + }, + load(id) { if (isBuild) { const parsedQuery = parseRequest(id) @@ -72,12 +236,13 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { let url: string if (isBuild) { - const code = await bundleWorkerEntry(config, id) if (query.inline != null) { + const code = await bundleWorkerEntry(this, config, id, query) const { format } = config.worker const workerOptions = format === 'es' ? '{type: "module"}' : '{}' // inline as blob data url - return `const encodedJs = "${code.toString('base64')}"; + return { + code: `const encodedJs = "${code.toString('base64')}"; const blob = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs)], { type: "text/javascript;charset=utf-8" }); export default function WorkerWrapper() { const objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob); @@ -86,19 +251,13 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { } finally { objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL); } - }` + }`, + + // Empty sourcemap to supress Rollup warning + map: { mappings: '' } + } } else { - const basename = path.parse(cleanUrl(id)).name - const contentHash = getAssetHash(code) - const fileName = path.posix.join( - config.build.assetsDir, - `${basename}.${contentHash}.js` - ) - url = `__VITE_ASSET__${this.emitFile({ - fileName, - type: 'asset', - source: code - })}__` + url = await workerFileToUrl(this, config, id, query) } } else { url = await fileToUrl(cleanUrl(id), config, this) @@ -109,11 +268,20 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { query.sharedworker != null ? 'SharedWorker' : 'Worker' const workerOptions = { type: 'module' } - return `export default function WorkerWrapper() { - return new ${workerConstructor}(${JSON.stringify( - url - )}, ${JSON.stringify(workerOptions, null, 2)}) - }` + return { + code: `export default function WorkerWrapper() { + return new ${workerConstructor}(${JSON.stringify( + url + )}, ${JSON.stringify(workerOptions, null, 2)}) + }`, + map: { mappings: '' } // Empty sourcemap to supress Rolup warning + } + }, + + renderChunk(code) { + if (isWorker && code.includes('import.meta.url')) { + return code.replace('import.meta.url', 'self.location.href') + } } } } diff --git a/packages/vite/src/node/plugins/workerImportMetaUrl.ts b/packages/vite/src/node/plugins/workerImportMetaUrl.ts index 13c0ef2bb3883b..c9a2903d9a4142 100644 --- a/packages/vite/src/node/plugins/workerImportMetaUrl.ts +++ b/packages/vite/src/node/plugins/workerImportMetaUrl.ts @@ -1,31 +1,116 @@ +import JSON5 from 'json5' import type { ResolvedConfig } from '../config' import type { Plugin } from '../plugin' -import { getAssetHash, fileToUrl } from './asset' +import { fileToUrl } from './asset' import { + blankReplacer, cleanUrl, injectQuery, multilineCommentsRE, - singlelineCommentsRE + singlelineCommentsRE, + stringsRE } from '../utils' import path from 'path' -import { bundleWorkerEntry } from './worker' +import { workerFileToUrl } from './worker' import { parseRequest } from '../utils' -import { ENV_PUBLIC_PATH } from '../constants' +import { ENV_ENTRY, ENV_PUBLIC_PATH } from '../constants' import MagicString from 'magic-string' +import type { ViteDevServer } from '..' +import type { RollupError } from 'rollup' + +type WorkerType = 'classic' | 'module' | 'ignore' const WORKER_FILE_ID = 'worker_url_file' +function getWorkerType( + code: string, + noCommentsCode: string, + i: number +): WorkerType { + function err(e: string, pos: number) { + const error = new Error(e) as RollupError + error.pos = pos + throw error + } + + const commaIndex = noCommentsCode.indexOf(',', i) + if (commaIndex === -1) { + return 'classic' + } + const endIndex = noCommentsCode.indexOf(')', i) + + // case: ') ... ,' mean no worker options params + if (commaIndex > endIndex) { + return 'classic' + } + + // need to find in comment code + let workerOptsString = code.substring(commaIndex + 1, endIndex) + + const hasViteIgnore = /\/\*\s*@vite-ignore\s*\*\//.test(workerOptsString) + if (hasViteIgnore) { + return 'ignore' + } + + // need to find in no comment code + workerOptsString = noCommentsCode.substring(commaIndex + 1, endIndex) + if (!workerOptsString.trim().length) { + return 'classic' + } + + let workerOpts: { type: WorkerType } = { type: 'classic' } + try { + workerOpts = JSON5.parse(workerOptsString) + } catch (e) { + // can't parse by JSON5, so the worker options had unexpect char. + err( + 'Vite is unable to parse the worker options as the value is not static.' + + 'To ignore this error, please use /* @vite-ignore */ in the worker options.', + commaIndex + 1 + ) + } + + if (['classic', 'module'].includes(workerOpts.type)) { + return workerOpts.type + } + return 'classic' +} + export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin { const isBuild = config.command === 'build' + let server: ViteDevServer return { name: 'vite:worker-import-meta-url', + configureServer(_server) { + server = _server + }, + async transform(code, id, options) { const query = parseRequest(id) - if (query && query[WORKER_FILE_ID] != null) { + if (query && query[WORKER_FILE_ID] != null && query['type'] != null) { + const workerType = query['type'] as WorkerType + let injectEnv = '' + + if (workerType === 'classic') { + injectEnv = `importScripts('${ENV_PUBLIC_PATH}')\n` + } else if (workerType === 'module') { + injectEnv = `import '${ENV_PUBLIC_PATH}'\n` + } else if (workerType === 'ignore') { + if (isBuild) { + injectEnv = '' + } else if (server) { + // dynamic worker type we can't know how import the env + // so we copy /@vite/env code of server transform result into file header + const { moduleGraph } = server + const module = moduleGraph.getModuleById(ENV_ENTRY) + injectEnv = module?.transformResult?.code || '' + } + } + return { - code: `import '${ENV_PUBLIC_PATH}'\n` + code + code: injectEnv + code } } if ( @@ -36,15 +121,23 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin { const importMetaUrlRE = /\bnew\s+(Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/g const noCommentsCode = code - .replace(multilineCommentsRE, (m) => ' '.repeat(m.length)) - .replace(singlelineCommentsRE, (m) => ' '.repeat(m.length)) + .replace(multilineCommentsRE, blankReplacer) + .replace(singlelineCommentsRE, blankReplacer) + + const noStringCode = noCommentsCode.replace( + stringsRE, + (m) => `'${' '.repeat(m.length - 2)}'` + ) let match: RegExpExecArray | null let s: MagicString | null = null - while ((match = importMetaUrlRE.exec(noCommentsCode))) { - const { 0: allExp, 2: exp, 3: rawUrl, index } = match - + while ((match = importMetaUrlRE.exec(noStringCode))) { + const { 0: allExp, 2: exp, 3: emptyUrl, index } = match const urlIndex = allExp.indexOf(exp) + index + const urlStart = allExp.indexOf(emptyUrl) + index + const urlEnd = urlStart + emptyUrl.length + const rawUrl = code.slice(urlStart, urlEnd) + if (options?.ssr) { this.error( `\`new URL(url, import.meta.url)\` is not supported in SSR.`, @@ -61,27 +154,23 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin { } s ||= new MagicString(code) - + const workerType = getWorkerType( + code, + noCommentsCode, + index + allExp.length + ) const file = path.resolve(path.dirname(id), rawUrl.slice(1, -1)) let url: string if (isBuild) { - const content = await bundleWorkerEntry(config, file) - const basename = path.parse(cleanUrl(file)).name - const contentHash = getAssetHash(content) - const fileName = path.posix.join( - config.build.assetsDir, - `${basename}.${contentHash}.js` - ) - url = `__VITE_ASSET__${this.emitFile({ - fileName, - type: 'asset', - source: content - })}__` + url = await workerFileToUrl(this, config, file, query) } else { url = await fileToUrl(cleanUrl(file), config, this) url = injectQuery(url, WORKER_FILE_ID) + url = injectQuery(url, `type=${workerType}`) } - s.overwrite(urlIndex, urlIndex + exp.length, JSON.stringify(url)) + s.overwrite(urlIndex, urlIndex + exp.length, JSON.stringify(url), { + contentOnly: true + }) } if (s) { return { diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index 5f4fe480c4f90f..56dee04e2e2e07 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -1,7 +1,7 @@ import path from 'path' import sirv from 'sirv' import connect from 'connect' -import compression from 'compression' +import compression from './server/middlewares/compression' import type { Server } from 'http' import type { InlineConfig, ResolvedConfig } from '.' import { resolveConfig } from '.' diff --git a/packages/vite/src/node/server/__tests__/fixtures/lerna/lerna.json b/packages/vite/src/node/server/__tests__/fixtures/lerna/lerna.json new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/packages/vite/src/node/server/__tests__/fixtures/lerna/nested/package.json b/packages/vite/src/node/server/__tests__/fixtures/lerna/nested/package.json new file mode 100644 index 00000000000000..352055cdf83423 --- /dev/null +++ b/packages/vite/src/node/server/__tests__/fixtures/lerna/nested/package.json @@ -0,0 +1,3 @@ +{ + "private": true +} diff --git a/packages/vite/src/node/server/__tests__/search-root.spec.ts b/packages/vite/src/node/server/__tests__/search-root.spec.ts index dd64ac00c43ab8..7322768286809e 100644 --- a/packages/vite/src/node/server/__tests__/search-root.spec.ts +++ b/packages/vite/src/node/server/__tests__/search-root.spec.ts @@ -2,6 +2,13 @@ import { searchForWorkspaceRoot } from '../searchRoot' import { resolve } from 'path' describe('searchForWorkspaceRoot', () => { + test('lerna', () => { + const resolved = searchForWorkspaceRoot( + resolve(__dirname, 'fixtures/lerna/nested') + ) + expect(resolved).toBe(resolve(__dirname, 'fixtures/lerna')) + }) + test('pnpm', () => { const resolved = searchForWorkspaceRoot( resolve(__dirname, 'fixtures/pnpm/nested') diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts index 3e5be4cf599c03..fc18b0aa91c5cb 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -47,7 +47,7 @@ export async function handleHMRUpdate( const isConfig = file === config.configFile const isConfigDependency = config.configFileDependencies.some( - (name) => file === path.resolve(name) + (name) => file === name ) const isEnv = config.inlineConfig.envFile !== false && diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 1f7c303a21a693..0067d9af76b4e0 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -10,7 +10,7 @@ import chokidar from 'chokidar' import type { CommonServerOptions } from '../http' import { resolveHttpsConfig, resolveHttpServer, httpServerStart } from '../http' import type { InlineConfig, ResolvedConfig } from '../config' -import { resolveConfig } from '../config' +import { mergeConfig, resolveConfig } from '../config' import type { PluginContainer } from './pluginContainer' import { createPluginContainer } from './pluginContainer' import type { FSWatcher, WatchOptions } from 'types/chokidar' @@ -33,7 +33,7 @@ import { timeMiddleware } from './middlewares/time' import type { ModuleNode } from './moduleGraph' import { ModuleGraph } from './moduleGraph' import type { Connect } from 'types/connect' -import { ensureLeadingSlash, normalizePath } from '../utils' +import { isParentDirectory, normalizePath } from '../utils' import { errorMiddleware, prepareError } from './middlewares/error' import type { HmrOptions } from './hmr' import { handleHMRUpdate, handleFileAddUnlink } from './hmr' @@ -44,8 +44,6 @@ import { transformRequest } from './transformRequest' import type { ESBuildTransformResult } from '../plugins/esbuild' import { transformWithEsbuild } from '../plugins/esbuild' import type { TransformOptions as EsbuildTransformOptions } from 'esbuild' -import type { DepOptimizationMetadata } from '../optimizer' -import { optimizeDeps } from '../optimizer' import { ssrLoadModule } from '../ssr/ssrModuleLoader' import { resolveSSRExternal } from '../ssr/ssrExternal' import { @@ -53,7 +51,8 @@ import { ssrRewriteStacktrace } from '../ssr/ssrStacktrace' import { ssrTransform } from '../ssr/ssrTransform' -import { createMissingImporterRegisterFn } from '../optimizer/registerMissing' +import { createOptimizedDeps } from '../optimizer/registerMissing' +import type { OptimizedDeps } from '../optimizer' import { resolveHostname } from '../utils' import { searchForWorkspaceRoot } from './searchRoot' import { CLIENT_DIR } from '../constants' @@ -224,9 +223,16 @@ export interface ViteDevServer { /** * Load a given URL as an instantiated module for SSR. */ - ssrLoadModule(url: string): Promise> + ssrLoadModule( + url: string, + opts?: { fixStacktrace?: boolean } + ): Promise> + /** + * Returns a fixed version of the given stack + */ + ssrRewriteStacktrace(stack: string): string /** - * Fix ssr error stacktrace + * Mutates the given SSR error by rewriting the stacktrace */ ssrFixStacktrace(e: Error): void /** @@ -250,7 +256,7 @@ export interface ViteDevServer { /** * @internal */ - _optimizeDepsMetadata: DepOptimizationMetadata | null + _optimizedDeps: OptimizedDeps | null /** * Deps that are externalized * @internal @@ -280,21 +286,14 @@ export interface ViteDevServer { /** * @internal */ - _isRunningOptimizer: boolean - /** - * @internal - */ - _registerMissingImport: - | ((id: string, resolved: string, ssr: boolean | undefined) => void) - | null - /** - * @internal - */ - _pendingReload: Promise | null - /** - * @internal - */ - _pendingRequests: Map> + _pendingRequests: Map< + string, + { + request: Promise + timestamp: number + abort: () => void + } + > } export async function createServer( @@ -365,14 +364,26 @@ export async function createServer( return transformRequest(url, server, options) }, transformIndexHtml: null!, // to be immediately set - ssrLoadModule(url) { - server._ssrExternals ||= resolveSSRExternal( - config, - server._optimizeDepsMetadata - ? Object.keys(server._optimizeDepsMetadata.optimized) - : [] + async ssrLoadModule(url, opts?: { fixStacktrace?: boolean }) { + if (!server._ssrExternals) { + let knownImports: string[] = [] + const optimizedDeps = server._optimizedDeps + if (optimizedDeps) { + await optimizedDeps.scanProcessing + knownImports = [ + ...Object.keys(optimizedDeps.metadata.optimized), + ...Object.keys(optimizedDeps.metadata.discovered) + ] + } + server._ssrExternals = resolveSSRExternal(config, knownImports) + } + return ssrLoadModule( + url, + server, + undefined, + undefined, + opts?.fixStacktrace ) - return ssrLoadModule(url, server) }, ssrFixStacktrace(e) { if (e.stack) { @@ -380,6 +391,9 @@ export async function createServer( rebindErrorStacktrace(e, stacktrace) } }, + ssrRewriteStacktrace(stack: string) { + return ssrRewriteStacktrace(stack, moduleGraph) + }, listen(port?: number, isRestart?: boolean) { return startServer(server, port, isRestart) }, @@ -404,7 +418,7 @@ export async function createServer( throw new Error('cannot print server URLs in middleware mode.') } }, - async restart(forceOptimize: boolean) { + async restart(forceOptimize?: boolean) { if (!server._restartPromise) { server._forceOptimizeOnRestart = !!forceOptimize server._restartPromise = restartServer(server).finally(() => { @@ -415,14 +429,11 @@ export async function createServer( return server._restartPromise }, - _optimizeDepsMetadata: null, + _optimizedDeps: null, _ssrExternals: null, _globImporters: Object.create(null), _restartPromise: null, _forceOptimizeOnRestart: false, - _isRunningOptimizer: false, - _registerMissingImport: null, - _pendingReload: null, _pendingRequests: new Map() } @@ -564,28 +575,15 @@ export async function createServer( // error handler middlewares.use(errorMiddleware(server, !!middlewareMode)) - const runOptimize = async () => { - server._isRunningOptimizer = true - try { - server._optimizeDepsMetadata = await optimizeDeps( - config, - config.server.force || server._forceOptimizeOnRestart - ) - } finally { - server._isRunningOptimizer = false - } - server._registerMissingImport = createMissingImporterRegisterFn(server) - } - if (!middlewareMode && httpServer) { let isOptimized = false - // overwrite listen to run optimizer before server start + // overwrite listen to init optimizer before server start const listen = httpServer.listen.bind(httpServer) httpServer.listen = (async (port: number, ...args: any[]) => { if (!isOptimized) { try { await container.buildStart({}) - await runOptimize() + server._optimizedDeps = createOptimizedDeps(server) isOptimized = true } catch (e) { httpServer.emit('error', e) @@ -596,7 +594,7 @@ export async function createServer( }) as any } else { await container.buildStart({}) - await runOptimize() + server._optimizedDeps = createOptimizedDeps(server) } return server @@ -613,7 +611,7 @@ async function startServer( } const options = server.config.server - const port = inlinePort || options.port || 3000 + const port = inlinePort ?? options.port ?? 3000 const hostname = resolveHostname(options.host) const protocol = options.https ? 'https' : 'http' @@ -697,7 +695,7 @@ function createServerCloseFn(server: http.Server | null) { } function resolvedAllowDir(root: string, dir: string): string { - return ensureLeadingSlash(normalizePath(path.resolve(root, dir))) + return normalizePath(path.resolve(root, dir)) } export function resolveServerOptions( @@ -719,7 +717,7 @@ export function resolveServerOptions( // only push client dir when vite itself is outside-of-root const resolvedClientDir = resolvedAllowDir(root, CLIENT_DIR) - if (!allowDirs.some((i) => resolvedClientDir.startsWith(i))) { + if (!allowDirs.some((dir) => isParentDirectory(dir, resolvedClientDir))) { allowDirs.push(resolvedClientDir) } @@ -738,9 +736,18 @@ async function restartServer(server: ViteDevServer) { await server.close() + let inlineConfig = server.config.inlineConfig + if (server._forceOptimizeOnRestart) { + inlineConfig = mergeConfig(inlineConfig, { + server: { + force: true + } + }) + } + let newServer = null try { - newServer = await createServer(server.config.inlineConfig) + newServer = await createServer(inlineConfig) } catch (err: any) { server.config.logger.error(err.message, { timestamp: true @@ -749,7 +756,11 @@ async function restartServer(server: ViteDevServer) { } for (const key in newServer) { - if (key !== 'app') { + if (key === '_restartPromise') { + // prevent new server `restart` function from calling + // @ts-ignore + newServer[key] = server[key] + } else if (key !== 'app') { // @ts-ignore server[key] = newServer[key] } @@ -769,4 +780,7 @@ async function restartServer(server: ViteDevServer) { } else { logger.info('server restarted.', { timestamp: true }) } + + // new server (the current server) can restart now + newServer._restartPromise = null } diff --git a/packages/vite/src/node/server/middlewares/base.ts b/packages/vite/src/node/server/middlewares/base.ts index d37e5d3e60794b..b72f0fd7949f0b 100644 --- a/packages/vite/src/node/server/middlewares/base.ts +++ b/packages/vite/src/node/server/middlewares/base.ts @@ -28,9 +28,9 @@ export function baseMiddleware({ } if (path === '/' || path === '/index.html') { - // redirect root visit to based url + // redirect root visit to based url with search and hash res.writeHead(302, { - Location: base + Location: base + (parsed.search || '') + (parsed.hash || '') }) res.end() return diff --git a/packages/vite/src/node/server/middlewares/compression.ts b/packages/vite/src/node/server/middlewares/compression.ts new file mode 100644 index 00000000000000..bafae7ef2023c6 --- /dev/null +++ b/packages/vite/src/node/server/middlewares/compression.ts @@ -0,0 +1,118 @@ +//@ts-nocheck +/* eslint-disable */ +//TODO: replace this code with https://github.com/lukeed/polka/pull/148 once it's released + +// This is based on https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/polkompress.js +// MIT Licensed https://github.com/preactjs/wmr/blob/main/LICENSE +import zlib from 'zlib' + +/* global Buffer */ + +const noop = () => {} + +const mimes = /text|javascript|\/json|xml/i +const threshold = 1024 +const level = -1 +let brotli = false +const gzip = true + +const getChunkSize = (chunk, enc) => (chunk ? Buffer.byteLength(chunk, enc) : 0) + +export default function compression() { + const brotliOpts = (typeof brotli === 'object' && brotli) || {} + const gzipOpts = (typeof gzip === 'object' && gzip) || {} + + // disable Brotli on Node<12.7 where it is unsupported: + if (!zlib.createBrotliCompress) brotli = false + + return (req, res, next = noop) => { + const accept = req.headers['accept-encoding'] + '' + const encoding = ((brotli && accept.match(/\bbr\b/)) || + (gzip && accept.match(/\bgzip\b/)) || + [])[0] + + // skip if no response body or no supported encoding: + if (req.method === 'HEAD' || !encoding) return next() + + /** @type {zlib.Gzip | zlib.BrotliCompress} */ + let compress + let pendingStatus + /** @type {[string, function][]?} */ + let pendingListeners = [] + let started = false + let size = 0 + + function start() { + started = true + // @ts-ignore + size = res.getHeader('Content-Length') | 0 || size + const compressible = mimes.test( + String(res.getHeader('Content-Type') || 'text/plain') + ) + const cleartext = !res.getHeader('Content-Encoding') + const listeners = pendingListeners || [] + if (compressible && cleartext && size >= threshold) { + res.setHeader('Content-Encoding', encoding) + res.removeHeader('Content-Length') + if (encoding === 'br') { + const params = { + [zlib.constants.BROTLI_PARAM_QUALITY]: level, + [zlib.constants.BROTLI_PARAM_SIZE_HINT]: size + } + compress = zlib.createBrotliCompress({ + params: Object.assign(params, brotliOpts) + }) + } else { + compress = zlib.createGzip(Object.assign({ level }, gzipOpts)) + } + // backpressure + compress.on( + 'data', + (chunk) => write.call(res, chunk) === false && compress.pause() + ) + on.call(res, 'drain', () => compress.resume()) + compress.on('end', () => end.call(res)) + listeners.forEach((p) => compress.on.apply(compress, p)) + } else { + pendingListeners = null + listeners.forEach((p) => on.apply(res, p)) + } + + writeHead.call(res, pendingStatus || res.statusCode) + } + + const { end, write, on, writeHead } = res + + res.writeHead = function (status, reason, headers) { + if (typeof reason !== 'string') [headers, reason] = [reason, headers] + if (headers) for (let i in headers) res.setHeader(i, headers[i]) + pendingStatus = status + return this + } + + res.write = function (chunk, enc, cb) { + size += getChunkSize(chunk, enc) + if (!started) start() + if (!compress) return write.apply(this, arguments) + return compress.write.apply(compress, arguments) + } + + res.end = function (chunk, enc, cb) { + if (arguments.length > 0 && typeof chunk !== 'function') { + size += getChunkSize(chunk, enc) + } + if (!started) start() + if (!compress) return end.apply(this, arguments) + return compress.end.apply(compress, arguments) + } + + res.on = function (type, listener) { + if (!pendingListeners || type !== 'drain') on.call(this, type, listener) + else if (compress) compress.on(type, listener) + else pendingListeners.push([type, listener]) + return this + } + + next() + } +} diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 2721502c408e28..ca2538bd9507ed 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import MagicString from 'magic-string' -import type { AttributeNode } from '@vue/compiler-dom' +import type { AttributeNode, ElementNode, TextNode } from '@vue/compiler-dom' import { NodeTypes } from '@vue/compiler-dom' import type { Connect } from 'types/connect' import type { IndexHtmlTransformHook } from '../../plugins/html' @@ -38,7 +38,9 @@ function getHtmlFilename(url: string, server: ViteDevServer) { if (url.startsWith(FS_PREFIX)) { return decodeURIComponent(fsPathFromId(url)) } else { - return decodeURIComponent(path.join(server.config.root, url.slice(1))) + return decodeURIComponent( + normalizePath(path.join(server.config.root, url.slice(1))) + ) } } @@ -64,7 +66,8 @@ const processNodeUrl = ( s.overwrite( node.value!.loc.start.offset, node.value!.loc.end.offset, - `"${config.base + url.slice(1)}"` + `"${config.base + url.slice(1)}"`, + { contentOnly: true } ) } else if ( url.startsWith('.') && @@ -82,21 +85,58 @@ const processNodeUrl = ( `"${path.posix.join( path.posix.relative(originalUrl, '/'), url.slice(1) - )}"` + )}"`, + { contentOnly: true } ) } } const devHtmlHook: IndexHtmlTransformHook = async ( html, - { path: htmlPath, server, originalUrl } + { path: htmlPath, filename, server, originalUrl } ) => { const { config, moduleGraph } = server! const base = config.base || '/' const s = new MagicString(html) - let scriptModuleIndex = -1 + let inlineModuleIndex = -1 const filePath = cleanUrl(htmlPath) + const addInlineModule = (node: ElementNode, ext: 'js' | 'css') => { + inlineModuleIndex++ + + const url = filePath.replace(normalizePath(config.root), '') + + const contentNode = node.children[0] as TextNode + + const code = contentNode.content + const map = new MagicString(html) + .snip(contentNode.loc.start.offset, contentNode.loc.end.offset) + .generateMap({ hires: true }) + map.sources = [filename] + map.file = filename + + // add HTML Proxy to Map + addToHTMLProxyCache(config, url, inlineModuleIndex, { code, map }) + + // inline js module. convert to src="proxy" + const modulePath = `${ + config.base + htmlPath.slice(1) + }?html-proxy&index=${inlineModuleIndex}.${ext}` + + // invalidate the module so the newly cached contents will be served + const module = server?.moduleGraph.getModuleById(modulePath) + if (module) { + server?.moduleGraph.invalidateModule(module) + } + + s.overwrite( + node.loc.start.offset, + node.loc.end.offset, + ``, + { contentOnly: true } + ) + } + await traverseHtml(html, htmlPath, (node) => { if (node.type !== NodeTypes.ELEMENT) { return @@ -105,41 +145,18 @@ const devHtmlHook: IndexHtmlTransformHook = async ( // script tags if (node.tag === 'script') { const { src, isModule } = getScriptInfo(node) - if (isModule) { - scriptModuleIndex++ - } if (src) { processNodeUrl(src, s, config, htmlPath, originalUrl, moduleGraph) - } else if (isModule) { - const url = filePath.replace(normalizePath(config.root), '') - - const contents = node.children - .map((child: any) => child.content || '') - .join('') - - // add HTML Proxy to Map - addToHTMLProxyCache(config, url, scriptModuleIndex, contents) - - // inline js module. convert to src="proxy" - const modulePath = `${ - config.base + htmlPath.slice(1) - }?html-proxy&index=${scriptModuleIndex}.js` - - // invalidate the module so the newly cached contents will be served - const module = server?.moduleGraph.getModuleById(modulePath) - if (module) { - server?.moduleGraph.invalidateModule(module) - } - - s.overwrite( - node.loc.start.offset, - node.loc.end.offset, - `` - ) + } else if (isModule && node.children.length) { + addInlineModule(node, 'js') } } + if (node.tag === 'style' && node.children.length) { + addInlineModule(node, 'css') + } + // elements with [href/src] attrs const assetAttrs = assetAttrsConfig[node.tag] if (assetAttrs) { diff --git a/packages/vite/src/node/server/middlewares/static.ts b/packages/vite/src/node/server/middlewares/static.ts index 0b8e2db93255ed..5fb4f7fad2e055 100644 --- a/packages/vite/src/node/server/middlewares/static.ts +++ b/packages/vite/src/node/server/middlewares/static.ts @@ -4,17 +4,17 @@ import type { Options } from 'sirv' import sirv from 'sirv' import type { Connect } from 'types/connect' import type { ViteDevServer } from '../..' -import { normalizePath } from '../..' import { FS_PREFIX } from '../../constants' import { cleanUrl, - ensureLeadingSlash, fsPathFromId, + fsPathFromUrl, isImportRequest, isInternalRequest, isWindows, slash, - isFileReadable + isFileReadable, + isParentDirectory } from '../../utils' import { isMatch } from 'micromatch' @@ -111,7 +111,7 @@ export function serveRawFsMiddleware( // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` return function viteServeRawFsMiddleware(req, res, next) { - let url = req.url! + let url = decodeURI(req.url!) // In some cases (e.g. linked monorepos) files outside of root will // reference assets that are also out of served root. In such cases // the paths are rewritten to `/@fs/` prefixed paths and must be served by @@ -148,15 +148,14 @@ export function isFileServingAllowed( ): boolean { if (!server.config.server.fs.strict) return true - const cleanedUrl = cleanUrl(url) - const file = ensureLeadingSlash(normalizePath(cleanedUrl)) + const file = fsPathFromUrl(url) if (server.config.server.fs.deny.some((i) => isMatch(file, i, _matchOptions))) return false if (server.moduleGraph.safeModulesPath.has(file)) return true - if (server.config.server.fs.allow.some((i) => file.startsWith(i + '/'))) + if (server.config.server.fs.allow.some((dir) => isParentDirectory(dir, file))) return true return false diff --git a/packages/vite/src/node/server/middlewares/transform.ts b/packages/vite/src/node/server/middlewares/transform.ts index 15f2355e0e389c..f5ae0e97b065bd 100644 --- a/packages/vite/src/node/server/middlewares/transform.ts +++ b/packages/vite/src/node/server/middlewares/transform.ts @@ -1,3 +1,4 @@ +import { promises as fs } from 'fs' import path from 'path' import type { ViteDevServer } from '..' import type { Connect } from 'types/connect' @@ -11,28 +12,29 @@ import { prettifyUrl, removeImportQuery, removeTimestampQuery, - unwrapId + unwrapId, + fsPathFromId, + ensureVolumeInPath } from '../../utils' import { send } from '../send' import { transformRequest } from '../transformRequest' import { isHTMLProxy } from '../../plugins/html' import colors from 'picocolors' import { - CLIENT_PUBLIC_PATH, DEP_VERSION_RE, - NULL_BYTE_PLACEHOLDER + NULL_BYTE_PLACEHOLDER, + FS_PREFIX } from '../../constants' import { isCSSRequest, isDirectCSSRequest, isDirectRequest } from '../../plugins/css' - -/** - * Time (ms) Vite has to full-reload the page before returning - * an empty response. - */ -const NEW_DEPENDENCY_BUILD_TIMEOUT = 1000 +import { + ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, + ERR_OUTDATED_OPTIMIZED_DEP +} from '../../plugins/optimizedDeps' +import { createIsOptimizedDepUrl } from '../../optimizer' const debugCache = createDebugger('vite:cache') const isDebug = !!process.env.DEBUG @@ -43,19 +45,11 @@ export function transformMiddleware( server: ViteDevServer ): Connect.NextHandleFunction { const { - config: { root, logger, cacheDir }, + config: { root, logger }, moduleGraph } = server - // determine the url prefix of files inside cache directory - const cacheDirRelative = normalizePath(path.relative(root, cacheDir)) - const cacheDirPrefix = cacheDirRelative.startsWith('../') - ? // if the cache directory is outside root, the url prefix would be something - // like '/@fs/absolute/path/to/node_modules/.vite' - `/@fs/${normalizePath(cacheDir).replace(/^\//, '')}` - : // if the cache directory is inside root, the url prefix would be something - // like '/node_modules/.vite' - `/${cacheDirRelative}` + const isOptimizedDepUrl = createIsOptimizedDepUrl(server.config) // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` return async function viteTransformMiddleware(req, res, next) { @@ -63,36 +57,6 @@ export function transformMiddleware( return next() } - if ( - server._pendingReload && - // always allow vite client requests so that it can trigger page reload - !req.url?.startsWith(CLIENT_PUBLIC_PATH) && - !req.url?.includes('vite/dist/client') - ) { - try { - // missing dep pending reload, hold request until reload happens - await Promise.race([ - server._pendingReload, - // If the refresh has not happened after timeout, Vite considers - // something unexpected has happened. In this case, Vite - // returns an empty response that will error. - new Promise((_, reject) => - setTimeout(reject, NEW_DEPENDENCY_BUILD_TIMEOUT) - ) - ]) - } catch { - // Don't do anything if response has already been sent - if (!res.writableEnded) { - // status code request timeout - res.statusCode = 408 - res.end( - `

[vite] Something unexpected happened while optimizing "${req.url}"

` + - `

The current page should have reloaded by now

` - ) - } - return - } - } let url: string try { url = decodeURI(removeTimestampQuery(req.url!)).replace( @@ -109,15 +73,47 @@ export function transformMiddleware( const isSourceMap = withoutQuery.endsWith('.map') // since we generate source map references, handle those requests here if (isSourceMap) { - const originalUrl = url.replace(/\.map($|\?)/, '$1') - const map = (await moduleGraph.getModuleByUrl(originalUrl, false)) - ?.transformResult?.map - if (map) { - return send(req, res, JSON.stringify(map), 'json', { - headers: server.config.server.headers - }) + if (isOptimizedDepUrl(url)) { + // If the browser is requesting a source map for an optimized dep, it + // means that the dependency has already been pre-bundled and loaded + const mapFile = url.startsWith(FS_PREFIX) + ? fsPathFromId(url) + : normalizePath( + ensureVolumeInPath(path.resolve(root, url.slice(1))) + ) + try { + const map = await fs.readFile(mapFile, 'utf-8') + return send(req, res, map, 'json', { + headers: server.config.server.headers + }) + } catch (e) { + // Outdated source map request for optimized deps, this isn't an error + // but part of the normal flow when re-optimizing after missing deps + // Send back an empty source map so the browser doesn't issue warnings + const dummySourceMap = { + version: 3, + file: mapFile.replace(/\.map$/, ''), + sources: [], + sourcesContent: [], + names: [], + mappings: ';;;;;;;;;' + } + return send(req, res, JSON.stringify(dummySourceMap), 'json', { + cacheControl: 'no-cache', + headers: server.config.server.headers + }) + } } else { - return next() + const originalUrl = url.replace(/\.map($|\?)/, '$1') + const map = (await moduleGraph.getModuleByUrl(originalUrl, false)) + ?.transformResult?.map + if (map) { + return send(req, res, JSON.stringify(map), 'json', { + headers: server.config.server.headers + }) + } else { + return next() + } } } @@ -179,9 +175,7 @@ export function transformMiddleware( }) if (result) { const type = isDirectCSSRequest(url) ? 'css' : 'js' - const isDep = - DEP_VERSION_RE.test(url) || - (cacheDirPrefix && url.startsWith(cacheDirPrefix)) + const isDep = DEP_VERSION_RE.test(url) || isOptimizedDepUrl(url) return send(req, res, result.code, type, { etag: result.etag, // allow browser to cache npm deps! @@ -192,6 +186,30 @@ export function transformMiddleware( } } } catch (e) { + if (e?.code === ERR_OPTIMIZE_DEPS_PROCESSING_ERROR) { + // Skip if response has already been sent + if (!res.writableEnded) { + res.statusCode = 504 // status code request timeout + res.end() + } + // This timeout is unexpected + logger.error(e.message) + return + } + if (e?.code === ERR_OUTDATED_OPTIMIZED_DEP) { + // Skip if response has already been sent + if (!res.writableEnded) { + res.statusCode = 504 // status code request timeout + res.end() + } + // We don't need to log an error in this case, the request + // is outdated because new dependencies were discovered and + // the new pre-bundle dependendencies have changed. + // A full-page reload has been issued, and these old requests + // can't be properly fullfilled. This isn't an unexpected + // error but a normal part of the missing deps discovery flow + return + } return next(e) } diff --git a/packages/vite/src/node/server/moduleGraph.ts b/packages/vite/src/node/server/moduleGraph.ts index f09e741f430983..44e76deef98b6f 100644 --- a/packages/vite/src/node/server/moduleGraph.ts +++ b/packages/vite/src/node/server/moduleGraph.ts @@ -32,6 +32,7 @@ export class ModuleNode { ssrTransformResult: TransformResult | null = null ssrModule: Record | null = null lastHMRTimestamp = 0 + lastInvalidationTimestamp = 0 constructor(url: string) { this.url = url @@ -94,17 +95,26 @@ export class ModuleGraph { } } - invalidateModule(mod: ModuleNode, seen: Set = new Set()): void { - mod.info = undefined + invalidateModule( + mod: ModuleNode, + seen: Set = new Set(), + timestamp: number = Date.now() + ): void { + // Save the timestamp for this invalidation, so we can avoid caching the result of possible already started + // processing being done for this module + mod.lastInvalidationTimestamp = timestamp + // Don't invalidate mod.info and mod.meta, as they are part of the processing pipeline + // Invalidating the transform result is enough to ensure this module is re-processed next time it is requested mod.transformResult = null mod.ssrTransformResult = null invalidateSSRModule(mod, seen) } invalidateAll(): void { + const timestamp = Date.now() const seen = new Set() this.idToModuleMap.forEach((mod) => { - this.invalidateModule(mod, seen) + this.invalidateModule(mod, seen, timestamp) }) } diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts index bb3e8fa36db624..5efc2670c0f81a 100644 --- a/packages/vite/src/node/server/pluginContainer.ts +++ b/packages/vite/src/node/server/pluginContainer.ts @@ -49,8 +49,9 @@ import type { TransformResult } from 'rollup' import * as acorn from 'acorn' -import type { RawSourceMap } from '@ampproject/remapping/dist/types/types' -import { combineSourcemaps } from '../utils' +import type { RawSourceMap } from '@ampproject/remapping' +import { TraceMap, originalPositionFor } from '@jridgewell/trace-mapping' +import { cleanUrl, combineSourcemaps } from '../utils' import MagicString from 'magic-string' import type { FSWatcher } from 'chokidar' import { @@ -70,7 +71,6 @@ import type { ResolvedConfig } from '../config' import { buildErrorMessage } from './middlewares/error' import type { ModuleGraph } from './moduleGraph' import { performance } from 'perf_hooks' -import { SourceMapConsumer } from 'source-map' import type * as postcss from 'postcss' export interface PluginContainerOptions { @@ -90,6 +90,10 @@ export interface PluginContainer { options?: { skip?: Set ssr?: boolean + /** + * @internal + */ + scan?: boolean } ): Promise transform( @@ -212,6 +216,7 @@ export async function createPluginContainer( class Context implements PluginContext { meta = minimalContext.meta ssr = false + _scan = false _activePlugin: Plugin | null _activeId: string | null = null _activeCode: string | null = null @@ -241,7 +246,11 @@ export async function createPluginContainer( skip = new Set(this._resolveSkips) skip.add(this._activePlugin) } - let out = await container.resolveId(id, importer, { skip, ssr: this.ssr }) + let out = await container.resolveId(id, importer, { + skip, + ssr: this.ssr, + scan: this._scan + }) if (typeof out === 'string') out = { id: out } return out as ResolvedId | null } @@ -376,13 +385,12 @@ export async function createPluginContainer( if (err.loc && ctx instanceof TransformContext) { const rawSourceMap = ctx._getCombinedSourcemap() if (rawSourceMap) { - const consumer = new SourceMapConsumer(rawSourceMap as any) - const { source, line, column } = consumer.originalPositionFor({ + const traced = new TraceMap(rawSourceMap as any) + const { source, line, column } = originalPositionFor(traced, { line: Number(err.loc.line), - column: Number(err.loc.column), - bias: SourceMapConsumer.GREATEST_LOWER_BOUND + column: Number(err.loc.column) }) - if (source) { + if (source && line != null && column != null) { err.loc = { file: source, line, column } } } @@ -420,7 +428,7 @@ export async function createPluginContainer( if (!combinedMap) { combinedMap = m as SourceMap } else { - combinedMap = combineSourcemaps(this.filename, [ + combinedMap = combineSourcemaps(cleanUrl(this.filename), [ { ...(m as RawSourceMap), sourcesContent: combinedMap.sourcesContent @@ -434,7 +442,7 @@ export async function createPluginContainer( ? new MagicString(this.originalCode).generateMap({ includeContent: true, hires: true, - source: this.filename + source: cleanUrl(this.filename) }) : null } @@ -488,8 +496,10 @@ export async function createPluginContainer( async resolveId(rawId, importer = join(root, 'index.html'), options) { const skip = options?.skip const ssr = options?.ssr + const scan = !!options?.scan const ctx = new Context() ctx.ssr = !!ssr + ctx._scan = scan ctx._resolveSkips = skip const resolveStart = isDebug ? performance.now() : 0 @@ -506,7 +516,7 @@ export async function createPluginContainer( ctx as any, rawId, importer, - { ssr } + { ssr, scan } ) if (!result) continue diff --git a/packages/vite/src/node/server/searchRoot.ts b/packages/vite/src/node/server/searchRoot.ts index d663daf16559c4..472f2ae6f005f0 100644 --- a/packages/vite/src/node/server/searchRoot.ts +++ b/packages/vite/src/node/server/searchRoot.ts @@ -8,14 +8,17 @@ const ROOT_FILES = [ // '.git', // https://pnpm.js.org/workspaces/ - 'pnpm-workspace.yaml' + 'pnpm-workspace.yaml', // https://rushjs.io/pages/advanced/config_files/ // 'rush.json', // https://nx.dev/latest/react/getting-started/nx-setup // 'workspace.json', - // 'nx.json' + // 'nx.json', + + // https://github.com/lerna/lerna#lernajson + 'lerna.json' ] // npm: https://docs.npmjs.com/cli/v7/using-npm/workspaces#installing-workspaces diff --git a/packages/vite/src/node/server/send.ts b/packages/vite/src/node/server/send.ts index 43f0fe1660b2eb..a52d17d17458ba 100644 --- a/packages/vite/src/node/server/send.ts +++ b/packages/vite/src/node/server/send.ts @@ -1,8 +1,7 @@ import type { IncomingMessage, OutgoingHttpHeaders, ServerResponse } from 'http' import getEtag from 'etag' import type { SourceMap } from 'rollup' - -const isDebug = process.env.DEBUG +import { getCodeWithSourcemap } from './sourcemap' const alias: Record = { js: 'application/javascript', @@ -38,7 +37,8 @@ export function send( if (req.headers['if-none-match'] === etag) { res.statusCode = 304 - return res.end() + res.end() + return } res.setHeader('Content-Type', alias[type] || type) @@ -53,24 +53,12 @@ export function send( // inject source map reference if (map && map.mappings) { - if (isDebug) { - content += `\n/*${JSON.stringify(map, null, 2).replace( - /\*\//g, - '*\\/' - )}*/\n` + if (type === 'js' || type === 'css') { + content = getCodeWithSourcemap(type, content.toString(), map) } - content += genSourceMapString(map) } res.statusCode = 200 - return res.end(content) -} - -function genSourceMapString(map: SourceMap | string | undefined) { - if (typeof map !== 'string') { - map = JSON.stringify(map) - } - return `\n//# sourceMappingURL=data:application/json;base64,${Buffer.from( - map - ).toString('base64')}` + res.end(content) + return } diff --git a/packages/vite/src/node/server/sourcemap.ts b/packages/vite/src/node/server/sourcemap.ts index c6fc3b1f2579bf..dc77c4a4714298 100644 --- a/packages/vite/src/node/server/sourcemap.ts +++ b/packages/vite/src/node/server/sourcemap.ts @@ -1,7 +1,9 @@ import path from 'path' import { promises as fs } from 'fs' import type { Logger } from '../logger' -import { createDebugger } from '../utils' +import { createDebugger, normalizePath } from '../utils' +import type { SourceMap } from 'rollup' +import { maybeVirtualHtmlSet } from '../plugins/html' const isDebug = !!process.env.DEBUG const debug = createDebugger('vite:sourcemap', { @@ -41,6 +43,7 @@ export async function injectSourcesContent( sourcePath = path.resolve(sourceRoot, sourcePath) } return fs.readFile(sourcePath, 'utf-8').catch(() => { + if (maybeVirtualHtmlSet.has(normalizePath(sourcePath))) return null missingSources.push(sourcePath) return null }) @@ -57,3 +60,28 @@ export async function injectSourcesContent( isDebug && debug(`Missing sources:\n ` + missingSources.join(`\n `)) } } + +function genSourceMapUrl(map: SourceMap | string | undefined) { + if (typeof map !== 'string') { + map = JSON.stringify(map) + } + return `data:application/json;base64,${Buffer.from(map).toString('base64')}` +} + +export function getCodeWithSourcemap( + type: 'js' | 'css', + code: string, + map: SourceMap | null +) { + if (isDebug) { + code += `\n/*${JSON.stringify(map, null, 2).replace(/\*\//g, '*\\/')}*/\n` + } + + if (type === 'js') { + code += `\n//# sourceMappingURL=${genSourceMapUrl(map ?? undefined)}` + } else if (type === 'css') { + code += `\n/*# sourceMappingURL=${genSourceMapUrl(map ?? undefined)} */` + } + + return code +} diff --git a/packages/vite/src/node/server/transformRequest.ts b/packages/vite/src/node/server/transformRequest.ts index 2ee1386295d9c5..f877925f491479 100644 --- a/packages/vite/src/node/server/transformRequest.ts +++ b/packages/vite/src/node/server/transformRequest.ts @@ -44,22 +44,80 @@ export function transformRequest( options: TransformOptions = {} ): Promise { const cacheKey = (options.ssr ? 'ssr:' : options.html ? 'html:' : '') + url - let request = server._pendingRequests.get(cacheKey) - if (!request) { - request = doTransform(url, server, options) - server._pendingRequests.set(cacheKey, request) - const done = () => server._pendingRequests.delete(cacheKey) - request.then(done, done) + + // This module may get invalidated while we are processing it. For example + // when a full page reload is needed after the re-processing of pre-bundled + // dependencies when a missing dep is discovered. We save the current time + // to compare it to the last invalidation performed to know if we should + // cache the result of the transformation or we should discard it as stale. + // + // A module can be invalidated due to: + // 1. A full reload because of pre-bundling newly discovered deps + // 2. A full reload after a config change + // 3. The file that generated the module changed + // 4. Invalidation for a virtual module + // + // For 1 and 2, a new request for this module will be issued after + // the invalidation as part of the browser reloading the page. For 3 and 4 + // there may not be a new request right away because of HMR handling. + // In all cases, the next time this module is requested, it should be + // re-processed. + // + // We save the timestamp when we start processing and compare it with the + // last time this module is invalidated + const timestamp = Date.now() + + const pending = server._pendingRequests.get(cacheKey) + if (pending) { + return server.moduleGraph + .getModuleByUrl(removeTimestampQuery(url), options.ssr) + .then((module) => { + if (!module || pending.timestamp > module.lastInvalidationTimestamp) { + // The pending request is still valid, we can safely reuse its result + return pending.request + } else { + // Request 1 for module A (pending.timestamp) + // Invalidate module A (module.lastInvalidationTimestamp) + // Request 2 for module A (timestamp) + + // First request has been invalidated, abort it to clear the cache, + // then perform a new doTransform. + pending.abort() + return transformRequest(url, server, options) + } + }) + } + + const request = doTransform(url, server, options, timestamp) + + // Avoid clearing the cache of future requests if aborted + let cleared = false + const clearCache = () => { + if (!cleared) { + server._pendingRequests.delete(cacheKey) + cleared = true + } } + + // Cache the request and clear it once processing is done + server._pendingRequests.set(cacheKey, { + request, + timestamp, + abort: clearCache + }) + request.then(clearCache, clearCache) + return request } async function doTransform( url: string, server: ViteDevServer, - options: TransformOptions + options: TransformOptions, + timestamp: number ) { url = removeTimestampQuery(url) + const { config, pluginContainer, moduleGraph, watcher } = server const { root, logger } = config const prettyUrl = isDebug ? prettifyUrl(url, root) : '' @@ -179,18 +237,22 @@ async function doTransform( } } - if (ssr) { - return (mod.ssrTransformResult = await ssrTransform( - code, - map as SourceMap, - url, - { json: { stringify: !!server.config.json?.stringify } } - )) - } else { - return (mod.transformResult = { - code, - map, - etag: getEtag(code, { weak: true }) - } as TransformResult) + const result = ssr + ? await ssrTransform(code, map as SourceMap, url, { + json: { stringify: !!server.config.json?.stringify } + }) + : ({ + code, + map, + etag: getEtag(code, { weak: true }) + } as TransformResult) + + // Only cache the result if the module wasn't invalidated while it was + // being processed, so it is re-processed next time if it is stale + if (timestamp > mod.lastInvalidationTimestamp) { + if (ssr) mod.ssrTransformResult = result + else mod.transformResult = result } + + return result } diff --git a/packages/vite/src/node/server/ws.ts b/packages/vite/src/node/server/ws.ts index 498148933740ef..a01d0bd3225571 100644 --- a/packages/vite/src/node/server/ws.ts +++ b/packages/vite/src/node/server/ws.ts @@ -3,35 +3,98 @@ import type { Server } from 'http' import { STATUS_CODES } from 'http' import type { ServerOptions as HttpsServerOptions } from 'https' import { createServer as createHttpsServer } from 'https' -import type { ServerOptions } from 'ws' -import { WebSocketServer as WebSocket } from 'ws' -import type { WebSocket as WebSocketTypes } from 'types/ws' -import type { ErrorPayload, HMRPayload } from 'types/hmrPayload' +import type { ServerOptions, WebSocket as WebSocketRaw } from 'ws' +import { WebSocketServer as WebSocketServerRaw } from 'ws' +import type { CustomPayload, ErrorPayload, HMRPayload } from 'types/hmrPayload' +import type { InferCustomEventPayload } from 'types/customEvent' import type { ResolvedConfig } from '..' import { isObject } from '../utils' import type { Socket } from 'net' + export const HMR_HEADER = 'vite-hmr' +export type WebSocketCustomListener = ( + data: T, + client: WebSocketClient +) => void + export interface WebSocketServer { - on: WebSocketTypes.Server['on'] - off: WebSocketTypes.Server['off'] + /** + * Get all connected clients. + */ + clients: Set + /** + * Boardcast events to all clients + */ send(payload: HMRPayload): void + /** + * Send custom event + */ + send(event: T, payload?: InferCustomEventPayload): void + /** + * Disconnect all clients and terminate the server. + */ close(): Promise + /** + * Handle custom event emitted by `import.meta.hot.send` + */ + on: WebSocketServerRaw['on'] & { + ( + event: T, + listener: WebSocketCustomListener> + ): void + } + /** + * Unregister event listener. + */ + off: WebSocketServerRaw['off'] & { + (event: string, listener: Function): void + } +} + +export interface WebSocketClient { + /** + * Send event to the client + */ + send(payload: HMRPayload): void + /** + * Send custom event + */ + send(event: string, payload?: CustomPayload['data']): void + /** + * The raw WebSocket instance + * @advanced + */ + socket: WebSocketRaw } +const wsServerEvents = [ + 'connection', + 'error', + 'headers', + 'listening', + 'message' +] + export function createWebSocketServer( server: Server | null, config: ResolvedConfig, httpsOptions?: HttpsServerOptions ): WebSocketServer { - let wss: WebSocket + let wss: WebSocketServerRaw let httpsServer: Server | undefined = undefined const hmr = isObject(config.server.hmr) && config.server.hmr - const wsServer = (hmr && hmr.server) || server + const hmrServer = hmr && hmr.server + const hmrPort = hmr && hmr.port + // TODO: the main server port may not have been chosen yet as it may use the next available + const portsAreCompatible = !hmrPort || hmrPort === config.server.port + const wsServer = hmrServer || (portsAreCompatible && server) + const customListeners = new Map>>() + const clientsMap = new WeakMap() if (wsServer) { - wss = new WebSocket({ noServer: true }) + wss = new WebSocketServerRaw({ noServer: true }) wsServer.on('upgrade', (req, socket, head) => { if (req.headers['sec-websocket-protocol'] === HMR_HEADER) { wss.handleUpgrade(req, socket as Socket, head, (ws) => { @@ -41,7 +104,8 @@ export function createWebSocketServer( }) } else { const websocketServerOptions: ServerOptions = {} - const port = (hmr && hmr.port) || 24678 + const port = hmrPort || 24678 + const host = (hmr && hmr.host) || undefined if (httpsOptions) { // if we're serving the middlewares over https, the ws library doesn't support automatically creating an https server, so we need to do it ourselves // create an inline https server and mount the websocket server to it @@ -60,18 +124,33 @@ export function createWebSocketServer( res.end(body) }) - httpsServer.listen(port) + httpsServer.listen(port, host) websocketServerOptions.server = httpsServer } else { // we don't need to serve over https, just let ws handle its own server websocketServerOptions.port = port + if (host) { + websocketServerOptions.host = host + } } // vite dev server in middleware mode - wss = new WebSocket(websocketServerOptions) + wss = new WebSocketServerRaw(websocketServerOptions) } wss.on('connection', (socket) => { + socket.on('message', (raw) => { + if (!customListeners.size) return + let parsed: any + try { + parsed = JSON.parse(String(raw)) + } catch {} + if (!parsed || parsed.type !== 'custom' || !parsed.event) return + const listeners = customListeners.get(parsed.event) + if (!listeners?.size) return + const client = getSocketClent(socket) + listeners.forEach((listener) => listener(parsed.data, client)) + }) socket.send(JSON.stringify({ type: 'connected' })) if (bufferedError) { socket.send(JSON.stringify(bufferedError)) @@ -88,6 +167,30 @@ export function createWebSocketServer( } }) + // Provide a wrapper to the ws client so we can send messages in JSON format + // To be consistent with server.ws.send + function getSocketClent(socket: WebSocketRaw) { + if (!clientsMap.has(socket)) { + clientsMap.set(socket, { + send: (...args) => { + let payload: HMRPayload + if (typeof args[0] === 'string') { + payload = { + type: 'custom', + event: args[0], + data: args[1] + } + } else { + payload = args[0] + } + socket.send(JSON.stringify(payload)) + }, + socket + }) + } + return clientsMap.get(socket)! + } + // On page reloads, if a file fails to compile and returns 500, the server // sends the error payload before the client connection is established. // If we have no open clients, buffer the error and send it to the next @@ -95,9 +198,39 @@ export function createWebSocketServer( let bufferedError: ErrorPayload | null = null return { - on: wss.on.bind(wss), - off: wss.off.bind(wss), - send(payload: HMRPayload) { + on: ((event: string, fn: () => void) => { + if (wsServerEvents.includes(event)) wss.on(event, fn) + else { + if (!customListeners.has(event)) { + customListeners.set(event, new Set()) + } + customListeners.get(event)!.add(fn) + } + }) as WebSocketServer['on'], + off: ((event: string, fn: () => void) => { + if (wsServerEvents.includes(event)) { + wss.off(event, fn) + } else { + customListeners.get(event)?.delete(fn) + } + }) as WebSocketServer['off'], + + get clients() { + return new Set(Array.from(wss.clients).map(getSocketClent)) + }, + + send(...args: any[]) { + let payload: HMRPayload + if (typeof args[0] === 'string') { + payload = { + type: 'custom', + event: args[0], + data: args[1] + } + } else { + payload = args[0] + } + if (payload.type === 'error' && !wss.clients.size) { bufferedError = payload return diff --git a/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts new file mode 100644 index 00000000000000..ad16534b088e2b --- /dev/null +++ b/packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts @@ -0,0 +1,5 @@ +import { stripNesting } from '../ssrExternal' + +test('stripNesting', async () => { + expect(stripNesting(['c', 'p1>c1', 'p2 > c2'])).toEqual(['c', 'c1', 'c2']) +}) diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts index f91444b49636a1..e086365ee25f16 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -304,8 +304,8 @@ test('should declare variable for imported super class', async () => { const Foo = __vite_ssr_import_0__.Foo; class A extends Foo {} class B extends Foo {} - Object.defineProperty(__vite_ssr_exports__, \\"default\\", { enumerable: true, value: A }); - Object.defineProperty(__vite_ssr_exports__, \\"B\\", { enumerable: true, configurable: true, get(){ return B }});" + Object.defineProperty(__vite_ssr_exports__, \\"B\\", { enumerable: true, configurable: true, get(){ return B }}); + Object.defineProperty(__vite_ssr_exports__, \\"default\\", { enumerable: true, value: A });" `) }) @@ -351,8 +351,8 @@ test('should handle default export variants', async () => { ).toMatchInlineSnapshot(` "class A {} class B extends A {} - Object.defineProperty(__vite_ssr_exports__, \\"default\\", { enumerable: true, value: A }); - Object.defineProperty(__vite_ssr_exports__, \\"B\\", { enumerable: true, configurable: true, get(){ return B }});" + Object.defineProperty(__vite_ssr_exports__, \\"B\\", { enumerable: true, configurable: true, get(){ return B }}); + Object.defineProperty(__vite_ssr_exports__, \\"default\\", { enumerable: true, value: A });" `) }) @@ -610,7 +610,7 @@ test('jsx', async () => { const code = ` import React from 'react' import { Foo, Slot } from 'foo' - + function Bar({ Slot = }) { return ( <> @@ -633,3 +633,27 @@ test('jsx', async () => { " `) }) + +test('continuous exports', async () => { + expect( + ( + await ssrTransform( + ` +export function fn1() { +}export function fn2() { +} + `, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + function fn1() { + } + Object.defineProperty(__vite_ssr_exports__, \\"fn1\\", { enumerable: true, configurable: true, get(){ return fn1 }});function fn2() { + } + Object.defineProperty(__vite_ssr_exports__, \\"fn2\\", { enumerable: true, configurable: true, get(){ return fn2 }}); + " + `) +}) diff --git a/packages/vite/src/node/ssr/ssrExternal.ts b/packages/vite/src/node/ssr/ssrExternal.ts index 0e2eade85c21f1..800a2307dabae6 100644 --- a/packages/vite/src/node/ssr/ssrExternal.ts +++ b/packages/vite/src/node/ssr/ssrExternal.ts @@ -14,6 +14,16 @@ import { createFilter } from '@rollup/pluginutils' const debug = createDebugger('vite:ssr-external') +/** + * Converts "parent > child" syntax to just "child" + */ +export function stripNesting(packages: string[]) { + return packages.map((s) => { + const arr = s.split('>') + return arr[arr.length - 1].trim() + }) +} + /** * Heuristics for determining whether a dependency should be externalized for * server-side rendering. @@ -22,6 +32,10 @@ export function resolveSSRExternal( config: ResolvedConfig, knownImports: string[] ): string[] { + // strip nesting since knownImports may be passed in from optimizeDeps which + // supports a "parent > child" syntax + knownImports = stripNesting(knownImports) + const ssrConfig = config.ssr if (ssrConfig?.noExternal === true) { return [] diff --git a/packages/vite/src/node/ssr/ssrManifestPlugin.ts b/packages/vite/src/node/ssr/ssrManifestPlugin.ts index e6811eae29b210..69184150bb97b7 100644 --- a/packages/vite/src/node/ssr/ssrManifestPlugin.ts +++ b/packages/vite/src/node/ssr/ssrManifestPlugin.ts @@ -4,8 +4,6 @@ import type { ImportSpecifier } from 'es-module-lexer' import type { OutputChunk } from 'rollup' import type { ResolvedConfig } from '..' import type { Plugin } from '../plugin' -import { chunkToEmittedCssFileMap } from '../plugins/css' -import { chunkToEmittedAssetsMap } from '../plugins/asset' import { preloadMethod } from '../plugins/importAnalysisBuild' import { normalizePath } from '../utils' @@ -20,29 +18,21 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin { for (const file in bundle) { const chunk = bundle[file] if (chunk.type === 'chunk') { - // links for certain entry chunks are already generated in static HTML - // in those cases we only need to record info for non-entry chunks - const cssFiles = chunk.isEntry - ? null - : chunkToEmittedCssFileMap.get(chunk) - const assetFiles = chunkToEmittedAssetsMap.get(chunk) for (const id in chunk.modules) { const normalizedId = normalizePath(relative(config.root, id)) const mappedChunks = - ssrManifest[normalizedId] || (ssrManifest[normalizedId] = []) + ssrManifest[normalizedId] ?? (ssrManifest[normalizedId] = []) if (!chunk.isEntry) { mappedChunks.push(base + chunk.fileName) - } - if (cssFiles) { - cssFiles.forEach((file) => { - mappedChunks.push(base + file) - }) - } - if (assetFiles) { - assetFiles.forEach((file) => { + // tags for entry chunks are already generated in static HTML, + // so we only need to record info for non-entry chunks. + chunk.viteMetadata.importedCss.forEach((file) => { mappedChunks.push(base + file) }) } + chunk.viteMetadata.importedAssets.forEach((file) => { + mappedChunks.push(base + file) + }) } if (chunk.code.includes(preloadMethod)) { // generate css deps map @@ -55,40 +45,30 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin { } if (imports.length) { for (let index = 0; index < imports.length; index++) { - const { - s: start, - e: end, - n: name, - d: dynamicIndex - } = imports[index] - if (dynamicIndex) { - // check the chunk being imported - const url = code.slice(start, end) - const deps: string[] = [] - const ownerFilename = chunk.fileName - // literal import - trace direct imports and add to deps - const analyzed: Set = new Set() - const addDeps = (filename: string) => { - if (filename === ownerFilename) return - if (analyzed.has(filename)) return - analyzed.add(filename) - const chunk = bundle[filename] as OutputChunk | undefined - if (chunk) { - const cssFiles = chunkToEmittedCssFileMap.get(chunk) - if (cssFiles) { - cssFiles.forEach((file) => { - deps.push(`/${file}`) - }) - } - chunk.imports.forEach(addDeps) - } + const { s: start, e: end, n: name } = imports[index] + // check the chunk being imported + const url = code.slice(start, end) + const deps: string[] = [] + const ownerFilename = chunk.fileName + // literal import - trace direct imports and add to deps + const analyzed: Set = new Set() + const addDeps = (filename: string) => { + if (filename === ownerFilename) return + if (analyzed.has(filename)) return + analyzed.add(filename) + const chunk = bundle[filename] as OutputChunk | undefined + if (chunk) { + chunk.viteMetadata.importedCss.forEach((file) => { + deps.push(`/${file}`) + }) + chunk.imports.forEach(addDeps) } - const normalizedFile = normalizePath( - join(dirname(chunk.fileName), url.slice(1, -1)) - ) - addDeps(normalizedFile) - ssrManifest[basename(name!)] = deps } + const normalizedFile = normalizePath( + join(dirname(chunk.fileName), url.slice(1, -1)) + ) + addDeps(normalizedFile) + ssrManifest[basename(name!)] = deps } } } @@ -96,7 +76,10 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin { } this.emitFile({ - fileName: 'ssr-manifest.json', + fileName: + typeof config.build.ssrManifest === 'string' + ? config.build.ssrManifest + : 'ssr-manifest.json', type: 'asset', source: JSON.stringify(ssrManifest, null, 2) }) diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index ec8868e3acc6d9..3b754fe8f671d1 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -35,7 +35,8 @@ export async function ssrLoadModule( url: string, server: ViteDevServer, context: SSRContext = { global }, - urlStack: string[] = [] + urlStack: string[] = [], + fixStacktrace?: boolean ): Promise { url = unwrapId(url).replace(NULL_BYTE_PLACEHOLDER, '\0') @@ -48,7 +49,13 @@ export async function ssrLoadModule( return pending } - const modulePromise = instantiateModule(url, server, context, urlStack) + const modulePromise = instantiateModule( + url, + server, + context, + urlStack, + fixStacktrace + ) pendingModules.set(url, modulePromise) modulePromise .catch(() => { @@ -64,7 +71,8 @@ async function instantiateModule( url: string, server: ViteDevServer, context: SSRContext = { global }, - urlStack: string[] = [] + urlStack: string[] = [], + fixStacktrace?: boolean ): Promise { const { moduleGraph } = server const mod = await moduleGraph.ensureEntryFromUrl(url, true) @@ -131,7 +139,13 @@ async function instantiateModule( if (pendingDeps.length === 1) { pendingImports.set(url, pendingDeps) } - const mod = await ssrLoadModule(dep, server, context, urlStack) + const mod = await ssrLoadModule( + dep, + server, + context, + urlStack, + fixStacktrace + ) if (pendingDeps.length === 1) { pendingImports.delete(url) } else { @@ -187,7 +201,7 @@ async function instantiateModule( ssrExportAll ) } catch (e) { - if (e.stack) { + if (e.stack && fixStacktrace !== false) { const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph) rebindErrorStacktrace(e, stacktrace) server.config.logger.error( @@ -233,8 +247,13 @@ async function nodeImport( const unhookNodeResolve = hookNodeResolve( (nodeResolve) => (id, parent, isMain, options) => { // Use the Vite resolver only for bare imports while skipping - // any built-in modules and binary modules. - if (!bareImportRE.test(id) || isBuiltin(id) || id.endsWith('.node')) { + // any absolute paths, built-in modules and binary modules. + if ( + !bareImportRE.test(id) || + path.isAbsolute(id) || + isBuiltin(id) || + id.endsWith('.node') + ) { return nodeResolve(id, parent, isMain, options) } if (parent) { diff --git a/packages/vite/src/node/ssr/ssrStacktrace.ts b/packages/vite/src/node/ssr/ssrStacktrace.ts index d70381062d062e..5ffd7d2e186545 100644 --- a/packages/vite/src/node/ssr/ssrStacktrace.ts +++ b/packages/vite/src/node/ssr/ssrStacktrace.ts @@ -1,5 +1,4 @@ -import type { RawSourceMap } from 'source-map' -import { SourceMapConsumer } from 'source-map' +import { TraceMap, originalPositionFor } from '@jridgewell/trace-mapping' import type { ModuleGraph } from '../server/moduleGraph' let offset: number @@ -32,23 +31,18 @@ export function ssrRewriteStacktrace( return input } - // In `source-map:v0.7.0+` this constructor returns a Promise... - // How can we make this block async? - const consumer = new SourceMapConsumer( - rawSourceMap as unknown as RawSourceMap - ) + const traced = new TraceMap(rawSourceMap as any) - const pos = consumer.originalPositionFor({ + const pos = originalPositionFor(traced, { line: Number(line) - offset, - column: Number(column), - bias: SourceMapConsumer.LEAST_UPPER_BOUND + column: Number(column) }) - if (!pos.source) { + if (!pos.source || pos.line == null || pos.column == null) { return input } - const source = `${pos.source}:${pos.line || 0}:${pos.column || 0}` + const source = `${pos.source}:${pos.line}:${pos.column}` if (!varName || varName === 'eval') { return ` at ${source}` } else { diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index e32a6ef31ebd7a..b3a6b5b2cf570c 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -12,8 +12,8 @@ import type { import { extract_names as extractNames } from 'periscopic' import { walk as eswalk } from 'estree-walker' import { combineSourcemaps } from '../utils' -import type { RawSourceMap } from '@ampproject/remapping/dist/types/types' import { isJSONRequest } from '../plugins/json' +import type { RawSourceMap } from '@ampproject/remapping' type Node = _Node & { start: number @@ -97,7 +97,7 @@ async function ssrTransformScript( } function defineExport(position: number, name: string, local = name) { - s.appendRight( + s.appendLeft( position, `\nObject.defineProperty(${ssrModuleExportsKey}, "${name}", ` + `{ enumerable: true, configurable: true, get(){ return ${local} }});` @@ -189,7 +189,8 @@ async function ssrTransformScript( s.overwrite( node.start, node.start + 14 /* 'export default'.length */, - `${ssrModuleExportsKey}.default =` + `${ssrModuleExportsKey}.default =`, + { contentOnly: true } ) } } @@ -221,7 +222,7 @@ async function ssrTransformScript( // { foo } -> { foo: __import_x__.foo } // skip for destructuring patterns if ( - !(parent as any).inPattern || + !isNodeInPatternWeakMap.get(parent) || isInDestructuringAssignment(parent, parentStack) ) { s.appendLeft(id.end, `: ${binding}`) @@ -238,14 +239,16 @@ async function ssrTransformScript( s.prependRight(topNode.start, `const ${id.name} = ${binding};\n`) } } else { - s.overwrite(id.start, id.end, binding) + s.overwrite(id.start, id.end, binding, { contentOnly: true }) } }, onImportMeta(node) { - s.overwrite(node.start, node.end, ssrImportMetaKey) + s.overwrite(node.start, node.end, ssrImportMetaKey, { contentOnly: true }) }, onDynamicImport(node) { - s.overwrite(node.start, node.start + 6, ssrDynamicImportKey) + s.overwrite(node.start, node.start + 6, ssrDynamicImportKey, { + contentOnly: true + }) if (node.type === 'ImportExpression' && node.source.type === 'Literal') { dynamicDeps.add(node.source.value as string) } @@ -288,6 +291,8 @@ interface Visitors { onDynamicImport: (node: Node) => void } +const isNodeInPatternWeakMap = new WeakMap<_Node, boolean>() + /** * Same logic from \@vue/compiler-core & \@vue/compiler-sfc * Except this is using acorn AST @@ -406,7 +411,7 @@ function walk( }) } else if (node.type === 'Property' && parent!.type === 'ObjectPattern') { // mark property in destructuring pattern - ;(node as any).inPattern = true + isNodeInPatternWeakMap.set(node, true) } else if (node.type === 'VariableDeclarator') { const parentFunction = findParentFunction(parentStack) if (parentFunction) { @@ -456,7 +461,7 @@ function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { // property key // this also covers object destructuring pattern - if (isStaticPropertyKey(id, parent) || (parent as any).inPattern) { + if (isStaticPropertyKey(id, parent) || isNodeInPatternWeakMap.get(parent)) { return false } diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index d723b25a54122d..0e3fe49c9cb584 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -9,16 +9,14 @@ import { DEFAULT_EXTENSIONS, VALID_ID_PREFIX, CLIENT_PUBLIC_PATH, - ENV_PUBLIC_PATH + ENV_PUBLIC_PATH, + CLIENT_ENTRY } from './constants' import resolve from 'resolve' import { builtinModules } from 'module' import type { FSWatcher } from 'chokidar' import remapping from '@ampproject/remapping' -import type { - DecodedSourceMap, - RawSourceMap -} from '@ampproject/remapping/dist/types/types' +import type { DecodedSourceMap, RawSourceMap } from '@ampproject/remapping' import { performance } from 'perf_hooks' import { parse as parseUrl, URLSearchParams } from 'url' @@ -33,7 +31,7 @@ export function unwrapId(id: string): string { } export const flattenId = (id: string): string => - id.replace(/(\s*>\s*)/g, '__').replace(/[\/\.]/g, '_') + id.replace(/(\s*>\s*)/g, '__').replace(/[\/\.:]/g, '_') export const normalizeId = (id: string): string => id.replace(/(\s*>\s*)/g, ' > ') @@ -139,7 +137,25 @@ export function createDebugger( } } +function testCaseInsensitiveFS() { + if (!CLIENT_ENTRY.endsWith('client.mjs')) { + throw new Error( + `cannot test case insensitive FS, CLIENT_ENTRY const doesn't contain client.mjs` + ) + } + if (!fs.existsSync(CLIENT_ENTRY)) { + throw new Error( + 'cannot test case insensitive FS, CLIENT_ENTRY does not point to an existing file: ' + + CLIENT_ENTRY + ) + } + return fs.existsSync(CLIENT_ENTRY.replace('client.mjs', 'cLiEnT.mjs')) +} + +export const isCaseInsensitiveFS = testCaseInsensitiveFS() + export const isWindows = os.platform() === 'win32' + const VOLUME_RE = /^[A-Z]:/i export function normalizePath(id: string): string { @@ -147,12 +163,37 @@ export function normalizePath(id: string): string { } export function fsPathFromId(id: string): string { - const fsPath = normalizePath(id.slice(FS_PREFIX.length)) + const fsPath = normalizePath( + id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id + ) return fsPath.startsWith('/') || fsPath.match(VOLUME_RE) ? fsPath : `/${fsPath}` } +export function fsPathFromUrl(url: string): string { + return fsPathFromId(cleanUrl(url)) +} + +/** + * Check if dir is a parent of file + * + * Warning: parameters are not validated, only works with normalized absolute paths + * + * @param dir - normalized absolute path + * @param file - normalized absolute path + * @returns true if dir is a parent of file + */ +export function isParentDirectory(dir: string, file: string): boolean { + if (!dir.endsWith('/')) { + dir = `${dir}/` + } + return ( + file.startsWith(dir) || + (isCaseInsensitiveFS && file.toLowerCase().startsWith(dir.toLowerCase())) + ) +} + export function ensureVolumeInPath(file: string): string { return isWindows ? path.resolve(file) : file } @@ -189,8 +230,14 @@ const knownTsOutputRE = /\.(js|mjs|cjs|jsx)$/ export const isTsRequest = (url: string) => knownTsRE.test(cleanUrl(url)) export const isPossibleTsOutput = (url: string) => knownTsOutputRE.test(cleanUrl(url)) -export const getTsSrcPath = (filename: string) => - filename.replace(/\.([cm])?(js)(x?)(\?|$)/, '.$1ts$3') +export function getPotentialTsSrcPaths(filePath: string) { + const [name, type, query = ''] = filePath.split(/(\.(?:[cm]?js|jsx))(\?.*)?$/) + const paths = [name + type.replace('js', 'ts') + query] + if (!type.endsWith('x')) { + paths.push(name + type.replace('js', 'tsx') + query) + } + return paths +} const importQueryRE = /(\?|&)import=?(?:&|$)/ const internalPrefixes = [ @@ -222,7 +269,7 @@ export function injectQuery(url: string, queryToInject: string): string { } pathname = decodeURIComponent(pathname) return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${ - hash || '' + hash ?? '' }` } @@ -292,20 +339,28 @@ export function isDefined(value: T | undefined | null): value is T { return value != null } +interface LookupFileOptions { + pathOnly?: boolean + rootDir?: string +} + export function lookupFile( dir: string, formats: string[], - pathOnly = false + options?: LookupFileOptions ): string | undefined { for (const format of formats) { const fullPath = path.join(dir, format) if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) { - return pathOnly ? fullPath : fs.readFileSync(fullPath, 'utf-8') + return options?.pathOnly ? fullPath : fs.readFileSync(fullPath, 'utf-8') } } const parentDir = path.dirname(dir) - if (parentDir !== dir) { - return lookupFile(parentDir, formats, pathOnly) + if ( + parentDir !== dir && + (!options?.rootDir || parentDir.startsWith(options?.rootDir)) + ) { + return lookupFile(parentDir, formats, options) } } @@ -422,8 +477,8 @@ export function writeFile( */ export function isFileReadable(filename: string): boolean { try { - fs.accessSync(filename, fs.constants.R_OK) - return true + const stat = fs.statSync(filename, { throwIfNoEntry: false }) + return !!stat } catch { return false } @@ -466,10 +521,6 @@ export function copyDir(srcDir: string, destDir: string): void { } } -export function ensureLeadingSlash(path: string): string { - return !path.startsWith('/') ? '/' + path : path -} - export function ensureWatchedFile( watcher: FSWatcher, file: string | null, @@ -518,12 +569,32 @@ export async function processSrcSet( ) return ret.reduce((prev, { url, descriptor }, index) => { - descriptor = descriptor || '' + descriptor ??= '' return (prev += url + ` ${descriptor}${index === ret.length - 1 ? '' : ', '}`) }, '') } +function escapeToLinuxLikePath(path: string) { + if (/^[A-Z]:/.test(path)) { + return path.replace(/^([A-Z]):\//, '/windows/$1/') + } + if (/^\/[^/]/.test(path)) { + return `/linux${path}` + } + return path +} + +function unescapeToLinuxLikePath(path: string) { + if (path.startsWith('/linux/')) { + return path.slice('/linux'.length) + } + if (path.startsWith('/windows/')) { + return path.replace(/^\/windows\/([A-Z])\//, '$1:/') + } + return path +} + // based on https://github.com/sveltejs/svelte/blob/abf11bb02b2afbd3e4cac509a0f70e318c306364/src/compiler/utils/mapped_code.ts#L221 const nullSourceMap: RawSourceMap = { names: [], @@ -542,6 +613,21 @@ export function combineSourcemaps( return { ...nullSourceMap } } + // hack for parse broken with normalized absolute paths on windows (C:/path/to/something). + // escape them to linux like paths + // also avoid mutation here to prevent breaking plugin's using cache to generate sourcemaps like vue (see #7442) + sourcemapList = sourcemapList.map((sourcemap) => { + const newSourcemaps = { ...sourcemap } + newSourcemaps.sources = sourcemap.sources.map((source) => + source ? escapeToLinuxLikePath(source) : null + ) + if (sourcemap.sourceRoot) { + newSourcemaps.sourceRoot = escapeToLinuxLikePath(sourcemap.sourceRoot) + } + return newSourcemaps + }) + const escapedFilename = escapeToLinuxLikePath(filename) + // We don't declare type here so we can convert/fake/map as RawSourceMap let map //: SourceMap let mapIndex = 1 @@ -553,10 +639,10 @@ export function combineSourcemaps( map = remapping( sourcemapList[0], function loader(sourcefile) { - if (sourcefile === filename && sourcemapList[mapIndex]) { + if (sourcefile === escapedFilename && sourcemapList[mapIndex]) { return sourcemapList[mapIndex++] } else { - return { ...nullSourceMap } + return null } }, true @@ -566,6 +652,12 @@ export function combineSourcemaps( delete map.file } + // unescape the previous hack + map.sources = map.sources.map((source) => + source ? unescapeToLinuxLikePath(source) : source + ) + map.file = filename + return map as RawSourceMap } @@ -584,11 +676,7 @@ export function resolveHostname( optionsHost: string | boolean | undefined ): Hostname { let host: string | undefined - if ( - optionsHost === undefined || - optionsHost === false || - optionsHost === 'localhost' - ) { + if (optionsHost === undefined || optionsHost === false) { // Use a secure default host = '127.0.0.1' } else if (optionsHost === true) { @@ -642,3 +730,6 @@ export function parseRequest(id: string): Record | null { } return Object.fromEntries(new URLSearchParams(search.slice(1))) } + +export const blankReplacer = (match: string) => ' '.repeat(match.length) +export const stringsRE = /"[^"]*"|'[^']*'|`[^`]*`/g diff --git a/packages/vite/types/chokidar.d.ts b/packages/vite/types/chokidar.d.ts index 4c6c295df96fd0..d56d507ccff183 100644 --- a/packages/vite/types/chokidar.d.ts +++ b/packages/vite/types/chokidar.d.ts @@ -29,27 +29,28 @@ THE SOFTWARE. /// import type * as fs from 'fs' +import { EventEmitter } from 'events' import type { Matcher } from './anymatch' -export interface FSWatcher extends fs.FSWatcher { +export class FSWatcher extends EventEmitter implements fs.FSWatcher { options: WatchOptions /** * Constructs a new FSWatcher instance with optional WatchOptions parameter. */ - (options?: WatchOptions): void + constructor(options?: WatchOptions) /** * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one * string. */ - add(paths: string | ReadonlyArray): void + add(paths: string | ReadonlyArray): this /** * Stop watching files, directories, or glob patterns. Takes an array of strings or just one * string. */ - unwatch(paths: string | ReadonlyArray): void + unwatch(paths: string | ReadonlyArray): this /** * Returns an object representing all the paths on the file system being watched by this @@ -155,7 +156,7 @@ export interface WatchOptions { /** * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly - * and `fsevents` is available this supersedes the `usePolling` setting. When set to `false` on + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on * OS X, `usePolling: true` becomes the default. */ useFsEvents?: boolean @@ -202,17 +203,25 @@ export interface WatchOptions { /** * can be set to an object in order to adjust timing params: */ - awaitWriteFinish?: - | { - /** - * Amount of time in milliseconds for a file size to remain constant before emitting its event. - */ - stabilityThreshold?: number - - /** - * File size polling interval. - */ - pollInterval?: number - } - | boolean + awaitWriteFinish?: AwaitWriteFinishOptions | boolean } + +export interface AwaitWriteFinishOptions { + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number + + /** + * File size polling interval. + */ + pollInterval?: number +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch( + paths: string | ReadonlyArray, + options?: WatchOptions +): FSWatcher diff --git a/packages/vite/types/customEvent.d.ts b/packages/vite/types/customEvent.d.ts index c38a4ac940ff6e..af4db5d14fbe97 100644 --- a/packages/vite/types/customEvent.d.ts +++ b/packages/vite/types/customEvent.d.ts @@ -1,5 +1,16 @@ -// See https://stackoverflow.com/a/63549561. -export type CustomEventName = (T extends `vite:${T}` - ? never - : T) & - (`vite:${T}` extends T ? never : T) +import type { + ErrorPayload, + FullReloadPayload, + PrunePayload, + UpdatePayload +} from './hmrPayload' + +export interface CustomEventMap { + 'vite:beforeUpdate': UpdatePayload + 'vite:beforePrune': PrunePayload + 'vite:beforeFullReload': FullReloadPayload + 'vite:error': ErrorPayload +} + +export type InferCustomEventPayload = + T extends keyof CustomEventMap ? CustomEventMap[T] : any diff --git a/packages/vite/types/hot.d.ts b/packages/vite/types/hot.d.ts new file mode 100644 index 00000000000000..f06846ff59d530 --- /dev/null +++ b/packages/vite/types/hot.d.ts @@ -0,0 +1,25 @@ +import type { InferCustomEventPayload } from './customEvent' + +export interface ViteHotContext { + readonly data: any + + accept(): void + accept(cb: (mod: any) => void): void + accept(dep: string, cb: (mod: any) => void): void + accept(deps: readonly string[], cb: (mods: any[]) => void): void + + /** + * @deprecated + */ + acceptDeps(): never + + dispose(cb: (data: any) => void): void + decline(): void + invalidate(): void + + on( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void + send(event: T, data?: InferCustomEventPayload): void +} diff --git a/packages/vite/types/importMeta.d.ts b/packages/vite/types/importMeta.d.ts index 625e075333e48d..9b57fd120a7ba9 100644 --- a/packages/vite/types/importMeta.d.ts +++ b/packages/vite/types/importMeta.d.ts @@ -4,10 +4,14 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ -// Duplicate import('../src/node/importGlob').AssertOptions -// Avoid breaking the production client type because this file is referenced -// in vite/client.d.ts and in production src/node/importGlob.ts doesn't exist -interface AssertOptions { +// Duplicate of import('../src/node/importGlob').GlobOptions in order to +// avoid breaking the production client type. Because this file is referenced +// in vite/client.d.ts and in production src/node/importGlob.ts doesn't exist. +interface GlobOptions { + as?: string + /** + * @deprecated + */ assert?: { type: string } @@ -16,68 +20,19 @@ interface AssertOptions { interface ImportMeta { url: string - readonly hot?: { - readonly data: any - - accept(): void - accept(cb: (mod: any) => void): void - accept(dep: string, cb: (mod: any) => void): void - accept(deps: readonly string[], cb: (mods: any[]) => void): void - - /** - * @deprecated - */ - acceptDeps(): never - - dispose(cb: (data: any) => void): void - decline(): void - invalidate(): void - - on: { - ( - event: 'vite:beforeUpdate', - cb: (payload: import('./hmrPayload').UpdatePayload) => void - ): void - ( - event: 'vite:beforePrune', - cb: (payload: import('./hmrPayload').PrunePayload) => void - ): void - ( - event: 'vite:beforeFullReload', - cb: (payload: import('./hmrPayload').FullReloadPayload) => void - ): void - ( - event: 'vite:error', - cb: (payload: import('./hmrPayload').ErrorPayload) => void - ): void - ( - event: import('./customEvent').CustomEventName, - cb: (data: any) => void - ): void - } - } + readonly hot?: import('./hot').ViteHotContext readonly env: ImportMetaEnv - glob( + glob( pattern: string, - options?: AssertOptions - ): Record< - string, - () => Promise<{ - [key: string]: any - }> - > + options?: GlobOptions + ): Record Promise> - globEager( + globEager( pattern: string, - options?: AssertOptions - ): Record< - string, - { - [key: string]: any - } - > + options?: GlobOptions + ): Record } interface ImportMetaEnv { diff --git a/packages/vite/types/shims.d.ts b/packages/vite/types/shims.d.ts index 9c2905cfb76dec..68aa799cb6a863 100644 --- a/packages/vite/types/shims.d.ts +++ b/packages/vite/types/shims.d.ts @@ -93,11 +93,6 @@ declare module 'micromatch' { ): boolean } -declare module 'compression' { - function compression(): any - export default compression -} - // LESS' types somewhat references this which doesn't make sense in Node, // so we have to shim it declare interface HTMLLinkElement {} diff --git a/packages/vite/types/ws.d.ts b/packages/vite/types/ws.d.ts index 4f85bb87d5bc3d..29732ebf3e0d8a 100644 --- a/packages/vite/types/ws.d.ts +++ b/packages/vite/types/ws.d.ts @@ -1,4 +1,7 @@ -// Type definitions for ws 8.2 +// Modified and inlined to avoid extra dependency +// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ws/index.d.ts + +// Type definitions for ws 8.5 // Project: https://github.com/websockets/ws // Definitions by: Paul Loyd // Margus Lamp @@ -7,6 +10,7 @@ // teidesu // Bartosz Wojtkowiak // Kyle Hensel +// Samuel Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -40,6 +44,8 @@ declare class WebSocket extends EventEmitter { binaryType: 'nodebuffer' | 'arraybuffer' | 'fragments' readonly bufferedAmount: number readonly extensions: string + /** Indicates whether the websocket is paused */ + readonly isPaused: boolean readonly protocol: string /** The current state of the connection */ readonly readyState: @@ -58,11 +64,12 @@ declare class WebSocket extends EventEmitter { /** The connection is closed. */ readonly CLOSED: 3 - onopen: (event: WebSocket.Event) => void - onerror: (event: WebSocket.ErrorEvent) => void - onclose: (event: WebSocket.CloseEvent) => void - onmessage: (event: WebSocket.MessageEvent) => void + onopen: ((event: WebSocket.Event) => void) | null + onerror: ((event: WebSocket.ErrorEvent) => void) | null + onclose: ((event: WebSocket.CloseEvent) => void) | null + onmessage: ((event: WebSocket.MessageEvent) => void) | null + constructor(address: null) constructor( address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs @@ -89,6 +96,18 @@ declare class WebSocket extends EventEmitter { ): void terminate(): void + /** + * Pause the websocket causing it to stop emitting events. Some events can still be + * emitted after this is called, until all buffered data is consumed. This method + * is a noop if the ready state is `CONNECTING` or `CLOSED`. + */ + pause(): void + /** + * Make a paused socket resume emitting events. This method is a noop if the ready + * state is `CONNECTING` or `CLOSED`. + */ + resume(): void + // HTML5 WebSocket events addEventListener( method: 'message', @@ -281,7 +300,7 @@ declare class WebSocket extends EventEmitter { } declare const WebSocketAlias: typeof WebSocket -type WebSocketAlias = WebSocket +interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface declare namespace WebSocket { /** @@ -328,6 +347,7 @@ declare namespace WebSocket { interface ClientOptions extends SecureContextOptions { protocol?: string | undefined followRedirects?: boolean | undefined + generateMask?(mask: Buffer): void handshakeTimeout?: number | undefined maxRedirects?: number | undefined perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined @@ -341,6 +361,7 @@ declare namespace WebSocket { checkServerIdentity?(servername: string, cert: CertMeta): boolean rejectUnauthorized?: boolean | undefined maxPayload?: number | undefined + skipUTF8Validation?: boolean | undefined } interface PerMessageDeflateOptions { @@ -415,6 +436,7 @@ declare namespace WebSocket { perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined maxPayload?: number | undefined skipUTF8Validation?: boolean | undefined + WebSocket?: typeof WebSocket.WebSocket | undefined } interface AddressInfo { @@ -424,10 +446,10 @@ declare namespace WebSocket { } // WebSocket Server - class Server extends EventEmitter { + class Server extends EventEmitter { options: ServerOptions path: string - clients: Set + clients: Set constructor(options?: ServerOptions, callback?: () => void) @@ -437,56 +459,59 @@ declare namespace WebSocket { request: IncomingMessage, socket: Duplex, upgradeHead: Buffer, - callback: (client: WebSocket, request: IncomingMessage) => void + callback: (client: T, request: IncomingMessage) => void ): void shouldHandle(request: IncomingMessage): boolean | Promise // Events on( event: 'connection', - cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void + cb: (this: Server, socket: T, request: IncomingMessage) => void ): this - on(event: 'error', cb: (this: Server, error: Error) => void): this + on(event: 'error', cb: (this: Server, error: Error) => void): this on( event: 'headers', - cb: (this: Server, headers: string[], request: IncomingMessage) => void + cb: (this: Server, headers: string[], request: IncomingMessage) => void ): this - on(event: 'close' | 'listening', cb: (this: Server) => void): this + on(event: 'close' | 'listening', cb: (this: Server) => void): this on( event: string | symbol, - listener: (this: Server, ...args: any[]) => void + listener: (this: Server, ...args: any[]) => void ): this once( event: 'connection', - cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void + cb: (this: Server, socket: T, request: IncomingMessage) => void ): this - once(event: 'error', cb: (this: Server, error: Error) => void): this + once(event: 'error', cb: (this: Server, error: Error) => void): this once( event: 'headers', - cb: (this: Server, headers: string[], request: IncomingMessage) => void + cb: (this: Server, headers: string[], request: IncomingMessage) => void + ): this + once(event: 'close' | 'listening', cb: (this: Server) => void): this + once( + event: string | symbol, + listener: (this: Server, ...args: any[]) => void ): this - once(event: 'close' | 'listening', cb: (this: Server) => void): this - once(event: string | symbol, listener: (...args: any[]) => void): this off( event: 'connection', - cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void + cb: (this: Server, socket: T, request: IncomingMessage) => void ): this - off(event: 'error', cb: (this: Server, error: Error) => void): this + off(event: 'error', cb: (this: Server, error: Error) => void): this off( event: 'headers', - cb: (this: Server, headers: string[], request: IncomingMessage) => void + cb: (this: Server, headers: string[], request: IncomingMessage) => void ): this - off(event: 'close' | 'listening', cb: (this: Server) => void): this + off(event: 'close' | 'listening', cb: (this: Server) => void): this off( event: string | symbol, - listener: (this: Server, ...args: any[]) => void + listener: (this: Server, ...args: any[]) => void ): this addListener( event: 'connection', - cb: (client: WebSocket, request: IncomingMessage) => void + cb: (client: T, request: IncomingMessage) => void ): this addListener(event: 'error', cb: (err: Error) => void): this addListener( @@ -499,7 +524,7 @@ declare namespace WebSocket { listener: (...args: any[]) => void ): this - removeListener(event: 'connection', cb: (client: WebSocket) => void): this + removeListener(event: 'connection', cb: (client: T) => void): this removeListener(event: 'error', cb: (err: Error) => void): this removeListener( event: 'headers', @@ -513,9 +538,9 @@ declare namespace WebSocket { } const WebSocketServer: typeof Server - type WebSocketServer = Server + interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface const WebSocket: typeof WebSocketAlias - type WebSocket = WebSocketAlias + interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface // WebSocket stream function createWebSocketStream( @@ -524,5 +549,5 @@ declare namespace WebSocket { ): Duplex } -//export = WebSocket; +// export = WebSocket export { WebSocket, WebSocketAlias } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b916538cb92a9e..b912b6c8b14eac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,96 +4,100 @@ overrides: vite: workspace:* '@vitejs/plugin-vue': workspace:* +packageExtensionsChecksum: 696422bac84dd936748019990f84746e + importers: .: specifiers: - '@microsoft/api-extractor': ^7.19.3 + '@microsoft/api-extractor': ^7.19.5 '@types/fs-extra': ^9.0.13 - '@types/jest': ^27.0.3 - '@types/node': ^16.11.17 + '@types/jest': ^27.4.1 + '@types/node': ^16.11.26 '@types/prompts': ^2.0.14 '@types/semver': ^7.3.9 - '@typescript-eslint/eslint-plugin': ^5.8.1 - '@typescript-eslint/parser': ^5.8.1 + '@typescript-eslint/eslint-plugin': ^5.16.0 + '@typescript-eslint/parser': ^5.16.0 conventional-changelog-cli: ^2.2.2 cross-env: ^7.0.3 - esbuild: 0.14.3 - eslint: ^8.5.0 - eslint-define-config: ^1.2.1 + esbuild: ^0.14.27 + eslint: ^8.12.0 + eslint-define-config: ^1.3.0 eslint-plugin-node: ^11.1.0 execa: ^5.1.1 - fs-extra: ^10.0.0 - jest: ^27.4.5 - lint-staged: ^12.1.4 - minimist: ^1.2.5 + fs-extra: ^10.0.1 + jest: ^27.5.1 + lint-staged: ^12.3.7 + minimist: ^1.2.6 node-fetch: ^2.6.6 npm-run-all: ^4.1.5 picocolors: ^1.0.0 - playwright-chromium: ^1.17.1 - prettier: 2.5.1 + playwright-chromium: ^1.20.1 + prettier: 2.6.1 prompts: ^2.4.2 rimraf: ^3.0.2 rollup: ^2.59.0 semver: ^7.3.5 simple-git-hooks: ^2.7.0 - sirv: ^2.0.0 - ts-jest: ^27.1.2 + sirv: ^2.0.2 + ts-jest: ^27.1.4 ts-node: ^10.4.0 typescript: ~4.5.4 vite: workspace:* - vitepress: ^0.20.10 + vitepress: ^0.22.3 devDependencies: - '@microsoft/api-extractor': 7.19.3 + '@microsoft/api-extractor': 7.19.5 '@types/fs-extra': 9.0.13 - '@types/jest': 27.0.3 - '@types/node': 16.11.17 + '@types/jest': 27.4.1 + '@types/node': 16.11.26 '@types/prompts': 2.0.14 '@types/semver': 7.3.9 - '@typescript-eslint/eslint-plugin': 5.8.1_3a47348159e115370aa4cba56aba33b6 - '@typescript-eslint/parser': 5.8.1_eslint@8.5.0+typescript@4.5.4 + '@typescript-eslint/eslint-plugin': 5.16.0_e8f8f41828c0dd0ac8e32e1859a7f4f7 + '@typescript-eslint/parser': 5.16.0_eslint@8.12.0+typescript@4.5.4 conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 - esbuild: 0.14.3 - eslint: 8.5.0 - eslint-define-config: 1.2.1 - eslint-plugin-node: 11.1.0_eslint@8.5.0 + esbuild: 0.14.27 + eslint: 8.12.0 + eslint-define-config: 1.3.0 + eslint-plugin-node: 11.1.0_eslint@8.12.0 execa: 5.1.1 - fs-extra: 10.0.0 - jest: 27.4.5_ts-node@10.4.0 - lint-staged: 12.1.4 - minimist: 1.2.5 + fs-extra: 10.0.1 + jest: 27.5.1_ts-node@10.4.0 + lint-staged: 12.3.7 + minimist: 1.2.6 node-fetch: 2.6.6 npm-run-all: 4.1.5 picocolors: 1.0.0 - playwright-chromium: 1.17.1 - prettier: 2.5.1 + playwright-chromium: 1.20.1 + prettier: 2.6.1 prompts: 2.4.2 rimraf: 3.0.2 rollup: 2.62.0 semver: 7.3.5 simple-git-hooks: 2.7.0 - sirv: 2.0.0 - ts-jest: 27.1.2_1b5a1be2010a86e622f02a11eaeb730f - ts-node: 10.4.0_00264fd83560919cd06c986889baae0a + sirv: 2.0.2 + ts-jest: 27.1.4_4dfe14e0e8266437469ae0475a5c09ac + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 typescript: 4.5.4 vite: link:packages/vite - vitepress: 0.20.10 + vitepress: 0.22.3 packages/create-vite: specifiers: kolorist: ^1.5.1 - minimist: ^1.2.5 + minimist: ^1.2.6 prompts: ^2.4.2 dependencies: kolorist: 1.5.1 - minimist: 1.2.5 + minimist: 1.2.6 prompts: 2.4.2 packages/playground: specifiers: + convert-source-map: ^1.8.0 css-color-names: ^1.0.1 devDependencies: + convert-source-map: 1.8.0 css-color-names: 1.0.1 packages/playground/alias: @@ -115,9 +119,12 @@ importers: packages/playground/backend-integration: specifiers: + fast-glob: ^3.2.11 tailwindcss: ^2.2.19 dependencies: tailwindcss: 2.2.19_ts-node@10.4.0 + devDependencies: + fast-glob: 3.2.11 packages/playground/cli: specifiers: {} @@ -128,12 +135,14 @@ importers: packages/playground/css: specifiers: css-dep: link:./css-dep + fast-glob: ^3.2.11 less: ^4.1.2 postcss-nested: ^5.0.6 sass: ^1.43.4 stylus: ^0.55.0 devDependencies: css-dep: link:css-dep + fast-glob: 3.2.11 less: 4.1.2 postcss-nested: 5.0.6 sass: 1.45.1 @@ -145,6 +154,18 @@ importers: packages/playground/css-codesplit-cjs: specifiers: {} + packages/playground/css-sourcemap: + specifiers: + less: ^4.1.2 + magic-string: ^0.25.7 + sass: ^1.43.4 + stylus: ^0.55.0 + devDependencies: + less: 4.1.2 + magic-string: 0.25.7 + sass: 1.45.1 + stylus: 0.55.0 + packages/playground/css/css-dep: specifiers: {} @@ -172,6 +193,9 @@ importers: devDependencies: cross-env: 7.0.3 + packages/playground/env-nested: + specifiers: {} + packages/playground/extensions: specifiers: vue: ^3.2.25 @@ -201,6 +225,9 @@ importers: packages/playground/html: specifiers: {} + packages/playground/js-sourcemap: + specifiers: {} + packages/playground/json: specifiers: cross-env: ^7.0.3 @@ -209,19 +236,30 @@ importers: devDependencies: cross-env: 7.0.3 express: 4.17.2 + json-module: link:json-module vue: 3.2.26 + packages/playground/json/json-module: + specifiers: {} + packages/playground/legacy: specifiers: '@vitejs/plugin-legacy': workspace:* + express: ^4.17.1 devDependencies: '@vitejs/plugin-legacy': link:../../plugin-legacy + express: 4.17.2 packages/playground/lib: specifiers: {} packages/playground/multiple-entrypoints: - specifiers: {} + specifiers: + fast-glob: ^3.2.11 + sass: ^1.43.4 + devDependencies: + fast-glob: 3.2.11 + sass: 1.45.1 packages/playground/nested-deps: specifiers: @@ -282,12 +320,15 @@ importers: dep-esbuild-plugin-transform: file:./dep-esbuild-plugin-transform dep-linked: link:./dep-linked dep-linked-include: link:./dep-linked-include + dep-not-js: file:./dep-not-js + dep-with-dynamic-import: file:./dep-with-dynamic-import lodash-es: ^4.17.21 nested-exclude: file:./nested-exclude phoenix: ^1.6.2 react: ^17.0.2 react-dom: ^17.0.2 resolve-linked: workspace:0.0.0 + url: ^0.11.0 vue: ^3.2.25 vuex: ^4.0.0 dependencies: @@ -298,12 +339,15 @@ importers: dep-esbuild-plugin-transform: link:dep-esbuild-plugin-transform dep-linked: link:dep-linked dep-linked-include: link:dep-linked-include + dep-not-js: link:dep-not-js + dep-with-dynamic-import: link:dep-with-dynamic-import lodash-es: 4.17.21 nested-exclude: link:nested-exclude phoenix: 1.6.5 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 resolve-linked: link:../resolve-linked + url: 0.11.0 vue: 3.2.26 vuex: 4.0.2_vue@3.2.26 devDependencies: @@ -330,6 +374,12 @@ importers: dependencies: react: 17.0.2 + packages/playground/optimize-deps/dep-not-js: + specifiers: {} + + packages/playground/optimize-deps/dep-with-dynamic-import: + specifiers: {} + packages/playground/optimize-deps/nested-exclude: specifiers: nested-include: link:./nested-include @@ -414,6 +464,7 @@ importers: '@babel/runtime': ^7.16.0 es5-ext: 0.10.53 normalize.css: ^8.0.1 + require-pkg-with-module-field: link:./require-pkg-with-module-field resolve-browser-field: link:./browser-field resolve-custom-condition: link:./custom-condition resolve-custom-main-field: link:./custom-main-field @@ -424,6 +475,7 @@ importers: '@babel/runtime': 7.16.5 es5-ext: 0.10.53 normalize.css: 8.0.1 + require-pkg-with-module-field: link:require-pkg-with-module-field resolve-browser-field: link:browser-field resolve-custom-condition: link:custom-condition resolve-custom-main-field: link:custom-main-field @@ -455,6 +507,12 @@ importers: packages/playground/resolve/inline-package: specifiers: {} + packages/playground/resolve/require-pkg-with-module-field: + specifiers: + bignumber.js: 9.0.2 + dependencies: + bignumber.js: 9.0.2 + packages/playground/ssr-deps: specifiers: bcrypt: ^5.0.1 @@ -611,6 +669,12 @@ importers: devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue + packages/playground/tailwind-sourcemap: + specifiers: + tailwindcss: ^3.0.23 + dependencies: + tailwindcss: 3.0.23_ts-node@10.4.0 + packages/playground/tsconfig-json: specifiers: {} @@ -620,7 +684,6 @@ importers: packages/playground/vue: specifiers: '@vitejs/plugin-vue': workspace:* - css-with-exports-field: ^1.0.0 js-yaml: ^4.1.0 less: ^4.1.2 lodash-es: ^4.17.21 @@ -633,7 +696,6 @@ importers: vue: 3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue - css-with-exports-field: 1.0.0 js-yaml: 4.1.0 less: 4.1.2 pug: 3.0.2 @@ -651,6 +713,28 @@ importers: '@vitejs/plugin-vue': link:../../plugin-vue '@vitejs/plugin-vue-jsx': link:../../plugin-vue-jsx + packages/playground/vue-lib: + specifiers: + '@vitejs/plugin-vue': workspace:* + vue: ^3.2.25 + dependencies: + vue: 3.2.26 + devDependencies: + '@vitejs/plugin-vue': link:../../plugin-vue + + packages/playground/vue-sourcemap: + specifiers: + '@vitejs/plugin-vue': workspace:* + less: ^4.1.2 + sass: ^1.43.4 + vue: ^3.2.31 + dependencies: + vue: 3.2.31 + devDependencies: + '@vitejs/plugin-vue': link:../../plugin-vue + less: 4.1.2 + sass: 1.45.1 + packages/playground/wasm: specifiers: {} @@ -662,219 +746,219 @@ importers: packages/plugin-legacy: specifiers: - '@babel/standalone': ^7.16.6 - core-js: ^3.20.1 - magic-string: ^0.25.7 + '@babel/standalone': ^7.17.8 + core-js: ^3.21.1 + magic-string: ^0.26.1 regenerator-runtime: ^0.13.9 - systemjs: ^6.11.0 + systemjs: ^6.12.1 dependencies: - '@babel/standalone': 7.16.6 - core-js: 3.20.1 - magic-string: 0.25.7 + '@babel/standalone': 7.17.8 + core-js: 3.21.1 + magic-string: 0.26.1 regenerator-runtime: 0.13.9 - systemjs: 6.11.0 + systemjs: 6.12.1 packages/plugin-react: specifiers: - '@babel/core': ^7.16.5 - '@babel/plugin-transform-react-jsx': ^7.16.5 - '@babel/plugin-transform-react-jsx-development': ^7.16.5 - '@babel/plugin-transform-react-jsx-self': ^7.16.5 - '@babel/plugin-transform-react-jsx-source': ^7.16.5 - '@rollup/pluginutils': ^4.1.2 + '@babel/core': ^7.17.8 + '@babel/plugin-transform-react-jsx': ^7.17.3 + '@babel/plugin-transform-react-jsx-development': ^7.16.7 + '@babel/plugin-transform-react-jsx-self': ^7.16.7 + '@babel/plugin-transform-react-jsx-source': ^7.16.7 + '@rollup/pluginutils': ^4.2.0 react-refresh: ^0.11.0 - resolve: ^1.20.0 - dependencies: - '@babel/core': 7.16.5 - '@babel/plugin-transform-react-jsx': 7.16.5_@babel+core@7.16.5 - '@babel/plugin-transform-react-jsx-development': 7.16.5_@babel+core@7.16.5 - '@babel/plugin-transform-react-jsx-self': 7.16.5_@babel+core@7.16.5 - '@babel/plugin-transform-react-jsx-source': 7.16.5_@babel+core@7.16.5 - '@rollup/pluginutils': 4.1.2 + resolve: ^1.22.0 + dependencies: + '@babel/core': 7.17.8 + '@babel/plugin-transform-react-jsx': 7.17.3_@babel+core@7.17.8 + '@babel/plugin-transform-react-jsx-development': 7.16.7_@babel+core@7.17.8 + '@babel/plugin-transform-react-jsx-self': 7.16.7_@babel+core@7.17.8 + '@babel/plugin-transform-react-jsx-source': 7.16.7_@babel+core@7.17.8 + '@rollup/pluginutils': 4.2.0 react-refresh: 0.11.0 - resolve: 1.20.0 + resolve: 1.22.0 packages/plugin-vue: specifiers: - '@rollup/pluginutils': ^4.1.2 + '@rollup/pluginutils': ^4.2.0 '@types/hash-sum': ^1.0.0 - debug: ^4.3.3 + debug: ^4.3.4 hash-sum: ^2.0.0 rollup: ^2.59.0 slash: ^4.0.0 source-map: ^0.6.1 - vue: ^3.2.26 + vue: ^3.2.31 devDependencies: - '@rollup/pluginutils': 4.1.2 + '@rollup/pluginutils': 4.2.0 '@types/hash-sum': 1.0.0 - debug: 4.3.3 + debug: 4.3.4 hash-sum: 2.0.0 rollup: 2.62.0 slash: 4.0.0 source-map: 0.6.1 - vue: 3.2.26 + vue: 3.2.31 packages/plugin-vue-jsx: specifiers: - '@babel/core': ^7.16.5 + '@babel/core': ^7.17.8 '@babel/plugin-syntax-import-meta': ^7.10.4 - '@babel/plugin-transform-typescript': ^7.16.1 - '@rollup/pluginutils': ^4.1.2 + '@babel/plugin-transform-typescript': ^7.16.8 + '@rollup/pluginutils': ^4.2.0 '@vue/babel-plugin-jsx': ^1.1.1 hash-sum: ^2.0.0 dependencies: - '@babel/core': 7.16.5 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.16.5 - '@babel/plugin-transform-typescript': 7.16.1_@babel+core@7.16.5 - '@rollup/pluginutils': 4.1.2 - '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.16.5 + '@babel/core': 7.17.8 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.17.8 + '@babel/plugin-transform-typescript': 7.16.8_@babel+core@7.17.8 + '@rollup/pluginutils': 4.2.0 + '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.17.8 hash-sum: 2.0.0 packages/vite: specifiers: - '@ampproject/remapping': ^1.0.2 - '@babel/parser': ^7.16.6 - '@babel/types': ^7.16.0 - '@rollup/plugin-alias': ^3.1.8 - '@rollup/plugin-commonjs': ^21.0.1 + '@ampproject/remapping': ^2.1.2 + '@babel/parser': ^7.17.8 + '@babel/types': ^7.17.0 + '@jridgewell/trace-mapping': ^0.3.4 + '@rollup/plugin-alias': ^3.1.9 + '@rollup/plugin-commonjs': ^21.0.3 '@rollup/plugin-dynamic-import-vars': ^1.4.2 '@rollup/plugin-json': ^4.1.0 - '@rollup/plugin-node-resolve': 13.1.1 - '@rollup/plugin-typescript': ^8.3.0 - '@rollup/pluginutils': ^4.1.2 + '@rollup/plugin-node-resolve': 13.1.3 + '@rollup/plugin-typescript': ^8.3.1 + '@rollup/pluginutils': ^4.2.0 '@types/convert-source-map': ^1.5.2 '@types/cross-spawn': ^6.0.2 '@types/debug': ^4.1.7 - '@types/estree': ^0.0.50 + '@types/estree': ^0.0.51 '@types/etag': ^1.8.1 '@types/less': ^3.0.3 '@types/micromatch': ^4.0.2 '@types/mime': ^2.0.3 - '@types/node': ^16.11.17 + '@types/node': ^16.11.26 '@types/resolve': ^1.20.1 '@types/sass': ~1.43.1 '@types/stylus': ^0.48.36 - '@types/ws': ^8.2.2 - '@vue/compiler-dom': ^3.2.26 + '@types/ws': ^8.5.3 + '@vue/compiler-dom': ^3.2.31 acorn: ^8.7.0 cac: 6.7.9 - chokidar: ^3.5.2 - compression: ^1.7.4 + chokidar: ^3.5.3 connect: ^3.7.0 connect-history-api-fallback: ^1.6.0 convert-source-map: ^1.8.0 cors: ^2.8.5 cross-spawn: ^7.0.3 - debug: ^4.3.3 - dotenv: ^10.0.0 + debug: ^4.3.4 + dotenv: ^14.3.2 dotenv-expand: ^5.1.0 - es-module-lexer: ^0.9.3 - esbuild: 0.14.3 + es-module-lexer: ^0.10.4 + esbuild: ^0.14.27 estree-walker: ^2.0.2 etag: ^1.8.1 - fast-glob: ^3.2.7 + fast-glob: ^3.2.11 fsevents: ~2.3.2 http-proxy: ^1.18.1 - json5: ^2.2.0 + json5: ^2.2.1 launch-editor-middleware: ^2.3.0 - magic-string: ^0.25.7 - micromatch: ^4.0.4 + magic-string: ^0.26.1 + micromatch: ^4.0.5 mrmime: ^1.0.0 - node-forge: ^1.2.0 + node-forge: ^1.3.0 okie: ^1.0.1 open: ^8.4.0 periscopic: ^2.0.3 picocolors: ^1.0.0 - postcss: ^8.4.5 - postcss-import: ^14.0.2 - postcss-load-config: ^3.1.0 - postcss-modules: ^4.3.0 - resolve: ^1.20.0 + postcss: ^8.4.12 + postcss-import: ^14.1.0 + postcss-load-config: ^3.1.3 + postcss-modules: ^4.3.1 + resolve: ^1.22.0 resolve.exports: ^1.1.0 rollup: ^2.59.0 - rollup-plugin-license: ^2.6.0 - sirv: ^2.0.0 - source-map: ^0.6.1 + rollup-plugin-license: ^2.6.1 + sirv: ^2.0.2 + source-map-js: ^1.0.2 source-map-support: ^0.5.21 strip-ansi: ^6.0.1 - terser: ^5.10.0 - tsconfck: 1.1.1 + terser: ^5.12.1 + tsconfck: ^1.2.1 tslib: ^2.3.1 types: link:./types - ws: ^8.4.0 + ws: ^8.5.0 dependencies: - esbuild: 0.14.3 - postcss: 8.4.5 - resolve: 1.20.0 + esbuild: 0.14.27 + postcss: 8.4.12 + resolve: 1.22.0 rollup: 2.62.0 optionalDependencies: fsevents: 2.3.2 devDependencies: - '@ampproject/remapping': 1.0.2 - '@babel/parser': 7.16.6 - '@babel/types': 7.16.0 - '@rollup/plugin-alias': 3.1.8_rollup@2.62.0 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.62.0 + '@ampproject/remapping': 2.1.2 + '@babel/parser': 7.17.8 + '@babel/types': 7.17.0 + '@jridgewell/trace-mapping': 0.3.4 + '@rollup/plugin-alias': 3.1.9_rollup@2.62.0 + '@rollup/plugin-commonjs': 21.0.3_rollup@2.62.0 '@rollup/plugin-dynamic-import-vars': 1.4.2_rollup@2.62.0 '@rollup/plugin-json': 4.1.0_rollup@2.62.0 - '@rollup/plugin-node-resolve': 13.1.1_rollup@2.62.0 - '@rollup/plugin-typescript': 8.3.0_7c5ff569c0887b4f0035eb7cb6988163 - '@rollup/pluginutils': 4.1.2 + '@rollup/plugin-node-resolve': 13.1.3_rollup@2.62.0 + '@rollup/plugin-typescript': 8.3.1_7c5ff569c0887b4f0035eb7cb6988163 + '@rollup/pluginutils': 4.2.0 '@types/convert-source-map': 1.5.2 '@types/cross-spawn': 6.0.2 '@types/debug': 4.1.7 - '@types/estree': 0.0.50 + '@types/estree': 0.0.51 '@types/etag': 1.8.1 '@types/less': 3.0.3 '@types/micromatch': 4.0.2 '@types/mime': 2.0.3 - '@types/node': 16.11.17 + '@types/node': 16.11.26 '@types/resolve': 1.20.1 '@types/sass': 1.43.1 '@types/stylus': 0.48.36 - '@types/ws': 8.2.2 - '@vue/compiler-dom': 3.2.26 + '@types/ws': 8.5.3 + '@vue/compiler-dom': 3.2.31 acorn: 8.7.0 cac: 6.7.9 - chokidar: 3.5.2 - compression: 1.7.4 + chokidar: 3.5.3 connect: 3.7.0 connect-history-api-fallback: 1.6.0 convert-source-map: 1.8.0 cors: 2.8.5 cross-spawn: 7.0.3 - debug: 4.3.3 - dotenv: 10.0.0 + debug: 4.3.4 + dotenv: 14.3.2 dotenv-expand: 5.1.0 - es-module-lexer: 0.9.3 + es-module-lexer: 0.10.4 estree-walker: 2.0.2 etag: 1.8.1 - fast-glob: 3.2.7 - http-proxy: 1.18.1_debug@4.3.3 - json5: 2.2.0 + fast-glob: 3.2.11 + http-proxy: 1.18.1_debug@4.3.4 + json5: 2.2.1 launch-editor-middleware: 2.3.0 - magic-string: 0.25.7 - micromatch: 4.0.4 + magic-string: 0.26.1 + micromatch: 4.0.5 mrmime: 1.0.0 - node-forge: 1.2.0 + node-forge: 1.3.0 okie: 1.0.1 open: 8.4.0 periscopic: 2.0.3 picocolors: 1.0.0 - postcss-import: 14.0.2_postcss@8.4.5 - postcss-load-config: 3.1.0_ts-node@10.4.0 - postcss-modules: 4.3.0_postcss@8.4.5 + postcss-import: 14.1.0_postcss@8.4.12 + postcss-load-config: 3.1.3_postcss@8.4.12+ts-node@10.4.0 + postcss-modules: 4.3.1_postcss@8.4.12 resolve.exports: 1.1.0 - rollup-plugin-license: 2.6.0_rollup@2.62.0 - sirv: 2.0.0 - source-map: 0.6.1 + rollup-plugin-license: 2.6.1_rollup@2.62.0 + sirv: 2.0.2 + source-map-js: 1.0.2 source-map-support: 0.5.21 strip-ansi: 6.0.1 - terser: 5.10.0_acorn@8.7.0 - tsconfck: 1.1.1_typescript@4.5.4 + terser: 5.12.1 + tsconfck: 1.2.1_typescript@4.5.4 tslib: 2.3.1 types: link:types - ws: 8.4.0 + ws: 8.5.0 packages: @@ -988,198 +1072,339 @@ packages: '@algolia/requester-common': 4.11.0 dev: true - /@ampproject/remapping/1.0.2: - resolution: {integrity: sha512-SncaVxs+E3EdoA9xJgHfWPxZfowAgeIsd71VpqCKP6KNKm6s7zSqqvUc70UpKUFsrV3dAmy6qxHoIj5NG+3DiA==} + /@ampproject/remapping/2.1.0: + resolution: {integrity: sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g==} engines: {node: '>=6.0.0'} dependencies: - '@jridgewell/resolve-uri': 1.0.0 - sourcemap-codec: 1.4.8 + '@jridgewell/trace-mapping': 0.3.4 dev: true + /@ampproject/remapping/2.1.2: + resolution: {integrity: sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/trace-mapping': 0.3.4 + /@babel/code-frame/7.16.0: resolution: {integrity: sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.16.0 + /@babel/code-frame/7.16.7: + resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.16.10 + /@babel/compat-data/7.16.4: resolution: {integrity: sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==} engines: {node: '>=6.9.0'} + dev: true - /@babel/core/7.16.5: - resolution: {integrity: sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==} + /@babel/compat-data/7.17.7: + resolution: {integrity: sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==} + engines: {node: '>=6.9.0'} + dev: false + + /@babel/core/7.17.2: + resolution: {integrity: sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.16.0 - '@babel/generator': 7.16.5 - '@babel/helper-compilation-targets': 7.16.3_@babel+core@7.16.5 - '@babel/helper-module-transforms': 7.16.5 - '@babel/helpers': 7.16.5 - '@babel/parser': 7.16.6 - '@babel/template': 7.16.0 - '@babel/traverse': 7.16.5 - '@babel/types': 7.16.0 + '@ampproject/remapping': 2.1.0 + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.17.0 + '@babel/helper-compilation-targets': 7.16.7_@babel+core@7.17.2 + '@babel/helper-module-transforms': 7.16.7 + '@babel/helpers': 7.17.2 + '@babel/parser': 7.17.0 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.0 + '@babel/types': 7.17.0 + convert-source-map: 1.8.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.1 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/core/7.17.8: + resolution: {integrity: sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.1.2 + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.17.7 + '@babel/helper-compilation-targets': 7.17.7_@babel+core@7.17.8 + '@babel/helper-module-transforms': 7.17.7 + '@babel/helpers': 7.17.8 + '@babel/parser': 7.17.8 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 convert-source-map: 1.8.0 debug: 4.3.3 gensync: 1.0.0-beta.2 json5: 2.2.0 semver: 6.3.0 - source-map: 0.5.7 transitivePeerDependencies: - supports-color + dev: false /@babel/generator/7.16.5: resolution: {integrity: sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 jsesc: 2.5.2 source-map: 0.5.7 + dev: false - /@babel/helper-annotate-as-pure/7.16.0: - resolution: {integrity: sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg==} + /@babel/generator/7.16.8: + resolution: {integrity: sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 + jsesc: 2.5.2 + source-map: 0.5.7 + dev: false + + /@babel/generator/7.17.0: + resolution: {integrity: sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 + jsesc: 2.5.2 + source-map: 0.5.7 + dev: true + + /@babel/generator/7.17.7: + resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 + jsesc: 2.5.2 + source-map: 0.5.7 dev: false - /@babel/helper-compilation-targets/7.16.3_@babel+core@7.16.5: - resolution: {integrity: sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==} + /@babel/helper-annotate-as-pure/7.16.7: + resolution: {integrity: sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.16.8 + dev: false + + /@babel/helper-compilation-targets/7.16.7_@babel+core@7.17.2: + resolution: {integrity: sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.16.4 - '@babel/core': 7.16.5 - '@babel/helper-validator-option': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-validator-option': 7.16.7 browserslist: 4.19.1 semver: 6.3.0 + dev: true - /@babel/helper-create-class-features-plugin/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-NEohnYA7mkB8L5JhU7BLwcBdU3j83IziR9aseMueWGeAjblbul3zzb8UvJ3a1zuBiqCMObzCJHFqKIQE6hTVmg==} + /@babel/helper-compilation-targets/7.17.7_@babel+core@7.17.8: + resolution: {integrity: sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-annotate-as-pure': 7.16.0 - '@babel/helper-environment-visitor': 7.16.5 - '@babel/helper-function-name': 7.16.0 - '@babel/helper-member-expression-to-functions': 7.16.5 - '@babel/helper-optimise-call-expression': 7.16.0 - '@babel/helper-replace-supers': 7.16.5 - '@babel/helper-split-export-declaration': 7.16.0 + '@babel/compat-data': 7.17.7 + '@babel/core': 7.17.8 + '@babel/helper-validator-option': 7.16.7 + browserslist: 4.19.1 + semver: 6.3.0 + dev: false + + /@babel/helper-create-class-features-plugin/7.16.10_@babel+core@7.17.8: + resolution: {integrity: sha512-wDeej0pu3WN/ffTxMNCPW5UCiOav8IcLRxSIyp/9+IF2xJUM9h/OYjg0IJLHaL6F8oU8kqMz9nc1vryXhMsgXg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.8 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 + '@babel/helper-member-expression-to-functions': 7.16.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/helper-replace-supers': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-environment-visitor/7.16.5: - resolution: {integrity: sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==} + /@babel/helper-environment-visitor/7.16.7: + resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 - /@babel/helper-function-name/7.16.0: - resolution: {integrity: sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==} + /@babel/helper-function-name/7.16.7: + resolution: {integrity: sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-get-function-arity': 7.16.0 - '@babel/template': 7.16.0 - '@babel/types': 7.16.0 + '@babel/helper-get-function-arity': 7.16.7 + '@babel/template': 7.16.7 + '@babel/types': 7.17.0 - /@babel/helper-get-function-arity/7.16.0: - resolution: {integrity: sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==} + /@babel/helper-get-function-arity/7.16.7: + resolution: {integrity: sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 /@babel/helper-hoist-variables/7.16.0: resolution: {integrity: sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 + dev: false - /@babel/helper-member-expression-to-functions/7.16.5: - resolution: {integrity: sha512-7fecSXq7ZrLE+TWshbGT+HyCLkxloWNhTbU2QM1NTI/tDqyf0oZiMcEfYtDuUDCo528EOlt39G1rftea4bRZIw==} + /@babel/helper-hoist-variables/7.16.7: + resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 + + /@babel/helper-member-expression-to-functions/7.16.7: + resolution: {integrity: sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.16.8 dev: false /@babel/helper-module-imports/7.16.0: resolution: {integrity: sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 - /@babel/helper-module-transforms/7.16.5: - resolution: {integrity: sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==} + /@babel/helper-module-imports/7.16.7: + resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.16.5 - '@babel/helper-module-imports': 7.16.0 - '@babel/helper-simple-access': 7.16.0 - '@babel/helper-split-export-declaration': 7.16.0 - '@babel/helper-validator-identifier': 7.15.7 - '@babel/template': 7.16.0 - '@babel/traverse': 7.16.5 - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 + + /@babel/helper-module-transforms/7.16.7: + resolution: {integrity: sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-simple-access': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/helper-validator-identifier': 7.16.7 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.0 + '@babel/types': 7.17.0 transitivePeerDependencies: - supports-color + dev: true - /@babel/helper-optimise-call-expression/7.16.0: - resolution: {integrity: sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==} + /@babel/helper-module-transforms/7.17.7: + resolution: {integrity: sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-simple-access': 7.17.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/helper-validator-identifier': 7.16.7 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 + transitivePeerDependencies: + - supports-color + dev: false + + /@babel/helper-optimise-call-expression/7.16.7: + resolution: {integrity: sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.16.8 dev: false /@babel/helper-plugin-utils/7.16.5: resolution: {integrity: sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==} engines: {node: '>=6.9.0'} - /@babel/helper-replace-supers/7.16.5: - resolution: {integrity: sha512-ao3seGVa/FZCMCCNDuBcqnBFSbdr8N2EW35mzojx3TwfIbdPmNK+JV6+2d5bR0Z71W5ocLnQp9en/cTF7pBJiQ==} + /@babel/helper-plugin-utils/7.16.7: + resolution: {integrity: sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==} + engines: {node: '>=6.9.0'} + + /@babel/helper-replace-supers/7.16.7: + resolution: {integrity: sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.16.5 - '@babel/helper-member-expression-to-functions': 7.16.5 - '@babel/helper-optimise-call-expression': 7.16.0 - '@babel/traverse': 7.16.5 - '@babel/types': 7.16.0 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-member-expression-to-functions': 7.16.7 + '@babel/helper-optimise-call-expression': 7.16.7 + '@babel/traverse': 7.16.10 + '@babel/types': 7.16.8 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-simple-access/7.16.0: - resolution: {integrity: sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==} + /@babel/helper-simple-access/7.16.7: + resolution: {integrity: sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 + dev: true - /@babel/helper-split-export-declaration/7.16.0: - resolution: {integrity: sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==} + /@babel/helper-simple-access/7.17.7: + resolution: {integrity: sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 + dev: false + + /@babel/helper-split-export-declaration/7.16.7: + resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.17.0 /@babel/helper-validator-identifier/7.15.7: resolution: {integrity: sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-option/7.14.5: - resolution: {integrity: sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==} + /@babel/helper-validator-identifier/7.16.7: + resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} + engines: {node: '>=6.9.0'} + + /@babel/helper-validator-option/7.16.7: + resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==} engines: {node: '>=6.9.0'} - /@babel/helpers/7.16.5: - resolution: {integrity: sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==} + /@babel/helpers/7.17.2: + resolution: {integrity: sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.16.0 - '@babel/traverse': 7.16.5 - '@babel/types': 7.16.0 + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.0 + '@babel/types': 7.17.0 transitivePeerDependencies: - supports-color + dev: true + + /@babel/helpers/7.17.8: + resolution: {integrity: sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.16.7 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 + transitivePeerDependencies: + - supports-color + dev: false /@babel/highlight/7.16.0: resolution: {integrity: sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==} @@ -1189,11 +1414,36 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 + /@babel/highlight/7.16.10: + resolution: {integrity: sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.16.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + + /@babel/parser/7.16.12: + resolution: {integrity: sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A==} + engines: {node: '>=6.0.0'} + hasBin: true + dev: false + /@babel/parser/7.16.6: resolution: {integrity: sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==} engines: {node: '>=6.0.0'} hasBin: true + /@babel/parser/7.17.0: + resolution: {integrity: sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==} + engines: {node: '>=6.0.0'} + hasBin: true + dev: true + + /@babel/parser/7.17.8: + resolution: {integrity: sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==} + engines: {node: '>=6.0.0'} + hasBin: true + /@babel/plugin-proposal-pipeline-operator/7.16.5: resolution: {integrity: sha512-aMw3gPJYa2F6mVnL6QuHr9NtAScspBPTVXU2kaup7FVl02Hr4tY2diaGNdismAOmiroWa/2ENy4EFyoz81ACLg==} engines: {node: '>=6.9.0'} @@ -1204,48 +1454,58 @@ packages: '@babel/plugin-syntax-pipeline-operator': 7.16.5 dev: true - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.16.5: + /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.17.2: resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.16.5: + /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.17.2: resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 + dev: true + + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.2: + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.2 '@babel/helper-plugin-utils': 7.16.5 dev: true - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.16.5: + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.8: resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 + '@babel/core': 7.17.8 '@babel/helper-plugin-utils': 7.16.5 + dev: false - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true /@babel/plugin-syntax-jsx/7.16.5: @@ -1254,71 +1514,81 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/helper-plugin-utils': 7.16.5 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-jsx/7.16.5_@babel+core@7.16.5: + /@babel/plugin-syntax-jsx/7.16.5_@babel+core@7.17.8: resolution: {integrity: sha512-42OGssv9NPk4QHKVgIHlzeLgPOW5rGgfV5jzG90AhcXXIv6hu/eqj63w4VgvRxdvZY3AlYeDgPiSJ3BqAd1Y6Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 + dev: false + + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.17.8: + resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.16.5: + /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.17.2: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.16.5: + /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.17.2: resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.16.5: + /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.17.2: resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true /@babel/plugin-syntax-pipeline-operator/7.16.5: @@ -1330,79 +1600,90 @@ packages: '@babel/helper-plugin-utils': 7.16.5 dev: true - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.16.5: + /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.17.2: resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-typescript/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw==} + /@babel/plugin-syntax-typescript/7.16.7_@babel+core@7.17.2: + resolution: {integrity: sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 + dev: true - /@babel/plugin-transform-react-jsx-development/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-uQSLacMZSGLCxOw20dzo1dmLlKkd+DsayoV54q3MHXhbqgPzoiGerZQgNPl/Ro8/OcXV2ugfnkx+rxdS0sN5Uw==} + /@babel/plugin-syntax-typescript/7.16.7_@babel+core@7.17.8: + resolution: {integrity: sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/plugin-transform-react-jsx': 7.16.5_@babel+core@7.16.5 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-transform-react-jsx-self/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-fvwq+jir1Vn4f5oBS0H/J/gD5CneTD53MHs+NMjlHcha4Sq35fwxI5RtmJGEBXO+M93f/eeD9cAhRPhmLyJiVw==} + /@babel/plugin-transform-react-jsx-development/7.16.7_@babel+core@7.17.8: + resolution: {integrity: sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.8 + '@babel/plugin-transform-react-jsx': 7.17.3_@babel+core@7.17.8 dev: false - /@babel/plugin-transform-react-jsx-source/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-/eP+nZywJntGLjSPjksAnM9/ELIs3RbiEuTu2/zAOzwwBcfiu+m/iptEq1lERUUtSXubYSHVnVHMr13GR+TwPw==} + /@babel/plugin-transform-react-jsx-self/7.16.7_@babel+core@7.17.8: + resolution: {integrity: sha512-oe5VuWs7J9ilH3BCCApGoYjHoSO48vkjX2CbA5bFVhIuO2HKxA3vyF7rleA4o6/4rTDbk6r8hBW7Ul8E+UZrpA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-plugin-utils': 7.16.5 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-transform-react-jsx/7.16.5_@babel+core@7.16.5: - resolution: {integrity: sha512-+arLIz1d7kmwX0fKxTxbnoeG85ONSnLpvdODa4P3pc1sS7CV1hfmtYWufkW/oYsPnkDrEeQFxhUWcFnrXW7jQQ==} + /@babel/plugin-transform-react-jsx-source/7.16.7_@babel+core@7.17.8: + resolution: {integrity: sha512-rONFiQz9vgbsnaMtQlZCjIRwhJvlrPET8TabIUK2hzlXw9B9s2Ieaxte1SCOOXMbWRHodbKixNf3BLcWVOQ8Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-annotate-as-pure': 7.16.0 - '@babel/helper-module-imports': 7.16.0 - '@babel/helper-plugin-utils': 7.16.5 - '@babel/plugin-syntax-jsx': 7.16.5_@babel+core@7.16.5 - '@babel/types': 7.16.0 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-transform-typescript/7.16.1_@babel+core@7.16.5: - resolution: {integrity: sha512-NO4XoryBng06jjw/qWEU2LhcLJr1tWkhpMam/H4eas/CDKMX/b2/Ylb6EI256Y7+FVPCawwSM1rrJNOpDiz+Lg==} + /@babel/plugin-transform-react-jsx/7.17.3_@babel+core@7.17.8: + resolution: {integrity: sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.5 - '@babel/helper-create-class-features-plugin': 7.16.5_@babel+core@7.16.5 - '@babel/helper-plugin-utils': 7.16.5 - '@babel/plugin-syntax-typescript': 7.16.5_@babel+core@7.16.5 + '@babel/core': 7.17.8 + '@babel/helper-annotate-as-pure': 7.16.7 + '@babel/helper-module-imports': 7.16.7 + '@babel/helper-plugin-utils': 7.16.7 + '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.17.8 + '@babel/types': 7.17.0 + dev: false + + /@babel/plugin-transform-typescript/7.16.8_@babel+core@7.17.8: + resolution: {integrity: sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.8 + '@babel/helper-create-class-features-plugin': 7.16.10_@babel+core@7.17.8 + '@babel/helper-plugin-utils': 7.16.7 + '@babel/plugin-syntax-typescript': 7.16.7_@babel+core@7.17.8 transitivePeerDependencies: - supports-color dev: false @@ -1413,8 +1694,8 @@ packages: dependencies: regenerator-runtime: 0.13.9 - /@babel/standalone/7.16.6: - resolution: {integrity: sha512-wjildVe951w1IPEPN4G76j+y5JFZfJN9gdyP8o9zd61qbiVEecAgORKskK1D/7VrJZrZS+nxDbhj2akEFU2RJw==} + /@babel/standalone/7.17.8: + resolution: {integrity: sha512-tr3SDpVnxR/fzrxyG+HZPAyEA9eTHZIAjy4eqrc7m+KBwsdo1YvTbUfJ6teWHQ177mk6GmdmltsIiOYCcvRPWA==} engines: {node: '>=6.9.0'} dev: false @@ -1424,7 +1705,34 @@ packages: dependencies: '@babel/code-frame': 7.16.0 '@babel/parser': 7.16.6 - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 + dev: false + + /@babel/template/7.16.7: + resolution: {integrity: sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/parser': 7.17.8 + '@babel/types': 7.17.0 + + /@babel/traverse/7.16.10: + resolution: {integrity: sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.16.8 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 + '@babel/helper-hoist-variables': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/parser': 7.16.12 + '@babel/types': 7.16.8 + debug: 4.3.3 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: false /@babel/traverse/7.16.5: resolution: {integrity: sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==} @@ -1432,16 +1740,53 @@ packages: dependencies: '@babel/code-frame': 7.16.0 '@babel/generator': 7.16.5 - '@babel/helper-environment-visitor': 7.16.5 - '@babel/helper-function-name': 7.16.0 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 '@babel/helper-hoist-variables': 7.16.0 - '@babel/helper-split-export-declaration': 7.16.0 + '@babel/helper-split-export-declaration': 7.16.7 '@babel/parser': 7.16.6 - '@babel/types': 7.16.0 + '@babel/types': 7.16.8 debug: 4.3.3 globals: 11.12.0 transitivePeerDependencies: - supports-color + dev: false + + /@babel/traverse/7.17.0: + resolution: {integrity: sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.17.0 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 + '@babel/helper-hoist-variables': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/parser': 7.17.0 + '@babel/types': 7.17.0 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/traverse/7.17.3: + resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/generator': 7.17.7 + '@babel/helper-environment-visitor': 7.16.7 + '@babel/helper-function-name': 7.16.7 + '@babel/helper-hoist-variables': 7.16.7 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/parser': 7.17.8 + '@babel/types': 7.17.0 + debug: 4.3.3 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: false /@babel/types/7.16.0: resolution: {integrity: sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==} @@ -1450,6 +1795,20 @@ packages: '@babel/helper-validator-identifier': 7.15.7 to-fast-properties: 2.0.0 + /@babel/types/7.16.8: + resolution: {integrity: sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.16.7 + to-fast-properties: 2.0.0 + + /@babel/types/7.17.0: + resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.16.7 + to-fast-properties: 2.0.0 + /@bcoe/v8-coverage/0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -1581,15 +1940,15 @@ packages: resolution: {integrity: sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==} dev: false - /@eslint/eslintrc/1.0.5: - resolution: {integrity: sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==} + /@eslint/eslintrc/1.2.1: + resolution: {integrity: sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.3 - espree: 9.2.0 + debug: 4.3.4 + espree: 9.3.1 globals: 13.12.0 - ignore: 4.0.6 + ignore: 5.2.0 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.0.4 @@ -1603,7 +1962,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.3 + debug: 4.3.4 minimatch: 3.0.4 transitivePeerDependencies: - supports-color @@ -1638,20 +1997,20 @@ packages: engines: {node: '>=8'} dev: true - /@jest/console/27.4.2: - resolution: {integrity: sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==} + /@jest/console/27.5.1: + resolution: {integrity: sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 - jest-message-util: 27.4.2 - jest-util: 27.4.2 + jest-message-util: 27.5.1 + jest-util: 27.5.1 slash: 3.0.0 dev: true - /@jest/core/27.4.5_ts-node@10.4.0: - resolution: {integrity: sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ==} + /@jest/core/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1659,30 +2018,30 @@ packages: node-notifier: optional: true dependencies: - '@jest/console': 27.4.2 - '@jest/reporters': 27.4.5 - '@jest/test-result': 27.4.2 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/console': 27.5.1 + '@jest/reporters': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 exit: 0.1.2 - graceful-fs: 4.2.8 - jest-changed-files: 27.4.2 - jest-config: 27.4.5_ts-node@10.4.0 - jest-haste-map: 27.4.5 - jest-message-util: 27.4.2 - jest-regex-util: 27.4.0 - jest-resolve: 27.4.5 - jest-resolve-dependencies: 27.4.5 - jest-runner: 27.4.5 - jest-runtime: 27.4.5 - jest-snapshot: 27.4.5 - jest-util: 27.4.2 - jest-validate: 27.4.2 - jest-watcher: 27.4.2 + graceful-fs: 4.2.9 + jest-changed-files: 27.5.1 + jest-config: 27.5.1_ts-node@10.4.0 + jest-haste-map: 27.5.1 + jest-message-util: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-resolve-dependencies: 27.5.1 + jest-runner: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 + jest-watcher: 27.5.1 micromatch: 4.0.4 rimraf: 3.0.2 slash: 3.0.0 @@ -1695,39 +2054,39 @@ packages: - utf-8-validate dev: true - /@jest/environment/27.4.4: - resolution: {integrity: sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==} + /@jest/environment/27.5.1: + resolution: {integrity: sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/fake-timers': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 - jest-mock: 27.4.2 + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 + jest-mock: 27.5.1 dev: true - /@jest/fake-timers/27.4.2: - resolution: {integrity: sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==} + /@jest/fake-timers/27.5.1: + resolution: {integrity: sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 16.11.17 - jest-message-util: 27.4.2 - jest-mock: 27.4.2 - jest-util: 27.4.2 + '@types/node': 16.11.26 + jest-message-util: 27.5.1 + jest-mock: 27.5.1 + jest-util: 27.5.1 dev: true - /@jest/globals/27.4.4: - resolution: {integrity: sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==} + /@jest/globals/27.5.1: + resolution: {integrity: sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/environment': 27.4.4 - '@jest/types': 27.4.2 - expect: 27.4.2 + '@jest/environment': 27.5.1 + '@jest/types': 27.5.1 + expect: 27.5.1 dev: true - /@jest/reporters/27.4.5: - resolution: {integrity: sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA==} + /@jest/reporters/27.5.1: + resolution: {integrity: sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1736,25 +2095,25 @@ packages: optional: true dependencies: '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 27.4.2 - '@jest/test-result': 27.4.2 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/console': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 glob: 7.2.0 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 4.0.3 + istanbul-lib-instrument: 5.1.0 istanbul-lib-report: 3.0.0 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.2 - jest-haste-map: 27.4.5 - jest-resolve: 27.4.5 - jest-util: 27.4.2 - jest-worker: 27.4.5 + istanbul-reports: 3.1.3 + jest-haste-map: 27.5.1 + jest-resolve: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 slash: 3.0.0 source-map: 0.6.1 string-length: 4.0.2 @@ -1764,51 +2123,51 @@ packages: - supports-color dev: true - /@jest/source-map/27.4.0: - resolution: {integrity: sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==} + /@jest/source-map/27.5.1: + resolution: {integrity: sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: callsites: 3.1.0 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 source-map: 0.6.1 dev: true - /@jest/test-result/27.4.2: - resolution: {integrity: sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==} + /@jest/test-result/27.5.1: + resolution: {integrity: sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/console': 27.4.2 - '@jest/types': 27.4.2 + '@jest/console': 27.5.1 + '@jest/types': 27.5.1 '@types/istanbul-lib-coverage': 2.0.4 collect-v8-coverage: 1.0.1 dev: true - /@jest/test-sequencer/27.4.5: - resolution: {integrity: sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ==} + /@jest/test-sequencer/27.5.1: + resolution: {integrity: sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/test-result': 27.4.2 - graceful-fs: 4.2.8 - jest-haste-map: 27.4.5 - jest-runtime: 27.4.5 + '@jest/test-result': 27.5.1 + graceful-fs: 4.2.9 + jest-haste-map: 27.5.1 + jest-runtime: 27.5.1 transitivePeerDependencies: - supports-color dev: true - /@jest/transform/27.4.5: - resolution: {integrity: sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew==} + /@jest/transform/27.5.1: + resolution: {integrity: sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/core': 7.16.5 - '@jest/types': 27.4.2 + '@babel/core': 7.17.2 + '@jest/types': 27.5.1 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 1.8.0 fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.8 - jest-haste-map: 27.4.5 - jest-regex-util: 27.4.0 - jest-util: 27.4.2 + graceful-fs: 4.2.9 + jest-haste-map: 27.5.1 + jest-regex-util: 27.5.1 + jest-util: 27.5.1 micromatch: 4.0.4 pirates: 4.0.4 slash: 3.0.0 @@ -1818,21 +2177,29 @@ packages: - supports-color dev: true - /@jest/types/27.4.2: - resolution: {integrity: sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==} + /@jest/types/27.5.1: + resolution: {integrity: sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.11.17 + '@types/node': 16.11.26 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true - /@jridgewell/resolve-uri/1.0.0: - resolution: {integrity: sha512-9oLAnygRMi8Q5QkYEU4XWK04B+nuoXoxjRvRxgjuChkLZFBja0YPSgdZ7dZtwhncLBcQe/I/E+fLuk5qxcYVJA==} + /@jridgewell/resolve-uri/3.0.5: + resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==} engines: {node: '>=6.0.0'} - dev: true + + /@jridgewell/sourcemap-codec/1.4.10: + resolution: {integrity: sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg==} + + /@jridgewell/trace-mapping/0.3.4: + resolution: {integrity: sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==} + dependencies: + '@jridgewell/resolve-uri': 3.0.5 + '@jridgewell/sourcemap-codec': 1.4.10 /@mapbox/node-pre-gyp/1.0.8: resolution: {integrity: sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==} @@ -1851,24 +2218,24 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.15.2: - resolution: {integrity: sha512-qgxKX/s6vo3nCVLhP0Ds7555QrErhcYHEok5/KyEZ7iR8J5M5oldD1eJJQmtEdVF5IzmnPPbxx1nRvfgA674LQ==} + /@microsoft/api-extractor-model/7.15.4: + resolution: {integrity: sha512-9bIXQKKQr5jAH1c9atXrukr4ua30fhqxMwWIOOjEnexPBPu3nhy9lC4/GpE0kPUp1Al3wSXgFnOEGzEH+HFz+w==} dependencies: '@microsoft/tsdoc': 0.13.2 '@microsoft/tsdoc-config': 0.15.2 - '@rushstack/node-core-library': 3.44.3 + '@rushstack/node-core-library': 3.45.1 dev: true - /@microsoft/api-extractor/7.19.3: - resolution: {integrity: sha512-GZe+R3K4kh2X425iOHkPbByysB7FN0592mPPA6vNj5IhyhlPHgdZS6m6AmOZOIxMS4euM+SBKzEJEp3oC+WsOQ==} + /@microsoft/api-extractor/7.19.5: + resolution: {integrity: sha512-ra5r8P7PocOpemrZRccI3Tf1+wukI0gT6ncRB448QSxSYlmqKuvez95YUSYPwHIN/ztKL0cn5PfMOauU1lZfGQ==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.15.2 + '@microsoft/api-extractor-model': 7.15.4 '@microsoft/tsdoc': 0.13.2 '@microsoft/tsdoc-config': 0.15.2 - '@rushstack/node-core-library': 3.44.3 - '@rushstack/rig-package': 0.3.7 - '@rushstack/ts-command-line': 4.10.6 + '@rushstack/node-core-library': 3.45.1 + '@rushstack/rig-package': 0.3.8 + '@rushstack/ts-command-line': 4.10.7 colors: 1.2.5 lodash: 4.17.21 resolve: 1.17.0 @@ -1949,8 +2316,8 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/plugin-alias/3.1.8_rollup@2.62.0: - resolution: {integrity: sha512-tf7HeSs/06wO2LPqKNY3Ckbvy0JRe7Jyn98bXnt/gfrxbe+AJucoNJlsEVi9sdgbQtXemjbakCpO/76JVgnHpA==} + /@rollup/plugin-alias/3.1.9_rollup@2.62.0: + resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} engines: {node: '>=8.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 @@ -1959,8 +2326,8 @@ packages: slash: 3.0.0 dev: true - /@rollup/plugin-commonjs/21.0.1_rollup@2.62.0: - resolution: {integrity: sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==} + /@rollup/plugin-commonjs/21.0.3_rollup@2.62.0: + resolution: {integrity: sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==} engines: {node: '>= 8.0.0'} peerDependencies: rollup: ^2.38.3 @@ -1971,7 +2338,7 @@ packages: glob: 7.2.0 is-reference: 1.2.1 magic-string: 0.25.7 - resolve: 1.20.0 + resolve: 1.22.0 rollup: 2.62.0 dev: true @@ -1981,9 +2348,9 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 dependencies: - '@rollup/pluginutils': 4.1.2 + '@rollup/pluginutils': 4.2.0 estree-walker: 2.0.2 - fast-glob: 3.2.7 + fast-glob: 3.2.11 magic-string: 0.25.7 rollup: 2.62.0 dev: true @@ -1997,8 +2364,8 @@ packages: rollup: 2.62.0 dev: true - /@rollup/plugin-node-resolve/13.1.1_rollup@2.62.0: - resolution: {integrity: sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==} + /@rollup/plugin-node-resolve/13.1.3_rollup@2.62.0: + resolution: {integrity: sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^2.42.0 @@ -2008,12 +2375,12 @@ packages: builtin-modules: 3.2.0 deepmerge: 4.2.2 is-module: 1.0.0 - resolve: 1.20.0 + resolve: 1.22.0 rollup: 2.62.0 dev: true - /@rollup/plugin-typescript/8.3.0_7c5ff569c0887b4f0035eb7cb6988163: - resolution: {integrity: sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==} + /@rollup/plugin-typescript/8.3.1_7c5ff569c0887b4f0035eb7cb6988163: + resolution: {integrity: sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==} engines: {node: '>=8.0.0'} peerDependencies: rollup: ^2.14.0 @@ -2021,7 +2388,7 @@ packages: typescript: '>=3.7.0' dependencies: '@rollup/pluginutils': 3.1.0_rollup@2.62.0 - resolve: 1.20.0 + resolve: 1.22.0 rollup: 2.62.0 tslib: 2.3.1 typescript: 4.5.4 @@ -2039,15 +2406,15 @@ packages: rollup: 2.62.0 dev: true - /@rollup/pluginutils/4.1.2: - resolution: {integrity: sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==} + /@rollup/pluginutils/4.2.0: + resolution: {integrity: sha512-2WUyJNRkyH5p487pGnn4tWAsxhEFKN/pT8CMgHshd5H+IXkOnKvKZwsz5ZWz+YCXkleZRAU5kwbfgF8CPfDRqA==} engines: {node: '>= 8.0.0'} dependencies: estree-walker: 2.0.2 picomatch: 2.3.0 - /@rushstack/node-core-library/3.44.3: - resolution: {integrity: sha512-Bt+R5LAnVr2BImTJqPpton5rvhJ2Wq8x4BaTqaCHQMmfxqtz5lb4nLYT9kneMJTCDuRMBvvLpSuz4MBj50PV3w==} + /@rushstack/node-core-library/3.45.1: + resolution: {integrity: sha512-BwdssTNe007DNjDBxJgInHg8ePytIPyT0La7ZZSQZF9+rSkT42AygXPGvbGsyFfEntjr4X37zZSJI7yGzL16cQ==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -2060,15 +2427,15 @@ packages: z-schema: 5.0.2 dev: true - /@rushstack/rig-package/0.3.7: - resolution: {integrity: sha512-pzMsTSeTC8IiZ6EJLr53gGMvhT4oLWH+hxD7907cHyWuIUlEXFtu/2pK25vUQT13nKp5DJCWxXyYoGRk/h6rtA==} + /@rushstack/rig-package/0.3.8: + resolution: {integrity: sha512-MDWg1xovea99PWloSiYMjFcCLsrdjFtYt6aOyHNs5ojn5mxrzR6U9F83hvbQjTWnKPMvZtr0vcek+4n+OQOp3Q==} dependencies: resolve: 1.17.0 strip-json-comments: 3.1.1 dev: true - /@rushstack/ts-command-line/4.10.6: - resolution: {integrity: sha512-Y3GkUag39sTIlukDg9mUp8MCHrrlJ27POrBNRQGc/uF+VVgX8M7zMzHch5zP6O1QVquWgD7Engdpn2piPYaS/g==} + /@rushstack/ts-command-line/4.10.7: + resolution: {integrity: sha512-CjS+DfNXUSO5Ab2wD1GBGtUTnB02OglRWGqfaTcac9Jn45V5MeUOsq/wA8wEeS5Y/3TZ2P1k+IWdVDiuOFP9Og==} dependencies: '@types/argparse': 1.0.38 argparse: 1.0.10 @@ -2120,8 +2487,8 @@ packages: /@types/babel__core/7.1.17: resolution: {integrity: sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==} dependencies: - '@babel/parser': 7.16.6 - '@babel/types': 7.16.0 + '@babel/parser': 7.17.0 + '@babel/types': 7.17.0 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.14.2 @@ -2130,20 +2497,20 @@ packages: /@types/babel__generator/7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 dev: true /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.16.6 - '@babel/types': 7.16.0 + '@babel/parser': 7.17.0 + '@babel/types': 7.17.0 dev: true /@types/babel__traverse/7.14.2: resolution: {integrity: sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==} dependencies: - '@babel/types': 7.16.0 + '@babel/types': 7.17.0 dev: true /@types/braces/3.0.1: @@ -2157,7 +2524,7 @@ packages: /@types/cross-spawn/6.0.2: resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/debug/4.1.7: @@ -2170,26 +2537,26 @@ packages: resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} dev: true - /@types/estree/0.0.50: - resolution: {integrity: sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==} + /@types/estree/0.0.51: + resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==} dev: true /@types/etag/1.8.1: resolution: {integrity: sha512-bsKkeSqN7HYyYntFRAmzcwx/dKW4Wa+KVMTInANlI72PWLQmOpZu96j0OqHZGArW4VQwCmJPteQlXaUDeOB0WQ==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/hash-sum/1.0.0: @@ -2212,11 +2579,11 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/jest/27.0.3: - resolution: {integrity: sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==} + /@types/jest/27.4.1: + resolution: {integrity: sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==} dependencies: - jest-diff: 27.4.2 - pretty-format: 27.4.2 + jest-matcher-utils: 27.5.1 + pretty-format: 27.5.1 dev: true /@types/json-schema/7.0.9: @@ -2253,8 +2620,8 @@ packages: resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} dev: true - /@types/node/16.11.17: - resolution: {integrity: sha512-C1vTZME8cFo8uxY2ui41xcynEotVkczIVI5AjLmy5pkpBv/FtG+jhtOlfcPysI8VRVwoOMv6NJm44LGnoMSWkw==} + /@types/node/16.11.26: + resolution: {integrity: sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==} dev: true /@types/normalize-package-data/2.4.1: @@ -2271,13 +2638,13 @@ packages: /@types/prompts/2.0.14: resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/resolve/1.20.1: @@ -2287,7 +2654,7 @@ packages: /@types/sass/1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/semver/7.3.9: @@ -2305,13 +2672,13 @@ packages: /@types/stylus/0.48.36: resolution: {integrity: sha512-7klEq45BUE8ZJWkYWy1E442DcCs0wi0FkFY1Tjr6EJ7edL77t9w/QmOwlkFumBMqHlatDBtrA2xgfRrGqkUkzg==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true - /@types/ws/8.2.2: - resolution: {integrity: sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==} + /@types/ws/8.5.3: + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true /@types/yargs-parser/20.2.1: @@ -2328,12 +2695,12 @@ packages: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 dev: true optional: true - /@typescript-eslint/eslint-plugin/5.8.1_3a47348159e115370aa4cba56aba33b6: - resolution: {integrity: sha512-wTZ5oEKrKj/8/366qTM366zqhIKAp6NCMweoRONtfuC07OAU9nVI2GZZdqQ1qD30WAAtcPdkH+npDwtRFdp4Rw==} + /@typescript-eslint/eslint-plugin/5.16.0_e8f8f41828c0dd0ac8e32e1859a7f4f7: + resolution: {integrity: sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2343,11 +2710,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.8.1_eslint@8.5.0+typescript@4.5.4 - '@typescript-eslint/parser': 5.8.1_eslint@8.5.0+typescript@4.5.4 - '@typescript-eslint/scope-manager': 5.8.1 - debug: 4.3.3 - eslint: 8.5.0 + '@typescript-eslint/parser': 5.16.0_eslint@8.12.0+typescript@4.5.4 + '@typescript-eslint/scope-manager': 5.16.0 + '@typescript-eslint/type-utils': 5.16.0_eslint@8.12.0+typescript@4.5.4 + '@typescript-eslint/utils': 5.16.0_eslint@8.12.0+typescript@4.5.4 + debug: 4.3.4 + eslint: 8.12.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 @@ -2358,59 +2726,60 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.8.1_eslint@8.5.0+typescript@4.5.4: - resolution: {integrity: sha512-fbodVnjIDU4JpeXWRDsG5IfIjYBxEvs8EBO8W1+YVdtrc2B9ppfof5sZhVEDOtgTfFHnYQJDI8+qdqLYO4ceww==} + /@typescript-eslint/parser/5.16.0_eslint@8.12.0+typescript@4.5.4: + resolution: {integrity: sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 5.8.1 - '@typescript-eslint/types': 5.8.1 - '@typescript-eslint/typescript-estree': 5.8.1_typescript@4.5.4 - eslint: 8.5.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.5.0 + '@typescript-eslint/scope-manager': 5.16.0 + '@typescript-eslint/types': 5.16.0 + '@typescript-eslint/typescript-estree': 5.16.0_typescript@4.5.4 + debug: 4.3.4 + eslint: 8.12.0 + typescript: 4.5.4 transitivePeerDependencies: - supports-color - - typescript dev: true - /@typescript-eslint/parser/5.8.1_eslint@8.5.0+typescript@4.5.4: - resolution: {integrity: sha512-K1giKHAjHuyB421SoXMXFHHVI4NdNY603uKw92++D3qyxSeYvC10CBJ/GE5Thpo4WTUvu1mmJI2/FFkz38F2Gw==} + /@typescript-eslint/scope-manager/5.16.0: + resolution: {integrity: sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.16.0 + '@typescript-eslint/visitor-keys': 5.16.0 + dev: true + + /@typescript-eslint/type-utils/5.16.0_eslint@8.12.0+typescript@4.5.4: + resolution: {integrity: sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: '*' typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.8.1 - '@typescript-eslint/types': 5.8.1 - '@typescript-eslint/typescript-estree': 5.8.1_typescript@4.5.4 - debug: 4.3.3 - eslint: 8.5.0 + '@typescript-eslint/utils': 5.16.0_eslint@8.12.0+typescript@4.5.4 + debug: 4.3.4 + eslint: 8.12.0 + tsutils: 3.21.0_typescript@4.5.4 typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.8.1: - resolution: {integrity: sha512-DGxJkNyYruFH3NIZc3PwrzwOQAg7vvgsHsHCILOLvUpupgkwDZdNq/cXU3BjF4LNrCsVg0qxEyWasys5AiJ85Q==} + /@typescript-eslint/types/5.16.0: + resolution: {integrity: sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.8.1 - '@typescript-eslint/visitor-keys': 5.8.1 dev: true - /@typescript-eslint/types/5.8.1: - resolution: {integrity: sha512-L/FlWCCgnjKOLefdok90/pqInkomLnAcF9UAzNr+DSqMC3IffzumHTQTrINXhP1gVp9zlHiYYjvozVZDPleLcA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree/5.8.1_typescript@4.5.4: - resolution: {integrity: sha512-26lQ8l8tTbG7ri7xEcCFT9ijU5Fk+sx/KRRyyzCv7MQ+rZZlqiDPtMKWLC8P7o+dtCnby4c+OlxuX1tp8WfafQ==} + /@typescript-eslint/typescript-estree/5.16.0_typescript@4.5.4: + resolution: {integrity: sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2418,9 +2787,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.8.1 - '@typescript-eslint/visitor-keys': 5.8.1 - debug: 4.3.3 + '@typescript-eslint/types': 5.16.0 + '@typescript-eslint/visitor-keys': 5.16.0 + debug: 4.3.4 globby: 11.0.4 is-glob: 4.0.3 semver: 7.3.5 @@ -2430,23 +2799,41 @@ packages: - supports-color dev: true - /@typescript-eslint/visitor-keys/5.8.1: - resolution: {integrity: sha512-SWgiWIwocK6NralrJarPZlWdr0hZnj5GXHIgfdm8hNkyKvpeQuFyLP6YjSIe9kf3YBIfU6OHSZLYkQ+smZwtNg==} + /@typescript-eslint/utils/5.16.0_eslint@8.12.0+typescript@4.5.4: + resolution: {integrity: sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/types': 5.8.1 - eslint-visitor-keys: 3.1.0 + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.16.0 + '@typescript-eslint/types': 5.16.0 + '@typescript-eslint/typescript-estree': 5.16.0_typescript@4.5.4 + eslint: 8.12.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.12.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.16.0: + resolution: {integrity: sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.16.0 + eslint-visitor-keys: 3.3.0 dev: true /@vue/babel-helper-vue-transform-on/1.0.2: resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==} dev: false - /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.16.5: + /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.17.8: resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==} dependencies: '@babel/helper-module-imports': 7.16.0 - '@babel/plugin-syntax-jsx': 7.16.5_@babel+core@7.16.5 + '@babel/plugin-syntax-jsx': 7.16.5_@babel+core@7.17.8 '@babel/template': 7.16.0 '@babel/traverse': 7.16.5 '@babel/types': 7.16.0 @@ -2467,12 +2854,26 @@ packages: estree-walker: 2.0.2 source-map: 0.6.1 + /@vue/compiler-core/3.2.31: + resolution: {integrity: sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==} + dependencies: + '@babel/parser': 7.17.8 + '@vue/shared': 3.2.31 + estree-walker: 2.0.2 + source-map: 0.6.1 + /@vue/compiler-dom/3.2.26: resolution: {integrity: sha512-smBfaOW6mQDxcT3p9TKT6mE22vjxjJL50GFVJiI0chXYGU/xzC05QRGrW3HHVuJrmLTLx5zBhsZ2dIATERbarg==} dependencies: '@vue/compiler-core': 3.2.26 '@vue/shared': 3.2.26 + /@vue/compiler-dom/3.2.31: + resolution: {integrity: sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==} + dependencies: + '@vue/compiler-core': 3.2.31 + '@vue/shared': 3.2.31 + /@vue/compiler-sfc/3.2.26: resolution: {integrity: sha512-ePpnfktV90UcLdsDQUh2JdiTuhV0Skv2iYXxfNMOK/F3Q+2BO0AulcVcfoksOpTJGmhhfosWfMyEaEf0UaWpIw==} dependencies: @@ -2487,12 +2888,32 @@ packages: postcss: 8.4.5 source-map: 0.6.1 + /@vue/compiler-sfc/3.2.31: + resolution: {integrity: sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==} + dependencies: + '@babel/parser': 7.17.8 + '@vue/compiler-core': 3.2.31 + '@vue/compiler-dom': 3.2.31 + '@vue/compiler-ssr': 3.2.31 + '@vue/reactivity-transform': 3.2.31 + '@vue/shared': 3.2.31 + estree-walker: 2.0.2 + magic-string: 0.25.7 + postcss: 8.4.12 + source-map: 0.6.1 + /@vue/compiler-ssr/3.2.26: resolution: {integrity: sha512-2mywLX0ODc4Zn8qBoA2PDCsLEZfpUGZcyoFRLSOjyGGK6wDy2/5kyDOWtf0S0UvtoyVq95OTSGIALjZ4k2q/ag==} dependencies: '@vue/compiler-dom': 3.2.26 '@vue/shared': 3.2.26 + /@vue/compiler-ssr/3.2.31: + resolution: {integrity: sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==} + dependencies: + '@vue/compiler-dom': 3.2.31 + '@vue/shared': 3.2.31 + /@vue/devtools-api/6.0.0-beta.21.1: resolution: {integrity: sha512-FqC4s3pm35qGVeXRGOjTsRzlkJjrBLriDS9YXbflHLsfA9FrcKzIyWnLXoNm+/7930E8rRakXuAc2QkC50swAw==} dev: false @@ -2506,17 +2927,37 @@ packages: estree-walker: 2.0.2 magic-string: 0.25.7 + /@vue/reactivity-transform/3.2.31: + resolution: {integrity: sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==} + dependencies: + '@babel/parser': 7.17.8 + '@vue/compiler-core': 3.2.31 + '@vue/shared': 3.2.31 + estree-walker: 2.0.2 + magic-string: 0.25.7 + /@vue/reactivity/3.2.26: resolution: {integrity: sha512-h38bxCZLW6oFJVDlCcAiUKFnXI8xP8d+eO0pcDxx+7dQfSPje2AO6M9S9QO6MrxQB7fGP0DH0dYQ8ksf6hrXKQ==} dependencies: '@vue/shared': 3.2.26 + /@vue/reactivity/3.2.31: + resolution: {integrity: sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==} + dependencies: + '@vue/shared': 3.2.31 + /@vue/runtime-core/3.2.26: resolution: {integrity: sha512-BcYi7qZ9Nn+CJDJrHQ6Zsmxei2hDW0L6AB4vPvUQGBm2fZyC0GXd/4nVbyA2ubmuhctD5RbYY8L+5GUJszv9mQ==} dependencies: '@vue/reactivity': 3.2.26 '@vue/shared': 3.2.26 + /@vue/runtime-core/3.2.31: + resolution: {integrity: sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==} + dependencies: + '@vue/reactivity': 3.2.31 + '@vue/shared': 3.2.31 + /@vue/runtime-dom/3.2.26: resolution: {integrity: sha512-dY56UIiZI+gjc4e8JQBwAifljyexfVCkIAu/WX8snh8vSOt/gMSEGwPRcl2UpYpBYeyExV8WCbgvwWRNt9cHhQ==} dependencies: @@ -2524,6 +2965,13 @@ packages: '@vue/shared': 3.2.26 csstype: 2.6.19 + /@vue/runtime-dom/3.2.31: + resolution: {integrity: sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==} + dependencies: + '@vue/runtime-core': 3.2.31 + '@vue/shared': 3.2.31 + csstype: 2.6.19 + /@vue/server-renderer/3.2.26_vue@3.2.26: resolution: {integrity: sha512-Jp5SggDUvvUYSBIvYEhy76t4nr1vapY/FIFloWmQzn7UxqaHrrBpbxrqPcTrSgGrcaglj0VBp22BKJNre4aA1w==} peerDependencies: @@ -2533,9 +2981,21 @@ packages: '@vue/shared': 3.2.26 vue: 3.2.26 + /@vue/server-renderer/3.2.31_vue@3.2.31: + resolution: {integrity: sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==} + peerDependencies: + vue: 3.2.31 + dependencies: + '@vue/compiler-ssr': 3.2.31 + '@vue/shared': 3.2.31 + vue: 3.2.31 + /@vue/shared/3.2.26: resolution: {integrity: sha512-vPV6Cq+NIWbH5pZu+V+2QHE9y1qfuTq49uNWw4f7FDEeZaDU2H2cx5jcUZOAKW7qTrUS4k6qZPbMy1x4N96nbA==} + /@vue/shared/3.2.31: + resolution: {integrity: sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==} + /@wessberg/stringutil/1.0.19: resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} engines: {node: '>=8.0.0'} @@ -2616,7 +3076,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.3 + debug: 4.3.4 transitivePeerDependencies: - supports-color @@ -2656,11 +3116,6 @@ packages: '@algolia/transporter': 4.11.0 dev: true - /ansi-colors/4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - dev: true - /ansi-escapes/4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -2704,7 +3159,7 @@ packages: engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 - picomatch: 2.3.0 + picomatch: 2.3.1 /aproba/2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} @@ -2767,7 +3222,7 @@ packages: resolution: {integrity: sha512-oagLNqpfNv7CvmyMoexMDNyVDSiq1rya0AEUgcLlNHdHgNl6U/hi8xY370n5y+ZIFEXOx0J4B1qF2NDjMRxklA==} engines: {node: '>=6.0.0'} dependencies: - pvutils: 1.0.17 + pvutils: 1.1.3 dev: true /assert-never/1.2.1: @@ -2812,20 +3267,20 @@ packages: - debug dev: false - /babel-jest/27.4.5_@babel+core@7.16.5: - resolution: {integrity: sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA==} + /babel-jest/27.5.1_@babel+core@7.17.2: + resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.16.5 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 + '@babel/core': 7.17.2 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 '@types/babel__core': 7.1.17 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 27.4.0_@babel+core@7.16.5 + babel-preset-jest: 27.5.1_@babel+core@7.17.2 chalk: 4.1.2 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 slash: 3.0.0 transitivePeerDependencies: - supports-color @@ -2835,7 +3290,7 @@ packages: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.16.5 + '@babel/helper-plugin-utils': 7.16.7 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.1.0 @@ -2844,12 +3299,12 @@ packages: - supports-color dev: true - /babel-plugin-jest-hoist/27.4.0: - resolution: {integrity: sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==} + /babel-plugin-jest-hoist/27.5.1: + resolution: {integrity: sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/template': 7.16.0 - '@babel/types': 7.16.0 + '@babel/template': 7.16.7 + '@babel/types': 7.17.0 '@types/babel__core': 7.1.17 '@types/babel__traverse': 7.14.2 dev: true @@ -2862,35 +3317,35 @@ packages: resolve: 1.20.0 dev: true - /babel-preset-current-node-syntax/1.0.1_@babel+core@7.16.5: + /babel-preset-current-node-syntax/1.0.1_@babel+core@7.17.2: resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.16.5 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.16.5 - '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.16.5 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.16.5 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.16.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.16.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.16.5 - '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.16.5 - dev: true - - /babel-preset-jest/27.4.0_@babel+core@7.16.5: - resolution: {integrity: sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==} + '@babel/core': 7.17.2 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.17.2 + '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.17.2 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.17.2 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.17.2 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.17.2 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.17.2 + '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.17.2 + dev: true + + /babel-preset-jest/27.5.1_@babel+core@7.17.2: + resolution: {integrity: sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.16.5 - babel-plugin-jest-hoist: 27.4.0 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.5 + '@babel/core': 7.17.2 + babel-plugin-jest-hoist: 27.5.1 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.2 dev: true /babel-walk/3.0.0-canary-5: @@ -2919,6 +3374,10 @@ packages: - supports-color dev: false + /bignumber.js/9.0.2: + resolution: {integrity: sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==} + dev: false + /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -3090,6 +3549,20 @@ packages: optionalDependencies: fsevents: 2.3.2 + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + /chownr/2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -3225,6 +3698,11 @@ packages: engines: {node: '>=0.1.90'} dev: true + /colors/1.4.0: + resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} + engines: {node: '>=0.1.90'} + dev: true + /combined-stream/1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -3510,8 +3988,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.20.1: - resolution: {integrity: sha512-btdpStYFQScnNVQ5slVcr858KP0YWYjV16eGJQw8Gg7CWtu/2qNvIM3qVRIR3n1pK2R9NNOrTevbvAYxajwEjg==} + /core-js/3.21.1: + resolution: {integrity: sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==} requiresBuild: true dev: false @@ -3600,10 +4078,6 @@ packages: resolution: {integrity: sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==} dev: false - /css-with-exports-field/1.0.0: - resolution: {integrity: sha512-YCPKv36/w3+SrxwZ8E1FJXhDGTeGTKQmNA00VSePNTaO4VqSUdgB5XkhLL9qbF07m7Y+3nlTQJL5YLgRoewKFQ==} - dev: true - /css/3.0.0: resolution: {integrity: sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==} dependencies: @@ -3693,8 +4167,19 @@ packages: dependencies: ms: 2.1.2 - /debug/4.3.3_supports-color@9.2.1: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + + /debug/4.3.4_supports-color@9.2.1: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -3816,8 +4301,8 @@ packages: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: false - /diff-sequences/27.4.0: - resolution: {integrity: sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==} + /diff-sequences/27.5.1: + resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dev: true @@ -3866,9 +4351,9 @@ packages: resolution: {integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==} dev: true - /dotenv/10.0.0: - resolution: {integrity: sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==} - engines: {node: '>=10'} + /dotenv/14.3.2: + resolution: {integrity: sha512-vwEppIphpFdvaMCaHfCEv9IgwcxMljMw2TnAQBB4VWPvzXQLTb82jwmdOKzlEVUL3gNFT4l4TPKO+Bn+sqcrVQ==} + engines: {node: '>=12'} dev: true /dotenv/8.6.0: @@ -3906,13 +4391,6 @@ packages: once: 1.4.0 dev: true - /enquirer/2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - dependencies: - ansi-colors: 4.1.1 - dev: true - /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -3958,8 +4436,8 @@ packages: unbox-primitive: 1.0.1 dev: true - /es-module-lexer/0.9.3: - resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} + /es-module-lexer/0.10.4: + resolution: {integrity: sha512-n5bOGUnrmuCKyMkmHNtC1ObnUx8AgFcKWe2mbxb6jYzuK81W0Rk3Z//sCoGJuxWzos8R2w48TemGIFqZsTY6YA==} dev: true /es-to-primitive/1.2.1: @@ -3994,147 +4472,192 @@ packages: ext: 1.6.0 dev: false - /esbuild-android-arm64/0.14.3: - resolution: {integrity: sha512-v/vdnGJiSGWOAXzg422T9qb4S+P3tOaYtc5n3FDR27Bh3/xQDS7PdYz/yY7HhOlVp0eGwWNbPHEi8FcEhXjsuw==} + /esbuild-android-64/0.14.27: + resolution: {integrity: sha512-LuEd4uPuj/16Y8j6kqy3Z2E9vNY9logfq8Tq+oTE2PZVuNs3M1kj5Qd4O95ee66yDGb3isaOCV7sOLDwtMfGaQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + optional: true + + /esbuild-android-arm64/0.14.27: + resolution: {integrity: sha512-E8Ktwwa6vX8q7QeJmg8yepBYXaee50OdQS3BFtEHKrzbV45H4foMOeEE7uqdjGQZFBap5VAqo7pvjlyA92wznQ==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true optional: true - /esbuild-darwin-64/0.14.3: - resolution: {integrity: sha512-swY5OtEg6cfWdgc/XEjkBP7wXSyXXeZHEsWMdh1bDiN1D6GmRphk9SgKFKTj+P3ZHhOGIcC1+UdIwHk5bUcOig==} + /esbuild-darwin-64/0.14.27: + resolution: {integrity: sha512-czw/kXl/1ZdenPWfw9jDc5iuIYxqUxgQ/Q+hRd4/3udyGGVI31r29LCViN2bAJgGvQkqyLGVcG03PJPEXQ5i2g==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /esbuild-darwin-arm64/0.14.3: - resolution: {integrity: sha512-6i9dXPk8oT87wF6VHmwzSad76eMRU2Rt+GXrwF3Y4DCJgnPssJbabNQ9gurkuEX8M0YnEyJF0d1cR7rpTzcEiA==} + /esbuild-darwin-arm64/0.14.27: + resolution: {integrity: sha512-BEsv2U2U4o672oV8+xpXNxN9bgqRCtddQC6WBh4YhXKDcSZcdNh7+6nS+DM2vu7qWIWNA4JbRG24LUUYXysimQ==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /esbuild-freebsd-64/0.14.3: - resolution: {integrity: sha512-WDY5ENsmyceeE+95U3eI+FM8yARY5akWkf21M/x/+v2P5OVsYqCYELglSeAI5Y7bhteCVV3g4i2fRqtkmprdSA==} + /esbuild-freebsd-64/0.14.27: + resolution: {integrity: sha512-7FeiFPGBo+ga+kOkDxtPmdPZdayrSzsV9pmfHxcyLKxu+3oTcajeZlOO1y9HW+t5aFZPiv7czOHM4KNd0tNwCA==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true optional: true - /esbuild-freebsd-arm64/0.14.3: - resolution: {integrity: sha512-4BEEGcP0wBzg04pCCWXlgaPuksQHHfwHvYgCIsi+7IsuB17ykt6MHhTkHR5b5pjI/jNtRhPfMsDODUyftQJgvw==} + /esbuild-freebsd-arm64/0.14.27: + resolution: {integrity: sha512-8CK3++foRZJluOWXpllG5zwAVlxtv36NpHfsbWS7TYlD8S+QruXltKlXToc/5ZNzBK++l6rvRKELu/puCLc7jA==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true optional: true - /esbuild-linux-32/0.14.3: - resolution: {integrity: sha512-8yhsnjLG/GwCA1RAIndjmCHWViRB2Ol0XeOh2fCXS9qF8tlVrJB7qAiHZpm2vXx+yjOA/bFLTxzU+5pMKqkn5A==} + /esbuild-linux-32/0.14.27: + resolution: {integrity: sha512-qhNYIcT+EsYSBClZ5QhLzFzV5iVsP1YsITqblSaztr3+ZJUI+GoK8aXHyzKd7/CKKuK93cxEMJPpfi1dfsOfdw==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true optional: true - /esbuild-linux-64/0.14.3: - resolution: {integrity: sha512-eNq4aixfbwXHIJq4bQDe+XaSNV1grxqpZYs/zHbp0HGHf6SBNlTI02uyTbYGpIzlXmCEPS9tpPCi7BTU45kcJQ==} + /esbuild-linux-64/0.14.27: + resolution: {integrity: sha512-ESjck9+EsHoTaKWlFKJpPZRN26uiav5gkI16RuI8WBxUdLrrAlYuYSndxxKgEn1csd968BX/8yQZATYf/9+/qg==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-arm/0.14.3: - resolution: {integrity: sha512-YcMvJHAQnWrWKb+eLxN9e/iWUC/3w01UF/RXuMknqOW3prX8UQ63QknWz9/RI8BY/sdrdgPEbSmsTU2jy2cayQ==} + /esbuild-linux-arm/0.14.27: + resolution: {integrity: sha512-JnnmgUBdqLQO9hoNZQqNHFWlNpSX82vzB3rYuCJMhtkuaWQEmQz6Lec1UIxJdC38ifEghNTBsF9bbe8dFilnCw==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /esbuild-linux-arm64/0.14.3: - resolution: {integrity: sha512-wPLyRoqoV/tEMQ7M24DpAmCMyKqBmtgZY35w2tXM8X5O5b2Ohi7fkPSmd6ZgLIxZIApWt88toA8RT0S7qoxcOA==} + /esbuild-linux-arm64/0.14.27: + resolution: {integrity: sha512-no6Mi17eV2tHlJnqBHRLekpZ2/VYx+NfGxKcBE/2xOMYwctsanCaXxw4zapvNrGE9X38vefVXLz6YCF8b1EHiQ==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-mips64le/0.14.3: - resolution: {integrity: sha512-DdmfM5rcuoqjQL3px5MbquAjZWnySB5LdTrg52SSapp0gXMnGcsM6GY2WVta02CMKn5qi7WPVG4WbqTWE++tJw==} + /esbuild-linux-mips64le/0.14.27: + resolution: {integrity: sha512-NolWP2uOvIJpbwpsDbwfeExZOY1bZNlWE/kVfkzLMsSgqeVcl5YMen/cedRe9mKnpfLli+i0uSp7N+fkKNU27A==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true optional: true - /esbuild-linux-ppc64le/0.14.3: - resolution: {integrity: sha512-ujdqryj0m135Ms9yaNDVFAcLeRtyftM/v2v7Osji5zElf2TivSMdFxdrYnYICuHfkm8c8gHg1ncwqitL0r+nnA==} + /esbuild-linux-ppc64le/0.14.27: + resolution: {integrity: sha512-/7dTjDvXMdRKmsSxKXeWyonuGgblnYDn0MI1xDC7J1VQXny8k1qgNp6VmrlsawwnsymSUUiThhkJsI+rx0taNA==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /esbuild-netbsd-64/0.14.3: - resolution: {integrity: sha512-Z/UB9OUdwo1KDJCSGnVueDuKowRZRkduLvRMegHtDBHC3lS5LfZ3RdM1i+4MMN9iafyk8Q9FNcqIXI178ZujvA==} + /esbuild-linux-riscv64/0.14.27: + resolution: {integrity: sha512-D+aFiUzOJG13RhrSmZgrcFaF4UUHpqj7XSKrIiCXIj1dkIkFqdrmqMSOtSs78dOtObWiOrFCDDzB24UyeEiNGg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + optional: true + + /esbuild-linux-s390x/0.14.27: + resolution: {integrity: sha512-CD/D4tj0U4UQjELkdNlZhQ8nDHU5rBn6NGp47Hiz0Y7/akAY5i0oGadhEIg0WCY/HYVXFb3CsSPPwaKcTOW3bg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + optional: true + + /esbuild-netbsd-64/0.14.27: + resolution: {integrity: sha512-h3mAld69SrO1VoaMpYl3a5FNdGRE/Nqc+E8VtHOag4tyBwhCQXxtvDDOAKOUQexBGca0IuR6UayQ4ntSX5ij1Q==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true optional: true - /esbuild-openbsd-64/0.14.3: - resolution: {integrity: sha512-9I1uoMDeogq3zQuTe3qygmXYjImnvc6rBn51LLbLniQDlfvqHPBMnAZ/5KshwtXXIIMkCwByytDZdiuzRRlTvQ==} + /esbuild-openbsd-64/0.14.27: + resolution: {integrity: sha512-xwSje6qIZaDHXWoPpIgvL+7fC6WeubHHv18tusLYMwL+Z6bEa4Pbfs5IWDtQdHkArtfxEkIZz77944z8MgDxGw==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true optional: true - /esbuild-sunos-64/0.14.3: - resolution: {integrity: sha512-pldqx/Adxl4V4ymiyKxOOyJmHn6nUIo3wqk2xBx07iDgmL2XTcDDQd7N4U4QGu9LnYN4ZF+8IdOYa3oRRpbjtg==} + /esbuild-sunos-64/0.14.27: + resolution: {integrity: sha512-/nBVpWIDjYiyMhuqIqbXXsxBc58cBVH9uztAOIfWShStxq9BNBik92oPQPJ57nzWXRNKQUEFWr4Q98utDWz7jg==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true optional: true - /esbuild-windows-32/0.14.3: - resolution: {integrity: sha512-AqzvA/KbkC2m3kTXGpljLin3EttRbtoPTfBn6w6n2m9MWkTEbhQbE1ONoOBxhO5tExmyJdL/6B87TJJD5jEFBQ==} + /esbuild-windows-32/0.14.27: + resolution: {integrity: sha512-Q9/zEjhZJ4trtWhFWIZvS/7RUzzi8rvkoaS9oiizkHTTKd8UxFwn/Mm2OywsAfYymgUYm8+y2b+BKTNEFxUekw==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /esbuild-windows-64/0.14.3: - resolution: {integrity: sha512-HGg3C6113zLGB5hN41PROTnBuoh/arG2lQdOird6xFl9giff1cAfMQOUJUfODKD57dDqHjQ1YGW8gOkg0/IrWw==} + /esbuild-windows-64/0.14.27: + resolution: {integrity: sha512-b3y3vTSl5aEhWHK66ngtiS/c6byLf6y/ZBvODH1YkBM+MGtVL6jN38FdHUsZasCz9gFwYs/lJMVY9u7GL6wfYg==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true optional: true - /esbuild-windows-arm64/0.14.3: - resolution: {integrity: sha512-qB2izYu4VpigGnOrAN2Yv7ICYLZWY/AojZtwFfteViDnHgW4jXPYkHQIXTISJbRz25H2cYiv+MfRQYK31RNjlw==} + /esbuild-windows-arm64/0.14.27: + resolution: {integrity: sha512-I/reTxr6TFMcR5qbIkwRGvldMIaiBu2+MP0LlD7sOlNXrfqIl9uNjsuxFPGEG4IRomjfQ5q8WT+xlF/ySVkqKg==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /esbuild/0.14.3: - resolution: {integrity: sha512-zyEC5hkguW2oieXRXp8VJzQdcO/1FxCS5GjzqOHItRlojXnx/cTavsrkxdWvBH9li2lUq0bN+LeeVEmyCwiR/Q==} + /esbuild/0.14.27: + resolution: {integrity: sha512-MZQt5SywZS3hA9fXnMhR22dv0oPGh6QtjJRIYbgL1AeqAoQZE+Qn5ppGYQAoHv/vq827flj4tIJ79Mrdiwk46Q==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-arm64: 0.14.3 - esbuild-darwin-64: 0.14.3 - esbuild-darwin-arm64: 0.14.3 - esbuild-freebsd-64: 0.14.3 - esbuild-freebsd-arm64: 0.14.3 - esbuild-linux-32: 0.14.3 - esbuild-linux-64: 0.14.3 - esbuild-linux-arm: 0.14.3 - esbuild-linux-arm64: 0.14.3 - esbuild-linux-mips64le: 0.14.3 - esbuild-linux-ppc64le: 0.14.3 - esbuild-netbsd-64: 0.14.3 - esbuild-openbsd-64: 0.14.3 - esbuild-sunos-64: 0.14.3 - esbuild-windows-32: 0.14.3 - esbuild-windows-64: 0.14.3 - esbuild-windows-arm64: 0.14.3 + esbuild-android-64: 0.14.27 + esbuild-android-arm64: 0.14.27 + esbuild-darwin-64: 0.14.27 + esbuild-darwin-arm64: 0.14.27 + esbuild-freebsd-64: 0.14.27 + esbuild-freebsd-arm64: 0.14.27 + esbuild-linux-32: 0.14.27 + esbuild-linux-64: 0.14.27 + esbuild-linux-arm: 0.14.27 + esbuild-linux-arm64: 0.14.27 + esbuild-linux-mips64le: 0.14.27 + esbuild-linux-ppc64le: 0.14.27 + esbuild-linux-riscv64: 0.14.27 + esbuild-linux-s390x: 0.14.27 + esbuild-netbsd-64: 0.14.27 + esbuild-openbsd-64: 0.14.27 + esbuild-sunos-64: 0.14.27 + esbuild-windows-32: 0.14.27 + esbuild-windows-64: 0.14.27 + esbuild-windows-arm64: 0.14.27 /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -4171,30 +4694,30 @@ packages: source-map: 0.6.1 dev: true - /eslint-define-config/1.2.1: - resolution: {integrity: sha512-Mj6OvJXNDrMA+RtFtPFst4BRJPkB4qi9B+8FFr/hdxY0gNbhGoSnp7i3w3/k75vMXTbbfsmeZhQUomI6mK/JVw==} - engines: {node: '>= 16.9.0', npm: '>= 7.0.0', pnpm: '>= 6.17.0'} + /eslint-define-config/1.3.0: + resolution: {integrity: sha512-sFbHUnaXdJfG74c0EfFjXajjM3ugDVOMteKBnddCHQP5eas6p3nmS7PbSVhyZ8Y9DaNNtFbzlovdGmVdTwrHcw==} + engines: {node: '>= 16.9.0', npm: '>= 7.0.0', pnpm: '>= 6.32.2'} dev: true - /eslint-plugin-es/3.0.1_eslint@8.5.0: + /eslint-plugin-es/3.0.1_eslint@8.12.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.5.0 + eslint: 8.12.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-node/11.1.0_eslint@8.5.0: + /eslint-plugin-node/11.1.0_eslint@8.12.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.5.0 - eslint-plugin-es: 3.0.1_eslint@8.5.0 + eslint: 8.12.0 + eslint-plugin-es: 3.0.1_eslint@8.12.0 eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.0.4 @@ -4210,8 +4733,8 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope/7.1.0: - resolution: {integrity: sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==} + /eslint-scope/7.1.1: + resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 @@ -4225,13 +4748,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.5.0: + /eslint-utils/3.0.0_eslint@8.12.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.5.0 + eslint: 8.12.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4245,29 +4768,28 @@ packages: engines: {node: '>=10'} dev: true - /eslint-visitor-keys/3.1.0: - resolution: {integrity: sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==} + /eslint-visitor-keys/3.3.0: + resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.5.0: - resolution: {integrity: sha512-tVGSkgNbOfiHyVte8bCM8OmX+xG9PzVG/B4UCF60zx7j61WIVY/AqJECDgpLD4DbbESD0e174gOg3ZlrX15GDg==} + /eslint/8.12.0: + resolution: {integrity: sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.0.5 + '@eslint/eslintrc': 1.2.1 '@humanwhocodes/config-array': 0.9.2 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.3 + debug: 4.3.4 doctrine: 3.0.0 - enquirer: 2.3.6 escape-string-regexp: 4.0.0 - eslint-scope: 7.1.0 - eslint-utils: 3.0.0_eslint@8.5.0 - eslint-visitor-keys: 3.1.0 - espree: 9.2.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.12.0 + eslint-visitor-keys: 3.3.0 + espree: 9.3.1 esquery: 1.4.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -4275,7 +4797,7 @@ packages: functional-red-black-tree: 1.0.1 glob-parent: 6.0.2 globals: 13.12.0 - ignore: 4.0.6 + ignore: 5.2.0 import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 @@ -4286,9 +4808,7 @@ packages: minimatch: 3.0.4 natural-compare: 1.4.0 optionator: 0.9.1 - progress: 2.0.3 regexpp: 3.2.0 - semver: 7.3.5 strip-ansi: 6.0.1 strip-json-comments: 3.1.1 text-table: 0.2.0 @@ -4297,13 +4817,13 @@ packages: - supports-color dev: true - /espree/9.2.0: - resolution: {integrity: sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==} + /espree/9.3.1: + resolution: {integrity: sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.7.0 acorn-jsx: 5.3.2_acorn@8.7.0 - eslint-visitor-keys: 3.1.0 + eslint-visitor-keys: 3.3.0 dev: true /esprima/4.0.1: @@ -4382,16 +4902,14 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect/27.4.2: - resolution: {integrity: sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==} + /expect/27.5.1: + resolution: {integrity: sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 - ansi-styles: 5.2.0 - jest-get-type: 27.4.0 - jest-matcher-utils: 27.4.2 - jest-message-util: 27.4.2 - jest-regex-util: 27.4.0 + '@jest/types': 27.5.1 + jest-get-type: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 dev: true /express/4.17.2: @@ -4441,7 +4959,7 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true dependencies: - debug: 4.3.3 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -4454,6 +4972,16 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.4 + /fast-glob/3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} engines: {node: '>=8'} @@ -4463,6 +4991,7 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.4 + dev: true /fast-json-stable-stringify/2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -4592,12 +5121,22 @@ packages: graceful-fs: 4.2.8 jsonfile: 6.1.0 universalify: 2.0.0 + dev: false + + /fs-extra/10.0.1: + resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.9 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true /fs-extra/7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} dependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 jsonfile: 4.0.0 universalify: 0.1.2 dev: true @@ -4774,7 +5313,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.7 + fast-glob: 3.2.11 ignore: 5.2.0 merge2: 1.4.1 slash: 3.0.0 @@ -4788,18 +5327,22 @@ packages: /graceful-fs/4.2.8: resolution: {integrity: sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==} + dev: false + + /graceful-fs/4.2.9: + resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} /handlebars/4.7.7: resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} engines: {node: '>=0.4.7'} hasBin: true dependencies: - minimist: 1.2.5 + minimist: 1.2.6 neo-async: 2.6.2 source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.14.5 + uglify-js: 3.15.0 dev: true /hard-rejection/2.1.0: @@ -4930,12 +5473,12 @@ packages: dependencies: '@tootallnate/once': 1.1.2 agent-base: 6.0.2 - debug: 4.3.3 + debug: 4.3.4 transitivePeerDependencies: - supports-color dev: true - /http-proxy/1.18.1_debug@4.3.3: + /http-proxy/1.18.1_debug@4.3.4: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} engines: {node: '>=8.0.0'} dependencies: @@ -4951,7 +5494,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.3 + debug: 4.3.4 transitivePeerDependencies: - supports-color @@ -4971,18 +5514,13 @@ packages: resolution: {integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=} dev: true - /icss-utils/5.1.0_postcss@8.4.5: + /icss-utils/5.1.0_postcss@8.4.12: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.5 - dev: true - - /ignore/4.0.6: - resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} - engines: {node: '>= 4'} + postcss: 8.4.12 dev: true /ignore/5.2.0: @@ -5007,6 +5545,7 @@ packages: engines: {node: '>=8'} dependencies: import-from: 3.0.0 + dev: false /import-fresh/3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} @@ -5020,6 +5559,7 @@ packages: engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 + dev: false /import-lazy/4.0.0: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} @@ -5143,6 +5683,11 @@ packages: dependencies: has: 1.0.3 + /is-core-module/2.8.1: + resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} + dependencies: + has: 1.0.3 + /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -5228,7 +5773,7 @@ packages: /is-reference/1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: - '@types/estree': 0.0.50 + '@types/estree': 0.0.51 dev: true /is-regex/1.1.4: @@ -5307,24 +5852,12 @@ packages: engines: {node: '>=8'} dev: true - /istanbul-lib-instrument/4.0.3: - resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} - engines: {node: '>=8'} - dependencies: - '@babel/core': 7.16.5 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - /istanbul-lib-instrument/5.1.0: resolution: {integrity: sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.16.5 - '@babel/parser': 7.16.6 + '@babel/core': 7.17.2 + '@babel/parser': 7.17.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.0 @@ -5345,50 +5878,50 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.3 + debug: 4.3.4 istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: - supports-color dev: true - /istanbul-reports/3.1.2: - resolution: {integrity: sha512-0gHxuT1NNC0aEIL1zbJ+MTgPbbHhU77eJPuU35WKA7TgXiSNlCAx4PENoMrH0Or6M2H80TaZcWKhM0IK6V8gRw==} + /istanbul-reports/3.1.3: + resolution: {integrity: sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.0 dev: true - /jest-changed-files/27.4.2: - resolution: {integrity: sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==} + /jest-changed-files/27.5.1: + resolution: {integrity: sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 execa: 5.1.1 throat: 6.0.1 dev: true - /jest-circus/27.4.5: - resolution: {integrity: sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw==} + /jest-circus/27.5.1: + resolution: {integrity: sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/environment': 27.4.4 - '@jest/test-result': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/environment': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 - expect: 27.4.2 + expect: 27.5.1 is-generator-fn: 2.1.0 - jest-each: 27.4.2 - jest-matcher-utils: 27.4.2 - jest-message-util: 27.4.2 - jest-runtime: 27.4.5 - jest-snapshot: 27.4.5 - jest-util: 27.4.2 - pretty-format: 27.4.2 + jest-each: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 slash: 3.0.0 stack-utils: 2.0.5 throat: 6.0.1 @@ -5396,8 +5929,8 @@ packages: - supports-color dev: true - /jest-cli/27.4.5_ts-node@10.4.0: - resolution: {integrity: sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg==} + /jest-cli/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true peerDependencies: @@ -5406,16 +5939,16 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.4.5_ts-node@10.4.0 - '@jest/test-result': 27.4.2 - '@jest/types': 27.4.2 + '@jest/core': 27.5.1_ts-node@10.4.0 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 import-local: 3.0.3 - jest-config: 27.4.5_ts-node@10.4.0 - jest-util: 27.4.2 - jest-validate: 27.4.2 + jest-config: 27.5.1_ts-node@10.4.0 + jest-util: 27.5.1 + jest-validate: 27.5.1 prompts: 2.4.2 yargs: 16.2.0 transitivePeerDependencies: @@ -5426,8 +5959,8 @@ packages: - utf-8-validate dev: true - /jest-config/27.4.5_ts-node@10.4.0: - resolution: {integrity: sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA==} + /jest-config/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: ts-node: '>=9.0.0' @@ -5435,29 +5968,31 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.16.5 - '@jest/test-sequencer': 27.4.5 - '@jest/types': 27.4.2 - babel-jest: 27.4.5_@babel+core@7.16.5 + '@babel/core': 7.17.2 + '@jest/test-sequencer': 27.5.1 + '@jest/types': 27.5.1 + babel-jest: 27.5.1_@babel+core@7.17.2 chalk: 4.1.2 ci-info: 3.3.0 deepmerge: 4.2.2 glob: 7.2.0 - graceful-fs: 4.2.8 - jest-circus: 27.4.5 - jest-environment-jsdom: 27.4.4 - jest-environment-node: 27.4.4 - jest-get-type: 27.4.0 - jest-jasmine2: 27.4.5 - jest-regex-util: 27.4.0 - jest-resolve: 27.4.5 - jest-runner: 27.4.5 - jest-util: 27.4.2 - jest-validate: 27.4.2 + graceful-fs: 4.2.9 + jest-circus: 27.5.1 + jest-environment-jsdom: 27.5.1 + jest-environment-node: 27.5.1 + jest-get-type: 27.5.1 + jest-jasmine2: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-runner: 27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 micromatch: 4.0.4 - pretty-format: 27.4.2 + parse-json: 5.2.0 + pretty-format: 27.5.1 slash: 3.0.0 - ts-node: 10.4.0_00264fd83560919cd06c986889baae0a + strip-json-comments: 3.1.1 + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 transitivePeerDependencies: - bufferutil - canvas @@ -5465,44 +6000,44 @@ packages: - utf-8-validate dev: true - /jest-diff/27.4.2: - resolution: {integrity: sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==} + /jest-diff/27.5.1: + resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: chalk: 4.1.2 - diff-sequences: 27.4.0 - jest-get-type: 27.4.0 - pretty-format: 27.4.2 + diff-sequences: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-docblock/27.4.0: - resolution: {integrity: sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==} + /jest-docblock/27.5.1: + resolution: {integrity: sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: detect-newline: 3.1.0 dev: true - /jest-each/27.4.2: - resolution: {integrity: sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==} + /jest-each/27.5.1: + resolution: {integrity: sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 chalk: 4.1.2 - jest-get-type: 27.4.0 - jest-util: 27.4.2 - pretty-format: 27.4.2 + jest-get-type: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-environment-jsdom/27.4.4: - resolution: {integrity: sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==} + /jest-environment-jsdom/27.5.1: + resolution: {integrity: sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/environment': 27.4.4 - '@jest/fake-timers': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 - jest-mock: 27.4.2 - jest-util: 27.4.2 + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 + jest-mock: 27.5.1 + jest-util: 27.5.1 jsdom: 16.7.0 transitivePeerDependencies: - bufferutil @@ -5511,111 +6046,110 @@ packages: - utf-8-validate dev: true - /jest-environment-node/27.4.4: - resolution: {integrity: sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==} + /jest-environment-node/27.5.1: + resolution: {integrity: sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/environment': 27.4.4 - '@jest/fake-timers': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 - jest-mock: 27.4.2 - jest-util: 27.4.2 + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 + jest-mock: 27.5.1 + jest-util: 27.5.1 dev: true - /jest-get-type/27.4.0: - resolution: {integrity: sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==} + /jest-get-type/27.5.1: + resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dev: true - /jest-haste-map/27.4.5: - resolution: {integrity: sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q==} + /jest-haste-map/27.5.1: + resolution: {integrity: sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.5 - '@types/node': 16.11.17 + '@types/node': 16.11.26 anymatch: 3.1.2 fb-watchman: 2.0.1 - graceful-fs: 4.2.8 - jest-regex-util: 27.4.0 - jest-serializer: 27.4.0 - jest-util: 27.4.2 - jest-worker: 27.4.5 + graceful-fs: 4.2.9 + jest-regex-util: 27.5.1 + jest-serializer: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 micromatch: 4.0.4 walker: 1.0.8 optionalDependencies: fsevents: 2.3.2 dev: true - /jest-jasmine2/27.4.5: - resolution: {integrity: sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw==} + /jest-jasmine2/27.5.1: + resolution: {integrity: sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/traverse': 7.16.5 - '@jest/environment': 27.4.4 - '@jest/source-map': 27.4.0 - '@jest/test-result': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/environment': 27.5.1 + '@jest/source-map': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 co: 4.6.0 - expect: 27.4.2 + expect: 27.5.1 is-generator-fn: 2.1.0 - jest-each: 27.4.2 - jest-matcher-utils: 27.4.2 - jest-message-util: 27.4.2 - jest-runtime: 27.4.5 - jest-snapshot: 27.4.5 - jest-util: 27.4.2 - pretty-format: 27.4.2 + jest-each: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-runtime: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 throat: 6.0.1 transitivePeerDependencies: - supports-color dev: true - /jest-leak-detector/27.4.2: - resolution: {integrity: sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==} + /jest-leak-detector/27.5.1: + resolution: {integrity: sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - jest-get-type: 27.4.0 - pretty-format: 27.4.2 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-matcher-utils/27.4.2: - resolution: {integrity: sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==} + /jest-matcher-utils/27.5.1: + resolution: {integrity: sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: chalk: 4.1.2 - jest-diff: 27.4.2 - jest-get-type: 27.4.0 - pretty-format: 27.4.2 + jest-diff: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-message-util/27.4.2: - resolution: {integrity: sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==} + /jest-message-util/27.5.1: + resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/code-frame': 7.16.0 - '@jest/types': 27.4.2 + '@babel/code-frame': 7.16.7 + '@jest/types': 27.5.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 micromatch: 4.0.4 - pretty-format: 27.4.2 + pretty-format: 27.5.1 slash: 3.0.0 stack-utils: 2.0.5 dev: true - /jest-mock/27.4.2: - resolution: {integrity: sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==} + /jest-mock/27.5.1: + resolution: {integrity: sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 dev: true - /jest-pnp-resolver/1.2.2_jest-resolve@27.4.5: + /jest-pnp-resolver/1.2.2_jest-resolve@27.5.1: resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} engines: {node: '>=6'} peerDependencies: @@ -5624,65 +6158,64 @@ packages: jest-resolve: optional: true dependencies: - jest-resolve: 27.4.5 + jest-resolve: 27.5.1 dev: true - /jest-regex-util/27.4.0: - resolution: {integrity: sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==} + /jest-regex-util/27.5.1: + resolution: {integrity: sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dev: true - /jest-resolve-dependencies/27.4.5: - resolution: {integrity: sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w==} + /jest-resolve-dependencies/27.5.1: + resolution: {integrity: sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 - jest-regex-util: 27.4.0 - jest-snapshot: 27.4.5 + '@jest/types': 27.5.1 + jest-regex-util: 27.5.1 + jest-snapshot: 27.5.1 transitivePeerDependencies: - supports-color dev: true - /jest-resolve/27.4.5: - resolution: {integrity: sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw==} + /jest-resolve/27.5.1: + resolution: {integrity: sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 chalk: 4.1.2 - graceful-fs: 4.2.8 - jest-haste-map: 27.4.5 - jest-pnp-resolver: 1.2.2_jest-resolve@27.4.5 - jest-util: 27.4.2 - jest-validate: 27.4.2 - resolve: 1.20.0 + graceful-fs: 4.2.9 + jest-haste-map: 27.5.1 + jest-pnp-resolver: 1.2.2_jest-resolve@27.5.1 + jest-util: 27.5.1 + jest-validate: 27.5.1 + resolve: 1.22.0 resolve.exports: 1.1.0 slash: 3.0.0 dev: true - /jest-runner/27.4.5: - resolution: {integrity: sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg==} + /jest-runner/27.5.1: + resolution: {integrity: sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/console': 27.4.2 - '@jest/environment': 27.4.4 - '@jest/test-result': 27.4.2 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/console': 27.5.1 + '@jest/environment': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 emittery: 0.8.1 - exit: 0.1.2 - graceful-fs: 4.2.8 - jest-docblock: 27.4.0 - jest-environment-jsdom: 27.4.4 - jest-environment-node: 27.4.4 - jest-haste-map: 27.4.5 - jest-leak-detector: 27.4.2 - jest-message-util: 27.4.2 - jest-resolve: 27.4.5 - jest-runtime: 27.4.5 - jest-util: 27.4.2 - jest-worker: 27.4.5 + graceful-fs: 4.2.9 + jest-docblock: 27.5.1 + jest-environment-jsdom: 27.5.1 + jest-environment-node: 27.5.1 + jest-haste-map: 27.5.1 + jest-leak-detector: 27.5.1 + jest-message-util: 27.5.1 + jest-resolve: 27.5.1 + jest-runtime: 27.5.1 + jest-util: 27.5.1 + jest-worker: 27.5.1 source-map-support: 0.5.21 throat: 6.0.1 transitivePeerDependencies: @@ -5692,128 +6225,122 @@ packages: - utf-8-validate dev: true - /jest-runtime/27.4.5: - resolution: {integrity: sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ==} + /jest-runtime/27.5.1: + resolution: {integrity: sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/console': 27.4.2 - '@jest/environment': 27.4.4 - '@jest/globals': 27.4.4 - '@jest/source-map': 27.4.0 - '@jest/test-result': 27.4.2 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 - '@types/yargs': 16.0.4 + '@jest/environment': 27.5.1 + '@jest/fake-timers': 27.5.1 + '@jest/globals': 27.5.1 + '@jest/source-map': 27.5.1 + '@jest/test-result': 27.5.1 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 execa: 5.1.1 - exit: 0.1.2 glob: 7.2.0 - graceful-fs: 4.2.8 - jest-haste-map: 27.4.5 - jest-message-util: 27.4.2 - jest-mock: 27.4.2 - jest-regex-util: 27.4.0 - jest-resolve: 27.4.5 - jest-snapshot: 27.4.5 - jest-util: 27.4.2 - jest-validate: 27.4.2 + graceful-fs: 4.2.9 + jest-haste-map: 27.5.1 + jest-message-util: 27.5.1 + jest-mock: 27.5.1 + jest-regex-util: 27.5.1 + jest-resolve: 27.5.1 + jest-snapshot: 27.5.1 + jest-util: 27.5.1 slash: 3.0.0 strip-bom: 4.0.0 - yargs: 16.2.0 transitivePeerDependencies: - supports-color dev: true - /jest-serializer/27.4.0: - resolution: {integrity: sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==} + /jest-serializer/27.5.1: + resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 16.11.17 - graceful-fs: 4.2.8 + '@types/node': 16.11.26 + graceful-fs: 4.2.9 dev: true - /jest-snapshot/27.4.5: - resolution: {integrity: sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ==} + /jest-snapshot/27.5.1: + resolution: {integrity: sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/core': 7.16.5 - '@babel/generator': 7.16.5 - '@babel/parser': 7.16.6 - '@babel/plugin-syntax-typescript': 7.16.5_@babel+core@7.16.5 - '@babel/traverse': 7.16.5 - '@babel/types': 7.16.0 - '@jest/transform': 27.4.5 - '@jest/types': 27.4.2 + '@babel/core': 7.17.2 + '@babel/generator': 7.17.0 + '@babel/plugin-syntax-typescript': 7.16.7_@babel+core@7.17.2 + '@babel/traverse': 7.17.0 + '@babel/types': 7.17.0 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 '@types/babel__traverse': 7.14.2 '@types/prettier': 2.4.2 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.5 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.2 chalk: 4.1.2 - expect: 27.4.2 - graceful-fs: 4.2.8 - jest-diff: 27.4.2 - jest-get-type: 27.4.0 - jest-haste-map: 27.4.5 - jest-matcher-utils: 27.4.2 - jest-message-util: 27.4.2 - jest-resolve: 27.4.5 - jest-util: 27.4.2 + expect: 27.5.1 + graceful-fs: 4.2.9 + jest-diff: 27.5.1 + jest-get-type: 27.5.1 + jest-haste-map: 27.5.1 + jest-matcher-utils: 27.5.1 + jest-message-util: 27.5.1 + jest-util: 27.5.1 natural-compare: 1.4.0 - pretty-format: 27.4.2 + pretty-format: 27.5.1 semver: 7.3.5 transitivePeerDependencies: - supports-color dev: true - /jest-util/27.4.2: - resolution: {integrity: sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==} + /jest-util/27.5.1: + resolution: {integrity: sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 ci-info: 3.3.0 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 picomatch: 2.3.0 dev: true - /jest-validate/27.4.2: - resolution: {integrity: sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==} + /jest-validate/27.5.1: + resolution: {integrity: sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 camelcase: 6.2.1 chalk: 4.1.2 - jest-get-type: 27.4.0 + jest-get-type: 27.5.1 leven: 3.1.0 - pretty-format: 27.4.2 + pretty-format: 27.5.1 dev: true - /jest-watcher/27.4.2: - resolution: {integrity: sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==} + /jest-watcher/27.5.1: + resolution: {integrity: sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/test-result': 27.4.2 - '@jest/types': 27.4.2 - '@types/node': 16.11.17 + '@jest/test-result': 27.5.1 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 ansi-escapes: 4.3.2 chalk: 4.1.2 - jest-util: 27.4.2 + jest-util: 27.5.1 string-length: 4.0.2 dev: true - /jest-worker/27.4.5: - resolution: {integrity: sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==} + /jest-worker/27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.11.17 + '@types/node': 16.11.26 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest/27.4.5_ts-node@10.4.0: - resolution: {integrity: sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==} + /jest/27.5.1_ts-node@10.4.0: + resolution: {integrity: sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true peerDependencies: @@ -5822,9 +6349,9 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.4.5_ts-node@10.4.0 + '@jest/core': 27.5.1_ts-node@10.4.0 import-local: 3.0.3 - jest-cli: 27.4.5_ts-node@10.4.0 + jest-cli: 27.5.1_ts-node@10.4.0 transitivePeerDependencies: - bufferutil - canvas @@ -5935,11 +6462,18 @@ packages: hasBin: true dependencies: minimist: 1.2.5 + dev: false + + /json5/2.2.1: + resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} + engines: {node: '>=6'} + hasBin: true + dev: true /jsonfile/4.0.0: resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=} optionalDependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 dev: true /jsonfile/6.1.0: @@ -5947,7 +6481,7 @@ packages: dependencies: universalify: 2.0.0 optionalDependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 /jsonparse/1.3.1: resolution: {integrity: sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=} @@ -6002,7 +6536,7 @@ packages: tslib: 2.3.1 optionalDependencies: errno: 0.1.8 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 image-size: 0.5.5 make-dir: 2.1.0 mime: 1.6.0 @@ -6038,21 +6572,22 @@ packages: /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /lint-staged/12.1.4: - resolution: {integrity: sha512-RgDz9nsFsE0/5eL9Vat0AvCuk0+j5mEuzBIVfrRH5FRtt5wibYe8zTjZs2nuqLFrLAGQGYnj8+HJxolcj08i/A==} + /lint-staged/12.3.7: + resolution: {integrity: sha512-/S4D726e2GIsDVWIk1XGvheCaDm1SJRQp8efamZFWJxQMVEbOwSysp7xb49Oo73KYCdy97mIWinhlxcoNqIfIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true dependencies: cli-truncate: 3.1.0 colorette: 2.0.16 commander: 8.3.0 - debug: 4.3.3_supports-color@9.2.1 + debug: 4.3.4_supports-color@9.2.1 execa: 5.1.1 lilconfig: 2.0.4 - listr2: 3.13.5 + listr2: 4.0.2 micromatch: 4.0.4 normalize-path: 3.0.0 object-inspect: 1.12.0 + pidtree: 0.5.0 string-argv: 0.3.1 supports-color: 9.2.1 yaml: 1.10.2 @@ -6060,9 +6595,9 @@ packages: - enquirer dev: true - /listr2/3.13.5: - resolution: {integrity: sha512-3n8heFQDSk+NcwBn3CgxEibZGaRzx+pC64n3YjpMD1qguV4nWus3Al+Oo3KooqFKTQEJ1v7MmnbnyyNspgx3NA==} - engines: {node: '>=10.0.0'} + /listr2/4.0.2: + resolution: {integrity: sha512-YcgwfCWpvPbj9FLUGqvdFvd3hrFWKpOeuXznRgfWEJ7RNr8b/IKKIKZABHx3aU+4CWN/iSAFFSReziQG6vTeIA==} + engines: {node: '>=12'} peerDependencies: enquirer: '>= 2.3.0 < 3' peerDependenciesMeta: @@ -6074,7 +6609,7 @@ packages: log-update: 4.0.0 p-map: 4.0.0 rfdc: 1.3.0 - rxjs: 7.5.1 + rxjs: 7.5.2 through: 2.3.8 wrap-ansi: 7.0.0 dev: true @@ -6083,7 +6618,7 @@ packages: resolution: {integrity: sha1-L19Fq5HjMhYjT9U62rZo607AmTs=} engines: {node: '>=4'} dependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 parse-json: 4.0.0 pify: 3.0.0 strip-bom: 3.0.0 @@ -6184,6 +6719,12 @@ packages: dependencies: sourcemap-codec: 1.4.8 + /magic-string/0.26.1: + resolution: {integrity: sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -6271,6 +6812,14 @@ packages: braces: 3.0.2 picomatch: 2.3.0 + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + /mime-db/1.46.0: resolution: {integrity: sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==} engines: {node: '>= 0.6'} @@ -6299,11 +6848,12 @@ packages: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true + requiresBuild: true dev: true - /mime/2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} + /mime/3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} hasBin: true dev: true @@ -6383,6 +6933,10 @@ packages: /minimist/1.2.5: resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} + dev: false + + /minimist/1.2.6: + resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} /minipass/3.1.6: resolution: {integrity: sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==} @@ -6444,6 +6998,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanoid/3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + /natural-compare/1.4.0: resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} dev: true @@ -6507,8 +7066,8 @@ packages: engines: {node: '>= 6.0.0'} dev: true - /node-forge/1.2.0: - resolution: {integrity: sha512-M4AsdaP0bGNaSPtatd/+f76asocI0cFaURRdeQVZvrJBrYp2Qohv5hDbGHykuNqCb1BYjWHjdS6HlN50qbztwA==} + /node-forge/1.3.0: + resolution: {integrity: sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==} engines: {node: '>= 6.13.0'} dev: true @@ -6531,7 +7090,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.20.0 + resolve: 1.22.0 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true @@ -6541,7 +7100,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.0.2 - is-core-module: 2.8.0 + is-core-module: 2.8.1 semver: 7.3.5 validate-npm-package-license: 3.0.4 dev: true @@ -6740,8 +7299,8 @@ packages: engines: {node: '>=6'} dev: true - /package-name-regex/2.0.4: - resolution: {integrity: sha512-p+ixFAmbQ9DE9TG3ptbjLc7/gwgdKEMCwdGpZwxzgD02D1q/SRRT/j32MyjGjJQ36CSTeVsvKt9Zp3PUHYWBnw==} + /package-name-regex/2.0.5: + resolution: {integrity: sha512-F0lX+FBs/Bo7KWY6EuUXj+oarXU0Og1R2Zdg3F/fVcNw3pPQAKFKxUrugno0Ds5NUztlx/gRLnQW9MF+7VTqAw==} engines: {node: '>=12'} dev: true @@ -6852,12 +7411,22 @@ packages: resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} engines: {node: '>=8.6'} + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + /pidtree/0.3.1: resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} engines: {node: '>=0.10'} hasBin: true dev: true + /pidtree/0.5.0: + resolution: {integrity: sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==} + engines: {node: '>=0.10'} + hasBin: true + dev: true + /pify/2.3.0: resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} engines: {node: '>=0.10.0'} @@ -6879,6 +7448,13 @@ packages: engines: {node: '>= 6'} dev: true + /pixelmatch/5.2.1: + resolution: {integrity: sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==} + hasBin: true + dependencies: + pngjs: 4.0.1 + dev: true + /pkg-dir/4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -6886,38 +7462,40 @@ packages: find-up: 4.1.0 dev: true - /playwright-chromium/1.17.1: - resolution: {integrity: sha512-EnCtsP/QTWWoQV/cFYpt2wgKwcOdoa2iHBlBaldHB8gobtynMKwk96rzldaRS4YimFibIzREFkWCNMrrb3LRMQ==} + /playwright-chromium/1.20.1: + resolution: {integrity: sha512-zDJm59GEOWrHqpByblzaKI+bpswd3nrheCoAGOTBDX7MsQYwAV/ZBS2aCJzeGxDt/67brq/fQuZse3GwnCk+6A==} engines: {node: '>=12'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.17.1 + playwright-core: 1.20.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: true - /playwright-core/1.17.1: - resolution: {integrity: sha512-C3c8RpPiC3qr15fRDN6dx6WnUkPLFmST37gms2aoHPDRvp7EaGDPMMZPpqIm/QWB5J40xDrQCD4YYHz2nBTojQ==} + /playwright-core/1.20.1: + resolution: {integrity: sha512-A8ZsZ09gaSbxP0UijoLyzp3LJc0kWMxDooLPi+mm4/5iYnTbd6PF5nKjoFw1a7KwjZIEgdhJduah4BcUIh+IPA==} engines: {node: '>=12'} hasBin: true dependencies: + colors: 1.4.0 commander: 8.3.0 debug: 4.3.3 extract-zip: 2.0.1 https-proxy-agent: 5.0.0 jpeg-js: 0.4.3 - mime: 2.6.0 - pngjs: 5.0.0 + mime: 3.0.0 + pixelmatch: 5.2.1 + pngjs: 6.0.0 progress: 2.0.3 proper-lockfile: 4.1.2 proxy-from-env: 1.1.0 rimraf: 3.0.2 socks-proxy-agent: 6.1.1 stack-utils: 2.0.5 - ws: 7.5.6 + ws: 8.4.2 yauzl: 2.10.0 yazl: 2.5.1 transitivePeerDependencies: @@ -6926,21 +7504,26 @@ packages: - utf-8-validate dev: true - /pngjs/5.0.0: - resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} - engines: {node: '>=10.13.0'} + /pngjs/4.0.1: + resolution: {integrity: sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==} + engines: {node: '>=8.0.0'} + dev: true + + /pngjs/6.0.0: + resolution: {integrity: sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==} + engines: {node: '>=12.13.0'} dev: true - /postcss-import/14.0.2_postcss@8.4.5: - resolution: {integrity: sha512-BJ2pVK4KhUyMcqjuKs9RijV5tatNzNa73e/32aBVE/ejYPe37iH+6vAu9WvqUkB5OAYgLHzbSvzHnorybJCm9g==} + /postcss-import/14.1.0_postcss@8.4.12: + resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.5 + postcss: 8.4.12 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.20.0 + resolve: 1.22.0 dev: true /postcss-js/3.0.3: @@ -6951,10 +7534,21 @@ packages: postcss: 8.4.5 dev: false + /postcss-js/4.0.0_postcss@8.4.12: + resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.3.3 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.12 + dev: false + /postcss-load-config/3.1.0_ts-node@10.4.0: resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==} engines: {node: '>= 10'} peerDependencies: + postcss: '*' ts-node: '>=9.0.0' peerDependenciesMeta: ts-node: @@ -6962,63 +7556,79 @@ packages: dependencies: import-cwd: 3.0.0 lilconfig: 2.0.4 - ts-node: 10.4.0_00264fd83560919cd06c986889baae0a + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 + yaml: 1.10.2 + dev: false + + /postcss-load-config/3.1.3_postcss@8.4.12+ts-node@10.4.0: + resolution: {integrity: sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + ts-node: + optional: true + dependencies: + lilconfig: 2.0.4 + postcss: 8.4.12 + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 yaml: 1.10.2 - /postcss-modules-extract-imports/3.0.0_postcss@8.4.5: + /postcss-modules-extract-imports/3.0.0_postcss@8.4.12: resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.5 + postcss: 8.4.12 dev: true - /postcss-modules-local-by-default/4.0.0_postcss@8.4.5: + /postcss-modules-local-by-default/4.0.0_postcss@8.4.12: resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.5 - postcss: 8.4.5 + icss-utils: 5.1.0_postcss@8.4.12 + postcss: 8.4.12 postcss-selector-parser: 6.0.8 postcss-value-parser: 4.2.0 dev: true - /postcss-modules-scope/3.0.0_postcss@8.4.5: + /postcss-modules-scope/3.0.0_postcss@8.4.12: resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.5 + postcss: 8.4.12 postcss-selector-parser: 6.0.8 dev: true - /postcss-modules-values/4.0.0_postcss@8.4.5: + /postcss-modules-values/4.0.0_postcss@8.4.12: resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.5 - postcss: 8.4.5 + icss-utils: 5.1.0_postcss@8.4.12 + postcss: 8.4.12 dev: true - /postcss-modules/4.3.0_postcss@8.4.5: - resolution: {integrity: sha512-zoUttLDSsbWDinJM9jH37o7hulLRyEgH6fZm2PchxN7AZ8rkdWiALyNhnQ7+jg7cX9f10m6y5VhHsrjO0Mf/DA==} + /postcss-modules/4.3.1_postcss@8.4.12: + resolution: {integrity: sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==} peerDependencies: postcss: ^8.0.0 dependencies: generic-names: 4.0.0 icss-replace-symbols: 1.1.0 lodash.camelcase: 4.3.0 - postcss: 8.4.5 - postcss-modules-extract-imports: 3.0.0_postcss@8.4.5 - postcss-modules-local-by-default: 4.0.0_postcss@8.4.5 - postcss-modules-scope: 3.0.0_postcss@8.4.5 - postcss-modules-values: 4.0.0_postcss@8.4.5 + postcss: 8.4.12 + postcss-modules-extract-imports: 3.0.0_postcss@8.4.12 + postcss-modules-local-by-default: 4.0.0_postcss@8.4.12 + postcss-modules-scope: 3.0.0_postcss@8.4.12 + postcss-modules-values: 4.0.0_postcss@8.4.12 string-hash: 1.1.3 dev: true @@ -7030,6 +7640,16 @@ packages: dependencies: postcss-selector-parser: 6.0.8 + /postcss-nested/5.0.6_postcss@8.4.12: + resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.12 + postcss-selector-parser: 6.0.8 + dev: false + /postcss-selector-parser/6.0.8: resolution: {integrity: sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==} engines: {node: '>=4'} @@ -7037,6 +7657,14 @@ packages: cssesc: 3.0.0 util-deprecate: 1.0.2 + /postcss-selector-parser/6.0.9: + resolution: {integrity: sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: false + /postcss-value-parser/3.3.1: resolution: {integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==} dev: false @@ -7044,13 +7672,21 @@ packages: /postcss-value-parser/4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + /postcss/8.4.12: + resolution: {integrity: sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.1 + picocolors: 1.0.0 + source-map-js: 1.0.2 + /postcss/8.4.5: resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.1.30 picocolors: 1.0.0 - source-map-js: 1.0.1 + source-map-js: 1.0.2 /preact/10.6.4: resolution: {integrity: sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==} @@ -7066,17 +7702,16 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier/2.5.1: - resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} + /prettier/2.6.1: + resolution: {integrity: sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==} engines: {node: '>=10.13.0'} hasBin: true dev: true - /pretty-format/27.4.2: - resolution: {integrity: sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==} + /pretty-format/27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 17.0.2 @@ -7124,7 +7759,7 @@ packages: /proper-lockfile/4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} dependencies: - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 retry: 0.12.0 signal-exit: 3.0.6 dev: true @@ -7248,6 +7883,10 @@ packages: once: 1.4.0 dev: true + /punycode/1.3.2: + resolution: {integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=} + dev: false + /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} @@ -7269,8 +7908,8 @@ packages: tslib: 2.3.1 dev: true - /pvutils/1.0.17: - resolution: {integrity: sha512-wLHYUQxWaXVQvKnwIDWFVKDJku9XDCvyhhxoq8dc5MFdIlRenyPI9eSfEtcvgHgD7FlvCyGAlWgOzRnZD99GZQ==} + /pvutils/1.1.3: + resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} engines: {node: '>=6.0.0'} dev: true @@ -7284,6 +7923,12 @@ packages: engines: {node: '>=0.6'} dev: true + /querystring/0.2.0: + resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=} + engines: {node: '>=0.4.x'} + deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. + dev: false + /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -7454,7 +8099,7 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: - picomatch: 2.3.0 + picomatch: 2.3.1 /redent/3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} @@ -7541,7 +8186,7 @@ packages: /resolve/1.19.0: resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} dependencies: - is-core-module: 2.8.0 + is-core-module: 2.8.1 path-parse: 1.0.7 dev: true @@ -7551,6 +8196,14 @@ packages: is-core-module: 2.8.0 path-parse: 1.0.7 + /resolve/1.22.0: + resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} + hasBin: true + dependencies: + is-core-module: 2.8.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + /restore-cursor/3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -7586,8 +8239,8 @@ packages: dependencies: glob: 7.2.0 - /rollup-plugin-license/2.6.0_rollup@2.62.0: - resolution: {integrity: sha512-ilM+sb9xCvP+23tmzsCqJSm33877nIFeO6lMDGbckxc1jq2nW6WtU1nFD4cfOrKYl0cw1dkz4rC3VMAe8dA8cQ==} + /rollup-plugin-license/2.6.1_rollup@2.62.0: + resolution: {integrity: sha512-JPtlXF0tZKyHztKJsyd3HHmQFSkXei+596Xrb/a/bHIdDhvFuNSKimCKkQpoXyspfeVQk7CNay1MyGpFHAXjvg==} engines: {node: '>=10.0.0'} peerDependencies: rollup: ^1.0.0 || ^2.0.0 @@ -7598,7 +8251,7 @@ packages: magic-string: 0.25.7 mkdirp: 1.0.4 moment: 2.29.1 - package-name-regex: 2.0.4 + package-name-regex: 2.0.5 rollup: 2.62.0 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 @@ -7616,8 +8269,8 @@ packages: dependencies: queue-microtask: 1.2.3 - /rxjs/7.5.1: - resolution: {integrity: sha512-KExVEeZWxMZnZhUZtsJcFwz8IvPvgu4G2Z2QyqjZQzUGr32KDYuSxrEYO4w3tFFNbfLozcrKUTvTPi+E9ywJkQ==} + /rxjs/7.5.2: + resolution: {integrity: sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==} dependencies: tslib: 2.3.1 dev: true @@ -7643,9 +8296,9 @@ packages: engines: {node: '>=8.9.0'} hasBin: true dependencies: - chokidar: 3.5.2 + chokidar: 3.5.3 immutable: 4.0.0 - source-map-js: 1.0.1 + source-map-js: 1.0.2 dev: true /sax/1.2.4: @@ -7785,13 +8438,13 @@ packages: is-arrayish: 0.3.2 dev: false - /sirv/2.0.0: - resolution: {integrity: sha512-TT+4+zSM9LR8soWT5/4gOYHfB5a5XEOSV2LtmBRN5MUxi8kh7BSRGuoRYjeBaqhR4w+yx+k6t0OibDNgoLfF7w==} + /sirv/2.0.2: + resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} engines: {node: '>= 10'} dependencies: '@polka/url': 1.0.0-next.21 mrmime: 1.0.0 - totalist: 2.0.0 + totalist: 3.0.0 dev: true /sisteransi/1.0.5: @@ -7843,7 +8496,7 @@ packages: engines: {node: '>= 10'} dependencies: agent-base: 6.0.2 - debug: 4.3.3 + debug: 4.3.4 socks: 2.6.1 transitivePeerDependencies: - supports-color @@ -7857,12 +8510,13 @@ packages: smart-buffer: 4.2.0 dev: true - /source-map-js/1.0.1: - resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==} + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} /source-map-resolve/0.6.0: resolution: {integrity: sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==} + deprecated: See https://github.com/lydell/source-map-resolve#deprecated dependencies: atob: 2.1.2 decode-uri-component: 0.2.0 @@ -8137,6 +8791,10 @@ packages: supports-color: 7.2.0 dev: true + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + /svg-tags/1.0.0: resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=} dev: false @@ -8145,8 +8803,8 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: true - /systemjs/6.11.0: - resolution: {integrity: sha512-7YPIY44j+BoY+E6cGBSw0oCU8SNTTIHKZgftcBdwWkDzs/M86Fdlr21FrzAyph7Zo8r3CFGscyFe4rrBtixrBg==} + /systemjs/6.12.1: + resolution: {integrity: sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==} dev: false /tailwindcss/2.2.19_6d1fa3babc9cc84b994ff99ef39d1aff: @@ -8167,7 +8825,7 @@ packages: detective: 5.2.0 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.7 + fast-glob: 3.2.11 fs-extra: 10.0.0 glob-parent: 6.0.2 html-tags: 3.1.0 @@ -8211,7 +8869,7 @@ packages: detective: 5.2.0 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.7 + fast-glob: 3.2.11 fs-extra: 10.0.0 glob-parent: 6.0.2 html-tags: 3.1.0 @@ -8238,6 +8896,38 @@ packages: - ts-node dev: false + /tailwindcss/3.0.23_ts-node@10.4.0: + resolution: {integrity: sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA==} + engines: {node: '>=12.13.0'} + hasBin: true + peerDependencies: + autoprefixer: ^10.0.2 + dependencies: + arg: 5.0.1 + chalk: 4.1.2 + chokidar: 3.5.3 + color-name: 1.1.4 + cosmiconfig: 7.0.1 + detective: 5.2.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.2.11 + glob-parent: 6.0.2 + is-glob: 4.0.3 + normalize-path: 3.0.0 + object-hash: 2.2.0 + postcss: 8.4.12 + postcss-js: 4.0.0_postcss@8.4.12 + postcss-load-config: 3.1.3_postcss@8.4.12+ts-node@10.4.0 + postcss-nested: 5.0.6_postcss@8.4.12 + postcss-selector-parser: 6.0.9 + postcss-value-parser: 4.2.0 + quick-lru: 5.1.1 + resolve: 1.22.0 + transitivePeerDependencies: + - ts-node + dev: false + /tar/6.1.11: resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==} engines: {node: '>= 10'} @@ -8271,15 +8961,10 @@ packages: supports-hyperlinks: 2.2.0 dev: true - /terser/5.10.0_acorn@8.7.0: - resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==} + /terser/5.12.1: + resolution: {integrity: sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==} engines: {node: '>=10'} hasBin: true - peerDependencies: - acorn: ^8.5.0 - peerDependenciesMeta: - acorn: - optional: true dependencies: acorn: 8.7.0 commander: 2.20.3 @@ -8372,8 +9057,8 @@ packages: resolution: {integrity: sha1-zCAOqyYT9BZtJ/+a/HylbUnfbrQ=} dev: true - /totalist/2.0.0: - resolution: {integrity: sha512-+Y17F0YzxfACxTyjfhnJQEe7afPA0GSpYlFkl2VFMxYP7jshQf9gXV7cH47EfToBumFThfKBvfAcoUn6fdNeRQ==} + /totalist/3.0.0: + resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} engines: {node: '>=6'} dev: true @@ -8407,15 +9092,15 @@ packages: utf8-byte-length: 1.0.4 dev: true - /ts-jest/27.1.2_1b5a1be2010a86e622f02a11eaeb730f: - resolution: {integrity: sha512-eSOiJOWq6Hhs6Khzk5wKC5sgWIXgXqOCiIl1+3lfnearu58Hj4QpE5tUhQcA3xtZrELbcvAGCsd6HB8OsaVaTA==} + /ts-jest/27.1.4_4dfe14e0e8266437469ae0475a5c09ac: + resolution: {integrity: sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true peerDependencies: '@babel/core': '>=7.0.0-beta.0 <8' '@types/jest': ^27.0.0 babel-jest: '>=27.0.0 <28' - esbuild: ~0.14.0 + esbuild: '*' jest: ^27.0.0 typescript: '>=3.8 <5.0' peerDependenciesMeta: @@ -8428,13 +9113,13 @@ packages: esbuild: optional: true dependencies: - '@types/jest': 27.0.3 + '@types/jest': 27.4.1 bs-logger: 0.2.6 - esbuild: 0.14.3 + esbuild: 0.14.27 fast-json-stable-stringify: 2.1.0 - jest: 27.4.5_ts-node@10.4.0 - jest-util: 27.4.2 - json5: 2.2.0 + jest: 27.5.1_ts-node@10.4.0 + jest-util: 27.5.1 + json5: 2.2.1 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.5 @@ -8442,7 +9127,7 @@ packages: yargs-parser: 20.2.9 dev: true - /ts-node/10.4.0_00264fd83560919cd06c986889baae0a: + /ts-node/10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -8461,7 +9146,7 @@ packages: '@tsconfig/node12': 1.0.9 '@tsconfig/node14': 1.0.1 '@tsconfig/node16': 1.0.2 - '@types/node': 16.11.17 + '@types/node': 16.11.26 acorn: 8.7.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -8472,9 +9157,9 @@ packages: yn: 3.1.1 dev: true - /tsconfck/1.1.1_typescript@4.5.4: - resolution: {integrity: sha512-uEsCWef+3lA9/YqpGt/mdr+nDovhlr+f0zoycYiOyVDDOUb3BjYFA71+Ee3LB/GiZBRDyTfKBK1kGN2iuPPuEA==} - engines: {node: ^12.20 || ^14.13.1 || >= 16, pnpm: '>=6.7.0'} + /tsconfck/1.2.1_typescript@4.5.4: + resolution: {integrity: sha512-x28dvgpazY0+Gdpheb+D47NiaepLoueunDXlNQ6gVruu9HJbUj3M07ORgjmOQBUpPbXUAQXyfACc8Mi/jlLDVw==} + engines: {node: ^12.20 || ^14.13.1 || >= 16} hasBin: true peerDependencies: typescript: ^4.3.5 @@ -8593,8 +9278,8 @@ packages: resolution: {integrity: sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==} dev: true - /uglify-js/3.14.5: - resolution: {integrity: sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==} + /uglify-js/3.15.0: + resolution: {integrity: sha512-x+xdeDWq7FiORDvyIJ0q/waWd4PhjBNOm5dQUOq2AKC0IEjxOS66Ha9tctiVDGcRQuh69K7fgU5oRuTK4cysSg==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true @@ -8630,6 +9315,13 @@ packages: punycode: 2.1.1 dev: true + /url/0.11.0: + resolution: {integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=} + dependencies: + punycode: 1.3.2 + querystring: 0.2.0 + dev: false + /utf8-byte-length/1.0.4: resolution: {integrity: sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=} dev: true @@ -8682,9 +9374,9 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/0.20.10: - resolution: {integrity: sha512-dKgH6k1yxdEjIIxoXGI0vMg3lpBLvMarre/vvt4beuxd+rXOUB1a7DAtXDmgIXOMGQ7IcF+4zyd2132IedhjtQ==} - engines: {node: '>=12.0.0'} + /vitepress/0.22.3: + resolution: {integrity: sha512-Yfvu/rent2vp/TXIDZMutS6ft2TJPn4xngS48PYFWDEbuFI2ccUAXM481lF1qVVnCKxfh4g8e/KPvevSJdg1Bw==} + engines: {node: '>=14.0.0'} hasBin: true dependencies: '@docsearch/css': 3.0.0-alpha.42 @@ -8692,7 +9384,7 @@ packages: '@vitejs/plugin-vue': link:packages/plugin-vue prismjs: 1.25.0 vite: link:packages/vite - vue: 3.2.26 + vue: 3.2.31 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -8723,6 +9415,15 @@ packages: '@vue/server-renderer': 3.2.26_vue@3.2.26 '@vue/shared': 3.2.26 + /vue/3.2.31: + resolution: {integrity: sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==} + dependencies: + '@vue/compiler-dom': 3.2.31 + '@vue/compiler-sfc': 3.2.31 + '@vue/runtime-dom': 3.2.31 + '@vue/server-renderer': 3.2.31_vue@3.2.31 + '@vue/shared': 3.2.31 + /vuex/4.0.2_vue@3.2.26: resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==} peerDependencies: @@ -8897,8 +9598,21 @@ packages: optional: true dev: true - /ws/8.4.0: - resolution: {integrity: sha512-IHVsKe2pjajSUIl4KYMQOdlyliovpEPquKkqbwswulszzI7r0SfQrxnXdWAEqOlDCLrVSJzo+O1hAwdog2sKSQ==} + /ws/8.4.2: + resolution: {integrity: sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + + /ws/8.5.0: + resolution: {integrity: sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 diff --git a/scripts/jestEnv.cjs b/scripts/jestEnv.cjs index e3b0cee4789dfe..255b83063efc5a 100644 --- a/scripts/jestEnv.cjs +++ b/scripts/jestEnv.cjs @@ -29,11 +29,11 @@ module.exports = class PlaywrightEnvironment extends NodeEnvironment { })) this.global.page = await browser.newPage() - // suppress @vue/compiler-sfc warning + // suppress @vue/ref-transform warning const console = this.global.console const warn = console.warn console.warn = (msg, ...args) => { - if (!msg.includes('@vue/compiler-sfc')) { + if (!msg.includes('@vue/ref-transform')) { warn.call(console, msg, ...args) } } diff --git a/scripts/jestGlobalSetup.cjs b/scripts/jestGlobalSetup.cjs index 9640f70c5a8291..7341cba40968d9 100644 --- a/scripts/jestGlobalSetup.cjs +++ b/scripts/jestGlobalSetup.cjs @@ -21,11 +21,21 @@ module.exports = async () => { const tempDir = path.resolve(__dirname, '../packages/temp') await fs.remove(tempDir) - await fs.copy(path.resolve(__dirname, '../packages/playground'), tempDir, { - dereference: false, - filter(file) { - file = file.replace(/\\/g, '/') - return !file.includes('__tests__') && !file.match(/dist(\/|$)/) - } - }) + await fs + .copy(path.resolve(__dirname, '../packages/playground'), tempDir, { + dereference: false, + filter(file) { + file = file.replace(/\\/g, '/') + return !file.includes('__tests__') && !file.match(/dist(\/|$)/) + } + }) + .catch(async (error) => { + if (error.code === 'EPERM' && error.syscall === 'symlink') { + throw new Error( + 'Could not create symlinks. On Windows, consider activating Developer Mode to allow non-admin users to create symlinks by following the instructions at https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development.' + ) + } else { + throw error + } + }) } diff --git a/scripts/jestGlobalTeardown.cjs b/scripts/jestGlobalTeardown.cjs index 583aa1d1caf4ce..fc3370d626683a 100644 --- a/scripts/jestGlobalTeardown.cjs +++ b/scripts/jestGlobalTeardown.cjs @@ -4,6 +4,6 @@ const path = require('path') module.exports = async () => { await global.__BROWSER_SERVER__.close() if (!process.env.VITE_PRESERVE_BUILD_ARTIFACTS) { - await fs.remove(path.resolve(__dirname, '../packages/temp')) + fs.removeSync(path.resolve(__dirname, '../packages/temp')) } } diff --git a/scripts/jestPerTestSetup.ts b/scripts/jestPerTestSetup.ts index 89209c3ffcbf69..150c02eed5b76c 100644 --- a/scripts/jestPerTestSetup.ts +++ b/scripts/jestPerTestSetup.ts @@ -4,14 +4,13 @@ import { resolve, dirname } from 'path' import sirv from 'sirv' import type { ViteDevServer, - UserConfig, + InlineConfig, PluginOption, ResolvedConfig, Logger } from 'vite' -import { createServer, build } from 'vite' -import type { Page } from 'playwright-chromium' -// eslint-disable-next-line node/no-extraneous-import +import { createServer, build, mergeConfig } from 'vite' +import type { Page, ConsoleMessage } from 'playwright-chromium' import type { RollupError, RollupWatcher, RollupWatcherEvent } from 'rollup' const isBuildTest = !!process.env.VITE_TEST_BUILD @@ -45,13 +44,15 @@ let server: ViteDevServer | http.Server let tempDir: string let rootDir: string -const setBeforeAllError = (err) => ((global as any).beforeAllError = err) -const getBeforeAllError = () => (global as any).beforeAllError +const setBeforeAllError = (err: Error | null) => { + global.beforeAllError = err +} +const getBeforeAllError = () => global.beforeAllError //init with null so old errors don't carry over setBeforeAllError(null) -const logs = ((global as any).browserLogs = []) -const onConsole = (msg) => { +const logs: string[] = (global.browserLogs = []) +const onConsole = (msg: ConsoleMessage) => { logs.push(msg.text()) } @@ -89,9 +90,16 @@ beforeAll(async () => { } } + const testCustomConfig = resolve(dirname(testPath), 'vite.config.js') + let config: InlineConfig | undefined + if (fs.existsSync(testCustomConfig)) { + // test has custom server configuration. + config = require(testCustomConfig) + } + const serverLogs: string[] = [] - const options: UserConfig = { + const options: InlineConfig = { root: rootDir, logLevel: 'silent', server: { @@ -113,11 +121,15 @@ beforeAll(async () => { customLogger: createInMemoryLogger(serverLogs) } + setupConsoleWarnCollector(serverLogs) + global.serverLogs = serverLogs if (!isBuildTest) { process.env.VITE_INLINE = 'inline-serve' - server = await (await createServer(options)).listen() + server = await ( + await createServer(mergeConfig(options, config || {})) + ).listen() // use resolved port/base from server const base = server.config.base === '/' ? '' : server.config.base const url = @@ -134,18 +146,18 @@ beforeAll(async () => { } }) options.plugins = [resolvedPlugin()] - const rollupOutput = await build(options) + const rollupOutput = await build(mergeConfig(options, config || {})) const isWatch = !!resolvedConfig!.build.watch // in build watch,call startStaticServer after the build is complete if (isWatch) { global.watcher = rollupOutput as RollupWatcher await notifyRebuildComplete(global.watcher) } - const url = (global.viteTestUrl = await startStaticServer()) + const url = (global.viteTestUrl = await startStaticServer(config)) await page.goto(url) } } - } catch (e) { + } catch (e: any) { // jest doesn't exit if our setup has error here // https://github.com/facebook/jest/issues/2713 setBeforeAllError(e) @@ -169,14 +181,17 @@ afterAll(async () => { } }) -function startStaticServer(): Promise { - // check if the test project has base config - const configFile = resolve(rootDir, 'vite.config.js') - let config: UserConfig - try { - config = require(configFile) - } catch (e) {} - const base = (config?.base || '/') === '/' ? '' : config.base +function startStaticServer(config?: InlineConfig): Promise { + if (!config) { + // check if the test project has base config + const configFile = resolve(rootDir, 'vite.config.js') + try { + config = require(configFile) + } catch (e) {} + } + + // fallback internal base to '' + const base = (config?.base ?? '/') === '/' ? '' : config?.base ?? '' // @ts-ignore if (config && config.__test__) { @@ -219,10 +234,10 @@ export async function notifyRebuildComplete( watcher: RollupWatcher ): Promise { let callback: (event: RollupWatcherEvent) => void - await new Promise((resolve, reject) => { + await new Promise((resolve, reject) => { callback = (event) => { if (event.code === 'END') { - resolve(true) + resolve() } } watcher.on('event', callback) @@ -261,3 +276,11 @@ function createInMemoryLogger(logs: string[]): Logger { return logger } + +function setupConsoleWarnCollector(logs: string[]) { + const warn = console.warn + console.warn = (...args) => { + serverLogs.push(args.join(' ')) + return warn.call(console, ...args) + } +} diff --git a/scripts/patchEsbuildDist.ts b/scripts/patchEsbuildDist.ts new file mode 100644 index 00000000000000..70ef846af1bcbb --- /dev/null +++ b/scripts/patchEsbuildDist.ts @@ -0,0 +1,31 @@ +// esbuild 0.14.4 https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#0144 introduced a +// change that breaks the "overwrite for cjs require('...')() usage" hack used in plugin-vue +// and plugin-react. For the moment, we can remove the extra exports code added in 0.14.4 to +// continue using it. + +import { bold, red } from 'picocolors' +import { readFileSync, writeFileSync } from 'fs' + +const indexPath = process.argv[2] +const varName = process.argv[3] + +let code = readFileSync(indexPath, 'utf-8') + +const moduleExportsLine = `module.exports = __toCommonJS(src_exports);` + +if (code.includes(moduleExportsLine)) { + // overwrite for cjs require('...')() usage + code = code.replace( + moduleExportsLine, + `module.exports = ${varName}; +${varName}['default'] = ${varName};` + ) + + writeFileSync(indexPath, code) + + console.log( + bold(`${indexPath} patched with overwrite for cjs require('...')()`) + ) +} else { + console.error(red(`${indexPath} post-esbuild bundling patch failed`)) +} diff --git a/scripts/publishCI.ts b/scripts/publishCI.ts new file mode 100644 index 00000000000000..7df0893a15b788 --- /dev/null +++ b/scripts/publishCI.ts @@ -0,0 +1,31 @@ +import { args, getPackageInfo, publishPackage, step } from './releaseUtils' + +async function main() { + const tag = args._[0] + + if (!tag) { + throw new Error('No tag specified') + } + + let pkgName = 'vite' + let version + + if (tag.includes('@')) [pkgName, version] = tag.split('@') + else version = tag + + if (version.startsWith('v')) version = version.slice(1) + + const { currentVersion, pkgDir } = getPackageInfo(pkgName) + if (currentVersion !== version) + throw new Error( + `Package version from tag "${version}" mismatches with current version "${currentVersion}"` + ) + + step('Publishing package...') + await publishPackage(pkgDir, version.includes('beta') ? 'beta' : undefined) +} + +main().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/scripts/release.ts b/scripts/release.ts index 3d456aacbc8638..5c32c13b5cf5c8 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -1,69 +1,42 @@ -/** - * modified from https://github.com/vuejs/vue-next/blob/master/scripts/release.js - */ -import colors from 'picocolors' -import type { ExecaChildProcess, Options as ExecaOptions } from 'execa' -import execa from 'execa' -import { readFileSync, writeFileSync } from 'fs' -import path from 'path' import prompts from 'prompts' -import type { ReleaseType } from 'semver' import semver from 'semver' +import colors from 'picocolors' +import { + args, + getPackageInfo, + getVersionChoices, + isDryRun, + logRecentCommits, + packages, + run, + runIfNotDry, + step, + updateTemplateVersions, + updateVersion +} from './releaseUtils' -const args = require('minimist')(process.argv.slice(2)) - -const pkgDir = process.cwd() -const pkgPath = path.resolve(pkgDir, 'package.json') -const pkg: { name: string; version: string } = require(pkgPath) -const pkgName = pkg.name.replace(/^@vitejs\//, '') -const currentVersion = pkg.version -const isDryRun: boolean = args.dry -const skipBuild: boolean = args.skipBuild - -const versionIncrements: ReleaseType[] = [ - 'patch', - 'minor', - 'major', - 'prepatch', - 'preminor', - 'premajor', - 'prerelease' -] - -const inc: (i: ReleaseType) => string = (i) => - semver.inc(currentVersion, i, 'beta')! - -type RunFn = ( - bin: string, - args: string[], - opts?: ExecaOptions -) => ExecaChildProcess - -const run: RunFn = (bin, args, opts = {}) => - execa(bin, args, { stdio: 'inherit', ...opts }) - -type DryRunFn = (bin: string, args: string[], opts?: any) => void +async function main(): Promise { + let targetVersion: string | undefined -const dryRun: DryRunFn = (bin, args, opts: any) => - console.log(colors.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts) + const { pkg }: { pkg: string } = await prompts({ + type: 'select', + name: 'pkg', + message: 'Select package', + choices: packages.map((i) => ({ value: i, title: i })) + }) -const runIfNotDry = isDryRun ? dryRun : run + if (!pkg) return -const step: (msg: string) => void = (msg) => console.log(colors.cyan(msg)) + await logRecentCommits(pkg) -async function main(): Promise { - let targetVersion: string | undefined = args._[0] + const { currentVersion, pkgName, pkgPath, pkgDir } = getPackageInfo(pkg) if (!targetVersion) { - // no explicit version, offer suggestions const { release }: { release: string } = await prompts({ type: 'select', name: 'release', message: 'Select release type', - choices: versionIncrements - .map((i) => `${i} (${inc(i)})`) - .concat(['custom']) - .map((i) => ({ value: i, title: i })) + choices: getVersionChoices(currentVersion) }) if (release === 'custom') { @@ -75,7 +48,7 @@ async function main(): Promise { }) targetVersion = res.version } else { - targetVersion = release.match(/\((.*)\)/)![1] + targetVersion = release } } @@ -87,19 +60,13 @@ async function main(): Promise { pkgName === 'vite' ? `v${targetVersion}` : `${pkgName}@${targetVersion}` if (targetVersion.includes('beta') && !args.tag) { - const { tagBeta }: { tagBeta: boolean } = await prompts({ - type: 'confirm', - name: 'tagBeta', - message: `Publish under dist-tag "beta"?` - }) - - if (tagBeta) args.tag = 'beta' + args.tag = 'beta' } const { yes }: { yes: boolean } = await prompts({ type: 'confirm', name: 'yes', - message: `Releasing ${tag}. Confirm?` + message: `Releasing ${colors.yellow(tag)} Confirm?` }) if (!yes) { @@ -107,17 +74,22 @@ async function main(): Promise { } step('\nUpdating package version...') - updateVersion(targetVersion) - - step('\nBuilding package...') - if (!skipBuild && !isDryRun) { - await run('pnpm', ['run', 'build']) - } else { - console.log(`(skipped)`) - } + updateVersion(pkgPath, targetVersion) + if (pkgName === 'create-vite') updateTemplateVersions() step('\nGenerating changelog...') - await run('pnpm', ['run', 'changelog']) + const changelogArgs = [ + 'conventional-changelog', + '-p', + 'angular', + '-i', + 'CHANGELOG.md', + '-s', + '--commit-path', + '.' + ] + if (pkgName !== 'vite') changelogArgs.push('--lerna-package', pkgName) + await run('npx', changelogArgs, { cwd: pkgDir }) const { stdout } = await run('git', ['diff'], { stdio: 'pipe' }) if (stdout) { @@ -127,59 +99,27 @@ async function main(): Promise { await runIfNotDry('git', ['tag', tag]) } else { console.log('No changes to commit.') + return } - step('\nPublishing package...') - await publishPackage(targetVersion, runIfNotDry) - step('\nPushing to GitHub...') await runIfNotDry('git', ['push', 'origin', `refs/tags/${tag}`]) await runIfNotDry('git', ['push']) if (isDryRun) { console.log(`\nDry run finished - run git diff to see package changes.`) + } else { + console.log( + colors.green( + '\nPushed, publishing should starts shortly on CI.\nhttps://github.com/vitejs/vite/actions/workflows/publish.yml' + ) + ) } console.log() } -function updateVersion(version: string): void { - const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8')) - pkg.version = version - writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n') -} - -async function publishPackage( - version: string, - runIfNotDry: RunFn | DryRunFn -): Promise { - const publicArgs = [ - 'publish', - '--no-git-tag-version', - '--new-version', - version, - '--access', - 'public' - ] - if (args.tag) { - publicArgs.push(`--tag`, args.tag) - } - try { - // important: we still use Yarn 1 to publish since we rely on its specific - // behavior - await runIfNotDry('yarn', publicArgs, { - stdio: 'pipe' - }) - console.log(colors.green(`Successfully published ${pkgName}@${version}`)) - } catch (e: any) { - if (e.stderr.match(/previously published/)) { - console.log(colors.red(`Skipping already published: ${pkgName}`)) - } else { - throw e - } - } -} - main().catch((err) => { console.error(err) + process.exit(1) }) diff --git a/scripts/releaseUtils.ts b/scripts/releaseUtils.ts new file mode 100644 index 00000000000000..b444835db7b6d0 --- /dev/null +++ b/scripts/releaseUtils.ts @@ -0,0 +1,216 @@ +/** + * modified from https://github.com/vuejs/core/blob/master/scripts/release.js + */ +import colors from 'picocolors' +import type { Options as ExecaOptions } from 'execa' +import execa from 'execa' +import { readFileSync, writeFileSync, existsSync, readdirSync } from 'fs' +import path from 'path' +import type { ReleaseType } from 'semver' +import semver from 'semver' + +export const args = require('minimist')(process.argv.slice(2)) + +export const isDryRun = !!args.dry + +if (isDryRun) { + console.log(colors.inverse(colors.yellow(' DRY RUN '))) + console.log() +} + +export const packages = [ + 'vite', + 'create-vite', + 'plugin-legacy', + 'plugin-react', + 'plugin-vue', + 'plugin-vue-jsx' +] + +export const versionIncrements: ReleaseType[] = [ + 'patch', + 'minor', + 'major' + // 'prepatch', + // 'preminor', + // 'premajor', + // 'prerelease' +] + +export function getPackageInfo(pkgName: string) { + const pkgDir = path.resolve(__dirname, '../packages/' + pkgName) + + if (!existsSync(pkgDir)) { + throw new Error(`Package ${pkgName} not found`) + } + + const pkgPath = path.resolve(pkgDir, 'package.json') + const pkg: { + name: string + version: string + private?: boolean + } = require(pkgPath) + const currentVersion = pkg.version + + if (pkg.private) { + throw new Error(`Package ${pkgName} is private`) + } + + return { + pkg, + pkgName, + pkgDir, + pkgPath, + currentVersion + } +} + +export async function run( + bin: string, + args: string[], + opts: ExecaOptions = {} +) { + return execa(bin, args, { stdio: 'inherit', ...opts }) +} + +export async function dryRun( + bin: string, + args: string[], + opts?: ExecaOptions +) { + return console.log( + colors.blue(`[dryrun] ${bin} ${args.join(' ')}`), + opts || '' + ) +} + +export const runIfNotDry = isDryRun ? dryRun : run + +export function step(msg: string) { + return console.log(colors.cyan(msg)) +} + +export function getVersionChoices(currentVersion: string) { + const currentBeta = currentVersion.includes('beta') + + const inc: (i: ReleaseType) => string = (i) => + semver.inc(currentVersion, i, 'beta')! + + const versionChoices = [ + { + title: 'next', + value: inc(currentBeta ? 'prerelease' : 'patch') + }, + ...(currentBeta + ? [ + { + title: 'stable', + value: inc('patch') + } + ] + : [ + { + title: 'beta-minor', + value: inc('preminor') + }, + { + title: 'beta-major', + value: inc('premajor') + }, + { + title: 'minor', + value: inc('minor') + }, + { + title: 'major', + value: inc('major') + } + ]), + { value: 'custom', title: 'custom' } + ].map((i) => { + i.title = `${i.title} (${i.value})` + return i + }) + + return versionChoices +} + +export function updateVersion(pkgPath: string, version: string): void { + const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8')) + pkg.version = version + writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n') +} + +export async function publishPackage( + pkdDir: string, + tag?: string +): Promise { + const publicArgs = ['publish', '--access', 'public'] + if (tag) { + publicArgs.push(`--tag`, tag) + } + await runIfNotDry('npm', publicArgs, { + stdio: 'pipe', + cwd: pkdDir + }) +} + +export async function getLatestTag(pkgName: string) { + const tags = (await run('git', ['tag'], { stdio: 'pipe' })).stdout + .split(/\n/) + .filter(Boolean) + const prefix = pkgName === 'vite' ? 'v' : `${pkgName}@` + return tags + .filter((tag) => tag.startsWith(prefix)) + .sort() + .reverse()[0] +} + +export async function logRecentCommits(pkgName: string) { + const tag = await getLatestTag(pkgName) + if (!tag) return + const sha = await run('git', ['rev-list', '-n', '1', tag], { + stdio: 'pipe' + }).then((res) => res.stdout.trim()) + console.log( + colors.bold( + `\n${colors.blue(`i`)} Commits of ${colors.green( + pkgName + )} since ${colors.green(tag)} ${colors.gray(`(${sha.slice(0, 5)})`)}` + ) + ) + await run( + 'git', + [ + '--no-pager', + 'log', + `${sha}..HEAD`, + '--oneline', + '--', + `packages/${pkgName}` + ], + { stdio: 'inherit' } + ) + console.log() +} + +export async function updateTemplateVersions() { + const viteVersion = require('../packages/vite/package.json').version + if (/beta|alpha|rc/.test(viteVersion)) return + + const dir = path.resolve(__dirname, '../packages/create-vite') + + const templates = readdirSync(dir).filter((dir) => + dir.startsWith('template-') + ) + for (const template of templates) { + const pkgPath = path.join(dir, template, `package.json`) + const pkg = require(pkgPath) + pkg.devDependencies.vite = `^` + viteVersion + if (template.startsWith('template-vue')) { + pkg.devDependencies['@vitejs/plugin-vue'] = + `^` + require('../packages/plugin-vue/package.json').version + } + writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n') + } +} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 00000000000000..5c70fcc7f15823 --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "target": "es2019", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "types": ["node", "jest"] + } +}