diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 578e00417db95b..48a0bd7773b0d7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -89,7 +89,11 @@ module.exports = defineConfig({ '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/no-non-null-assertion': 'off', // maybe we should turn this on in a new PR '@typescript-eslint/no-unused-vars': 'off', // maybe we should turn this on in a new PR - '@typescript-eslint/no-var-requires': 'off' + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/consistent-type-imports': [ + 'error', + { prefer: 'type-imports' } + ] }, overrides: [ { diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1958ffdf1bea07..301b795e15fb5e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -14,11 +14,11 @@ body: placeholder: Bug description validations: required: true - - type: textarea + - type: input id: reproduction attributes: label: Reproduction - description: Please provide a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed. + description: Please provide a link via [vite.new](https://vite.new/) or a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed. placeholder: Reproduction validations: required: true @@ -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 0e946cf9b4fda1..dfccbea368c449 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,13 @@ on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + jobs: build: + timeout-minutes: 20 runs-on: ${{ matrix.os }} strategy: matrix: @@ -31,7 +36,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 @@ -39,7 +44,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" @@ -63,10 +68,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 @@ -76,7 +82,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/.gitignore b/.gitignore index 200acefca621e6..44abdd7bf563db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store node_modules +!**/glob-import/dir/node_modules dist dist-ssr TODOs.md @@ -11,4 +12,3 @@ explorations /packages/vite/LICENSE *.cpuprofile /.vscode/ -/packages/playground/ssr-deps/node-addon/build/ 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 76d0e7f08c2be1..c624a3a21eecfe 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,3 +9,5 @@ LICENSE.md 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 54ac9f4d4ddc81..a87561a8e4146c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,31 +10,67 @@ 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. Run `pnpm link --global` in `packages/vite`. This links `vite` globally so that you can: +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. - - Run `pnpm link --global vite` in another Vite project to use the locally built Vite; - - Use the `vite` binary anywhere. +You can alternatively use [Vite.js Docker Dev](https://github.com/nystudio107/vitejs-docker-dev) for a containerized Docker setup for Vite.js development. - If your project has `vite` as a nested dependency, you can customize the dependency resolution instead depending on the package manager used. For pnpm, add this in your project's root `package.json`: +## Debugging - ```json - { - "pnpm": { - "overrides": { - "vite": "link:../path/to/vite/packages/vite" - } - } - } - ``` +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. - And re-run `pnpm install` to link the package. +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`: + +```json +{ + "dependencies": { + "vite": "^2.0.0" + }, + "pnpm": { + "overrides": { + "vite": "link:../path/to/vite/packages/vite" + } + } +} +``` + +And re-run `pnpm install` to link the package. ## Running Tests 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. @@ -100,7 +136,7 @@ To work around this, playground packages that uses the `file:` protocol should a ```jsonc "scripts": { //... - "postinstall": "node ../../../scripts/patchFileDeps.cjs" + "postinstall": "ts-node ../../../scripts/patchFileDeps.ts" } ``` @@ -181,3 +217,28 @@ We already have many config options, and we should avoid fixing an issue by addi - Whether the problem can be fixed with a smarter default - Whether the problem has workaround using existing options - Whether the problem can be addressed with a plugin instead + +## Docs translation contribution + +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 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. + (that said, `package.json` is need). + + - Refresh git history by removing `.git` and then `git init` + +3. Translate the docs. + + - 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. + +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/config/index.md b/docs/config/index.md index b1c2345c96652f..6beef1753a8384 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -1,3 +1,7 @@ +--- +title: Configuring Vite +--- + # Configuring Vite ## Config File @@ -23,6 +27,17 @@ You can also explicitly specify a config file to use with the `--config` CLI opt vite --config my-config.js ``` +::: 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" +// will be transformed to +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: @@ -84,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 @@ -127,13 +158,27 @@ 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`). ::: + ::: warning Because it's implemented as straightforward [RegExp-based](https://github.com/vitejs/vite/blob/2e16e5d4346c010034d417d27d029588b82dd261/packages/vite/src/node/plugins/define.ts#L62-L76) 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. + + Example: + + ```ts + // vite-env.d.ts + declare const __APP_VERSION__: string + ``` + + ::: ### plugins -- **Type:** ` (Plugin | Plugin[])[]` +- **Type:** `(Plugin | Plugin[])[]` Array of plugins to use. Falsy plugins are ignored and arrays of plugins are flattened. See [Plugin API](/guide/api-plugin) for more details on Vite plugins. @@ -153,14 +198,14 @@ export default defineConfig(async ({ command, mode }) => { - **Type:** `string` - **Default:** `"node_modules/.vite"` - Directory to save cache files. Files in this directory are pre-bundled deps or some other cache files generated by vite, which can improve the performance. You can use `--force` flag or manually delete the directory to regenerate the cache files. The value can be either an absolute file system path or a path relative to project root. + Directory to save cache files. Files in this directory are pre-bundled deps or some other cache files generated by vite, which can improve the performance. You can use `--force` flag or manually delete the directory to regenerate the cache files. The value can be either an absolute file system path or a path relative to project root. Default to `.vite` when no package.json is detected. ### resolve.alias - **Type:** - `Record | Array<{ find: string | RegExp, replacement: string }>` + `Record | Array<{ find: string | RegExp, replacement: string, customResolver?: ResolverFunction | ResolverObject }>` - Will be passed to `@rollup/plugin-alias` as its [entries option](https://github.com/rollup/plugins/tree/master/packages/alias#entries). Can either be an object, or an array of `{ find, replacement }` pairs. + Will be passed to `@rollup/plugin-alias` as its [entries option](https://github.com/rollup/plugins/tree/master/packages/alias#entries). Can either be an object, or an array of `{ find, replacement, customResolver }` pairs. When aliasing to file system paths, always use absolute paths. Relative alias values will be used as-is and will not be resolved into file system paths. @@ -199,6 +244,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[]` @@ -253,7 +302,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. @@ -261,7 +310,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({ @@ -269,6 +318,9 @@ export default defineConfig(async ({ command, mode }) => { preprocessorOptions: { scss: { additionalData: `$injectedColor: orange;` + }, + styl: { + additionalData: `$injectedColor ?= orange` } } } @@ -306,7 +358,7 @@ 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: @@ -325,7 +377,7 @@ export default defineConfig(async ({ command, mode }) => { - **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. @@ -458,6 +510,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 } } } @@ -470,6 +527,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` @@ -479,15 +542,17 @@ export default defineConfig(async ({ command, mode }) => { ### server.hmr -- **Type:** `boolean | { protocol?: string, host?: string, port?: number, path?: string, timeout?: number, overlay?: boolean, clientPort?: number, server?: Server }` +- **Type:** `boolean | { protocol?: string, host?: string, port?: number | false, path?: string, timeout?: number, overlay?: boolean, clientPort?: number, server?: Server }` Disable or configure HMR connection (in cases where the HMR websocket must use a different address from the http server). Set `server.hmr.overlay` to `false` to disable the server error overlay. + Set `server.hmr.port` to `false` when connecting to a domain without a port. + `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 @@ -551,6 +616,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` @@ -568,6 +639,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: @@ -742,19 +814,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 @@ -771,6 +843,8 @@ export default defineConfig({ 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. + ### build.terserOptions - **Type:** `TerserOptions` @@ -827,7 +901,7 @@ export default defineConfig({ ### preview.port - **Type:** `number` -- **Default:** `5000` +- **Default:** `4173` Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. @@ -891,7 +965,7 @@ 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 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. 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. @@ -958,3 +1032,24 @@ SSR options may be adjusted in minor releases. - **Default:** `node` Build target for the SSR server. + +## Worker Options + +### worker.format + +- **Type:** `'es' | 'iife'` +- **Default:** `iife` + + Output format for worker bundle. + +### worker.plugins + +- **Type:** [`(Plugin | Plugin[])[]`](#plugins) + + Vite plugins that apply to worker bundle + +### worker.rollupOptions + +- **Type:** [`RollupOptions`](https://rollupjs.org/guide/en/#big-list-of-options) + + Rollup options to build worker bundle. 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..ddaa04279737f5 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -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 058130cec38414..13767c45dd3103 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 +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. -```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 - } - } - } - } -} -``` +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 @@ -445,12 +453,12 @@ apply(config, { command }) { A fair number of Rollup plugins will work directly as a Vite plugin (e.g. `@rollup/plugin-alias` or `@rollup/plugin-json`), but not all of them, since some plugin hooks do not make sense in an unbundled dev server context. -In general, as long as a Rollup plugin fits the following criterias then it should just work as a Vite plugin: +In general, as long as a Rollup plugin fits the following criteria then it should just work as a Vite plugin: - 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,71 @@ 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 boardcast 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!' }) + }) + } + } + ] +}) +``` 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 e764325e1948cf..d3a6a575bce64c 100644 --- a/docs/guide/env-and-mode.md +++ b/docs/guide/env-and-mode.md @@ -33,6 +33,15 @@ Vite uses [dotenv](https://github.com/motdotla/dotenv) to load additional enviro .env.[mode].local # only loaded in specified mode, ignored by git ``` +:::tip Env Loading Priorities + +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. + +`.env` files are loaded at the start of Vite. Restart the server after making changes. +::: + Loaded env variables are also exposed to your client source code via `import.meta.env`. To prevent accidentally leaking env variables to the client, only variables prefixed with `VITE_` are exposed to your Vite-processed code. e.g. the following file: @@ -74,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: @@ -101,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 bd082c3f82254d..ebed85cd2d529d 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -34,6 +34,13 @@ Vite only performs transpilation on `.ts` files and does **NOT** perform type ch Vite uses [esbuild](https://github.com/evanw/esbuild) to transpile TypeScript into JavaScript which is about 20~30x faster than vanilla `tsc`, and HMR updates can reflect in the browser in under 50ms. +Use the [Type-Only Imports and Export](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax to avoid potential problems like type-only imports being incorrectly bundled. for example: + +```ts +import type { T } from 'only/types' +export type { T } +``` + ### TypeScript Compiler Options Some configuration fields under `compilerOptions` in `tsconfig.json` require special attention. @@ -63,6 +70,7 @@ But a few libraries haven't transitioned to this new default yet, including [`li - [`extends`](https://www.typescriptlang.org/tsconfig#extends) - [`importsNotUsedAsValues`](https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues) +- [`preserveValueImports`](https://www.typescriptlang.org/tsconfig#preserveValueImports) - [`jsxFactory`](https://www.typescriptlang.org/tsconfig#jsxFactory) - [`jsxFragmentFactory`](https://www.typescriptlang.org/tsconfig#jsxFragmentFactory) @@ -183,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 ` +
+ inline style +
+
use style class
+ +

base64

+ +

+ inline style +

+

use style class

+ +

@import

+ + +

+ @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..c29f18d4dee0d7 --- /dev/null +++ b/packages/playground/css-sourcemap/package.json @@ -0,0 +1,18 @@ +{ + "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": { + "convert-source-map": "^1.8.0", + "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..34858ab34bc09d 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') @@ -356,3 +364,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/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/index.html b/packages/playground/css/index.html index 7a79bb1629f989..a09d8e6e7c46aa 100644 --- a/packages/playground/css/index.html +++ b/packages/playground/css/index.html @@ -12,6 +12,8 @@

CSS

Imported css string:


+  

+  

 
   

PostCSS nesting plugin: this should be pink @@ -103,7 +105,22 @@

CSS

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..53d001d8387989 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}
  */
diff --git a/packages/playground/define/__tests__/define.spec.ts b/packages/playground/define/__tests__/define.spec.ts
index 86713c34360829..5d9707e70b47ba 100644
--- a/packages/playground/define/__tests__/define.spec.ts
+++ b/packages/playground/define/__tests__/define.spec.ts
@@ -28,4 +28,7 @@ test('string', async () => {
   )
   expect(await page.textContent('.no-identifier-substring')).toBe(String(true))
   expect(await page.textContent('.no-property')).toBe(String(true))
+  // 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 246bbe2c991bbe..c89a3fe02218ff 100644
--- a/packages/playground/define/index.html
+++ b/packages/playground/define/index.html
@@ -13,8 +13,11 @@ 

Define

unicode identifier:

no property:

no identifier substring:

+

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/extensions/package.json b/packages/playground/extensions/package.json index 389a6e9c3cdff9..d09b7da4d5300b 100644 --- a/packages/playground/extensions/package.json +++ b/packages/playground/extensions/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.23" + "vue": "^3.2.25" } } diff --git a/packages/playground/fs-serve/root/src/index.html b/packages/playground/fs-serve/root/src/index.html index c8b294e86ab0ea..9e4f728a593a91 100644 --- a/packages/playground/fs-serve/root/src/index.html +++ b/packages/playground/fs-serve/root/src/index.html @@ -8,6 +8,10 @@

Safe Fetch


 

 
+

Safe Fetch Subdirectory

+

+

+
 

Unsafe Fetch


 

@@ -42,6 +46,15 @@ 

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)) + }) // outside of allowed dir, treated as unsafe fetch('/unsafe.txt') 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 4377f7961ef229..fff8d9fe202ebc 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': { @@ -45,10 +56,29 @@ const allResult = { } } +const nodeModulesResult = { + '/dir/node_modules/hoge.js': { msg: 'hoge' } +} + +const rawResult = { + '/dir/baz.json': { + msg: 'baz' + } +} + test('should work', async () => { expect(await page.textContent('.result')).toBe( JSON.stringify(allResult, null, 2) ) + expect(await page.textContent('.result-node_modules')).toBe( + JSON.stringify(nodeModulesResult, null, 2) + ) +}) + +test('import glob raw', async () => { + expect(await page.textContent('.globraw')).toBe( + JSON.stringify(rawResult, null, 2) + ) }) if (!isBuild) { @@ -61,6 +91,7 @@ if (!isBuild) { '/dir/a.js': {}, ...allResult, '/dir/index.js': { + ...allResult['/dir/index.js'], modules: { './a.js': {}, ...allResult['/dir/index.js'].modules @@ -83,6 +114,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/dir/node_modules/hoge.js b/packages/playground/glob-import/dir/node_modules/hoge.js new file mode 100644 index 00000000000000..874eb4312f0dc5 --- /dev/null +++ b/packages/playground/glob-import/dir/node_modules/hoge.js @@ -0,0 +1 @@ +export const msg = 'hoge' diff --git a/packages/playground/glob-import/index.html b/packages/playground/glob-import/index.html index b38a194e21b4f2..52d41b817a169c 100644 --- a/packages/playground/glob-import/index.html +++ b/packages/playground/glob-import/index.html @@ -1,21 +1,54 @@

+

+

 
 
 
+
+
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 d0c78d9ee3f9f0..4d0491af91a69e 100644
--- a/packages/playground/hmr/__tests__/hmr.spec.ts
+++ b/packages/playground/hmr/__tests__/hmr.spec.ts
@@ -122,4 +122,42 @@ if (!isBuild) {
     editFile('customFile.js', (code) => code.replace('custom', 'edited'))
     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'
+    )
+    const el = await page.$('#app')
+    expect(await el.textContent()).toBe('title')
+    await editFile(
+      'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
+      (code) => code.replace('title', 'title2')
+    )
+    await page.waitForEvent('load')
+    await untilUpdated(
+      async () => (await page.$('#app')).textContent(),
+      '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/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.js
index e8da1ecbabf98b..e80b517e6449dc 100644
--- a/packages/playground/hmr/hmr.js
+++ b/packages/playground/hmr/hmr.js
@@ -35,6 +35,19 @@ 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')
+      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) => {
@@ -44,6 +57,12 @@ if (import.meta.hot) {
   import.meta.hot.on('foo', ({ msg }) => {
     text('.custom', msg)
   })
+
+  // send custom event to server to calculate 1 + 2
+  import.meta.hot.send('remote-add', { a: 1, b: 2 })
+  import.meta.hot.on('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..fc398c60c4cadf 100644
--- a/packages/playground/hmr/index.html
+++ b/packages/playground/hmr/index.html
@@ -1,6 +1,10 @@
+
 
 
 
+
+
+
diff --git "a/packages/playground/hmr/unicode-path/\344\270\255\346\226\207-\343\201\253\343\201\273\343\202\223\343\201\224-\355\225\234\352\270\200-\360\237\214\225\360\237\214\226\360\237\214\227/index.html" "b/packages/playground/hmr/unicode-path/\344\270\255\346\226\207-\343\201\253\343\201\273\343\202\223\343\201\224-\355\225\234\352\270\200-\360\237\214\225\360\237\214\226\360\237\214\227/index.html" new file mode 100644 index 00000000000000..2f948015a88d6b --- /dev/null +++ "b/packages/playground/hmr/unicode-path/\344\270\255\346\226\207-\343\201\253\343\201\273\343\202\223\343\201\224-\355\225\234\352\270\200-\360\237\214\225\360\237\214\226\360\237\214\227/index.html" @@ -0,0 +1 @@ +
title
diff --git a/packages/playground/hmr/vite.config.js b/packages/playground/hmr/vite.config.js index c34637844e2170..57252c91be410b 100644 --- a/packages/playground/hmr/vite.config.js +++ b/packages/playground/hmr/vite.config.js @@ -9,14 +9,13 @@ module.exports = { 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 - } - }) + server.ws.send('foo', { msg }) } + }, + configureServer(server) { + server.ws.on('remote-add', ({ a, b }, client) => { + client.send('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 823e2f4784ad7a..66f537e5026361 100644 --- a/packages/playground/html/__tests__/html.spec.ts +++ b/packages/playground/html/__tests__/html.spec.ts @@ -1,4 +1,4 @@ -import { getColor, isBuild } from '../../testUtils' +import { getColor, isBuild, editFile } from '../../testUtils' function testPage(isNested: boolean) { test('pre transform', async () => { @@ -210,3 +210,29 @@ describe('unicode path', () => { expect(await page.textContent('h1')).toBe('unicode-path') }) }) + +if (!isBuild) { + describe('invalid', () => { + test('should be 500 with overlay', async () => { + const response = await page.goto(viteTestUrl + '/invalid.html') + expect(response.status()).toBe(500) + + const errorOverlay = await page.waitForSelector('vite-error-overlay') + expect(errorOverlay).toBeTruthy() + + const message = await errorOverlay.$$eval('.message-body', (m) => { + return m[0].innerHTML + }) + expect(message).toMatch(/^Unable to parse HTML/) + }) + + test('should reload when fixed', async () => { + const response = await page.goto(viteTestUrl + '/invalid.html') + await editFile('invalid.html', (content) => { + return content.replace('
Good') + }) + const content = await page.waitForSelector('text=Good Html') + expect(content).toBeTruthy() + }) + }) +} diff --git a/packages/playground/html/emptyAttr.html b/packages/playground/html/emptyAttr.html new file mode 100644 index 00000000000000..30c647017690dd --- /dev/null +++ b/packages/playground/html/emptyAttr.html @@ -0,0 +1,12 @@ + + + + + + + Empty Attr + + + + + diff --git a/packages/playground/html/index.html b/packages/playground/html/index.html index b0b5947debd00c..7320ff2b097db0 100644 --- a/packages/playground/html/index.html +++ b/packages/playground/html/index.html @@ -3,5 +3,5 @@

Hello

- + diff --git a/packages/playground/html/invalid.html b/packages/playground/html/invalid.html new file mode 100644 index 00000000000000..5b5cf429687466 --- /dev/null +++ b/packages/playground/html/invalid.html @@ -0,0 +1 @@ +
diff --git a/packages/playground/html/link.html b/packages/playground/html/link.html new file mode 100644 index 00000000000000..1ec95eedeab182 --- /dev/null +++ b/packages/playground/html/link.html @@ -0,0 +1,12 @@ + + + + + + + Link to rollup config + + + A Link to a Rollup Import + + diff --git a/packages/playground/html/vite.config.js b/packages/playground/html/vite.config.js index 09fb2fd337e7ee..1703e02cc05366 100644 --- a/packages/playground/html/vite.config.js +++ b/packages/playground/html/vite.config.js @@ -11,6 +11,9 @@ module.exports = { nested: resolve(__dirname, 'nested/index.html'), scriptAsync: resolve(__dirname, 'scriptAsync.html'), scriptMixed: resolve(__dirname, 'scriptMixed.html'), + emptyAttr: resolve(__dirname, 'emptyAttr.html'), + link: resolve(__dirname, 'link.html'), + 'link/target': resolve(__dirname, 'index.html'), zeroJS: resolve(__dirname, 'zeroJS.html'), noHead: resolve(__dirname, 'noHead.html'), noBody: resolve(__dirname, 'noBody.html'), 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/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 67410700820be5..2752e691da6fb2 100644
--- a/packages/playground/optimize-deps/package.json
+++ b/packages/playground/optimize-deps/package.json
@@ -7,7 +7,7 @@
     "build": "vite build",
     "debug": "node --inspect-brk ../../vite/bin/vite",
     "preview": "vite preview",
-    "postinstall": "node ../../../scripts/patchFileDeps.cjs"
+    "postinstall": "ts-node ../../../scripts/patchFileDeps.ts"
   },
   "dependencies": {
     "axios": "^0.24.0",
@@ -17,13 +17,16 @@
     "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",
-    "vue": "^3.2.23",
+    "url": "^0.11.0",
+    "vue": "^3.2.25",
     "vuex": "^4.0.0"
   },
   "devDependencies": {
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/optimize-missing-deps/package.json b/packages/playground/optimize-missing-deps/package.json
index 74e17dd60704a6..431cf3b33c3847 100644
--- a/packages/playground/optimize-missing-deps/package.json
+++ b/packages/playground/optimize-missing-deps/package.json
@@ -4,7 +4,7 @@
   "version": "0.0.0",
   "scripts": {
     "dev": "node server",
-    "postinstall": "node ../../../scripts/patchFileDeps.cjs"
+    "postinstall": "ts-node ../../../scripts/patchFileDeps.ts"
   },
   "dependencies": {
     "missing-dep": "file:./missing-dep",
diff --git a/packages/playground/package.json b/packages/playground/package.json
index 16398f7a310961..58ef368099e82f 100644
--- a/packages/playground/package.json
+++ b/packages/playground/package.json
@@ -1,7 +1,7 @@
 {
   "name": "vite-playground",
-  "version": "1.0.0",
   "private": true,
+  "version": "1.0.0",
   "devDependencies": {
     "css-color-names": "^1.0.1"
   }
diff --git a/packages/playground/preload/package.json b/packages/playground/preload/package.json
index 96d5c7b01f30e3..5e65dafc8099c4 100644
--- a/packages/playground/preload/package.json
+++ b/packages/playground/preload/package.json
@@ -9,7 +9,7 @@
     "preview": "vite preview"
   },
   "dependencies": {
-    "vue": "^3.2.23",
+    "vue": "^3.2.25",
     "vue-router": "^4.0.0"
   },
   "devDependencies": {
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/react-emotion/vite.config.ts b/packages/playground/react-emotion/vite.config.ts
index 5b60bc7e26d145..9364c8f616c2f5 100644
--- a/packages/playground/react-emotion/vite.config.ts
+++ b/packages/playground/react-emotion/vite.config.ts
@@ -1,6 +1,7 @@
 import react from '@vitejs/plugin-react'
+import type { UserConfig } from 'vite'
 
-const config: import('vite').UserConfig = {
+const config: UserConfig = {
   plugins: [
     react({
       jsxImportSource: '@emotion/react',
diff --git a/packages/playground/react/vite.config.ts b/packages/playground/react/vite.config.ts
index e8780031511dac..c6955a131d375f 100644
--- a/packages/playground/react/vite.config.ts
+++ b/packages/playground/react/vite.config.ts
@@ -1,6 +1,7 @@
 import react from '@vitejs/plugin-react'
+import type { UserConfig } from 'vite'
 
-const config: import('vite').UserConfig = {
+const config: UserConfig = {
   plugins: [react()],
   build: {
     // to make tests faster
diff --git a/packages/playground/resolve-config/__tests__/resolve-config.spec.ts b/packages/playground/resolve-config/__tests__/resolve-config.spec.ts
new file mode 100644
index 00000000000000..13ea5ea6f59a4f
--- /dev/null
+++ b/packages/playground/resolve-config/__tests__/resolve-config.spec.ts
@@ -0,0 +1,54 @@
+import fs from 'fs'
+import path from 'path'
+import { commandSync } from 'execa'
+import { isBuild, testDir, workspaceRoot } from '../../testUtils'
+
+const viteBin = path.join(workspaceRoot, 'packages', 'vite', 'bin', 'vite.js')
+
+const fromTestDir = (...p: string[]) => path.resolve(testDir, ...p)
+
+const build = (configName: string) => {
+  commandSync(`${viteBin} build`, { cwd: fromTestDir(configName) })
+}
+const getDistFile = (configName: string) => {
+  return fs.readFileSync(fromTestDir(`${configName}/dist/index.es.js`), 'utf8')
+}
+
+if (isBuild) {
+  it('loads vite.config.js', () => {
+    build('js')
+    expect(getDistFile('js')).toContain('console.log(true)')
+  })
+  it('loads vite.config.js with package#type module', () => {
+    build('js-module')
+    expect(getDistFile('js-module')).toContain('console.log(true)')
+  })
+  it('loads vite.config.cjs', () => {
+    build('cjs')
+    expect(getDistFile('cjs')).toContain('console.log(true)')
+  })
+  it('loads vite.config.cjs with package#type module', () => {
+    build('cjs-module')
+    expect(getDistFile('cjs-module')).toContain('console.log(true)')
+  })
+  it('loads vite.config.mjs', () => {
+    build('mjs')
+    expect(getDistFile('mjs')).toContain('console.log(true)')
+  })
+  it('loads vite.config.mjs with package#type module', () => {
+    build('mjs-module')
+    expect(getDistFile('mjs-module')).toContain('console.log(true)')
+  })
+  it('loads vite.config.ts', () => {
+    build('ts')
+    expect(getDistFile('ts')).toContain('console.log(true)')
+  })
+  it('loads vite.config.ts with package#type module', () => {
+    build('ts-module')
+    expect(getDistFile('ts-module')).toContain('console.log(true)')
+  })
+} else {
+  // this test doesn't support serve mode
+  // must contain at least one test
+  test('should work', () => void 0)
+}
diff --git a/packages/playground/resolve-config/__tests__/serve.js b/packages/playground/resolve-config/__tests__/serve.js
new file mode 100644
index 00000000000000..bd451d4cf6f6bc
--- /dev/null
+++ b/packages/playground/resolve-config/__tests__/serve.js
@@ -0,0 +1,39 @@
+// @ts-check
+// this is automtically detected by scripts/jestPerTestSetup.ts and will replace
+// the default e2e test serve behavior
+
+const path = require('path')
+const fs = require('fs-extra')
+const { testDir } = require('../../testUtils')
+
+const fromTestDir = (/** @type{string[]} */ ...p) => path.resolve(testDir, ...p)
+
+const configNames = ['js', 'cjs', 'mjs', 'ts']
+
+/** @param {string} root @param {boolean} isProd */
+exports.serve = async function serve(root, isProd) {
+  if (!isProd) return
+
+  // create separate directories for all config types:
+  // ./{js,cjs,mjs,ts} and ./{js,cjs,mjs,ts}-module (with package#type)
+  for (const configName of configNames) {
+    const pathToConf = fromTestDir(configName, `vite.config.${configName}`)
+
+    await fs.copy(fromTestDir('root'), fromTestDir(configName))
+    await fs.rename(fromTestDir(configName, 'vite.config.js'), pathToConf)
+
+    if (configName === 'cjs') {
+      const conf = await fs.readFile(pathToConf, 'utf8')
+      await fs.writeFile(
+        pathToConf,
+        conf.replace('export default', 'module.exports = ')
+      )
+    }
+
+    // copy directory and add package.json with "type": "module"
+    await fs.copy(fromTestDir(configName), fromTestDir(`${configName}-module`))
+    await fs.writeJSON(fromTestDir(`${configName}-module`, 'package.json'), {
+      type: 'module'
+    })
+  }
+}
diff --git a/packages/playground/resolve-config/package.json b/packages/playground/resolve-config/package.json
new file mode 100644
index 00000000000000..5459dad99003cd
--- /dev/null
+++ b/packages/playground/resolve-config/package.json
@@ -0,0 +1,10 @@
+{
+  "name": "resolve-config",
+  "private": true,
+  "version": "0.0.0",
+  "scripts": {
+    "dev": "vite --force",
+    "build": "vite build",
+    "preview": "vite preview"
+  }
+}
diff --git a/packages/playground/resolve-config/root/index.js b/packages/playground/resolve-config/root/index.js
new file mode 100644
index 00000000000000..a3f8f13f20f96e
--- /dev/null
+++ b/packages/playground/resolve-config/root/index.js
@@ -0,0 +1 @@
+console.log(__CONFIG_LOADED__)
diff --git a/packages/playground/resolve-config/root/vite.config.js b/packages/playground/resolve-config/root/vite.config.js
new file mode 100644
index 00000000000000..ed72046f940d59
--- /dev/null
+++ b/packages/playground/resolve-config/root/vite.config.js
@@ -0,0 +1,9 @@
+export default {
+  define: { __CONFIG_LOADED__: true },
+  logLevel: 'silent',
+  build: {
+    minify: false,
+    sourcemap: false,
+    lib: { entry: 'index.js', fileName: 'index', formats: ['es'] }
+  }
+}
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..c8c85d8df9b806 100644
--- a/packages/playground/resolve/__tests__/resolve.spec.ts
+++ b/packages/playground/resolve/__tests__/resolve.spec.ts
@@ -16,6 +16,10 @@ test('deep import with exports field', async () => {
   expect(await page.textContent('.exports-deep')).toMatch('[success]')
 })
 
+test('deep import with query with exports field', async () => {
+  expect(await page.textContent('.exports-deep-query')).not.toMatch('fail')
+})
+
 test('deep import with exports field + exposed dir', async () => {
   expect(await page.textContent('.exports-deep-exposed-dir')).toMatch(
     '[success]'
@@ -54,6 +58,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..2c4ed7b9aa760c 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()) @@ -157,6 +184,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/shims.d.ts b/packages/playground/shims.d.ts index 99ed8eb232b14f..ced8fb1ad585ae 100644 --- a/packages/playground/shims.d.ts +++ b/packages/playground/shims.d.ts @@ -4,7 +4,7 @@ declare module 'css-color-names' { } declare module '*.vue' { - import { ComponentOptions } from 'vue' + import type { ComponentOptions } from 'vue' const component: ComponentOptions export default component } diff --git a/packages/playground/ssr-deps/__tests__/ssr-deps.spec.ts b/packages/playground/ssr-deps/__tests__/ssr-deps.spec.ts index 5559bb1e9adb83..8a201c9eb87455 100644 --- a/packages/playground/ssr-deps/__tests__/ssr-deps.spec.ts +++ b/packages/playground/ssr-deps/__tests__/ssr-deps.spec.ts @@ -8,12 +8,66 @@ const url = `http://localhost:${port}` * NOTE: This test will always succeed now, unless the temporary workaround for Jest can be removed * See https://github.com/vitejs/vite/pull/5197#issuecomment-938054077 */ -test('msg from node addon', async () => { +test('msg should be encrypted', async () => { await page.goto(url) - expect(await page.textContent('.node-addon-msg')).toMatch('Hello World!') + expect(await page.textContent('.encrypted-msg')).not.toMatch( + 'Secret Message!' + ) }) test('msg read by fs/promises', async () => { await page.goto(url) expect(await page.textContent('.file-message')).toMatch('File Content!') }) + +test('msg from primitive export', async () => { + await page.goto(url) + expect(await page.textContent('.primitive-export-message')).toMatch( + 'Hello World!' + ) +}) + +test('msg from TS transpiled exports', async () => { + await page.goto(url) + expect(await page.textContent('.ts-default-export-message')).toMatch( + 'Hello World!' + ) + expect(await page.textContent('.ts-named-export-message')).toMatch( + 'Hello World!' + ) +}) + +test('msg from Object.assign exports', async () => { + await page.goto(url) + expect(await page.textContent('.object-assigned-exports-message')).toMatch( + 'Hello World!' + ) +}) + +test('msg from forwarded exports', async () => { + await page.goto(url) + expect(await page.textContent('.forwarded-export-message')).toMatch( + 'Hello World!' + ) +}) + +test('msg from define properties exports', async () => { + await page.goto(url) + expect(await page.textContent('.define-properties-exports-msg')).toMatch( + 'Hello World!' + ) +}) + +test('msg from define property exports', async () => { + await page.goto(url) + expect(await page.textContent('.define-property-exports-msg')).toMatch( + 'Hello World!' + ) +}) + +test('msg from only object assigned exports', async () => { + await page.goto(url) + expect(await page.textContent('.only-object-assigned-exports-msg')).toMatch( + 'Hello World!' + ) +}) diff --git a/packages/playground/ssr-deps/define-properties-exports/index.js b/packages/playground/ssr-deps/define-properties-exports/index.js new file mode 100644 index 00000000000000..5bdd02be906469 --- /dev/null +++ b/packages/playground/ssr-deps/define-properties-exports/index.js @@ -0,0 +1,8 @@ +// prettier-ignore +Object.defineProperties ( exports , { + hello: { + value() { + return 'Hello World!' + } + } +}) diff --git a/packages/playground/ssr-deps/define-properties-exports/package.json b/packages/playground/ssr-deps/define-properties-exports/package.json new file mode 100644 index 00000000000000..3cf10f8cced539 --- /dev/null +++ b/packages/playground/ssr-deps/define-properties-exports/package.json @@ -0,0 +1,5 @@ +{ + "name": "define-properties-exports", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/define-property-exports/index.js b/packages/playground/ssr-deps/define-property-exports/index.js new file mode 100644 index 00000000000000..4506dd6200051e --- /dev/null +++ b/packages/playground/ssr-deps/define-property-exports/index.js @@ -0,0 +1,5 @@ +Object.defineProperty(exports, 'hello', { + value() { + return 'Hello World!' + } +}) diff --git a/packages/playground/ssr-deps/define-property-exports/package.json b/packages/playground/ssr-deps/define-property-exports/package.json new file mode 100644 index 00000000000000..38ef7fdf5f410a --- /dev/null +++ b/packages/playground/ssr-deps/define-property-exports/package.json @@ -0,0 +1,5 @@ +{ + "name": "define-property-exports", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/forwarded-export/index.js b/packages/playground/ssr-deps/forwarded-export/index.js new file mode 100644 index 00000000000000..0b9f314d00015e --- /dev/null +++ b/packages/playground/ssr-deps/forwarded-export/index.js @@ -0,0 +1,2 @@ +const original = require('object-assigned-exports') +module.exports = original diff --git a/packages/playground/ssr-deps/forwarded-export/package.json b/packages/playground/ssr-deps/forwarded-export/package.json new file mode 100644 index 00000000000000..1a0a62e0b4472d --- /dev/null +++ b/packages/playground/ssr-deps/forwarded-export/package.json @@ -0,0 +1,5 @@ +{ + "name": "forwarded-export", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/node-addon/README.md b/packages/playground/ssr-deps/node-addon/README.md deleted file mode 100644 index 824c79ebc5a832..00000000000000 --- a/packages/playground/ssr-deps/node-addon/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This test aim to correctly resolve the `.node` file when loading CJS and ESM using dynamic import - -Steps to build `.node` file, refer to [here](https://nodejs.org/api/addons.html#building) diff --git a/packages/playground/ssr-deps/node-addon/binding.gyp b/packages/playground/ssr-deps/node-addon/binding.gyp deleted file mode 100644 index e141d88eb32edb..00000000000000 --- a/packages/playground/ssr-deps/node-addon/binding.gyp +++ /dev/null @@ -1,10 +0,0 @@ -{ - "targets": [ - { - "target_name": "cpp_addon", - "sources": [ - "main.cpp" - ] - } - ] -} diff --git a/packages/playground/ssr-deps/node-addon/index.js b/packages/playground/ssr-deps/node-addon/index.js deleted file mode 100644 index 75bf8b92e50ebb..00000000000000 --- a/packages/playground/ssr-deps/node-addon/index.js +++ /dev/null @@ -1,3 +0,0 @@ -const path = require('path') -const cpp = require(path.resolve(__dirname, './build/Release/cpp_addon.node')) -exports.hello = cpp.hello diff --git a/packages/playground/ssr-deps/node-addon/main.cpp b/packages/playground/ssr-deps/node-addon/main.cpp deleted file mode 100644 index fcc5de956aae7e..00000000000000 --- a/packages/playground/ssr-deps/node-addon/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -using namespace v8; - -void HelloWorld(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - Local hello = String::NewFromUtf8(isolate, "Hello World!", NewStringType::kNormal).ToLocalChecked(); - args.GetReturnValue().Set(hello); -} - -void Init(Local exports) { - NODE_SET_METHOD(exports, "hello", HelloWorld); -} - -NODE_MODULE(cpp_addon, Init) diff --git a/packages/playground/ssr-deps/node-addon/package.json b/packages/playground/ssr-deps/node-addon/package.json deleted file mode 100644 index 50a4ab21c20419..00000000000000 --- a/packages/playground/ssr-deps/node-addon/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "node-addon", - "version": "0.0.0", - "private": true, - "scripts": { - "install": "node-gyp install && node-gyp rebuild" - }, - "dependencies": { - "node-gyp": "^8.4.1" - } -} diff --git a/packages/playground/ssr-deps/object-assigned-exports/index.js b/packages/playground/ssr-deps/object-assigned-exports/index.js new file mode 100644 index 00000000000000..d6510e38f3a36f --- /dev/null +++ b/packages/playground/ssr-deps/object-assigned-exports/index.js @@ -0,0 +1,9 @@ +Object.defineProperty(exports, '__esModule', { value: true }) + +const obj = { + hello() { + return 'Hello World!' + } +} + +Object.assign(exports, obj) diff --git a/packages/playground/ssr-deps/object-assigned-exports/package.json b/packages/playground/ssr-deps/object-assigned-exports/package.json new file mode 100644 index 00000000000000..a385dc9b7ec1b7 --- /dev/null +++ b/packages/playground/ssr-deps/object-assigned-exports/package.json @@ -0,0 +1,5 @@ +{ + "name": "object-assigned-exports", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/only-object-assigned-exports/index.js b/packages/playground/ssr-deps/only-object-assigned-exports/index.js new file mode 100644 index 00000000000000..b6a4ab368b133d --- /dev/null +++ b/packages/playground/ssr-deps/only-object-assigned-exports/index.js @@ -0,0 +1,5 @@ +Object.assign(exports, { + hello() { + return 'Hello World!' + } +}) diff --git a/packages/playground/ssr-deps/only-object-assigned-exports/package.json b/packages/playground/ssr-deps/only-object-assigned-exports/package.json new file mode 100644 index 00000000000000..22a071b59e411d --- /dev/null +++ b/packages/playground/ssr-deps/only-object-assigned-exports/package.json @@ -0,0 +1,5 @@ +{ + "name": "only-object-assigned-exports", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/package.json b/packages/playground/ssr-deps/package.json index 2e1f7a9deba490..7af243c3b4769a 100644 --- a/packages/playground/ssr-deps/package.json +++ b/packages/playground/ssr-deps/package.json @@ -6,11 +6,19 @@ "dev": "node server", "serve": "cross-env NODE_ENV=production node server", "debug": "node --inspect-brk server", - "postinstall": "node ../../../scripts/patchFileDeps.cjs" + "postinstall": "ts-node ../../../scripts/patchFileDeps.ts" }, "dependencies": { - "node-addon": "link:./node-addon", - "read-file-content": "file:./read-file-content" + "bcrypt": "^5.0.1", + "define-properties-exports": "file:./define-properties-exports", + "define-property-exports": "file:./define-property-exports", + "forwarded-export": "file:./forwarded-export", + "object-assigned-exports": "file:./object-assigned-exports", + "only-object-assigned-exports": "file:./only-object-assigned-exports", + "primitive-export": "file:./primitive-export", + "read-file-content": "file:./read-file-content", + "require-absolute": "file:./require-absolute", + "ts-transpiled-exports": "file:./ts-transpiled-exports" }, "devDependencies": { "cross-env": "^7.0.3", diff --git a/packages/playground/ssr-deps/primitive-export/index.js b/packages/playground/ssr-deps/primitive-export/index.js new file mode 100644 index 00000000000000..0701a4664b7537 --- /dev/null +++ b/packages/playground/ssr-deps/primitive-export/index.js @@ -0,0 +1 @@ +module.exports = 'Hello World!' diff --git a/packages/playground/ssr-deps/primitive-export/package.json b/packages/playground/ssr-deps/primitive-export/package.json new file mode 100644 index 00000000000000..d86685f6b9a8f1 --- /dev/null +++ b/packages/playground/ssr-deps/primitive-export/package.json @@ -0,0 +1,5 @@ +{ + "name": "primitive-export", + "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/foo.js b/packages/playground/ssr-deps/require-absolute/foo.js new file mode 100644 index 00000000000000..d48e42fa57dd14 --- /dev/null +++ b/packages/playground/ssr-deps/require-absolute/foo.js @@ -0,0 +1 @@ +module.exports.hello = 'Hello World!' diff --git a/packages/playground/ssr-deps/require-absolute/index.js b/packages/playground/ssr-deps/require-absolute/index.js new file mode 100644 index 00000000000000..c2f844f3e2f6ed --- /dev/null +++ b/packages/playground/ssr-deps/require-absolute/index.js @@ -0,0 +1,3 @@ +const path = require('path') + +module.exports.hello = () => require(path.resolve(__dirname, './foo.js')).hello diff --git a/packages/playground/ssr-deps/require-absolute/package.json b/packages/playground/ssr-deps/require-absolute/package.json new file mode 100644 index 00000000000000..352f550e184745 --- /dev/null +++ b/packages/playground/ssr-deps/require-absolute/package.json @@ -0,0 +1,5 @@ +{ + "name": "require-absolute", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/src/app.js b/packages/playground/ssr-deps/src/app.js index 46cca814e08444..9646cdcf2bf688 100644 --- a/packages/playground/ssr-deps/src/app.js +++ b/packages/playground/ssr-deps/src/app.js @@ -1,15 +1,49 @@ import path from 'path' -import { hello } from 'node-addon' import readFileContent from 'read-file-content' +import primitiveExport from 'primitive-export' +import tsDefaultExport, { hello as tsNamedExport } from 'ts-transpiled-exports' +import objectAssignedExports from 'object-assigned-exports' +import forwardedExport from 'forwarded-export' +import bcrypt from 'bcrypt' +import definePropertiesExports from 'define-properties-exports' +import definePropertyExports from 'define-property-exports' +import onlyObjectAssignedExports from 'only-object-assigned-exports' +import requireAbsolute from 'require-absolute' export async function render(url, rootDir) { let html = '' - const nodeAddonMsg = hello() - html += `\n

message from node addon: ${nodeAddonMsg}

` + const encryptedMsg = await bcrypt.hash('Secret Message!', 10) + html += `\n

encrypted message: ${encryptedMsg}

` const fileContent = await readFileContent(path.resolve(rootDir, 'message')) html += `\n

msg read via fs/promises: ${fileContent}

` + html += `\n

message from primitive export: ${primitiveExport}

` + + const tsDefaultExportMessage = tsDefaultExport() + html += `\n

message from ts-default-export: ${tsDefaultExportMessage}

` + + const tsNamedExportMessage = tsNamedExport() + html += `\n

message from ts-named-export: ${tsNamedExportMessage}

` + + const objectAssignedExportsMessage = objectAssignedExports.hello() + html += `\n

message from object-assigned-exports: ${objectAssignedExportsMessage}

` + + const forwardedExportMessage = forwardedExport.hello() + html += `\n

message from forwarded-export: ${forwardedExportMessage}

` + + const definePropertiesExportsMsg = definePropertiesExports.hello() + html += `\n

message from define-properties-exports: ${definePropertiesExportsMsg}

` + + const definePropertyExportsMsg = definePropertyExports.hello() + html += `\n

message from define-property-exports: ${definePropertyExportsMsg}

` + + const onlyObjectAssignedExportsMessage = onlyObjectAssignedExports.hello() + html += `\n

message from only-object-assigned-exports: ${onlyObjectAssignedExportsMessage}

` + + const requireAbsoluteMessage = requireAbsolute.hello() + html += `\n

message from require-absolute: ${requireAbsoluteMessage}

` + return html + '\n' } diff --git a/packages/playground/ssr-deps/ts-transpiled-exports/index.js b/packages/playground/ssr-deps/ts-transpiled-exports/index.js new file mode 100644 index 00000000000000..882c5fee653a8b --- /dev/null +++ b/packages/playground/ssr-deps/ts-transpiled-exports/index.js @@ -0,0 +1,8 @@ +'use strict' +Object.defineProperty(exports, '__esModule', { value: true }) +exports.hello = void 0 +function hello() { + return 'Hello World!' +} +exports.hello = hello +exports.default = hello diff --git a/packages/playground/ssr-deps/ts-transpiled-exports/package.json b/packages/playground/ssr-deps/ts-transpiled-exports/package.json new file mode 100644 index 00000000000000..7dbeff43974e42 --- /dev/null +++ b/packages/playground/ssr-deps/ts-transpiled-exports/package.json @@ -0,0 +1,5 @@ +{ + "name": "ts-transpiled-exports", + "private": true, + "version": "0.0.0" +} diff --git a/packages/playground/ssr-deps/vite.config.js b/packages/playground/ssr-deps/vite.config.js deleted file mode 100644 index 491f4c924a8c62..00000000000000 --- a/packages/playground/ssr-deps/vite.config.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @type {import('vite').UserConfig} - */ -module.exports = { - resolve: { - // The dependency `node-addon` needs to be linked to node_modules and preserve symlinks, - // because the `.node` file cannot be unlinked in Windows after being filed to node_modules - // ref: https://github.com/nodejs/node/issues/24878/ - preserveSymlinks: true - } -} diff --git a/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts b/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts index a762909db538f5..952e287a7f12aa 100644 --- a/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts +++ b/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts @@ -1,6 +1,7 @@ import { editFile, getColor, isBuild, untilUpdated } from '../../testUtils' import { port } from './serve' import fetch from 'node-fetch' +import { resolve } from 'path' const url = `http://localhost:${port}` @@ -133,6 +134,10 @@ test('virtual module', async () => { expect(await page.textContent('.virtual')).toMatch('hi') }) +test('nested virtual module', async () => { + expect(await page.textContent('.nested-virtual')).toMatch('[success]') +}) + test('hydration', async () => { expect(await page.textContent('button')).toMatch('0') await page.click('button') @@ -158,3 +163,20 @@ test('import.meta.url', async () => { await page.goto(url) expect(await page.textContent('.protocol')).toEqual('file:') }) + +test('dynamic css file should be preloaded', async () => { + if (isBuild) { + await page.goto(url) + const homeHtml = await (await fetch(url)).text() + const re = /link rel="modulepreload".*?href="\/assets\/(Home\.\w{8}\.js)"/ + const filename = re.exec(homeHtml)[1] + const manifest = require(resolve( + process.cwd(), + './packages/temp/ssr-vue/dist/client/ssr-manifest.json' + )) + const depFile = manifest[filename] + for (const file of depFile) { + expect(homeHtml).toMatch(file) + } + } +}) 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/package.json b/packages/playground/ssr-vue/package.json index 70c108aa89dcc6..4a385336a97603 100644 --- a/packages/playground/ssr-vue/package.json +++ b/packages/playground/ssr-vue/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "example-external-component": "file:example-external-component", - "vue": "^3.2.23", + "vue": "^3.2.25", "vue-router": "^4.0.0", "vuex": "^4.0.2" }, diff --git a/packages/playground/ssr-vue/src/assets/button.css b/packages/playground/ssr-vue/src/assets/button.css new file mode 100644 index 00000000000000..8e1ebc58c0891f --- /dev/null +++ b/packages/playground/ssr-vue/src/assets/button.css @@ -0,0 +1,15 @@ +.btn { + background-color: #65b587; + border-radius: 8px; + border-style: none; + box-sizing: border-box; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 500; + height: 40px; + line-height: 20px; + list-style: none; + outline: none; + padding: 10px 16px; +} diff --git a/packages/playground/ssr-vue/src/components/button.js b/packages/playground/ssr-vue/src/components/button.js new file mode 100644 index 00000000000000..3b39f53fd96c47 --- /dev/null +++ b/packages/playground/ssr-vue/src/components/button.js @@ -0,0 +1,16 @@ +import { createVNode, defineComponent } from 'vue' +import '../assets/button.css' + +export default defineComponent({ + setup() { + return () => { + return createVNode( + 'div', + { + class: 'btn' + }, + 'dynamicBtn' + ) + } + } +}) diff --git a/packages/playground/ssr-vue/src/entry-server.js b/packages/playground/ssr-vue/src/entry-server.js index b1a5b6770d7fe2..0f4e47711c17a1 100644 --- a/packages/playground/ssr-vue/src/entry-server.js +++ b/packages/playground/ssr-vue/src/entry-server.js @@ -1,5 +1,6 @@ import { createApp } from './main' import { renderToString } from 'vue/server-renderer' +import path, { basename } from 'path' export async function render(url, manifest) { const { app, router } = createApp() @@ -31,6 +32,13 @@ function renderPreloadLinks(modules, manifest) { files.forEach((file) => { if (!seen.has(file)) { seen.add(file) + const filename = basename(file) + if (manifest[filename]) { + for (const depFile of manifest[filename]) { + links += renderPreloadLink(depFile) + seen.add(depFile) + } + } links += renderPreloadLink(file) } }) diff --git a/packages/playground/ssr-vue/src/pages/About.vue b/packages/playground/ssr-vue/src/pages/About.vue index a5c29a24e8dbaf..2c8589f7ff109a 100644 --- a/packages/playground/ssr-vue/src/pages/About.vue +++ b/packages/playground/ssr-vue/src/pages/About.vue @@ -1,9 +1,12 @@ diff --git a/packages/playground/ssr-vue/src/pages/Home.vue b/packages/playground/ssr-vue/src/pages/Home.vue index 46e1f6b105a090..32a33882cc2324 100644 --- a/packages/playground/ssr-vue/src/pages/Home.vue +++ b/packages/playground/ssr-vue/src/pages/Home.vue @@ -9,13 +9,21 @@

this will be styled with a font-face

{{ state.url }}

{{ state.protocol }}

+

msg from nested virtual module: {{ virtualMsg }}

+ +
+ encrypted message: +

+
+ + diff --git a/packages/playground/vue-jsx/vite.config.js b/packages/playground/vue-jsx/vite.config.js index 3ec89a003d79f4..d6eb84e05f4e4a 100644 --- a/packages/playground/vue-jsx/vite.config.js +++ b/packages/playground/vue-jsx/vite.config.js @@ -9,7 +9,28 @@ module.exports = { vueJsxPlugin({ include: [/\.tesx$/, /\.[jt]sx$/] }), - vuePlugin() + vuePlugin(), + { + name: 'jsx-query-plugin', + transform(code, id) { + if (id.includes('?query=true')) { + return ` +import { createVNode as _createVNode } from "vue"; +import { defineComponent, ref } from 'vue'; +export default defineComponent(() => { + const count = ref(6); + + const inc = () => count.value++; + + return () => _createVNode("button", { + "class": "jsx-with-query", + "onClick": inc + }, [count.value]); +}); +` + } + } + } ], build: { // to make tests faster diff --git a/packages/playground/vue-lib/__tests__/serve.js b/packages/playground/vue-lib/__tests__/serve.js new file mode 100644 index 00000000000000..73f89eee44ea3e --- /dev/null +++ b/packages/playground/vue-lib/__tests__/serve.js @@ -0,0 +1,7 @@ +// @ts-check +// this is automtically detected by scripts/jestPerTestSetup.ts and will replace +// the default e2e test serve behavior + +exports.serve = async function serve() { + // do nothing, skip default behavior +} diff --git a/packages/playground/vue-lib/__tests__/vue-lib.spec.ts b/packages/playground/vue-lib/__tests__/vue-lib.spec.ts new file mode 100644 index 00000000000000..0504160f17d2f0 --- /dev/null +++ b/packages/playground/vue-lib/__tests__/vue-lib.spec.ts @@ -0,0 +1,24 @@ +import { build } from 'vite' +import path from 'path' +import type { OutputChunk, RollupOutput } from 'rollup' + +describe('vue component library', () => { + test('should output tree shakeable css module code', async () => { + // Build lib + await build({ + logLevel: 'silent', + configFile: path.resolve(__dirname, '../vite.config.lib.ts') + }) + // Build app + const { output } = (await build({ + logLevel: 'silent', + configFile: path.resolve(__dirname, '../vite.config.consumer.ts') + })) as RollupOutput + const { code } = output.find( + (e) => e.type === 'chunk' && e.isEntry + ) as OutputChunk + // Unused css module should be treeshaked + expect(code).toContain('styleA') // styleA is used by CompA + expect(code).not.toContain('styleB') // styleB is not used + }) +}) diff --git a/packages/playground/vue-lib/index.html b/packages/playground/vue-lib/index.html new file mode 100644 index 00000000000000..e016cf7d760797 --- /dev/null +++ b/packages/playground/vue-lib/index.html @@ -0,0 +1,6 @@ + + +
+ + + diff --git a/packages/playground/vue-lib/package.json b/packages/playground/vue-lib/package.json new file mode 100644 index 00000000000000..df82cf48b62a9c --- /dev/null +++ b/packages/playground/vue-lib/package.json @@ -0,0 +1,16 @@ +{ + "name": "test-vue-lib", + "private": true, + "version": "0.0.0", + "scripts": { + "dev-consumer": "vite --config ./vite.config.consumer.ts", + "build-lib": "vite build --config ./vite.config.lib.ts", + "build-consumer": "vite build --config ./vite.config.consumer.ts" + }, + "dependencies": { + "vue": "^3.2.25" + }, + "devDependencies": { + "@vitejs/plugin-vue": "workspace:*" + } +} diff --git a/packages/playground/vue-lib/src-consumer/index.ts b/packages/playground/vue-lib/src-consumer/index.ts new file mode 100644 index 00000000000000..ac0f65e2a3ed9d --- /dev/null +++ b/packages/playground/vue-lib/src-consumer/index.ts @@ -0,0 +1,8 @@ +// @ts-ignore +/* eslint-disable node/no-missing-import */ +import { CompA } from '../dist/lib/my-vue-lib.es' +import '../dist/lib/style.css' +import { createApp } from 'vue' + +const app = createApp(CompA) +app.mount('#app') diff --git a/packages/playground/vue-lib/src-lib/CompA.vue b/packages/playground/vue-lib/src-lib/CompA.vue new file mode 100644 index 00000000000000..dac9298b3bedf4 --- /dev/null +++ b/packages/playground/vue-lib/src-lib/CompA.vue @@ -0,0 +1,8 @@ + + diff --git a/packages/playground/vue-lib/src-lib/CompB.vue b/packages/playground/vue-lib/src-lib/CompB.vue new file mode 100644 index 00000000000000..cca30168fb6753 --- /dev/null +++ b/packages/playground/vue-lib/src-lib/CompB.vue @@ -0,0 +1,8 @@ + + diff --git a/packages/playground/vue-lib/src-lib/index.ts b/packages/playground/vue-lib/src-lib/index.ts new file mode 100644 index 00000000000000..f83abd4ec72118 --- /dev/null +++ b/packages/playground/vue-lib/src-lib/index.ts @@ -0,0 +1,2 @@ +export { default as CompA } from './CompA.vue' +export { default as CompB } from './CompB.vue' diff --git a/packages/playground/vue-lib/vite.config.consumer.ts b/packages/playground/vue-lib/vite.config.consumer.ts new file mode 100644 index 00000000000000..9e75b5cfbeabcb --- /dev/null +++ b/packages/playground/vue-lib/vite.config.consumer.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +export default defineConfig({ + root: __dirname, + build: { + outDir: 'dist/consumer' + }, + plugins: [vue()] +}) diff --git a/packages/playground/vue-lib/vite.config.lib.ts b/packages/playground/vue-lib/vite.config.lib.ts new file mode 100644 index 00000000000000..a888382d008a8c --- /dev/null +++ b/packages/playground/vue-lib/vite.config.lib.ts @@ -0,0 +1,23 @@ +import path from 'path' +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +export default defineConfig({ + root: __dirname, + build: { + outDir: 'dist/lib', + lib: { + entry: path.resolve(__dirname, 'src-lib/index.ts'), + name: 'MyVueLib', + formats: ['es'], + fileName: (format) => `my-vue-lib.${format}.js` + }, + rollupOptions: { + external: ['vue'], + output: { + globals: { vue: 'Vue' } + } + } + }, + plugins: [vue()] +}) diff --git a/packages/playground/vue-sourcemap/Css.vue b/packages/playground/vue-sourcemap/Css.vue new file mode 100644 index 00000000000000..19668de8d33965 --- /dev/null +++ b/packages/playground/vue-sourcemap/Css.vue @@ -0,0 +1,23 @@ + + + + + + + diff --git a/packages/playground/vue-sourcemap/Less.vue b/packages/playground/vue-sourcemap/Less.vue new file mode 100644 index 00000000000000..f12a3e55f2111c --- /dev/null +++ b/packages/playground/vue-sourcemap/Less.vue @@ -0,0 +1,9 @@ + + + diff --git a/packages/playground/vue-sourcemap/Main.vue b/packages/playground/vue-sourcemap/Main.vue new file mode 100644 index 00000000000000..04ddf50071ccb3 --- /dev/null +++ b/packages/playground/vue-sourcemap/Main.vue @@ -0,0 +1,16 @@ + + + diff --git a/packages/playground/vue-sourcemap/Sass.vue b/packages/playground/vue-sourcemap/Sass.vue new file mode 100644 index 00000000000000..0fded031a52c72 --- /dev/null +++ b/packages/playground/vue-sourcemap/Sass.vue @@ -0,0 +1,8 @@ + + + diff --git a/packages/playground/vue-sourcemap/SassWithImport.vue b/packages/playground/vue-sourcemap/SassWithImport.vue new file mode 100644 index 00000000000000..7a00420a00bb3a --- /dev/null +++ b/packages/playground/vue-sourcemap/SassWithImport.vue @@ -0,0 +1,11 @@ + + + diff --git a/packages/playground/vue-sourcemap/__tests__/build.spec.ts b/packages/playground/vue-sourcemap/__tests__/build.spec.ts new file mode 100644 index 00000000000000..e36c1f52d2c1f8 --- /dev/null +++ b/packages/playground/vue-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/vue-sourcemap/__tests__/serve.spec.ts b/packages/playground/vue-sourcemap/__tests__/serve.spec.ts new file mode 100644 index 00000000000000..193b0afb9ba73f --- /dev/null +++ b/packages/playground/vue-sourcemap/__tests__/serve.spec.ts @@ -0,0 +1,283 @@ +import { fromComment } from 'convert-source-map' +import { normalizePath } from 'vite' +import { isBuild, testDir } from 'testUtils' + +if (!isBuild) { + const root = normalizePath(testDir) + + const getStyleTagContentIncluding = async (content: string) => { + const styles = await page.$$('style') + for (const style of styles) { + const text = await style.textContent() + if (text.includes(content)) { + return text + } + } + throw new Error('Not found') + } + + const extractSourcemap = (content: string) => { + const lines = content.trim().split('\n') + return fromComment(lines[lines.length - 1]).toObject() + } + + const formatSourcemapForSnapshot = (map: any) => { + const m = { ...map } + delete m.file + delete m.names + m.sources = m.sources.map((source) => source.replace(root, '/root')) + return m + } + + test('css', async () => { + const css = await getStyleTagContentIncluding('.css ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": ";AAOA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/Css.vue", + ], + "sourcesContent": Array [ + " + + + + + + + ", + ], + "version": 3, + } + `) + }) + + test('css module', async () => { + const css = await getStyleTagContentIncluding('._css-module_') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": ";AAaA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/Css.vue", + ], + "sourcesContent": Array [ + " + + + + + + + ", + ], + "version": 3, + } + `) + }) + + test('css scoped', async () => { + const css = await getStyleTagContentIncluding('.css-scoped[data-v-') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": ";AAmBA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/Css.vue", + ], + "sourcesContent": Array [ + " + + + + + + + ", + ], + "version": 3, + } + `) + }) + + test('sass', async () => { + const css = await getStyleTagContentIncluding('.sass ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAKA;EACE", + "sources": Array [ + "/root/Sass.vue", + ], + "sourcesContent": Array [ + " + + + ", + ], + "version": 3, + } + `) + }) + + test('sass with import', async () => { + const css = await getStyleTagContentIncluding('.sass-with-import ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA;EACE;;ACOF;EACE", + "sources": Array [ + "/root/sassWithImportImported.sass", + "/root/SassWithImport.vue", + ], + "sourcesContent": Array [ + ".sass-with-import-imported + color: red + ", + " + + + ", + ], + "version": 3, + } + `) + }) + + test('less with additionalData', async () => { + const css = await getStyleTagContentIncluding('.less ') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAKA;EACE", + "sources": Array [ + "/root/Less.vue", + ], + "sourcesContent": Array [ + " + + + ", + ], + "version": 3, + } + `) + }) + + test('src imported', async () => { + const css = await getStyleTagContentIncluding('.src-import[data-v-') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA;EACE,UAAU;AACZ", + "sources": Array [ + "/root/src-import/src-import.css", + ], + "sourcesContent": Array [ + ".src-import { + color: red; + } + ", + ], + "version": 3, + } + `) + }) + + test('src imported sass', async () => { + const css = await getStyleTagContentIncluding('.src-import-sass[data-v-') + const map = extractSourcemap(css) + expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(` + Object { + "mappings": "AAAA;EACE;;ACCF;EACE", + "sources": Array [ + "/root/src-import/src-import-imported.sass", + "/root/src-import/src-import.sass", + ], + "sourcesContent": Array [ + ".src-import-sass-imported + color: red + ", + "@import './src-import-imported' + + .src-import-sass + color: red + ", + ], + "version": 3, + } + `) + }) +} else { + test('this file only includes test for serve', () => { + expect(true).toBe(true) + }) +} diff --git a/packages/playground/vue-sourcemap/index.html b/packages/playground/vue-sourcemap/index.html new file mode 100644 index 00000000000000..57f325518a2c25 --- /dev/null +++ b/packages/playground/vue-sourcemap/index.html @@ -0,0 +1,7 @@ +
+ diff --git a/packages/playground/vue-sourcemap/package.json b/packages/playground/vue-sourcemap/package.json new file mode 100644 index 00000000000000..5672b5e3d9d57d --- /dev/null +++ b/packages/playground/vue-sourcemap/package.json @@ -0,0 +1,20 @@ +{ + "name": "test-vue-sourcemap", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../vite/bin/vite", + "preview": "vite preview" + }, + "devDependencies": { + "@vitejs/plugin-vue": "workspace:*", + "convert-source-map": "^1.8.0", + "less": "^4.1.2", + "sass": "^1.43.4" + }, + "dependencies": { + "vue": "^3.2.31" + } +} diff --git a/packages/playground/vue-sourcemap/sassWithImportImported.sass b/packages/playground/vue-sourcemap/sassWithImportImported.sass new file mode 100644 index 00000000000000..8092b37048cbdd --- /dev/null +++ b/packages/playground/vue-sourcemap/sassWithImportImported.sass @@ -0,0 +1,2 @@ +.sass-with-import-imported + color: red diff --git a/packages/playground/vue-sourcemap/src-import/SrcImport.vue b/packages/playground/vue-sourcemap/src-import/SrcImport.vue new file mode 100644 index 00000000000000..406c6a6b45382d --- /dev/null +++ b/packages/playground/vue-sourcemap/src-import/SrcImport.vue @@ -0,0 +1,8 @@ + + + + diff --git a/packages/playground/vue-sourcemap/src-import/src-import-imported.sass b/packages/playground/vue-sourcemap/src-import/src-import-imported.sass new file mode 100644 index 00000000000000..2ed87d933e58a6 --- /dev/null +++ b/packages/playground/vue-sourcemap/src-import/src-import-imported.sass @@ -0,0 +1,2 @@ +.src-import-sass-imported + color: red diff --git a/packages/playground/vue-sourcemap/src-import/src-import.css b/packages/playground/vue-sourcemap/src-import/src-import.css new file mode 100644 index 00000000000000..da61ff0fb6cb27 --- /dev/null +++ b/packages/playground/vue-sourcemap/src-import/src-import.css @@ -0,0 +1,3 @@ +.src-import { + color: red; +} diff --git a/packages/playground/vue-sourcemap/src-import/src-import.sass b/packages/playground/vue-sourcemap/src-import/src-import.sass new file mode 100644 index 00000000000000..c7e0314fda541c --- /dev/null +++ b/packages/playground/vue-sourcemap/src-import/src-import.sass @@ -0,0 +1,4 @@ +@import './src-import-imported' + +.src-import-sass + color: red diff --git a/packages/playground/vue-sourcemap/vite.config.js b/packages/playground/vue-sourcemap/vite.config.js new file mode 100644 index 00000000000000..2a48cad3cb00d4 --- /dev/null +++ b/packages/playground/vue-sourcemap/vite.config.js @@ -0,0 +1,19 @@ +const vuePlugin = require('@vitejs/plugin-vue') + +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + css: { + devSourcemap: true, + preprocessorOptions: { + less: { + additionalData: '@color: red;' + } + } + }, + plugins: [vuePlugin()], + build: { + sourcemap: true + } +} diff --git a/packages/playground/vue/CustomBlockPlugin.ts b/packages/playground/vue/CustomBlockPlugin.ts index b434bbc24cf324..4f5def023902bc 100644 --- a/packages/playground/vue/CustomBlockPlugin.ts +++ b/packages/playground/vue/CustomBlockPlugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from 'vite' +import type { Plugin } from 'vite' export const vueI18nPlugin: Plugin = { name: 'vue-i18n', diff --git a/packages/playground/vue/Main.vue b/packages/playground/vue/Main.vue index a65c9d7480920e..d10ae401f7aa8e 100644 --- a/packages/playground/vue/Main.vue +++ b/packages/playground/vue/Main.vue @@ -18,7 +18,7 @@ - + @@ -33,7 +33,7 @@ import SrcImport from './src-import/SrcImport.vue' import Slotted from './Slotted.vue' import ScanDep from './ScanDep.vue' import AsyncComponent from './AsyncComponent.vue' -import RefTransform from './RefTransform.vue' +import ReactivityTransform from './ReactivityTransform.vue' import SetupImportTemplate from './setup-import-template/SetupImportTemplate.vue' import { ref } from 'vue' diff --git a/packages/playground/vue/RefTransform.vue b/packages/playground/vue/ReactivityTransform.vue similarity index 58% rename from packages/playground/vue/RefTransform.vue rename to packages/playground/vue/ReactivityTransform.vue index ef7942fdc0e5c3..0dc2b09343d641 100644 --- a/packages/playground/vue/RefTransform.vue +++ b/packages/playground/vue/ReactivityTransform.vue @@ -1,9 +1,12 @@ diff --git a/packages/playground/vue/package.json b/packages/playground/vue/package.json index 473a63afa9a289..f493e9028b6ec3 100644 --- a/packages/playground/vue/package.json +++ b/packages/playground/vue/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "vue": "^3.2.23" + "vue": "^3.2.25" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/packages/playground/vue/public/favicon.ico b/packages/playground/vue/public/favicon.ico new file mode 100644 index 00000000000000..df36fcfb72584e Binary files /dev/null and b/packages/playground/vue/public/favicon.ico differ diff --git a/packages/playground/vue/src-import/SrcImport.vue b/packages/playground/vue/src-import/SrcImport.vue index ac7ec78c869e65..d70e1f48a84331 100644 --- a/packages/playground/vue/src-import/SrcImport.vue +++ b/packages/playground/vue/src-import/SrcImport.vue @@ -1,3 +1,4 @@ + + - diff --git a/packages/playground/vue/src-import/script.ts b/packages/playground/vue/src-import/script.ts index c7712fc4b755b6..54e6e35db41f46 100644 --- a/packages/playground/vue/src-import/script.ts +++ b/packages/playground/vue/src-import/script.ts @@ -1,6 +1,12 @@ import { defineComponent } from 'vue' +import SrcImportStyle from './srcImportStyle.vue' +import SrcImportStyle2 from './srcImportStyle2.vue' export default defineComponent({ + components: { + SrcImportStyle, + SrcImportStyle2 + }, setup() { return { msg: 'hello from script src!' diff --git a/packages/playground/vue/src-import/srcImportStyle.vue b/packages/playground/vue/src-import/srcImportStyle.vue new file mode 100644 index 00000000000000..de91769858fe93 --- /dev/null +++ b/packages/playground/vue/src-import/srcImportStyle.vue @@ -0,0 +1,7 @@ + + + diff --git a/packages/playground/vue/src-import/srcImportStyle2.vue b/packages/playground/vue/src-import/srcImportStyle2.vue new file mode 100644 index 00000000000000..1e0f327413103e --- /dev/null +++ b/packages/playground/vue/src-import/srcImportStyle2.vue @@ -0,0 +1,4 @@ + + diff --git a/packages/playground/vue/src-import/style2.css b/packages/playground/vue/src-import/style2.css new file mode 100644 index 00000000000000..8c93cb983cc09d --- /dev/null +++ b/packages/playground/vue/src-import/style2.css @@ -0,0 +1,3 @@ +.src-imports-script { + color: #0088ff; +} diff --git a/packages/playground/vue/src-import/template.html b/packages/playground/vue/src-import/template.html index 305bbad0fbc2f6..6b55c545daac6a 100644 --- a/packages/playground/vue/src-import/template.html +++ b/packages/playground/vue/src-import/template.html @@ -1,3 +1,5 @@

SFC Src Imports

{{ msg }}
This should be tan
+ + diff --git a/packages/playground/vue/vite.config.ts b/packages/playground/vue/vite.config.ts index 4245af73426958..f99a68ce8b6b10 100644 --- a/packages/playground/vue/vite.config.ts +++ b/packages/playground/vue/vite.config.ts @@ -1,5 +1,4 @@ -import path from 'path' -import { defineConfig } from 'vite' +import { defineConfig, splitVendorChunkPlugin } from 'vite' import vuePlugin from '@vitejs/plugin-vue' import { vueI18nPlugin } from './CustomBlockPlugin' @@ -11,13 +10,24 @@ export default defineConfig({ }, plugins: [ vuePlugin({ - refTransform: true + reactivityTransform: true }), + splitVendorChunkPlugin(), vueI18nPlugin ], build: { // to make tests faster - minify: false + minify: false, + rollupOptions: { + output: { + // Test splitVendorChunkPlugin composition + manualChunks(id) { + if (id.includes('src-import')) { + return 'src-import' + } + } + } + } }, css: { modules: { 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

+ +
+ + + diff --git a/packages/playground/worker/modules/module.js b/packages/playground/worker/modules/module.js new file mode 100644 index 00000000000000..8b84d26d5c74f3 --- /dev/null +++ b/packages/playground/worker/modules/module.js @@ -0,0 +1 @@ +export default 'A string' 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/modules/test-plugin.tsx b/packages/playground/worker/modules/test-plugin.tsx new file mode 100644 index 00000000000000..15b6b94f460bc3 --- /dev/null +++ b/packages/playground/worker/modules/test-plugin.tsx @@ -0,0 +1 @@ +export const bundleWithPlugin: string = 'worker bundle with plugin success!' 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 2bcce3faa8a50e..dd6061885128c7 100644 --- a/packages/playground/worker/my-worker.ts +++ b/packages/playground/worker/my-worker.ts @@ -1,7 +1,8 @@ -import { msg, mode } from './workerImport' +import { msg, mode } from './modules/workerImport' +import { bundleWithPlugin } from './modules/test-plugin' self.onmessage = (e) => { if (e.data === 'ping') { - self.postMessage({ msg, mode }) + self.postMessage({ msg, mode, bundleWithPlugin }) } } diff --git a/packages/playground/worker/package.json b/packages/playground/worker/package.json index 325f88f8f30a37..54b737ca2d9cc4 100644 --- a/packages/playground/worker/package.json +++ b/packages/playground/worker/package.json @@ -5,7 +5,13 @@ "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", + "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..eec65b86a0382a --- /dev/null +++ b/packages/playground/worker/sub-worker.js @@ -0,0 +1,5 @@ +self.onmessage = (event) => { + if (event.data === 'ping') { + self.postMessage('pong') + } +} diff --git a/packages/playground/worker/url-shared-worker.js b/packages/playground/worker/url-shared-worker.js new file mode 100644 index 00000000000000..3535d5c277ec84 --- /dev/null +++ b/packages/playground/worker/url-shared-worker.js @@ -0,0 +1,6 @@ +import constant from './modules/module' + +self.onconnect = (event) => { + const port = event.ports[0] + port.postMessage(constant) +} diff --git a/packages/playground/worker/url-worker.js b/packages/playground/worker/url-worker.js new file mode 100644 index 00000000000000..79d05da0f06082 --- /dev/null +++ b/packages/playground/worker/url-worker.js @@ -0,0 +1 @@ +self.postMessage('A string' + import.meta.env.BASE_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.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/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..aa16636c34c73a --- /dev/null +++ b/packages/playground/worker/worker/main-format-es.js @@ -0,0 +1,23 @@ +// 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() +nestedWorker.addEventListener('message', (ev) => { + text('.emti-chunk-worker', JSON.stringify(ev.data)) +}) + +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)) +}) diff --git a/packages/playground/worker/worker/main-module.js b/packages/playground/worker/worker/main-module.js new file mode 100644 index 00000000000000..b66c7299cdf690 --- /dev/null +++ b/packages/playground/worker/worker/main-module.js @@ -0,0 +1,84 @@ +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', () => { + 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 077f29eaa790c0..e92ca1e12357fe 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,25 @@ +## [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) + + + ## [1.6.3](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.2...plugin-legacy@1.6.3) (2021-11-22) 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.d.ts b/packages/plugin-legacy/index.d.ts index 612e6cacda9702..8f340f11cba074 100644 --- a/packages/plugin-legacy/index.d.ts +++ b/packages/plugin-legacy/index.d.ts @@ -1,4 +1,4 @@ -import { Plugin } from 'vite' +import type { Plugin } from 'vite' export interface Options { /** diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 2267cd9cf82b42..626b48f85ea955 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,')};` @@ -37,8 +41,9 @@ function viteLegacyPlugin(options = {}) { const genLegacy = options.renderLegacyChunks !== false const genDynamicFallback = genLegacy - const debugFlag = process.env.DEBUG - const isDebug = debugFlag === 'vite:*' || debugFlag === 'vite:legacy' + const debugFlags = (process.env.DEBUG || '').split(',') + const isDebug = + debugFlags.includes('vite:*') || debugFlags.includes('vite:legacy') const facadeToLegacyChunkMap = new Map() const facadeToLegacyPolyfillMap = new Map() @@ -105,23 +110,6 @@ function viteLegacyPlugin(options = {}) { name: 'vite:legacy-generate-polyfill-chunk', apply: 'build', - config() { - return { - build: { - minify: 'terser' - } - } - }, - - configResolved(config) { - if (!config.build.ssr && genLegacy && config.build.minify === 'esbuild') { - throw new Error( - `Can't use esbuild as the minifier when targeting legacy browsers ` + - `because esbuild minification is not legacy safe.` - ) - } - }, - async generateBundle(opts, bundle) { if (config.build.ssr) { return @@ -297,6 +285,19 @@ function viteLegacyPlugin(options = {}) { // legacy-unsafe code - e.g. rewriting object properties into shorthands opts.__vite_skip_esbuild__ = true + // @ts-ignore force terser for legacy chunks. This only takes effect if + // minification isn't disabled, because that leaves out the terser plugin + // 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) @@ -433,6 +434,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' }, @@ -698,5 +711,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 2ab7f597861915..6f3e44cc3e9fdd 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "1.6.3", + "version": "1.7.1", "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": "node ../../scripts/release.cjs --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.4", - "core-js": "^3.19.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.0.0" + "vite": "^2.8.0" } } diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index 2ed02eec161858..b1d1b8bddba63e 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -1,3 +1,49 @@ +# [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) + + +### Bug Fixes + +* **plugin-react:** check for import React statement in .js files ([#6320](https://github.com/vitejs/vite/issues/6320)) ([bd9e97b](https://github.com/vitejs/vite/commit/bd9e97bd1b9156059b78b531871a12f6f47c04b1)), closes [#6148](https://github.com/vitejs/vite/issues/6148) [#6148](https://github.com/vitejs/vite/issues/6148) +* **plugin-react:** restore-jsx bug when component name is lowercase ([#6110](https://github.com/vitejs/vite/issues/6110)) ([ce65c56](https://github.com/vitejs/vite/commit/ce65c567a64fad3be4209cbd1132e62e905fe349)) + + +### Features + +* **plugin-react:** check for `api.reactBabel` on other plugins ([#5454](https://github.com/vitejs/vite/issues/5454)) ([2ab41b3](https://github.com/vitejs/vite/commit/2ab41b3184d2452be4fa0b427f05c791311644aa)) + + + +## [1.1.3](https://github.com/vitejs/vite/compare/plugin-react@1.1.2...plugin-react@1.1.3) (2021-12-13) + + +### Bug Fixes + +* **plugin-react:** only detect preamble in hmr context ([#6096](https://github.com/vitejs/vite/issues/6096)) ([8735294](https://github.com/vitejs/vite/commit/8735294055ce16308a6b8302eba4538f4a2931d0)) + + + +## [1.1.2](https://github.com/vitejs/vite/compare/plugin-react@1.1.1...plugin-react@1.1.2) (2021-12-13) + + +### Bug Fixes + +* ignore babel config when running restore-jsx ([#6047](https://github.com/vitejs/vite/issues/6047)) ([9c2843c](https://github.com/vitejs/vite/commit/9c2843cf0506844ee32f042a04c22c440434df2a)) + + + +## [1.1.1](https://github.com/vitejs/vite/compare/plugin-react@1.1.0...plugin-react@1.1.1) (2021-12-07) + + + # [1.1.0](https://github.com/vitejs/vite/compare/plugin-react@1.1.0-beta.1...plugin-react@1.1.0) (2021-11-22) diff --git a/packages/plugin-react/README.md b/packages/plugin-react/README.md index 4f3f262d38ddab..588f947ec8b08c 100644 --- a/packages/plugin-react/README.md +++ b/packages/plugin-react/README.md @@ -33,6 +33,16 @@ react({ }) ``` +## Opting out of the automatic JSX runtime + +By default, the plugin uses the [automatic JSX runtime](https://github.com/alloc/vite-react-jsx#faq). However, if you encounter any issues, you may opt out using the `jsxRuntime` option. + +```js +react({ + jsxRuntime: 'classic' +}) +``` + ## Babel configuration The `babel` option lets you add plugins, presets, and [other configuration](https://babeljs.io/docs/en/options) to the Babel transformation performed on each JSX/TSX file. diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index a8942b2abf9e41..f182a7f5a2fb10 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react", - "version": "1.1.0", + "version": "1.2.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": "node ../../scripts/release.cjs" + "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.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-react-jsx-development": "^7.16.0", - "@babel/plugin-transform-react-jsx-self": "^7.16.0", - "@babel/plugin-transform-react-jsx-source": "^7.16.0", - "@rollup/pluginutils": "^4.1.1", + "@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/fast-refresh.ts b/packages/plugin-react/src/fast-refresh.ts index 76d163e4d665e2..70562bbbdfc5b7 100644 --- a/packages/plugin-react/src/fast-refresh.ts +++ b/packages/plugin-react/src/fast-refresh.ts @@ -35,14 +35,14 @@ import RefreshRuntime from "${runtimePublicPath}"; let prevRefreshReg; let prevRefreshSig; -if (!window.__vite_plugin_react_preamble_installed__) { - throw new Error( - "@vitejs/plugin-react can't detect preamble. Something is wrong. " + - "See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201" - ); -} - if (import.meta.hot) { + if (!window.__vite_plugin_react_preamble_installed__) { + throw new Error( + "@vitejs/plugin-react can't detect preamble. Something is wrong. " + + "See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201" + ); + } + prevRefreshReg = window.$RefreshReg$; prevRefreshSig = window.$RefreshSig$; window.$RefreshReg$ = (type, id) => { diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 5cbfc83c9bbbd5..76f6c6c2a799f3 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -32,17 +32,57 @@ 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. */ - babel?: TransformOptions + babel?: BabelOptions /** * @deprecated Use `babel.parserOpts.plugins` instead */ parserPlugins?: ParserOptions['plugins'] } +export type BabelOptions = Omit< + TransformOptions, + | 'ast' + | 'filename' + | 'root' + | 'sourceFileName' + | 'sourceMaps' + | 'inputSourceMap' +> + +/** + * The object type used by the `options` passed to plugins with + * an `api.reactBabel` method. + */ +export interface ReactBabelOptions extends BabelOptions { + plugins: Extract + presets: Extract + overrides: Extract + parserOpts: ParserOptions & { + plugins: Extract + } +} + +declare module 'vite' { + export interface Plugin { + api?: { + /** + * Manipulate the Babel options of `@vitejs/plugin-react` + */ + reactBabel?: (options: ReactBabelOptions, config: ResolvedConfig) => void + } + } +} + export default function viteReact(opts: Options = {}): PluginOption[] { // Provide default values for Rollup compat. let base = '/' @@ -54,11 +94,19 @@ export default function viteReact(opts: Options = {}): PluginOption[] { const useAutomaticRuntime = opts.jsxRuntime !== 'classic' - const userPlugins = opts.babel?.plugins || [] - const userParserPlugins = - opts.parserPlugins || opts.babel?.parserOpts?.plugins || [] + const babelOptions = { + babelrc: false, + configFile: false, + ...opts.babel + } as ReactBabelOptions - // Support pattens like: + babelOptions.plugins ||= [] + babelOptions.presets ||= [] + babelOptions.overrides ||= [] + babelOptions.parserOpts ||= {} as any + babelOptions.parserOpts.plugins ||= opts.parserPlugins || [] + + // Support patterns like: // - import * as React from 'react'; // - import React from 'react'; // - import React, {useEffect} from 'react'; @@ -88,15 +136,21 @@ export default function viteReact(opts: Options = {}): PluginOption[] { ) } - config.plugins.forEach( - (plugin) => - (plugin.name === 'react-refresh' || - (plugin !== viteReactJsx && plugin.name === 'vite:react-jsx')) && - config.logger.warn( + config.plugins.forEach((plugin) => { + const hasConflict = + plugin.name === 'react-refresh' || + (plugin !== viteReactJsx && plugin.name === 'vite:react-jsx') + + if (hasConflict) + return config.logger.warn( `[@vitejs/plugin-react] You should stop using "${plugin.name}" ` + `since this plugin conflicts with it.` ) - ) + + if (plugin.api?.reactBabel) { + plugin.api.reactBabel(babelOptions, config) + } + }) }, async transform(code, id, options) { const ssr = typeof options === 'boolean' ? options : options?.ssr === true @@ -113,12 +167,12 @@ export default function viteReact(opts: Options = {}): PluginOption[] { const isProjectFile = !isNodeModules && (id[0] === '\0' || id.startsWith(projectRoot + '/')) - const plugins = isProjectFile ? [...userPlugins] : [] + const plugins = isProjectFile ? [...babelOptions.plugins] : [] let useFastRefresh = false if (!skipFastRefresh && !ssr && !isNodeModules) { // Modules with .js or .ts extension must import React. - const isReactModule = isJSX || code.includes('react') + const isReactModule = isJSX || importReactRE.test(code) if (isReactModule && filter(id)) { useFastRefresh = true plugins.push([ @@ -147,7 +201,8 @@ export default function viteReact(opts: Options = {}): PluginOption[] { ), { runtime: 'automatic', - importSource: opts.jsxImportSource + importSource: opts.jsxImportSource, + pure: opts.jsxPure !== false } ]) @@ -179,15 +234,15 @@ export default function viteReact(opts: Options = {}): PluginOption[] { // module, including node_modules and linked packages. const shouldSkip = !plugins.length && - !opts.babel?.configFile && - !(isProjectFile && opts.babel?.babelrc) + !babelOptions.configFile && + !(isProjectFile && babelOptions.babelrc) if (shouldSkip) { return // Avoid parsing if no plugins exist. } - const parserPlugins: typeof userParserPlugins = [ - ...userParserPlugins, + const parserPlugins: typeof babelOptions.parserOpts.plugins = [ + ...babelOptions.parserOpts.plugins, 'importMeta', // This plugin is applied before esbuild transforms the code, // so we need to enable some stage 3 syntax that is supported in @@ -206,35 +261,32 @@ export default function viteReact(opts: Options = {}): PluginOption[] { parserPlugins.push('typescript') } - const isReasonReact = extension.endsWith('.bs.js') + const transformAsync = ast + ? babel.transformFromAstAsync.bind(babel, ast, code) + : babel.transformAsync.bind(babel, code) - const babelOpts: TransformOptions = { - babelrc: false, - configFile: false, - ...opts.babel, + const isReasonReact = extension.endsWith('.bs.js') + const result = await transformAsync({ + ...babelOptions, ast: !isReasonReact, root: projectRoot, filename: id, sourceFileName: filepath, parserOpts: { - ...opts.babel?.parserOpts, + ...babelOptions.parserOpts, sourceType: 'module', allowAwaitOutsideFunction: true, plugins: parserPlugins }, generatorOpts: { - ...opts.babel?.generatorOpts, + ...babelOptions.generatorOpts, decoratorsBeforeExport: true }, plugins, sourceMaps: true, // Vite handles sourcemap flattening inputSourceMap: false as any - } - - const result = ast - ? await babel.transformFromAstAsync(ast, code, babelOpts) - : await babel.transformAsync(code, babelOpts) + }) if (result) { let code = result.code! @@ -323,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/babel-import-to-require.ts b/packages/plugin-react/src/jsx-runtime/babel-import-to-require.ts index 936d88b0c8472b..dc7129862fd976 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-import-to-require.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-import-to-require.ts @@ -1,3 +1,4 @@ +import type * as babelCore from '@babel/core' import type { types as t, Visitor } from '@babel/core' /** @@ -9,9 +10,7 @@ import type { types as t, Visitor } from '@babel/core' * * var _jsx = require("react/jsx-runtime").jsx */ -export function babelImportToRequire({ - types: t -}: typeof import('@babel/core')): { +export function babelImportToRequire({ types: t }: typeof babelCore): { visitor: Visitor } { return { diff --git a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts index 60e330e4003b03..59d6661bedd11b 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts @@ -108,4 +108,10 @@ describe('babel-restore-jsx', () => { ) ).toMatchInlineSnapshot(`"

{foo ?

: null}

;"`) }) + + it('should handle lowercase component names', () => { + expect(jsx('React.createElement(aaa)')).toMatchInlineSnapshot( + `"React.createElement(aaa);"` + ) + }) }) diff --git a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts index 0ac0a1f831c79a..669a0aeeced207 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts @@ -2,7 +2,7 @@ * https://github.com/flying-sheep/babel-plugin-transform-react-createelement-to-jsx * @license GNU General Public License v3.0 */ -import * as babel from '@babel/core' +import type * as babel from '@babel/core' /** * Visitor factory for babel, converting React.createElement(...) to ... @@ -76,7 +76,7 @@ export default function ({ types: t }: typeof babel): babel.PluginObj { return null } - const name = getJSXIdentifier(node) + const name = getJSXIdentifier(node, true) if (name != null) { return name } @@ -152,9 +152,9 @@ export default function ({ types: t }: typeof babel): babel.PluginObj { return children } - function getJSXIdentifier(node: any) { + function getJSXIdentifier(node: any, tag = false) { //TODO: JSXNamespacedName - if (t.isIdentifier(node)) { + if (t.isIdentifier(node) && (!tag || node.name.match(/^[A-Z]/))) { return t.jsxIdentifier(node.name) } if (t.isStringLiteral(node)) { diff --git a/packages/plugin-react/src/jsx-runtime/restore-jsx.ts b/packages/plugin-react/src/jsx-runtime/restore-jsx.ts index 250fe43ce4d0c8..268153f4ba5d45 100644 --- a/packages/plugin-react/src/jsx-runtime/restore-jsx.ts +++ b/packages/plugin-react/src/jsx-runtime/restore-jsx.ts @@ -1,3 +1,4 @@ +import type * as babelCore from '@babel/core' import type { PluginItem, types as t } from '@babel/core' type RestoredJSX = [result: t.File | null | undefined, isCommonJS: boolean] @@ -8,7 +9,7 @@ const jsxNotFound: RestoredJSX = [null, false] /** Restore JSX from `React.createElement` calls */ export async function restoreJSX( - babel: typeof import('@babel/core'), + babel: typeof babelCore, code: string, filename: string ): Promise { @@ -48,13 +49,16 @@ export async function restoreJSX( babelRestoreJSX ||= import('./babel-restore-jsx') const result = await babel.transformAsync(code, { + babelrc: false, + configFile: false, ast: true, code: false, filename, 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 310ff252d3be03..43632e9a88ade8 100644 --- a/packages/plugin-vue-jsx/CHANGELOG.md +++ b/packages/plugin-vue-jsx/CHANGELOG.md @@ -1,3 +1,50 @@ +## [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) + + + +## [1.3.2](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.1...plugin-vue-jsx@1.3.2) (2021-12-13) + + +### Bug Fixes + +* allow overwriting `define` options in vue & vue-jsx plugins ([#6072](https://github.com/vitejs/vite/issues/6072)) ([5f3f6b7](https://github.com/vitejs/vite/commit/5f3f6b7b406cb3371084057c74814eb36175e5cf)) + + + +## [1.3.1](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.0...plugin-vue-jsx@1.3.1) (2021-12-07) + + + # [1.3.0](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.3.0-beta.0...plugin-vue-jsx@1.3.0) (2021-11-22) diff --git a/packages/plugin-vue-jsx/index.d.ts b/packages/plugin-vue-jsx/index.d.ts index 2cac80ba56632e..a702c09baa8417 100644 --- a/packages/plugin-vue-jsx/index.d.ts +++ b/packages/plugin-vue-jsx/index.d.ts @@ -1,6 +1,6 @@ -import { Plugin } from 'vite' -import { VueJSXPluginOptions } from '@vue/babel-plugin-jsx' -import { FilterPattern } from '@rollup/pluginutils' +import type { Plugin } from 'vite' +import type { VueJSXPluginOptions } from '@vue/babel-plugin-jsx' +import type { FilterPattern } from '@rollup/pluginutils' declare interface FilterOptions { include?: FilterPattern diff --git a/packages/plugin-vue-jsx/index.js b/packages/plugin-vue-jsx/index.js index a520ae176dd770..248270765d19a1 100644 --- a/packages/plugin-vue-jsx/index.js +++ b/packages/plugin-vue-jsx/index.js @@ -48,6 +48,12 @@ function vueJsxPlugin(options = {}) { name: 'vite:vue-jsx', config(config) { + const optionsApi = config.define + ? config.define.__VUE_OPTIONS_API__ + : undefined + const devTools = config.define + ? config.define.__VUE_PROD_DEVTOOLS__ + : undefined return { // only apply esbuild to ts files // since we are handling jsx and tsx now @@ -55,9 +61,8 @@ function vueJsxPlugin(options = {}) { include: /\.ts$/ }, define: { - __VUE_OPTIONS_API__: true, - __VUE_PROD_DEVTOOLS__: false, - ...config.define + __VUE_OPTIONS_API__: optionsApi != null ? optionsApi : true, + __VUE_PROD_DEVTOOLS__: devTools != null ? devTools : false } } }, @@ -90,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 3a400dda99bd32..ed807955ed0c87 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.0", + "version": "1.3.8", "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": "node ../../scripts/release.cjs --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.0", + "@babel/core": "^7.17.8", "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-typescript": "^7.16.1", - "@rollup/pluginutils": "^4.1.1", + "@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 15cfcbecef213b..c4b3f8e1a1ddb0 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,9 +1,110 @@ +## 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) + + +### Bug Fixes + +* **plugin-vue:** error.length is zero ([#6106](https://github.com/vitejs/vite/issues/6106)) ([5ec49be](https://github.com/vitejs/vite/commit/5ec49befad4d7b5e7cc14f14520ba96d5b6f6d69)) + + + +# [2.0.0](https://github.com/vitejs/vite/compare/plugin-vue@1.10.2...plugin-vue@2.0.0) (2021-12-12) + + +### Bug Fixes + +* allow overwriting `define` options in vue & vue-jsx plugins ([#6072](https://github.com/vitejs/vite/issues/6072)) ([5f3f6b7](https://github.com/vitejs/vite/commit/5f3f6b7b406cb3371084057c74814eb36175e5cf)) +* **plugin-vue:** multiple vue files using the same src file (fix [#5925](https://github.com/vitejs/vite/issues/5925), [#5447](https://github.com/vitejs/vite/issues/5447)) ([#5994](https://github.com/vitejs/vite/issues/5994)) ([df7aec7](https://github.com/vitejs/vite/commit/df7aec7d2a567af1dfbab76e5765aba80dc3cb5c)) + + +### Code Refactoring + +* **plugin-vue:** resolve vue/compiler-sfc from project root ([ce8b0fe](https://github.com/vitejs/vite/commit/ce8b0feae334cc224b3f4d2fdb2bffbb62322acf)) + + +### Features + +* **plugin-vue:** add `reactivityTransform` option. ([955d0fe](https://github.com/vitejs/vite/commit/955d0fecd936b8175d7a7e4355eab855eb4567f8)) + + +### BREAKING CHANGES + +* **plugin-vue:** `refTransform` option has been replaced by +`reactivityTransform` option. Now also requires vue@^3.2.25. +* **plugin-vue:** now requires vue@^3.2.13 as peer dep + + + +## [1.10.2](https://github.com/vitejs/vite/compare/plugin-vue@1.10.1...plugin-vue@1.10.2) (2021-12-07) + + +### Bug Fixes + +* **plugin-vue:** misleading error thrown after refresh or hmr ([#5870](https://github.com/vitejs/vite/issues/5870)) ([5c07cec](https://github.com/vitejs/vite/commit/5c07cec7214948da73fbbc33c7f5c83bf7f6cd2e)) + + + ## [1.10.1](https://github.com/vitejs/vite/compare/plugin-vue@1.10.0...plugin-vue@1.10.1) (2021-11-26) ### 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 96f9cbb1414a84..a232982e8aed59 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -22,7 +22,7 @@ export interface Options { isProduction?: boolean /** - * Transform Vue SFCs into custom elements (requires Vue >= 3.2.0) + * Transform Vue SFCs into custom elements (requires vue@^3.2.0) * - `true` -> all `*.vue` imports are converted into custom elements * - `string | RegExp` -> matched files are converted into custom elements * @@ -31,10 +31,8 @@ export interface Options { customElement?: boolean | string | RegExp | (string | RegExp)[] /** - * Enable Vue ref transform (experimental). - * https://github.com/vuejs/vue-next/tree/master/packages/ref-transform - * - * **requires Vue \>= 3.2.5** + * Enable Vue reactivity transform (experimental, requires vue@^3.2.25). + * 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 @@ -44,7 +42,7 @@ export interface Options { * * @default false */ - refTransform?: boolean | string | RegExp | (string | RegExp)[] + reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] // options to pass on to vue/compiler-sfc script?: Partial @@ -53,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' @@ -64,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 41001dc51e2e9f..bf4749ac8ee428 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "1.10.1", + "version": "2.3.0-beta.0", "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": "node ../../scripts/release.cjs" + "prepublishOnly": "(cd ../vite && npm run build) && npm run build" }, "engines": { "node": ">=12.0.0" @@ -31,17 +31,17 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue#readme", "peerDependencies": { - "vite": "^2.5.10" + "vite": "^2.5.10", + "vue": "^3.2.25" }, "devDependencies": { - "@rollup/pluginutils": "^4.1.1", + "@rollup/pluginutils": "^4.2.0", "@types/hash-sum": "^1.0.0", - "@vue/compiler-sfc": "^3.2.23", - "debug": "^4.3.2", + "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.23" + "vue": "^3.2.31" } } diff --git a/packages/plugin-vue/src/compiler.ts b/packages/plugin-vue/src/compiler.ts index e7ece1dfc073b2..9c70f6a8a64590 100644 --- a/packages/plugin-vue/src/compiler.ts +++ b/packages/plugin-vue/src/compiler.ts @@ -1,25 +1,30 @@ // extend the descriptor so we can store the scopeId on it -declare module '@vue/compiler-sfc' { +declare module 'vue/compiler-sfc' { interface SFCDescriptor { id: string } } -import * as _compiler from '@vue/compiler-sfc' +import type * as _compiler from 'vue/compiler-sfc' -export let compiler: typeof _compiler +export function resolveCompiler(root: string): typeof _compiler { + // resolve from project root first, then fallback to peer dep (if any) + const compiler = + tryRequire('vue/compiler-sfc', root) || tryRequire('vue/compiler-sfc') -try { - // Vue 3.2.13+ ships the SFC compiler directly under the `vue` package - // making it no longer necessary to have @vue/compiler-sfc separately installed. - compiler = require('vue/compiler-sfc') -} catch (e) { - try { - compiler = require('@vue/compiler-sfc') - } catch (e) { + if (!compiler) { throw new Error( - `@vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc ` + + `Failed to resolve vue/compiler-sfc.\n` + + `@vitejs/plugin-vue requires vue (>=3.2.25) ` + `to be present in the dependency tree.` ) } + + return compiler +} + +function tryRequire(id: string, from?: string) { + try { + return from ? require(require.resolve(id, { paths: [from] })) : require(id) + } catch (e) {} } diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index 4f472114e637cb..7c2a7ef7ee2f1f 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -1,13 +1,13 @@ import _debug from 'debug' -import { SFCBlock, SFCDescriptor } from '@vue/compiler-sfc' +import type { SFCBlock, SFCDescriptor } from 'vue/compiler-sfc' import { createDescriptor, getDescriptor, setPrevDescriptor } from './utils/descriptorCache' import { getResolvedScript, setResolvedScript } from './script' -import { ModuleNode, HmrContext } from 'vite' -import { ResolvedOptions } from '.' +import type { ModuleNode, HmrContext } from 'vite' +import type { ResolvedOptions } from '.' const debug = _debug('vite:hmr') @@ -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 71ec6e7a4bef47..7bdf63b700fa15 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -1,15 +1,16 @@ import fs from 'fs' -import { Plugin, ViteDevServer } from 'vite' +import type { Plugin, ViteDevServer } from 'vite' import { createFilter } from '@rollup/pluginutils' -import { +import type { SFCBlock, SFCScriptCompileOptions, SFCStyleCompileOptions, SFCTemplateCompileOptions -} from '@vue/compiler-sfc' -import { compiler } from './compiler' +} from 'vue/compiler-sfc' +import type * as _compiler from 'vue/compiler-sfc' +import { resolveCompiler } from './compiler' import { parseVueRequest } from './utils/query' -import { getDescriptor } from './utils/descriptorCache' +import { getDescriptor, getSrcDescriptor } from './utils/descriptorCache' import { getResolvedScript } from './script' import { transformMain } from './main' import { handleHotUpdate } from './handleHotUpdate' @@ -25,14 +26,13 @@ export interface Options { isProduction?: boolean - // options to pass on to @vue/compiler-sfc + // options to pass on to vue/compiler-sfc script?: Partial template?: Partial style?: Partial /** * Transform Vue SFCs into custom elements. - * **requires Vue \>= 3.2.0 & Vite \>= 2.4.4** * - `true`: all `*.vue` imports are converted into custom elements * - `string | RegExp`: matched files are converted into custom elements * @@ -41,11 +41,8 @@ export interface Options { customElement?: boolean | string | RegExp | (string | RegExp)[] /** - * Enable Vue ref transform (experimental). - * https://github.com/vuejs/vue-next/tree/master/packages/ref-transform - * - * **requires Vue \>= 3.2.5** - * + * Enable Vue reactivity transform (experimental). + * 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 @@ -54,18 +51,21 @@ export interface Options { * * @default false */ - refTransform?: boolean | string | RegExp | (string | RegExp)[] + reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] /** - * @deprecated the plugin now auto-detects whether it's being invoked for ssr. + * Use custom compiler-sfc instance. Can be used to force a specific version. */ - ssr?: boolean + compiler?: typeof _compiler } 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 { @@ -73,7 +73,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { include = /\.vue$/, exclude, customElement = /\.ce\.vue$/, - refTransform = false + reactivityTransform = false } = rawOptions const filter = createFilter(include, exclude) @@ -84,30 +84,30 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { : createFilter(customElement) const refTransformFilter = - refTransform === false + reactivityTransform === false ? () => false - : refTransform === true + : reactivityTransform === true ? createFilter(/\.(j|t)sx?$/, /node_modules/) - : createFilter(refTransform) - - // compat for older versions - const canUseRefTransform = typeof compiler.shouldTransformRef === 'function' + : createFilter(reactivityTransform) let options: ResolvedOptions = { isProduction: process.env.NODE_ENV === 'production', + compiler: null as any, // to be set in buildStart ...rawOptions, include, exclude, customElement, - refTransform, + reactivityTransform, root: process.cwd(), - sourceMap: true + sourceMap: true, + cssDevSourcemap: false, + devToolsEnabled: process.env.NODE_ENV !== 'production' } // Temporal handling for 2.7 breaking change const isSSR = (opt: { ssr?: boolean } | boolean | undefined) => opt === undefined - ? !!options.ssr + ? false : typeof opt === 'boolean' ? opt : opt?.ssr === true @@ -125,8 +125,8 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { config(config) { return { define: { - __VUE_OPTIONS_API__: true, - __VUE_PROD_DEVTOOLS__: false + __VUE_OPTIONS_API__: config.define?.__VUE_OPTIONS_API__ ?? true, + __VUE_PROD_DEVTOOLS__: config.define?.__VUE_PROD_DEVTOOLS__ ?? false }, ssr: { external: ['vue', '@vue/server-renderer'] @@ -139,7 +139,10 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { ...options, root: config.root, sourceMap: config.command === 'build' ? !!config.build.sourcemap : true, - isProduction: config.isProduction + cssDevSourcemap: config.css?.devSourcemap ?? false, + isProduction: config.isProduction, + devToolsEnabled: + !!config.define!.__VUE_PROD_DEVTOOLS__ || !config.isProduction } }, @@ -147,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) { @@ -198,15 +205,15 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { return } if (!filter(filename) && !query.vue) { - if (!query.vue && refTransformFilter(filename)) { - if (!canUseRefTransform) { - this.warn('refTransform requires @vue/compiler-sfc@^3.2.5.') - } else if (compiler.shouldTransformRef(code)) { - return compiler.transformRef(code, { - filename, - sourceMap: true - }) - } + if ( + !query.vue && + refTransformFilter(filename) && + options.compiler.shouldTransformRef(code) + ) { + return options.compiler.transformRef(code, { + filename, + sourceMap: true + }) } return } @@ -223,7 +230,10 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { ) } else { // sub block request - const descriptor = getDescriptor(filename, options)! + const descriptor = query.src + ? getSrcDescriptor(filename, query)! + : getDescriptor(filename, options)! + if (query.type === 'template') { return transformTemplateAsModule(code, descriptor, options, this, ssr) } else if (query.type === 'style') { @@ -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 bb3076763844bd..44b1de74721efd 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -1,19 +1,19 @@ import qs from 'querystring' import path from 'path' -import { SFCBlock, SFCDescriptor } from '@vue/compiler-sfc' -import { compiler } from './compiler' -import { ResolvedOptions } from '.' +import type { SFCBlock, SFCDescriptor } from 'vue/compiler-sfc' +import type { ResolvedOptions } from '.' import { createDescriptor, getPrevDescriptor, - setDescriptor + setSrcDescriptor } from './utils/descriptorCache' -import { PluginContext, SourceMap, TransformPluginContext } from 'rollup' +import type { PluginContext, SourceMap, TransformPluginContext } from 'rollup' import { normalizePath } from '@rollup/pluginutils' import { resolveScript, isUseInlineTemplate } from './script' import { transformTemplateInMain } from './template' import { isOnlyTemplateChanged, isEqualBlock } from './handleHotUpdate' -import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map' +import type { RawSourceMap } from 'source-map' +import { SourceMapConsumer, SourceMapGenerator } from 'source-map' import { createRollupError } from './utils/error' import { transformWithEsbuild } from 'vite' import { EXPORT_HELPER_ID } from './helper' @@ -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({ @@ -237,7 +240,7 @@ async function genTemplateCode( await linkSrcToDescriptor(template.src, descriptor, pluginContext) } const src = template.src || descriptor.filename - const srcQuery = template.src ? `&src` : `` + const srcQuery = template.src ? `&src=${descriptor.id}` : `` const attrsQuery = attrsToQuery(template.attrs, 'js', true) const query = `?vue&type=template${srcQuery}${attrsQuery}` const request = JSON.stringify(src + query) @@ -266,7 +269,7 @@ async function genScriptCode( // If the script is js/ts and has no external src, it can be directly placed // in the main module. if ((!script.lang || script.lang === 'ts') && !script.src) { - scriptCode = compiler.rewriteDefault( + scriptCode = options.compiler.rewriteDefault( script.content, '_sfc_main', script.lang === 'ts' ? ['typescript'] : undefined @@ -279,7 +282,7 @@ async function genScriptCode( const src = script.src || descriptor.filename const langFallback = (script.src && path.extname(src).slice(1)) || 'js' const attrsQuery = attrsToQuery(script.attrs, langFallback) - const srcQuery = script.src ? `&src` : `` + const srcQuery = script.src ? `&src=${descriptor.id}` : `` const query = `?vue&type=script${srcQuery}${attrsQuery}` const request = JSON.stringify(src + query) scriptCode = @@ -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] @@ -310,7 +313,7 @@ async function genStyleCode( // do not include module in default query, since we use it to indicate // that the module needs to export the modules json const attrsQuery = attrsToQuery(style.attrs, 'css') - const srcQuery = style.src ? `&src` : `` + const srcQuery = style.src ? `&src=${descriptor.id}` : `` const directQuery = asCustomElement ? `&inline` : `` const query = `?vue&type=style&index=${i}${srcQuery}${directQuery}` const styleRequest = src + query + attrsQuery @@ -320,12 +323,13 @@ async function genStyleCode( ` + if (node.tag === 'style' && node.children.length) { + const styleNode = node.children.pop() as TextNode + const filePath = id.replace(normalizePath(config.root), '') + inlineModuleIndex++ + addToHTMLProxyCache(config, filePath, inlineModuleIndex, { + code: styleNode.content + }) + js += `\nimport "${id}?html-proxy&index=${inlineModuleIndex}.css"` + shouldRemove = true + } if (shouldRemove) { // remove the script tag from the html. we are going to inject new @@ -299,28 +403,54 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { } // for each encountered asset url, rewrite original html so that it - // references the post-build location. + // references the post-build location, ignoring empty attributes and + // attributes that directly reference named output. + const namedOutput = Object.keys( + config?.build?.rollupOptions?.input || {} + ) for (const attr of assetUrls) { const value = attr.value! - try { - const url = - attr.name === 'srcset' - ? await processSrcSet(value.content, ({ url }) => - urlToBuiltUrl(url, id, config, this) - ) - : await urlToBuiltUrl(value.content, id, config, this) + // assetsUrl may be encodeURI + const content = decodeURI(value.content) + if ( + content !== '' && // Empty attribute + !namedOutput.includes(content) && // Direct reference to named output + !namedOutput.includes(content.replace(/^\//, '')) // Allow for absolute references as named output can't be an absolute path + ) { + try { + const url = + attr.name === 'srcset' + ? await processSrcSet(content, ({ url }) => + urlToBuiltUrl(url, id, config, this) + ) + : await urlToBuiltUrl(content, id, config, this) + s.overwrite( + value.loc.start.offset, + value.loc.end.offset, + `"${url}"`, + { contentOnly: true } + ) + } catch (e) { + if (e.code !== 'ENOENT') { + throw e + } + } + } + } + // emit asset + for (const { start, end, url } of scriptUrls) { + if (!isExcludedUrl(url)) { s.overwrite( - value.loc.start.offset, - value.loc.end.offset, - `"${url}"` + start, + end, + await urlToBuiltUrl(url, id, config, this), + { contentOnly: true } ) - } catch (e) { - // #1885 preload may be pointing to urls that do not exist - // locally on disk - if (e.code !== 'ENOENT') { - throw e - } + } else if (checkPublicFile(url, config)) { + s.overwrite(start, end, config.base + url.slice(1), { + contentOnly: true + }) } } @@ -394,31 +524,26 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { }) } - const cssFiles = chunkToEmittedCssFileMap.get(chunk) - if (cssFiles) { - cssFiles.forEach((file) => { - if (!seen.has(file)) { - seen.add(file) - tags.push({ - tag: 'link', - attrs: { - rel: 'stylesheet', - href: toPublicPath(file, config) - } - }) - } - }) - } + chunk.viteMetadata.importedCss.forEach((file) => { + if (!seen.has(file)) { + seen.add(file) + tags.push({ + tag: 'link', + attrs: { + rel: 'stylesheet', + href: toPublicPath(file, config) + } + }) + } + }) + return tags } for (const [id, html] of processedHtml) { const isAsync = isAsyncScriptMap.get(config)!.get(id)! - // resolve asset url references - let result = html.replace(assetUrlRE, (_, fileHash, postfix = '') => { - return config.base + getAssetFilename(fileHash, config) + postfix - }) + let result = html // find corresponding entry chunk const chunk = Object.values(bundle).find( @@ -470,12 +595,33 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { } const shortEmitName = path.posix.relative(config.root, id) + // no use assets plugin because it will emit file + let match: RegExpExecArray | null + let s: MagicString | undefined + while ((match = inlineCSSRE.exec(result))) { + s ||= new MagicString(result) + const { 0: full, 1: scopedName } = match + const cssTransformedCode = htmlProxyResult.get(scopedName)! + s.overwrite( + match.index, + match.index + full.length, + cssTransformedCode, + { contentOnly: true } + ) + } + if (s) { + result = s.toString() + } result = await applyHtmlTransforms(result, postHooks, { path: '/' + shortEmitName, filename: id, bundle, chunk }) + // resolve asset url references + result = result.replace(assetUrlRE, (_, fileHash, postfix = '') => { + return config.base + getAssetFilename(fileHash, config) + postfix + }) if (chunk && canInlineEntry) { // all imports from entry have been inlined to html, prevent rollup from outputting it @@ -559,6 +705,8 @@ export function resolveHtmlTransforms( return [preHooks, postHooks] } +export const maybeVirtualHtmlSet = new Set() + export async function applyHtmlTransforms( html: string, hooks: IndexHtmlTransformHook[], @@ -569,6 +717,8 @@ export async function applyHtmlTransforms( const bodyTags: HtmlTagDescriptor[] = [] const bodyPrependTags: HtmlTagDescriptor[] = [] + maybeVirtualHtmlSet.add(ctx.filename) + for (const hook of hooks) { const res = await hook(html, ctx) if (!res) { diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index 13bb8967279af1..e7336ae4947677 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -1,10 +1,11 @@ import fs from 'fs' import path from 'path' -import { Plugin } from '../plugin' -import { ResolvedConfig } from '../config' -import chalk from 'chalk' +import type { Plugin } from '../plugin' +import type { ResolvedConfig } from '../config' +import colors from 'picocolors' import MagicString from 'magic-string' -import { init, parse as parseImports, ImportSpecifier } from 'es-module-lexer' +import type { ImportSpecifier } from 'es-module-lexer' +import { init, parse as parseImports } from 'es-module-lexer' import { isCSSRequest, isDirectCSSRequest } from './css' import { isBuiltin, @@ -20,7 +21,8 @@ import { normalizePath, removeImportQuery, unwrapId, - moduleListContains + moduleListContains, + fsPathFromUrl } from '../utils' import { debugHmr, @@ -35,7 +37,8 @@ import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from '../constants' -import { ViteDevServer } from '..' +import { ERR_OUTDATED_OPTIMIZED_DEP } from './optimizedDeps' +import type { ViteDevServer } from '..' import { checkPublicFile } from './asset' import { parse as parseJS } from 'acorn' import type { Node } from 'estree' @@ -44,6 +47,11 @@ import { makeLegalIdentifier } from '@rollup/pluginutils' import { shouldExternalizeForSSR } from '../ssr/ssrExternal' import { performance } from 'perf_hooks' import { transformRequest } from '../server/transformRequest' +import { + isOptimizedDepFile, + getDepsCacheDir, + optimizedDepNeedsInterop +} from '../optimizer' const isDebug = !!process.env.DEBUG const debug = createDebugger('vite:import-analysis') @@ -53,6 +61,9 @@ const clientDir = normalizePath(CLIENT_DIR) const skipRE = /\.(map|json)$/ const canSkip = (id: string) => skipRE.test(id) || isDirectCSSRequest(id) +const optimizedDepChunkRE = /\/chunk-[A-Z0-9]{8}\.js/ +const optimizedDepDynamicRE = /-[A-Z0-9]{8}\.js/ + function isExplicitImportRequired(url: string) { return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url) } @@ -96,7 +107,11 @@ function markExplicitImport(url: string) { export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const { root, base } = config const clientPublicPath = path.posix.join(base, CLIENT_PUBLIC_PATH) - + const resolve = config.createResolver({ + preferRelative: true, + tryIndex: false, + extensions: [] + }) let server: ViteDevServer return { @@ -111,7 +126,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const prettyImporter = prettifyUrl(importer, root) if (canSkip(importer)) { - isDebug && debug(chalk.dim(`[skipped] ${prettyImporter}`)) + isDebug && debug(colors.dim(`[skipped] ${prettyImporter}`)) return null } @@ -147,7 +162,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { if (!imports.length) { isDebug && debug( - `${timeFrom(start)} ${chalk.dim(`[no imports] ${prettyImporter}`)}` + `${timeFrom(start)} ${colors.dim(`[no imports] ${prettyImporter}`)}` ) return source } @@ -182,19 +197,20 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { } let importerFile = importer - if ( - moduleListContains(config.optimizeDeps?.exclude, url) && - server._optimizeDepsMetadata - ) { - // if the dependency encountered in the optimized file was excluded from the optimization - // the dependency needs to be resolved starting from the original source location of the optimized file - // because starting from node_modules/.vite will not find the dependency if it was not hoisted - // (that is, if it is under node_modules directory in the package source of the optimized file) - for (const optimizedModule of Object.values( - server._optimizeDepsMetadata.optimized - )) { - if (optimizedModule.file === importerModule.file) { - importerFile = optimizedModule.src + if (moduleListContains(config.optimizeDeps?.exclude, url)) { + const optimizedDeps = server._optimizedDeps + if (optimizedDeps) { + await optimizedDeps.scanProcessing + + // if the dependency encountered in the optimized file was excluded from the optimization + // the dependency needs to be resolved starting from the original source location of the optimized file + // because starting from node_modules/.vite will not find the dependency if it was not hoisted + // (that is, if it is under node_modules directory in the package source of the optimized file) + for (const optimizedModule of optimizedDeps.metadata.depInfoList) { + if (!optimizedModule.src) continue // Ignore chunks + if (optimizedModule.file === importerModule.file) { + importerFile = optimizedModule.src + } } } } @@ -202,6 +218,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const resolved = await this.resolve(url, importerFile) if (!resolved) { + // in ssr, we should let node handle the missing modules + if (ssr) { + return [url, url] + } this.error( `Failed to resolve import "${url}" from "${path.relative( process.cwd(), @@ -215,12 +235,16 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const isSelfImport = !isRelative && cleanUrl(url) === cleanUrl(importer) // normalize all imports into resolved URLs - // e.g. `import 'foo'` -> `import '/@fs/.../node_modules/foo/index.js` + // e.g. `import 'foo'` -> `import '/@fs/.../node_modules/foo/index.js'` if (resolved.id.startsWith(root + '/')) { // in root: infer short absolute path from root url = resolved.id.slice(root.length) - } else if (fs.existsSync(cleanUrl(resolved.id))) { - // exists but out of root: rewrite to absolute /@fs/ paths + } else if ( + resolved.id.startsWith(getDepsCacheDir(config)) || + fs.existsSync(cleanUrl(resolved.id)) + ) { + // an optimized deps may not yet exists in the filesystem, or + // a regular file exists but is out of root: rewrite to absolute /@fs/ paths url = path.posix.join(FS_PREFIX + resolved.id) } else { url = resolved.id @@ -243,11 +267,16 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { // mark non-js/css imports with `?import` url = markExplicitImport(url) + // If the url isn't a request for a pre-bundled common chunk, // for relative js/css imports, or self-module virtual imports // (e.g. vue blocks), inherit importer's version query // do not do this for unknown type imports, otherwise the appended // query can break 3rd party plugin's extension checks. - if ((isRelative || isSelfImport) && !/[\?&]import=?\b/.test(url)) { + if ( + (isRelative || isSelfImport) && + !/[\?&]import=?\b/.test(url) && + !url.match(DEP_VERSION_RE) + ) { const versionMatch = importer.match(DEP_VERSION_RE) if (versionMatch) { url = injectQuery(url, versionMatch[1]) @@ -258,7 +287,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { // its last updated timestamp to force the browser to fetch the most // up-to-date version of this module. try { - const depModule = await moduleGraph.ensureEntryFromUrl(url) + const depModule = await moduleGraph.ensureEntryFromUrl(url, ssr) if (depModule.lastHMRTimestamp > 0) { url = injectQuery(url, `t=${depModule.lastHMRTimestamp}`) } @@ -276,6 +305,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { return [url, resolved.id] } + // Import rewrites, we do them after all the URLs have been resolved + // to help with the discovery of new dependencies. If we need to wait + // for each dependency there could be one reload per import + const importRewrites: (() => Promise)[] = [] + for (let index = 0; index < imports.length; index++) { const { s: start, @@ -327,10 +361,12 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { importer, index, root, - normalizeUrl + config.logger, + normalizeUrl, + resolve ) str().prepend(importsString) - str().overwrite(expStart, endIndex, exp) + str().overwrite(expStart, endIndex, exp, { contentOnly: true }) imports.forEach((url) => { url = url.replace(base, '/') importedUrls.add(url) @@ -350,7 +386,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { continue } - const isDynamicImport = dynamicIndex >= 0 + const isDynamicImport = dynamicIndex > -1 // static import or valid string in dynamic import // If resolvable, let's resolve it @@ -395,39 +431,81 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { specifier, start ) - let url = normalizedUrl + const url = normalizedUrl // record as safe modules - server?.moduleGraph.safeModulesPath.add( - cleanUrl(url).slice(4 /* '/@fs'.length */) - ) + server?.moduleGraph.safeModulesPath.add(fsPathFromUrl(url)) - // rewrite if (url !== specifier) { - // for optimized cjs deps, support named imports by rewriting named - // imports to const assignments. - if (resolvedId.endsWith(`&es-interop`)) { - url = url.slice(0, -11) - if (isDynamicImport) { - // rewrite `import('package')` to expose the default directly - str().overwrite( - dynamicIndex, - end + 1, - `import('${url}').then(m => m.default && m.default.__esModule ? m.default : ({ ...m.default, default: m.default }))` + importRewrites.push(async () => { + let rewriteDone = false + if ( + server?._optimizedDeps && + isOptimizedDepFile(resolvedId, config) && + !resolvedId.match(optimizedDepChunkRE) + ) { + // for optimized cjs deps, support named imports by rewriting named imports to const assignments. + // internal optimized chunks don't need es interop and are excluded + + // The browserHash in resolvedId could be stale in which case there will be a full + // page reload. We could return a 404 in that case but it is safe to return the request + const file = cleanUrl(resolvedId) // Remove ?v={hash} + + const needsInterop = await optimizedDepNeedsInterop( + server._optimizedDeps!.metadata, + file ) - } else { - const exp = source.slice(expStart, expEnd) - const rewritten = transformCjsImport(exp, url, rawUrl, index) - if (rewritten) { - str().overwrite(expStart, expEnd, rewritten) - } else { - // #1439 export * from '...' - str().overwrite(start, end, url) + + if (needsInterop === undefined) { + // Non-entry dynamic imports from dependencies will reach here as there isn't + // optimize info for them, but they don't need es interop. If the request isn't + // a dynamic import, then it is an internal Vite error + if (!file.match(optimizedDepDynamicRE)) { + config.logger.error( + colors.red( + `Vite Error, ${url} optimized info should be defined` + ) + ) + } + } else if (needsInterop) { + debug(`${url} needs interop`) + if (isDynamicImport) { + // rewrite `import('package')` to expose the default directly + str().overwrite( + expStart, + expEnd, + `import('${url}').then(m => m.default && m.default.__esModule ? m.default : ({ ...m.default, default: m.default }))`, + { contentOnly: true } + ) + } else { + const exp = source.slice(expStart, expEnd) + const rewritten = transformCjsImport( + exp, + url, + rawUrl, + index + ) + if (rewritten) { + str().overwrite(expStart, expEnd, rewritten, { + contentOnly: true + }) + } else { + // #1439 export * from '...' + str().overwrite(start, end, url, { contentOnly: true }) + } + } + rewriteDone = true } } - } else { - str().overwrite(start, end, isDynamicImport ? `'${url}'` : url) - } + if (!rewriteDone) { + str().overwrite( + start, + end, + isDynamicImport ? `'${url}'` : url, + { contentOnly: true } + ) + } + }) } // record for HMR import chain analysis @@ -448,11 +526,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { if (!hasViteIgnore && !isSupportedDynamicImport(url)) { this.warn( `\n` + - chalk.cyan(importerModule.file) + + colors.cyan(importerModule.file) + `\n` + generateCodeFrame(source, start) + `\nThe above dynamic import cannot be analyzed by vite.\n` + - `See ${chalk.blue( + `See ${colors.blue( `https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations` )} ` + `for supported dynamic import formats. ` + @@ -465,7 +543,12 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { isExplicitImportRequired(url.slice(1, -1)) ) { needQueryInjectHelper = true - str().overwrite(start, end, `__vite__injectQuery(${url}, 'import')`) + str().overwrite( + start, + end, + `__vite__injectQuery(${url}, 'import')`, + { contentOnly: true } + ) } } } @@ -517,10 +600,13 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { const normalizedAcceptedUrls = new Set() for (const { url, start, end } of acceptedUrls) { const [normalized] = await moduleGraph.resolveUrl( - toAbsoluteUrl(markExplicitImport(url)) + toAbsoluteUrl(markExplicitImport(url)), + ssr ) normalizedAcceptedUrls.add(normalized) - str().overwrite(start, end, JSON.stringify(normalized)) + str().overwrite(start, end, JSON.stringify(normalized), { + contentOnly: true + }) } // update the module graph for HMR analysis. @@ -548,7 +634,8 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { importerModule, importedUrls, normalizedAcceptedUrls, - isSelfAccepting + isSelfAccepting, + ssr ) if (hasHMR && prunedImports) { handlePrunedModules(prunedImports, server) @@ -557,18 +644,37 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { isDebug && debug( - `${timeFrom(start)} ${chalk.dim( + `${timeFrom(start)} ${colors.dim( `[${importedUrls.size} imports rewritten] ${prettyImporter}` )}` ) // pre-transform known direct imports - if (staticImportedUrls.size) { + if (config.server.preTransformRequests && staticImportedUrls.size) { staticImportedUrls.forEach((url) => { - transformRequest(unwrapId(removeImportQuery(url)), server, { ssr }) + url = unwrapId(removeImportQuery(url)).replace( + NULL_BYTE_PLACEHOLDER, + '\0' + ) + transformRequest(url, server, { ssr }).catch((e) => { + if (e?.code === ERR_OUTDATED_OPTIMIZED_DEP) { + // This are expected errors + return + } + // Unexpected error, log the issue but avoid an unhandled exception + config.logger.error(e.message) + }) }) } + // Await for import rewrites that requires dependencies to be pre-bundled to + // know if es interop is needed after starting further transformRequest calls + // This will let Vite process deeper into the user code and find more missing + // dependencies before the next page reload + for (const rewrite of importRewrites) { + await rewrite() + } + if (s) { return s.toString() } else { diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index d3a7229d4eb777..91ce663b9f8111 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -1,14 +1,11 @@ import path from 'path' -import { ResolvedConfig } from '../config' -import { Plugin } from '../plugin' +import type { ResolvedConfig } from '../config' +import type { Plugin } from '../plugin' import MagicString from 'magic-string' -import { ImportSpecifier, init, parse as parseImports } from 'es-module-lexer' -import { OutputChunk } from 'rollup' -import { - chunkToEmittedCssFileMap, - isCSSRequest, - removedPureCssFilesCache -} from './css' +import type { ImportSpecifier } from 'es-module-lexer' +import { init, parse as parseImports } from 'es-module-lexer' +import type { OutputChunk } from 'rollup' +import { isCSSRequest, removedPureCssFilesCache } from './css' import { transformImportGlob } from '../importGlob' import { bareImportRE } from '../utils' @@ -74,7 +71,9 @@ function preload(baseModule: () => Promise<{}>, deps?: string[]) { if (isCss) { return new Promise((res, rej) => { link.addEventListener('load', res) - link.addEventListener('error', rej) + link.addEventListener('error', () => + rej(new Error(`Unable to preload CSS for ${dep}`)) + ) }) } }) @@ -87,11 +86,17 @@ function preload(baseModule: () => Promise<{}>, deps?: string[]) { export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { const ssr = !!config.build.ssr const insertPreload = !(ssr || !!config.build.lib) + const isWorker = config.isWorker const scriptRel = config.build.polyfillModulePreload ? `'modulepreload'` : `(${detectScriptRel.toString()})()` const preloadCode = `const scriptRel = ${scriptRel};const seen = {};const base = '${preloadBaseMarker}';export const ${preloadMethod} = ${preload.toString()}` + const resolve = config.createResolver({ + preferRelative: true, + tryIndex: false, + extensions: [] + }) return { name: 'vite:build-import-analysis', @@ -116,6 +121,11 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { return } + if (isWorker) { + // preload method use `document` and can't run in the worker + return + } + await init let imports: readonly ImportSpecifier[] = [] @@ -128,7 +138,6 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { if (!imports.length) { return null } - let s: MagicString | undefined const str = () => s || (s = new MagicString(source)) let needPreloadHelper = false @@ -138,6 +147,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { s: start, e: end, ss: expStart, + se: expEnd, n: specifier, d: dynamicIndex } = imports[index] @@ -154,11 +164,13 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { importer, index, config.root, + config.logger, undefined, + resolve, insertPreload ) str().prepend(importsString) - str().overwrite(expStart, endIndex, exp) + str().overwrite(expStart, endIndex, exp, { contentOnly: true }) if (!isEager) { needPreloadHelper = true } @@ -167,10 +179,9 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { if (dynamicIndex > -1 && insertPreload) { needPreloadHelper = true - const dynamicEnd = source.indexOf(`)`, end) + 1 - const original = source.slice(dynamicIndex, dynamicEnd) + const original = source.slice(expStart, expEnd) const replacement = `${preloadMethod}(() => ${original},${isModernFlag}?"${preloadMarker}":void 0)` - str().overwrite(dynamicIndex, dynamicEnd, replacement) + str().overwrite(expStart, expEnd, replacement, { contentOnly: true }) } // Differentiate CSS imports that use the default export from those that @@ -185,7 +196,9 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { !(bareImportRE.test(specifier) && !specifier.includes('/')) ) { const url = specifier.replace(/\?|$/, (m) => `?used${m ? '&' : ''}`) - str().overwrite(start, end, dynamicIndex > -1 ? `'${url}'` : url) + str().overwrite(start, end, dynamicIndex > -1 ? `'${url}'` : url, { + contentOnly: true + }) } } @@ -217,7 +230,8 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { s.overwrite( match.index, match.index + isModernFlag.length, - isModern + isModern, + { contentOnly: true } ) } return { @@ -232,7 +246,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { }, generateBundle({ format }, bundle) { - if (format !== 'es' || ssr) { + if (format !== 'es' || ssr || isWorker) { return } @@ -257,7 +271,8 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { n: name, s: start, e: end, - d: dynamicIndex + ss: expStart, + se: expEnd } = imports[index] // check the chunk being imported let url = name @@ -280,27 +295,25 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { const chunk = bundle[filename] as OutputChunk | undefined if (chunk) { deps.add(chunk.fileName) - const cssFiles = chunkToEmittedCssFileMap.get(chunk) - if (cssFiles) { - cssFiles.forEach((file) => { - deps.add(file) - }) - } + chunk.viteMetadata.importedCss.forEach((file) => { + deps.add(file) + }) chunk.imports.forEach(addDeps) } else { const removedPureCssFiles = removedPureCssFilesCache.get(config)! const chunk = removedPureCssFiles.get(filename) if (chunk) { - const cssFiles = chunkToEmittedCssFileMap.get(chunk) - if (cssFiles && cssFiles.size > 0) { - cssFiles.forEach((file) => { + if (chunk.viteMetadata.importedCss.size) { + chunk.viteMetadata.importedCss.forEach((file) => { deps.add(file) }) hasRemovedPureCssChunk = true } - s.overwrite(dynamicIndex, end + 1, 'Promise.resolve({})') + s.overwrite(expStart, expEnd, 'Promise.resolve({})', { + contentOnly: true + }) } } } @@ -327,7 +340,8 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { // main chunk is removed (hasRemovedPureCssChunk && deps.size > 0) ? `[${[...deps].map((d) => JSON.stringify(d)).join(',')}]` - : `[]` + : `[]`, + { contentOnly: true } ) } } diff --git a/packages/vite/src/node/plugins/index.ts b/packages/vite/src/node/plugins/index.ts index 54a7ae8589b2a6..825798a73c8493 100644 --- a/packages/vite/src/node/plugins/index.ts +++ b/packages/vite/src/node/plugins/index.ts @@ -1,20 +1,23 @@ -import { ResolvedConfig } from '../config' -import { Plugin } from '../plugin' +import type { ResolvedConfig } from '../config' +import type { Plugin } from '../plugin' import aliasPlugin from '@rollup/plugin-alias' import { jsonPlugin } from './json' import { resolvePlugin } from './resolve' +import { optimizedDepsPlugin } from './optimizedDeps' import { esbuildPlugin } from './esbuild' import { importAnalysisPlugin } from './importAnalysis' import { cssPlugin, cssPostPlugin } from './css' import { assetPlugin } from './asset' import { clientInjectionsPlugin } from './clientInjections' -import { htmlInlineScriptProxyPlugin } from './html' +import { htmlInlineProxyPlugin } from './html' import { wasmPlugin } from './wasm' import { modulePreloadPolyfillPlugin } from './modulePreloadPolyfill' import { webWorkerPlugin } from './worker' import { preAliasPlugin } from './preAlias' import { definePlugin } from './define' import { ssrRequireHookPlugin } from './ssrRequireHook' +import { workerImportMetaUrlPlugin } from './workerImportMetaUrl' +import { metadataPlugin } from './metadata' export async function resolvePlugins( config: ResolvedConfig, @@ -29,6 +32,7 @@ export async function resolvePlugins( : { pre: [], post: [] } return [ + isBuild ? metadataPlugin() : null, isBuild ? null : preAliasPlugin(), aliasPlugin({ entries: config.resolve.alias }), ...prePlugins, @@ -44,8 +48,8 @@ export async function resolvePlugins( ssrConfig: config.ssr, asSrc: true }), - config.build.ssr ? ssrRequireHookPlugin(config) : null, - htmlInlineScriptProxyPlugin(config), + isBuild ? null : optimizedDepsPlugin(), + htmlInlineProxyPlugin(config), cssPlugin(config), config.esbuild !== false ? esbuildPlugin(config.esbuild) : null, jsonPlugin( @@ -57,10 +61,12 @@ export async function resolvePlugins( ), wasmPlugin(config), webWorkerPlugin(config), + workerImportMetaUrlPlugin(config), assetPlugin(config), ...normalPlugins, definePlugin(config), cssPostPlugin(config), + config.build.ssr ? ssrRequireHookPlugin(config) : null, ...buildPlugins.pre, ...postPlugins, ...buildPlugins.post, diff --git a/packages/vite/src/node/plugins/json.ts b/packages/vite/src/node/plugins/json.ts index d3add60733677f..f8419c40f36174 100644 --- a/packages/vite/src/node/plugins/json.ts +++ b/packages/vite/src/node/plugins/json.ts @@ -7,7 +7,7 @@ */ import { dataToEsm } from '@rollup/pluginutils' -import { Plugin } from 'rollup' +import type { Plugin } from 'rollup' import { SPECIAL_QUERY_RE } from '../constants' export interface JsonOptions { diff --git a/packages/vite/src/node/plugins/loadFallback.ts b/packages/vite/src/node/plugins/loadFallback.ts index 9867ccbfd106e7..aedd611ec40118 100644 --- a/packages/vite/src/node/plugins/loadFallback.ts +++ b/packages/vite/src/node/plugins/loadFallback.ts @@ -1,5 +1,5 @@ import { promises as fs } from 'fs' -import { Plugin } from '..' +import type { Plugin } from '..' import { cleanUrl } from '../utils' /** diff --git a/packages/vite/src/node/plugins/manifest.ts b/packages/vite/src/node/plugins/manifest.ts index 77b09d62f484c7..02fbdce63eec78 100644 --- a/packages/vite/src/node/plugins/manifest.ts +++ b/packages/vite/src/node/plugins/manifest.ts @@ -1,9 +1,7 @@ import path from 'path' -import { OutputChunk } from 'rollup' -import { ResolvedConfig } from '..' -import { Plugin } from '../plugin' -import { chunkToEmittedCssFileMap } from './css' -import { chunkToEmittedAssetsMap } from './asset' +import type { OutputChunk } from 'rollup' +import type { ResolvedConfig } from '..' +import type { Plugin } from '../plugin' import { normalizePath } from '../utils' export type Manifest = Record @@ -41,7 +39,7 @@ export function manifestPlugin(config: ResolvedConfig): Plugin { const ext = path.extname(name) name = name.slice(0, -ext.length) + `-legacy` + ext } - return name + return name.replace(/\0/g, '') } else { return `_` + path.basename(chunk.fileName) } @@ -90,13 +88,12 @@ export function manifestPlugin(config: ResolvedConfig): Plugin { } } - const cssFiles = chunkToEmittedCssFileMap.get(chunk) - if (cssFiles) { - manifestChunk.css = [...cssFiles] + if (chunk.viteMetadata.importedCss.size) { + manifestChunk.css = [...chunk.viteMetadata.importedCss] + } + if (chunk.viteMetadata.importedAssets.size) { + manifestChunk.assets = [...chunk.viteMetadata.importedAssets] } - - const assets = chunkToEmittedAssetsMap.get(chunk) - if (assets) [(manifestChunk.assets = [...assets])] return manifestChunk } @@ -113,7 +110,10 @@ export function manifestPlugin(config: ResolvedConfig): Plugin { const outputLength = Array.isArray(output) ? output.length : 1 if (outputCount >= outputLength) { this.emitFile({ - fileName: `manifest.json`, + fileName: + typeof config.build.manifest === 'string' + ? config.build.manifest + : 'manifest.json', type: 'asset', source: JSON.stringify(manifest, null, 2) }) diff --git a/packages/vite/src/node/plugins/metadata.ts b/packages/vite/src/node/plugins/metadata.ts new file mode 100644 index 00000000000000..2b617aca4c89c8 --- /dev/null +++ b/packages/vite/src/node/plugins/metadata.ts @@ -0,0 +1,23 @@ +import type { Plugin } from '../plugin' + +export interface ChunkMetadata { + importedAssets: Set + importedCss: Set +} + +/** + * Prepares the rendered chunks to contain additional metadata during build. + */ +export function metadataPlugin(): Plugin { + return { + name: 'vite:build-metadata', + + async renderChunk(_code, chunk) { + chunk.viteMetadata = { + importedAssets: new Set(), + importedCss: new Set() + } + return null + } + } +} diff --git a/packages/vite/src/node/plugins/modulePreloadPolyfill.ts b/packages/vite/src/node/plugins/modulePreloadPolyfill.ts index f5bfe9a36a39a9..0ad1ed2e0d30a4 100644 --- a/packages/vite/src/node/plugins/modulePreloadPolyfill.ts +++ b/packages/vite/src/node/plugins/modulePreloadPolyfill.ts @@ -1,5 +1,5 @@ -import { ResolvedConfig } from '..' -import { Plugin } from '../plugin' +import type { ResolvedConfig } from '..' +import type { Plugin } from '../plugin' import { isModernFlag } from './importAnalysisBuild' export const modulePreloadPolyfillId = 'vite/modulepreload-polyfill' diff --git a/packages/vite/src/node/plugins/optimizedDeps.ts b/packages/vite/src/node/plugins/optimizedDeps.ts new file mode 100644 index 00000000000000..adab1bd9756251 --- /dev/null +++ b/packages/vite/src/node/plugins/optimizedDeps.ts @@ -0,0 +1,96 @@ +import { promises as fs } from 'fs' +import type { Plugin } from '../plugin' +import colors from 'picocolors' +import { DEP_VERSION_RE } from '../constants' +import { cleanUrl, createDebugger } from '../utils' +import { isOptimizedDepFile, optimizedDepInfoFromFile } from '../optimizer' +import type { ViteDevServer } from '..' + +export const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = + 'ERR_OPTIMIZE_DEPS_PROCESSING_ERROR' +export const ERR_OUTDATED_OPTIMIZED_DEP = 'ERR_OUTDATED_OPTIMIZED_DEP' + +const isDebug = process.env.DEBUG +const debug = createDebugger('vite:optimize-deps') + +export function optimizedDepsPlugin(): Plugin { + let server: ViteDevServer | undefined + + return { + name: 'vite:optimized-deps', + + configureServer(_server) { + server = _server + }, + + async load(id) { + if (server && isOptimizedDepFile(id, server.config)) { + const metadata = server?._optimizedDeps?.metadata + if (metadata) { + const file = cleanUrl(id) + const versionMatch = id.match(DEP_VERSION_RE) + const browserHash = versionMatch + ? versionMatch[1].split('=')[1] + : undefined + + // Search in both the currently optimized and newly discovered deps + const info = optimizedDepInfoFromFile(metadata, file) + if (info) { + if (browserHash && info.browserHash !== browserHash) { + throwOutdatedRequest(id) + } + try { + // This is an entry point, it may still not be bundled + await info.processing + } catch { + // 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. + throwProcessingError(id) + return + } + const newMetadata = server._optimizedDeps?.metadata + if (metadata !== newMetadata) { + const currentInfo = optimizedDepInfoFromFile(newMetadata!, file) + if (info.browserHash !== currentInfo?.browserHash) { + throwOutdatedRequest(id) + } + } + } + isDebug && debug(`load ${colors.cyan(file)}`) + // Load the file from the cache instead of waiting for other plugin + // load hooks to avoid race conditions, once processing is resolved, + // we are sure that the file has been properly save to disk + try { + return await fs.readFile(file, 'utf-8') + } catch (e) { + // Outdated non-entry points (CHUNK), loaded after a rerun + throwOutdatedRequest(id) + } + } + } + } + } +} + +function throwProcessingError(id: string) { + const err: any = new Error( + `Something unexpected happened while optimizing "${id}". ` + + `The current page should have reloaded by now` + ) + err.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR + // This error will be caught by the transform middleware that will + // send a 504 status code request timeout + throw err +} + +function throwOutdatedRequest(id: string) { + const err: any = new Error( + `There is a new version of the pre-bundle for "${id}", ` + + `a page reload is going to ask for it.` + ) + err.code = ERR_OUTDATED_OPTIMIZED_DEP + // This error will be caught by the transform middleware that will + // send a 504 status code request timeout + throw err +} diff --git a/packages/vite/src/node/plugins/preAlias.ts b/packages/vite/src/node/plugins/preAlias.ts index f194a8c29c78d7..dadb16aa4c28a9 100644 --- a/packages/vite/src/node/plugins/preAlias.ts +++ b/packages/vite/src/node/plugins/preAlias.ts @@ -1,5 +1,5 @@ -import { ViteDevServer } from '..' -import { Plugin } from '../plugin' +import type { ViteDevServer } from '..' +import type { Plugin } from '../plugin' import { bareImportRE } from '../utils' import { tryOptimizedResolve } from './resolve' @@ -13,9 +13,9 @@ export function preAliasPlugin(): Plugin { configureServer(_server) { server = _server }, - resolveId(id, importer, options) { - if (!options?.ssr && bareImportRE.test(id)) { - return tryOptimizedResolve(id, server, importer) + async resolveId(id, importer, options) { + if (!options?.ssr && bareImportRE.test(id) && !options?.scan) { + return await tryOptimizedResolve(id, server, importer) } } } diff --git a/packages/vite/src/node/plugins/reporter.ts b/packages/vite/src/node/plugins/reporter.ts index d16aec2e564491..4e568a756fa0ea 100644 --- a/packages/vite/src/node/plugins/reporter.ts +++ b/packages/vite/src/node/plugins/reporter.ts @@ -1,9 +1,9 @@ import path from 'path' -import chalk from 'chalk' +import colors from 'picocolors' import { gzip } from 'zlib' import { promisify } from 'util' -import { Plugin } from 'rollup' -import { ResolvedConfig } from '../config' +import type { Plugin } from 'rollup' +import type { ResolvedConfig } from '../config' import { normalizePath } from '../utils' import { LogLevels } from '../logger' @@ -16,11 +16,11 @@ const enum WriteType { } const writeColors = { - [WriteType.JS]: chalk.cyan, - [WriteType.CSS]: chalk.magenta, - [WriteType.ASSET]: chalk.green, - [WriteType.HTML]: chalk.blue, - [WriteType.SOURCE_MAP]: chalk.gray + [WriteType.JS]: colors.cyan, + [WriteType.CSS]: colors.magenta, + [WriteType.ASSET]: colors.green, + [WriteType.HTML]: colors.blue, + [WriteType.SOURCE_MAP]: colors.gray } export function buildReporterPlugin(config: ResolvedConfig): Plugin { @@ -61,9 +61,9 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin { ) ) + '/' const kibs = content.length / 1024 - const sizeColor = kibs > chunkLimit ? chalk.yellow : chalk.dim + const sizeColor = kibs > chunkLimit ? colors.yellow : colors.dim config.logger.info( - `${chalk.gray(chalk.white.dim(outDir))}${writeColors[type]( + `${colors.gray(colors.white(colors.dim(outDir)))}${writeColors[type]( filePath.padEnd(maxLength + 2) )} ${sizeColor(`${kibs.toFixed(2)} KiB${compressedSize}`)}` ) @@ -78,7 +78,7 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin { const logTransform = throttle((id: string) => { writeLine( - `transforming (${transformedCount}) ${chalk.dim( + `transforming (${transformedCount}) ${colors.dim( path.relative(config.root, id) )}` ) @@ -110,7 +110,7 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin { process.stdout.cursorTo(0) } config.logger.info( - `${chalk.green(`✓`)} ${transformedCount} modules transformed.` + `${colors.green(`✓`)} ${transformedCount} modules transformed.` ) } }, @@ -210,7 +210,7 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin { !config.build.ssr ) { config.logger.warn( - chalk.yellow( + colors.yellow( `\n(!) Some chunks are larger than ${chunkLimit} KiB after minification. Consider:\n` + `- Using dynamic import() to code-split the application\n` + `- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks\n` + diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 74cc7f0ea7109b..686c08b12c3248 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -1,13 +1,14 @@ import fs from 'fs' import path from 'path' -import { Plugin } from '../plugin' -import chalk from 'chalk' +import type { Plugin } from '../plugin' +import colors from 'picocolors' import { FS_PREFIX, SPECIAL_QUERY_RE, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, - OPTIMIZABLE_ENTRY_RE + OPTIMIZABLE_ENTRY_RE, + DEP_VERSION_RE } from '../constants' import { isBuiltin, @@ -27,17 +28,20 @@ import { isFileReadable, isTsRequest, isPossibleTsOutput, - getTsSrcPath + getPotentialTsSrcPaths } from '../utils' -import { ViteDevServer, SSROptions } from '..' -import { PartialResolvedId } from 'rollup' -import { resolve as _resolveExports } from 'resolve.exports' import { - loadPackageData, - PackageCache, - PackageData, - resolvePackageData -} from '../packages' + createIsOptimizedDepUrl, + isOptimizedDepFile, + optimizedDepInfoFromFile, + optimizedDepInfoFromId +} from '../optimizer' +import type { OptimizedDepInfo } from '../optimizer' +import type { ViteDevServer, SSROptions } from '..' +import type { PartialResolvedId } from 'rollup' +import { resolve as _resolveExports } from 'resolve.exports' +import type { PackageCache, PackageData } from '../packages' +import { loadPackageData, resolvePackageData } from '../packages' // special id for paths marked with browser: false // https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module @@ -80,6 +84,8 @@ export interface InternalResolveOptions extends ResolveOptions { // should also try import from `.ts/tsx/mts/cts` source file as fallback. isFromTsImporter?: boolean tryEsmOnly?: boolean + // True when resolving during the scan phase to discover dependencies + scan?: boolean } export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { @@ -91,6 +97,7 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { preferRelative = false } = baseOptions let server: ViteDevServer | undefined + let isOptimizedDepUrl: (url: string) => boolean const { target: ssrTarget, noExternal: ssrNoExternal } = ssrConfig ?? {} @@ -99,9 +106,10 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { configureServer(_server) { server = _server + isOptimizedDepUrl = createIsOptimizedDepUrl(server.config) }, - resolveId(id, importer, resolveOpts) { + async resolveId(id, importer, resolveOpts) { const ssr = resolveOpts?.ssr === true if (id.startsWith(browserExternalId)) { return id @@ -122,16 +130,27 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { isRequire, ...baseOptions, - isFromTsImporter: isTsRequest(importer ?? '') + isFromTsImporter: isTsRequest(importer ?? ''), + scan: resolveOpts?.scan ?? baseOptions.scan } let res: string | PartialResolvedId | undefined + // resolve pre-bundled deps requests, these could be resolved by + // tryFileResolve or /fs/ resolution but these files may not yet + // exists if we are in the middle of a deps re-processing + if (asSrc && isOptimizedDepUrl?.(id)) { + const optimizedPath = id.startsWith(FS_PREFIX) + ? fsPathFromId(id) + : normalizePath(ensureVolumeInPath(path.resolve(root, id.slice(1)))) + return optimizedPath + } + // explicit fs paths that starts with /@fs/* if (asSrc && id.startsWith(FS_PREFIX)) { const fsPath = fsPathFromId(id) res = tryFsResolve(fsPath, options) - isDebug && debug(`[@fs] ${chalk.cyan(id)} -> ${chalk.dim(res)}`) + isDebug && debug(`[@fs] ${colors.cyan(id)} -> ${colors.dim(res)}`) // always return here even if res doesn't exist since /@fs/ is explicit // if the file doesn't exist it should be a 404 return res || fsPath @@ -142,7 +161,7 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { if (asSrc && id.startsWith('/')) { const fsPath = path.resolve(root, id.slice(1)) if ((res = tryFsResolve(fsPath, options))) { - isDebug && debug(`[url] ${chalk.cyan(id)} -> ${chalk.dim(res)}`) + isDebug && debug(`[url] ${colors.cyan(id)} -> ${colors.dim(res)}`) return res } } @@ -154,6 +173,25 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { // handle browser field mapping for relative imports const normalizedFsPath = normalizePath(fsPath) + + if ( + server?._optimizedDeps && + isOptimizedDepFile(normalizedFsPath, server!.config) + ) { + // Optimized files could not yet exist in disk, resolve to the full path + // Inject the current browserHash version if the path doesn't have one + if (!normalizedFsPath.match(DEP_VERSION_RE)) { + const browserHash = optimizedDepInfoFromFile( + server._optimizedDeps!.metadata!, + normalizedFsPath + )?.browserHash + if (browserHash) { + return injectQuery(normalizedFsPath, `v=${browserHash}`) + } + } + return normalizedFsPath + } + const pathFromBasedir = normalizedFsPath.slice(basedir.length) if (pathFromBasedir.startsWith('/node_modules/')) { // normalize direct imports from node_modules to bare imports, so the @@ -182,7 +220,8 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { } if ((res = tryFsResolve(fsPath, options))) { - isDebug && debug(`[relative] ${chalk.cyan(id)} -> ${chalk.dim(res)}`) + isDebug && + debug(`[relative] ${colors.cyan(id)} -> ${colors.dim(res)}`) const pkg = importer != null && idToPkgMap.get(importer) if (pkg) { idToPkgMap.set(res, pkg) @@ -197,7 +236,7 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { // absolute fs paths if (path.isAbsolute(id) && (res = tryFsResolve(id, options))) { - isDebug && debug(`[fs] ${chalk.cyan(id)} -> ${chalk.dim(res)}`) + isDebug && debug(`[fs] ${colors.cyan(id)} -> ${colors.dim(res)}`) return res } @@ -221,7 +260,8 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { asSrc && server && !ssr && - (res = tryOptimizedResolve(id, server, importer)) + !options.scan && + (res = await tryOptimizedResolve(id, server, importer)) ) { return res } @@ -263,7 +303,7 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { if (!asSrc) { debug( `externalized node built-in "${id}" to empty module. ` + - `(imported by: ${chalk.white.dim(importer)})` + `(imported by: ${colors.white(colors.dim(importer))})` ) } return isProduction @@ -273,7 +313,7 @@ export function resolvePlugin(baseOptions: InternalResolveOptions): Plugin { } } - isDebug && debug(`[fallthrough] ${chalk.dim(id)}`) + isDebug && debug(`[fallthrough] ${colors.dim(id)}`) }, load(id) { @@ -439,16 +479,20 @@ function tryResolveFile( const tryTsExtension = options.isFromTsImporter && isPossibleTsOutput(file) if (tryTsExtension) { - const tsSrcPath = getTsSrcPath(file) - return tryResolveFile( - tsSrcPath, - postfix, - options, - tryIndex, - targetWeb, - tryPrefix, - skipPackageJson - ) + const tsSrcPaths = getPotentialTsSrcPaths(file) + for (const srcPath of tsSrcPaths) { + const res = tryResolveFile( + srcPath, + postfix, + options, + tryIndex, + targetWeb, + tryPrefix, + skipPackageJson + ) + if (res) return res + } + return } if (tryPrefix) { @@ -571,8 +615,8 @@ export function tryNodeResolve( if ( !resolved.includes('node_modules') || // linked !server || // build - server._isRunningOptimizer || // optimizing - !server._optimizeDepsMetadata + !server._optimizedDeps || // resolving before listening to the server + options.scan // initial esbuild scan phase ) { return { id: resolved } } @@ -592,42 +636,41 @@ export function tryNodeResolve( // can cache it without re-validation, but only do so for known js types. // otherwise we may introduce duplicated modules for externalized files // from pre-bundled deps. - const versionHash = server._optimizeDepsMetadata?.browserHash + + const versionHash = server._optimizedDeps!.metadata.browserHash if (versionHash && isJsType) { resolved = injectQuery(resolved, `v=${versionHash}`) } } else { - // this is a missing import. - // queue optimize-deps re-run. - server._registerMissingImport?.(id, resolved, ssr) + // this is a missing import, queue optimize-deps re-run and + // get a resolved its optimized info + const optimizedInfo = server._optimizedDeps!.registerMissingImport( + id, + resolved + ) + resolved = getOptimizedUrl(optimizedInfo) } - return { id: resolved } + return { id: resolved! } } } -export function tryOptimizedResolve( +const getOptimizedUrl = (optimizedData: OptimizedDepInfo) => + `${optimizedData.file}?v=${optimizedData.browserHash}` + +export async function tryOptimizedResolve( id: string, server: ViteDevServer, importer?: string -): string | undefined { - const cacheDir = server.config.cacheDir - const depData = server._optimizeDepsMetadata +): Promise { + const optimizedDeps = server._optimizedDeps - if (!cacheDir || !depData) return + if (!optimizedDeps) return - const getOptimizedUrl = (optimizedData: typeof depData.optimized[string]) => { - return ( - optimizedData.file + - `?v=${depData.browserHash}${ - optimizedData.needsInterop ? `&es-interop` : `` - }` - ) - } + await optimizedDeps.scanProcessing - // check if id has been optimized - const isOptimized = depData.optimized[id] - if (isOptimized) { - return getOptimizedUrl(isOptimized) + const depInfo = optimizedDepInfoFromId(optimizedDeps.metadata, id) + if (depInfo) { + return getOptimizedUrl(depInfo) } if (!importer) return @@ -635,7 +678,10 @@ export function tryOptimizedResolve( // further check if id is imported by nested dependency let resolvedSrc: string | undefined - for (const [pkgPath, optimizedData] of Object.entries(depData.optimized)) { + for (const optimizedData of optimizedDeps.metadata.depInfoList) { + if (!optimizedData.src) continue // Ignore chunks + + const pkgPath = optimizedData.id // check for scenarios, e.g. // pkgPath => "my-lib > foo" // id => "foo" @@ -692,7 +738,11 @@ export function resolvePackageEntry( : isObject(data.browser) && data.browser['.'] if (browserEntry) { // check if the package also has a "module" field. - if (typeof data.module === 'string' && data.module !== browserEntry) { + if ( + !options.isRequire && + typeof data.module === 'string' && + data.module !== browserEntry + ) { // if both are present, we may have a problem: some package points both // to ESM, with "module" targeting Node.js, while some packages points // "module" to browser ESM and "browser" to UMD. @@ -728,39 +778,44 @@ export function resolvePackageEntry( } } } + entryPoint ||= data.main + + // try default entry when entry is not define + // https://nodejs.org/api/modules.html#all-together + const entryPoints = entryPoint + ? [entryPoint] + : ['index.js', 'index.json', 'index.node'] + + for (let entry of entryPoints) { + // make sure we don't get scripts when looking for sass + if ( + options.mainFields?.[0] === 'sass' && + !options.extensions?.includes(path.extname(entry)) + ) { + entry = '' + options.skipPackageJson = true + } - entryPoint = entryPoint || data.main || 'index.js' - - // make sure we don't get scripts when looking for sass - if ( - options.mainFields?.[0] === 'sass' && - !options.extensions?.includes(path.extname(entryPoint)) - ) { - entryPoint = '' - options.skipPackageJson = true - } - - // resolve object browser field in package.json - const { browser: browserField } = data - if (targetWeb && isObject(browserField)) { - entryPoint = mapWithBrowserField(entryPoint, browserField) || entryPoint - } - - entryPoint = path.join(dir, entryPoint) - const resolvedEntryPoint = tryFsResolve(entryPoint, options) + // resolve object browser field in package.json + const { browser: browserField } = data + if (targetWeb && isObject(browserField)) { + entry = mapWithBrowserField(entry, browserField) || entry + } - if (resolvedEntryPoint) { - isDebug && - debug( - `[package entry] ${chalk.cyan(id)} -> ${chalk.dim( - resolvedEntryPoint - )}` - ) - setResolvedCache('.', resolvedEntryPoint, targetWeb) - return resolvedEntryPoint - } else { - packageEntryFailure(id) + const entryPointPath = path.join(dir, entry) + const resolvedEntryPoint = tryFsResolve(entryPointPath, options) + if (resolvedEntryPoint) { + isDebug && + debug( + `[package entry] ${colors.cyan(id)} -> ${colors.dim( + resolvedEntryPoint + )}` + ) + setResolvedCache('.', resolvedEntryPoint, targetWeb) + return resolvedEntryPoint + } } + packageEntryFailure(id) } catch (e) { packageEntryFailure(id, e.message) } @@ -817,7 +872,12 @@ function resolveDeepImport( // map relative based on exports data if (exportsField) { if (isObject(exportsField) && !Array.isArray(exportsField)) { - relativeId = resolveExports(data, relativeId, options, targetWeb) + relativeId = resolveExports( + data, + cleanUrl(relativeId), + options, + targetWeb + ) } else { // not exposed relativeId = undefined @@ -846,7 +906,9 @@ function resolveDeepImport( ) if (resolved) { isDebug && - debug(`[node/deep-import] ${chalk.cyan(id)} -> ${chalk.dim(resolved)}`) + debug( + `[node/deep-import] ${colors.cyan(id)} -> ${colors.dim(resolved)}` + ) setResolvedCache(id, resolved, targetWeb) return resolved } @@ -868,7 +930,7 @@ function tryResolveBrowserMapping( const fsPath = path.join(pkg.dir, browserMappedPath) if ((res = tryFsResolve(fsPath, options))) { isDebug && - debug(`[browser mapped] ${chalk.cyan(id)} -> ${chalk.dim(res)}`) + debug(`[browser mapped] ${colors.cyan(id)} -> ${colors.dim(res)}`) idToPkgMap.set(res, pkg) return { id: res, 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/ssrRequireHook.ts b/packages/vite/src/node/plugins/ssrRequireHook.ts index 096b688012b0d2..0873e44245ab6a 100644 --- a/packages/vite/src/node/plugins/ssrRequireHook.ts +++ b/packages/vite/src/node/plugins/ssrRequireHook.ts @@ -1,6 +1,6 @@ import MagicString from 'magic-string' -import { ResolvedConfig } from '..' -import { Plugin } from '../plugin' +import type { ResolvedConfig } from '..' +import type { Plugin } from '../plugin' import { arraify } from '../utils' /** @@ -31,7 +31,8 @@ export function ssrRequireHookPlugin(config: ResolvedConfig): Plugin | null { return { code: s.toString(), map: s.generateMap({ - source: id + source: id, + hires: true }) } } diff --git a/packages/vite/src/node/plugins/terser.ts b/packages/vite/src/node/plugins/terser.ts index 253dc437aeafa3..29f4d5c172ce67 100644 --- a/packages/vite/src/node/plugins/terser.ts +++ b/packages/vite/src/node/plugins/terser.ts @@ -1,32 +1,49 @@ -import { Plugin } from '../plugin' +import type { Plugin } from '../plugin' import { Worker } from 'okie' -import { Terser } from 'types/terser' -import { ResolvedConfig } from '..' +import type { Terser } from 'types/terser' +import type { ResolvedConfig } from '..' export function terserPlugin(config: ResolvedConfig): Plugin { - const worker = new Worker( - (basedir: string, code: string, options: Terser.MinifyOptions) => { - // when vite is linked, the worker thread won't share the same resolve - // root with vite itself, so we have to pass in the basedir and resolve - // terser first. - // eslint-disable-next-line node/no-restricted-require - const terserPath = require.resolve('terser', { - paths: [basedir] - }) - return require(terserPath).minify(code, options) as Terser.MinifyOutput - } - ) + const makeWorker = () => + new Worker( + (basedir: string, code: string, options: Terser.MinifyOptions) => { + // when vite is linked, the worker thread won't share the same resolve + // root with vite itself, so we have to pass in the basedir and resolve + // terser first. + // eslint-disable-next-line node/no-restricted-require + const terserPath = require.resolve('terser', { + paths: [basedir] + }) + return require(terserPath).minify(code, options) as Terser.MinifyOutput + } + ) + + let worker: ReturnType return { name: 'vite:terser', async renderChunk(code, _chunk, outputOptions) { + // This plugin is included for any non-false value of config.build.minify, + // so that normal chunks can use the preferred minifier, and legacy chunks + // can use terser. + if ( + config.build.minify !== 'terser' && + // @ts-ignore injected by @vitejs/plugin-legacy + !outputOptions.__vite_force_terser__ + ) { + return null + } + // Do not minify ES lib output since that would remove pure annotations - // and break tree-shaking + // and break tree-shaking. if (config.build.lib && outputOptions.format === 'es') { return null } + // Lazy load worker. + worker ||= makeWorker() + const res = await worker.run(__dirname, code, { safari10: true, ...config.build.terserOptions, @@ -41,7 +58,7 @@ export function terserPlugin(config: ResolvedConfig): Plugin { }, closeBundle() { - worker.stop() + worker?.stop() } } } diff --git a/packages/vite/src/node/plugins/wasm.ts b/packages/vite/src/node/plugins/wasm.ts index 753dc1813817c0..1f64434a5b9781 100644 --- a/packages/vite/src/node/plugins/wasm.ts +++ b/packages/vite/src/node/plugins/wasm.ts @@ -1,5 +1,5 @@ -import { ResolvedConfig } from '../config' -import { Plugin } from '../plugin' +import type { ResolvedConfig } from '../config' +import type { Plugin } from '../plugin' import { fileToUrl } from './asset' const wasmHelperId = '/__vite-wasm-helper' diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index 799233088d6b13..70bfd916e21cab 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -1,24 +1,58 @@ -import { ResolvedConfig } from '../config' -import { Plugin } from '../plugin' -import { resolvePlugins } from '../plugins' -import { parse as parseUrl, URLSearchParams } from 'url' +import type { ResolvedConfig } from '../config' +import type { Plugin } from '../plugin' import { fileToUrl, getAssetHash } from './asset' -import { cleanUrl, injectQuery } from '../utils' -import Rollup from 'rollup' +import { cleanUrl, injectQuery, parseRequest } from '../utils' +import type Rollup from 'rollup' import { ENV_PUBLIC_PATH } from '../constants' import path from 'path' import { onRollupWarning } from '../build' -function parseWorkerRequest(id: string): Record | null { - const { search } = parseUrl(id) - if (!search) { - return null +const WorkerFileId = 'worker_file' + +export async function bundleWorkerEntry( + ctx: Rollup.TransformPluginContext, + config: ResolvedConfig, + id: string +): Promise { + // bundle the file as entry to support imports + const rollup = require('rollup') as typeof Rollup + const { plugins, rollupOptions, format } = config.worker + const bundle = await rollup.rollup({ + ...rollupOptions, + input: cleanUrl(id), + plugins, + onwarn(warning, warn) { + onRollupWarning(warning, warn, config) + }, + preserveEntrySignatures: false + }) + let code: string + try { + const { + output: [outputCode, ...outputChunks] + } = await bundle.generate({ + format, + sourcemap: config.build.sourcemap + }) + code = outputCode.code + outputChunks.forEach((outputChunk) => { + if (outputChunk.type === 'asset') { + ctx.emitFile(outputChunk) + } + if (outputChunk.type === 'chunk') { + ctx.emitFile({ + fileName: `${config.build.assetsDir}/${outputChunk.fileName}`, + source: outputChunk.code, + type: 'asset' + }) + } + }) + } finally { + await bundle.close() } - return Object.fromEntries(new URLSearchParams(search.slice(1))) + return Buffer.from(code) } -const WorkerFileId = 'worker_file' - export function webWorkerPlugin(config: ResolvedConfig): Plugin { const isBuild = config.command === 'build' @@ -27,7 +61,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { load(id) { if (isBuild) { - const parsedQuery = parseWorkerRequest(id) + const parsedQuery = parseRequest(id) if ( parsedQuery && (parsedQuery.worker ?? parsedQuery.sharedworker) != null @@ -38,7 +72,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { }, async transform(_, id) { - const query = parseWorkerRequest(id) + const query = parseRequest(id) if (query && query[WorkerFileId] != null) { return { code: `import '${ENV_PUBLIC_PATH}'\n` + _ @@ -53,41 +87,24 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { let url: string if (isBuild) { - // bundle the file as entry to support imports - const rollup = require('rollup') as typeof Rollup - const bundle = await rollup.rollup({ - input: cleanUrl(id), - plugins: await resolvePlugins({ ...config }, [], [], []), - onwarn(warning, warn) { - onRollupWarning(warning, warn, config) - } - }) - let code: string - try { - const { output } = await bundle.generate({ - format: 'iife', - sourcemap: config.build.sourcemap - }) - code = output[0].code - } finally { - await bundle.close() - } - const content = Buffer.from(code) + const code = await bundleWorkerEntry(this, config, id) if (query.inline != null) { + const { format } = config.worker + const workerOptions = format === 'es' ? '{type: "module"}' : '{}' // inline as blob data url - return `const encodedJs = "${content.toString('base64')}"; + return `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); try { - return objURL ? new Worker(objURL) : new Worker("data:application/javascript;base64," + encodedJs, {type: "module"}); + return objURL ? new Worker(objURL, ${workerOptions}) : new Worker("data:application/javascript;base64," + encodedJs, {type: "module"}); } finally { objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL); } }` } else { const basename = path.parse(cleanUrl(id)).name - const contentHash = getAssetHash(content) + const contentHash = getAssetHash(code) const fileName = path.posix.join( config.build.assetsDir, `${basename}.${contentHash}.js` diff --git a/packages/vite/src/node/plugins/workerImportMetaUrl.ts b/packages/vite/src/node/plugins/workerImportMetaUrl.ts new file mode 100644 index 00000000000000..233d83d066bcb7 --- /dev/null +++ b/packages/vite/src/node/plugins/workerImportMetaUrl.ts @@ -0,0 +1,186 @@ +import JSON5 from 'json5' +import type { ResolvedConfig } from '../config' +import type { Plugin } from '../plugin' +import { getAssetHash, fileToUrl } from './asset' +import { + blankReplacer, + cleanUrl, + injectQuery, + multilineCommentsRE, + singlelineCommentsRE +} from '../utils' +import path from 'path' +import { bundleWorkerEntry } from './worker' +import { parseRequest } from '../utils' +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 && 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: injectEnv + code + } + } + if ( + (code.includes('new Worker') || code.includes('new ShareWorker')) && + code.includes('new URL') && + code.includes(`import.meta.url`) + ) { + 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, blankReplacer) + .replace(singlelineCommentsRE, blankReplacer) + let match: RegExpExecArray | null + let s: MagicString | null = null + while ((match = importMetaUrlRE.exec(noCommentsCode))) { + const { 0: allExp, 2: exp, 3: rawUrl, index } = match + const urlIndex = allExp.indexOf(exp) + index + + if (options?.ssr) { + this.error( + `\`new URL(url, import.meta.url)\` is not supported in SSR.`, + urlIndex + ) + } + + // potential dynamic template string + if (rawUrl[0] === '`' && /\$\{/.test(rawUrl)) { + this.error( + `\`new URL(url, import.meta.url)\` is not supported in dynamic template string.`, + urlIndex + ) + } + + 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(this, 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 + })}__` + } 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), { + contentOnly: true + }) + } + if (s) { + return { + code: s.toString(), + map: config.build.sourcemap ? s.generateMap({ hires: true }) : null + } + } + return null + } + } + } +} diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index 20a37b9abbee0b..56dee04e2e2e07 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -1,17 +1,14 @@ import path from 'path' import sirv from 'sirv' import connect from 'connect' -import compression from 'compression' -import { Server } from 'http' -import { resolveConfig, InlineConfig, ResolvedConfig } from '.' -import { Connect } from 'types/connect' -import { ResolvedServerOptions } from './server' -import { - resolveHttpsConfig, - resolveHttpServer, - httpServerStart, - CommonServerOptions -} from './http' +import compression from './server/middlewares/compression' +import type { Server } from 'http' +import type { InlineConfig, ResolvedConfig } from '.' +import { resolveConfig } from '.' +import type { Connect } from 'types/connect' +import type { ResolvedServerOptions } from './server' +import type { CommonServerOptions } from './http' +import { resolveHttpsConfig, resolveHttpServer, httpServerStart } from './http' import { openBrowser } from './server/openBrowser' import corsMiddleware from 'cors' import { proxyMiddleware } from './server/middlewares/proxy' @@ -36,7 +33,8 @@ export function resolvePreviewOptions( https: preview?.https ?? server.https, open: preview?.open ?? server.open, proxy: preview?.proxy ?? server.proxy, - cors: preview?.cors ?? server.cors + cors: preview?.cors ?? server.cors, + headers: preview?.headers ?? server.headers } } @@ -98,7 +96,7 @@ export async function preview( const options = config.preview const hostname = resolveHostname(options.host) - const port = options.port ?? 5000 + const port = options.port ?? 4173 const protocol = options.https ? 'https' : 'http' const logger = config.logger const base = config.base 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__/pluginContainer.spec.ts b/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts index a4d53fee0a0e08..9fbd07e90aa089 100644 --- a/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts +++ b/packages/vite/src/node/server/__tests__/pluginContainer.spec.ts @@ -1,7 +1,9 @@ -import { resolveConfig, UserConfig } from '../../config' -import { Plugin } from '../../plugin' +import type { UserConfig } from '../../config' +import { resolveConfig } from '../../config' +import type { Plugin } from '../../plugin' import { ModuleGraph } from '../moduleGraph' -import { createPluginContainer, PluginContainer } from '../pluginContainer' +import type { PluginContainer } from '../pluginContainer' +import { createPluginContainer } from '../pluginContainer' let resolveId: (id: string) => any let moduleGraph: ModuleGraph @@ -53,7 +55,7 @@ describe('plugin container', () => { plugins: [plugin] }) - const entryModule = await moduleGraph.ensureEntryFromUrl(entryUrl) + const entryModule = await moduleGraph.ensureEntryFromUrl(entryUrl, false) expect(entryModule.meta).toEqual({ x: 1 }) const loadResult: any = await container.load(entryUrl) @@ -92,7 +94,7 @@ describe('plugin container', () => { plugins: [plugin1, plugin2] }) - await moduleGraph.ensureEntryFromUrl(entryUrl) + await moduleGraph.ensureEntryFromUrl(entryUrl, false) await container.load(entryUrl) expect.assertions(1) 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 aff8e3d096c44b..edb73785247b6f 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -1,14 +1,14 @@ import fs from 'fs' import path from 'path' -import chalk from 'chalk' -import { ViteDevServer } from '..' +import colors from 'picocolors' +import type { ViteDevServer } from '..' import { createDebugger, normalizePath } from '../utils' -import { ModuleNode } from './moduleGraph' -import { Update } from 'types/hmrPayload' +import type { ModuleNode } from './moduleGraph' +import type { Update } from 'types/hmrPayload' import { CLIENT_DIR } from '../constants' -import { RollupError } from 'rollup' +import type { RollupError } from 'rollup' import { isMatch } from 'micromatch' -import { Server } from 'http' +import type { Server } from 'http' import { isCSSRequest } from '../plugins/css' export const debugHmr = createDebugger('vite:hmr') @@ -18,7 +18,7 @@ const normalizedClientDir = normalizePath(CLIENT_DIR) export interface HmrOptions { protocol?: string host?: string - port?: number + port?: number | false clientPort?: number path?: string timeout?: number @@ -47,25 +47,29 @@ 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 && (file === '.env' || file.startsWith('.env.')) if (isConfig || isConfigDependency || isEnv) { // auto restart server - debugHmr(`[config change] ${chalk.dim(shortFile)}`) + debugHmr(`[config change] ${colors.dim(shortFile)}`) config.logger.info( - chalk.green( + colors.green( `${path.relative(process.cwd(), file)} changed, restarting server...` ), { clear: true, timestamp: true } ) - await server.restart() + try { + await server.restart() + } catch (e) { + config.logger.error(colors.red(e)) + } return } - debugHmr(`[file change] ${chalk.dim(shortFile)}`) + debugHmr(`[file change] ${colors.dim(shortFile)}`) // (dev only) the client itself cannot be hot updated. if (file.startsWith(normalizedClientDir)) { @@ -100,7 +104,7 @@ export async function handleHMRUpdate( if (!hmrContext.modules.length) { // html file cannot be hot updated if (file.endsWith('.html')) { - config.logger.info(chalk.green(`page reload `) + chalk.dim(shortFile), { + config.logger.info(colors.green(`page reload `) + colors.dim(shortFile), { clear: true, timestamp: true }) @@ -112,7 +116,7 @@ export async function handleHMRUpdate( }) } else { // loaded but not in the module graph, probably not js - debugHmr(`[no modules matched] ${chalk.dim(shortFile)}`) + debugHmr(`[no modules matched] ${colors.dim(shortFile)}`) } return } @@ -157,7 +161,7 @@ function updateModules( } if (needFullReload) { - config.logger.info(chalk.green(`page reload `) + chalk.dim(file), { + config.logger.info(colors.green(`page reload `) + colors.dim(file), { clear: true, timestamp: true }) @@ -167,7 +171,7 @@ function updateModules( } else { config.logger.info( updates - .map(({ path }) => chalk.green(`hmr update `) + chalk.dim(path)) + .map(({ path }) => colors.green(`hmr update `) + colors.dim(path)) .join('\n'), { clear: true, timestamp: true } ) @@ -300,7 +304,7 @@ export function handlePrunedModules( const t = Date.now() mods.forEach((mod) => { mod.lastHMRTimestamp = t - debugHmr(`[dispose] ${chalk.dim(mod.file)}`) + debugHmr(`[dispose] ${colors.dim(mod.file)}`) }) ws.send({ type: 'prune', diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 8f922a5471918c..e8d4c3f1e5626d 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1,22 +1,21 @@ import fs from 'fs' import path from 'path' -import * as net from 'net' -import * as http from 'http' +import type * as net from 'net' +import type * as http from 'http' import connect from 'connect' import corsMiddleware from 'cors' -import chalk from 'chalk' -import { AddressInfo } from 'net' +import colors from 'picocolors' +import type { AddressInfo } from 'net' import chokidar from 'chokidar' -import { - resolveHttpsConfig, - resolveHttpServer, - httpServerStart, - CommonServerOptions -} from '../http' -import { resolveConfig, InlineConfig, ResolvedConfig } from '../config' -import { createPluginContainer, PluginContainer } from './pluginContainer' -import { FSWatcher, WatchOptions } from 'types/chokidar' -import { createWebSocketServer, WebSocketServer } from './ws' +import type { CommonServerOptions } from '../http' +import { resolveHttpsConfig, resolveHttpServer, httpServerStart } from '../http' +import type { InlineConfig, ResolvedConfig } from '../config' +import { mergeConfig, resolveConfig } from '../config' +import type { PluginContainer } from './pluginContainer' +import { createPluginContainer } from './pluginContainer' +import type { FSWatcher, WatchOptions } from 'types/chokidar' +import type { WebSocketServer } from './ws' +import { createWebSocketServer } from './ws' import { baseMiddleware } from './middlewares/base' import { proxyMiddleware } from './middlewares/proxy' import { spaFallbackMiddleware } from './middlewares/spaFallback' @@ -31,37 +30,36 @@ import { serveStaticMiddleware } from './middlewares/static' import { timeMiddleware } from './middlewares/time' -import { ModuleGraph, ModuleNode } from './moduleGraph' -import { Connect } from 'types/connect' -import { ensureLeadingSlash, normalizePath } from '../utils' +import type { ModuleNode } from './moduleGraph' +import { ModuleGraph } from './moduleGraph' +import type { Connect } from 'types/connect' +import { isParentDirectory, normalizePath } from '../utils' import { errorMiddleware, prepareError } from './middlewares/error' -import { handleHMRUpdate, HmrOptions, handleFileAddUnlink } from './hmr' +import type { HmrOptions } from './hmr' +import { handleHMRUpdate, handleFileAddUnlink } from './hmr' import { openBrowser } from './openBrowser' import launchEditorMiddleware from 'launch-editor-middleware' -import { - TransformOptions, - TransformResult, - transformRequest -} from './transformRequest' -import { - transformWithEsbuild, - ESBuildTransformResult -} from '../plugins/esbuild' -import { TransformOptions as EsbuildTransformOptions } from 'esbuild' -import { DepOptimizationMetadata, optimizeDeps } from '../optimizer' +import type { TransformOptions, TransformResult } from './transformRequest' +import { transformRequest } from './transformRequest' +import type { ESBuildTransformResult } from '../plugins/esbuild' +import { transformWithEsbuild } from '../plugins/esbuild' +import type { TransformOptions as EsbuildTransformOptions } from 'esbuild' import { ssrLoadModule } from '../ssr/ssrModuleLoader' import { resolveSSRExternal } from '../ssr/ssrExternal' import { rebindErrorStacktrace, ssrRewriteStacktrace } from '../ssr/ssrStacktrace' -import { createMissingImporterRegisterFn } from '../optimizer/registerMissing' +import { ssrTransform } from '../ssr/ssrTransform' +import { createOptimizedDeps } from '../optimizer/registerMissing' +import type { OptimizedDeps } from '../optimizer' import { resolveHostname } from '../utils' import { searchForWorkspaceRoot } from './searchRoot' import { CLIENT_DIR } from '../constants' import { printCommonServerUrls } from '../logger' import { performance } from 'perf_hooks' import { invalidatePackageData } from '../packages' +import type { SourceMap } from 'rollup' export { searchForWorkspaceRoot } from './searchRoot' @@ -96,6 +94,13 @@ export interface ServerOptions extends CommonServerOptions { * Origin for the generated asset URLs. */ origin?: string + /** + * Pre-transform known direct imports + * + * @experimental this option is experimental and might be changed in the future + * @default true + */ + preTransformRequests?: boolean } export interface ResolvedServerOptions extends ServerOptions { @@ -206,12 +211,28 @@ export interface ViteDevServer { options?: EsbuildTransformOptions, inMap?: object ): Promise + /** + * Transform module code into SSR format. + * @experimental + */ + ssrTransform( + code: string, + inMap: SourceMap | null, + url: string + ): Promise /** * 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 /** @@ -235,7 +256,7 @@ export interface ViteDevServer { /** * @internal */ - _optimizeDepsMetadata: DepOptimizationMetadata | null + _optimizedDeps: OptimizedDeps | null /** * Deps that are externalized * @internal @@ -265,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( @@ -288,7 +302,10 @@ export async function createServer( const config = await resolveConfig(inlineConfig, 'serve', 'development') const root = config.root const serverConfig = config.server - const httpsOptions = await resolveHttpsConfig(config.server.https) + const httpsOptions = await resolveHttpsConfig( + config.server.https, + config.cacheDir + ) let { middlewareMode } = serverConfig if (middlewareMode === true) { middlewareMode = 'ssr' @@ -313,8 +330,8 @@ export async function createServer( ...watchOptions }) as FSWatcher - const moduleGraph: ModuleGraph = new ModuleGraph((url) => - container.resolveId(url) + const moduleGraph: ModuleGraph = new ModuleGraph((url, ssr) => + container.resolveId(url, undefined, { ssr }) ) const container = await createPluginContainer(config, moduleGraph, watcher) @@ -337,19 +354,32 @@ export async function createServer( pluginContainer: container, ws, moduleGraph, + ssrTransform, transformWithEsbuild, transformRequest(url, options) { 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) { @@ -357,6 +387,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) }, @@ -381,7 +414,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(() => { @@ -392,14 +425,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() } @@ -541,30 +571,15 @@ export async function createServer( // error handler middlewares.use(errorMiddleware(server, !!middlewareMode)) - const runOptimize = async () => { - if (config.cacheDir) { - 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) @@ -575,7 +590,7 @@ export async function createServer( }) as any } else { await container.buildStart({}) - await runOptimize() + server._optimizedDeps = createOptimizedDeps(server) } return server @@ -615,7 +630,9 @@ async function startServer( const outPath = path.resolve('./vite-profile.cpuprofile') fs.writeFileSync(outPath, JSON.stringify(profile)) info( - chalk.yellow(` CPU profile written to ${chalk.white.dim(outPath)}\n`) + colors.yellow( + ` CPU profile written to ${colors.white(colors.dim(outPath))}\n` + ) ) } else { throw err @@ -674,14 +691,17 @@ 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( root: string, raw?: ServerOptions ): ResolvedServerOptions { - const server = raw || {} + const server: ResolvedServerOptions = { + preTransformRequests: true, + ...(raw as ResolvedServerOptions) + } let allowDirs = server.fs?.allow const deny = server.fs?.deny || ['.env', '.env.*', '*.{crt,pem}'] @@ -693,7 +713,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) } @@ -702,19 +722,28 @@ export function resolveServerOptions( allow: allowDirs, deny } - return server as ResolvedServerOptions + return server } async function restartServer(server: ViteDevServer) { // @ts-ignore global.__vite_start_time = performance.now() - const { port } = server.config.server + const { port: prevPort, host: prevHost } = server.config.server 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 @@ -723,14 +752,31 @@ 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] } } - if (!server.config.server.middlewareMode) { + + const { + logger, + server: { port, host, middlewareMode } + } = server.config + if (!middlewareMode) { await server.listen(port, true) + logger.info('server restarted.', { timestamp: true }) + if (port !== prevPort || host !== prevHost) { + logger.info('') + server.printUrls() + } } else { - server.config.logger.info('server restarted.', { timestamp: true }) + 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 869e460c4f4d93..b72f0fd7949f0b 100644 --- a/packages/vite/src/node/server/middlewares/base.ts +++ b/packages/vite/src/node/server/middlewares/base.ts @@ -1,6 +1,6 @@ import { parse as parseUrl } from 'url' -import { ViteDevServer } from '..' -import { Connect } from 'types/connect' +import type { ViteDevServer } from '..' +import type { Connect } from 'types/connect' // this middleware is only active when (config.base !== '/') @@ -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..7a97044985ac0e --- /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 +const 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/error.ts b/packages/vite/src/node/server/middlewares/error.ts index eab03a7e0206c2..62f86313690f0e 100644 --- a/packages/vite/src/node/server/middlewares/error.ts +++ b/packages/vite/src/node/server/middlewares/error.ts @@ -1,10 +1,10 @@ -import chalk from 'chalk' -import { RollupError } from 'rollup' -import { ViteDevServer } from '../..' -import { Connect } from 'types/connect' +import colors from 'picocolors' +import type { RollupError } from 'rollup' +import type { ViteDevServer } from '../..' +import type { Connect } from 'types/connect' import { pad } from '../../utils' import strip from 'strip-ansi' -import { ErrorPayload } from 'types/hmrPayload' +import type { ErrorPayload } from 'types/hmrPayload' export function prepareError(err: Error | RollupError): ErrorPayload['err'] { // only copy the information we need and avoid serializing unnecessary @@ -25,9 +25,9 @@ export function buildErrorMessage( args: string[] = [], includeStack = true ): string { - if (err.plugin) args.push(` Plugin: ${chalk.magenta(err.plugin)}`) - if (err.id) args.push(` File: ${chalk.cyan(err.id)}`) - if (err.frame) args.push(chalk.yellow(pad(err.frame))) + if (err.plugin) args.push(` Plugin: ${colors.magenta(err.plugin)}`) + if (err.id) args.push(` File: ${colors.cyan(err.id)}`) + if (err.frame) args.push(colors.yellow(pad(err.frame))) if (includeStack && err.stack) args.push(pad(cleanStack(err.stack))) return args.join('\n') } @@ -41,7 +41,7 @@ function cleanStack(stack: string) { export function logError(server: ViteDevServer, err: RollupError): void { const msg = buildErrorMessage(err, [ - chalk.red(`Internal server error: ${err.message}`) + colors.red(`Internal server error: ${err.message}`) ]) server.config.logger.error(msg, { @@ -69,7 +69,23 @@ export function errorMiddleware( next() } else { res.statusCode = 500 - res.end() + res.end(` + + + + + Error + + + + + + `) } } } diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index e257628a35a746..ca2538bd9507ed 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -1,18 +1,19 @@ import fs from 'fs' import path from 'path' import MagicString from 'magic-string' -import { AttributeNode, NodeTypes } from '@vue/compiler-dom' -import { Connect } from 'types/connect' +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' import { addToHTMLProxyCache, applyHtmlTransforms, assetAttrsConfig, getScriptInfo, - IndexHtmlTransformHook, resolveHtmlTransforms, traverseHtml } from '../../plugins/html' -import { ResolvedConfig, ViteDevServer } from '../..' +import type { ResolvedConfig, ViteDevServer } from '../..' import { send } from '../send' import { CLIENT_PUBLIC_PATH, FS_PREFIX } from '../../constants' import { cleanUrl, fsPathFromId, normalizePath, injectQuery } from '../../utils' @@ -37,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))) + ) } } @@ -63,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('.') && @@ -81,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 @@ -104,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) { @@ -188,7 +206,9 @@ export function indexHtmlMiddleware( try { let html = fs.readFileSync(filename, 'utf-8') html = await server.transformIndexHtml(url, html, req.originalUrl) - return send(req, res, html, 'html') + return send(req, res, html, 'html', { + headers: server.config.server.headers + }) } catch (e) { return next(e) } diff --git a/packages/vite/src/node/server/middlewares/proxy.ts b/packages/vite/src/node/server/middlewares/proxy.ts index b8c653fdfb4eda..aa1100f13d5229 100644 --- a/packages/vite/src/node/server/middlewares/proxy.ts +++ b/packages/vite/src/node/server/middlewares/proxy.ts @@ -1,11 +1,11 @@ -import * as http from 'http' +import type * as http from 'http' import { createDebugger, isObject } from '../../utils' import httpProxy from 'http-proxy' import { HMR_HEADER } from '../ws' -import { Connect } from 'types/connect' -import { HttpProxy } from 'types/http-proxy' -import chalk from 'chalk' -import { ResolvedConfig } from '../..' +import type { Connect } from 'types/connect' +import type { HttpProxy } from 'types/http-proxy' +import colors from 'picocolors' +import type { ResolvedConfig } from '../..' const debug = createDebugger('vite:proxy') @@ -45,7 +45,7 @@ export function proxyMiddleware( const proxy = httpProxy.createProxyServer(opts) as HttpProxy.Server proxy.on('error', (err) => { - config.logger.error(`${chalk.red(`http proxy error:`)}\n${err.stack}`, { + config.logger.error(`${colors.red(`http proxy error:`)}\n${err.stack}`, { timestamp: true, error: err }) diff --git a/packages/vite/src/node/server/middlewares/spaFallback.ts b/packages/vite/src/node/server/middlewares/spaFallback.ts index 5d6e4ff8c5b5c4..1aade764d6993a 100644 --- a/packages/vite/src/node/server/middlewares/spaFallback.ts +++ b/packages/vite/src/node/server/middlewares/spaFallback.ts @@ -1,7 +1,7 @@ import fs from 'fs' import history from 'connect-history-api-fallback' import path from 'path' -import { Connect } from 'types/connect' +import type { Connect } from 'types/connect' import { createDebugger } from '../../utils' export function spaFallbackMiddleware( diff --git a/packages/vite/src/node/server/middlewares/static.ts b/packages/vite/src/node/server/middlewares/static.ts index 9411e8a09a95dc..a6623338783cc8 100644 --- a/packages/vite/src/node/server/middlewares/static.ts +++ b/packages/vite/src/node/server/middlewares/static.ts @@ -1,18 +1,20 @@ import path from 'path' -import { ServerResponse } from 'http' -import sirv, { Options } from 'sirv' -import { Connect } from 'types/connect' -import { normalizePath, ViteDevServer } from '../..' +import type { ServerResponse } from 'http' +import type { Options } from 'sirv' +import sirv from 'sirv' +import type { Connect } from 'types/connect' +import type { ViteDevServer } from '../..' import { FS_PREFIX } from '../../constants' import { cleanUrl, - ensureLeadingSlash, fsPathFromId, + fsPathFromUrl, isImportRequest, isInternalRequest, isWindows, slash, - isFileReadable + isFileReadable, + isParentDirectory } from '../../utils' import { isMatch } from 'micromatch' @@ -146,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/time.ts b/packages/vite/src/node/server/middlewares/time.ts index b551b846071631..64124ab58c70c7 100644 --- a/packages/vite/src/node/server/middlewares/time.ts +++ b/packages/vite/src/node/server/middlewares/time.ts @@ -1,5 +1,5 @@ import { performance } from 'perf_hooks' -import { Connect } from 'types/connect' +import type { Connect } from 'types/connect' import { createDebugger, prettifyUrl, timeFrom } from '../../utils' const logTime = createDebugger('vite:time') diff --git a/packages/vite/src/node/server/middlewares/transform.ts b/packages/vite/src/node/server/middlewares/transform.ts index a68308f391e363..f5ae0e97b065bd 100644 --- a/packages/vite/src/node/server/middlewares/transform.ts +++ b/packages/vite/src/node/server/middlewares/transform.ts @@ -1,6 +1,7 @@ +import { promises as fs } from 'fs' import path from 'path' -import { ViteDevServer } from '..' -import { Connect } from 'types/connect' +import type { ViteDevServer } from '..' +import type { Connect } from 'types/connect' import { cleanUrl, createDebugger, @@ -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 chalk from 'chalk' +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,24 +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 - let cacheDirPrefix: string | undefined - if (cacheDir) { - const cacheDirRelative = normalizePath(path.relative(root, cacheDir)) - if (cacheDirRelative.startsWith('../')) { - // if the cache directory is outside root, the url prefix would be something - // like '/@fs/absolute/path/to/node_modules/.vite' - cacheDirPrefix = `/@fs/${normalizePath(cacheDir).replace(/^\//, '')}` - } else { - // if the cache directory is inside root, the url prefix would be something - // like '/node_modules/.vite' - cacheDirPrefix = `/${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) { @@ -68,49 +57,63 @@ 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') - ) { - // missing dep pending reload, hold request until reload happens - server._pendingReload.then(() => - // 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. - setTimeout(() => { - // Don't do anything if response has already been sent - if (res.writableEnded) return - // 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

` - ) - }, NEW_DEPENDENCY_BUILD_TIMEOUT) + let url: string + try { + url = decodeURI(removeTimestampQuery(req.url!)).replace( + NULL_BYTE_PLACEHOLDER, + '\0' ) - return + } catch (e) { + return next(e) } - let url = decodeURI(removeTimestampQuery(req.url!)).replace( - NULL_BYTE_PLACEHOLDER, - '\0' - ) - const withoutQuery = cleanUrl(url) try { 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)) - ?.transformResult?.map - if (map) { - return send(req, res, JSON.stringify(map), 'json') + 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() + } } } @@ -122,9 +125,9 @@ export function transformMiddleware( // warn explicit public paths if (url.startsWith(publicPath)) { logger.warn( - chalk.yellow( + colors.yellow( `files in the public directory are served at the root path.\n` + - `Instead of ${chalk.cyan(url)}, use ${chalk.cyan( + `Instead of ${colors.cyan(url)}, use ${colors.cyan( url.replace(publicPath, '/') )}.` ) @@ -158,8 +161,8 @@ export function transformMiddleware( const ifNoneMatch = req.headers['if-none-match'] if ( ifNoneMatch && - (await moduleGraph.getModuleByUrl(url))?.transformResult?.etag === - ifNoneMatch + (await moduleGraph.getModuleByUrl(url, false))?.transformResult + ?.etag === ifNoneMatch ) { isDebug && debugCache(`[304] ${prettifyUrl(url, root)}`) res.statusCode = 304 @@ -172,22 +175,41 @@ export function transformMiddleware( }) if (result) { const type = isDirectCSSRequest(url) ? 'css' : 'js' - const isDep = - DEP_VERSION_RE.test(url) || - (cacheDirPrefix && url.startsWith(cacheDirPrefix)) - return send( - req, - res, - result.code, - type, - result.etag, + 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! - isDep ? 'max-age=31536000,immutable' : 'no-cache', - result.map - ) + cacheControl: isDep ? 'max-age=31536000,immutable' : 'no-cache', + headers: server.config.server.headers, + map: result.map + }) } } } 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 7185304e45b951..44e76deef98b6f 100644 --- a/packages/vite/src/node/server/moduleGraph.ts +++ b/packages/vite/src/node/server/moduleGraph.ts @@ -1,5 +1,5 @@ import { extname } from 'path' -import { ModuleInfo, PartialResolvedId } from 'rollup' +import type { ModuleInfo, PartialResolvedId } from 'rollup' import { parse as parseUrl } from 'url' import { isDirectCSSRequest } from '../plugins/css' import { @@ -9,7 +9,7 @@ import { removeTimestampQuery } from '../utils' import { FS_PREFIX } from '../constants' -import { TransformResult } from './transformRequest' +import type { TransformResult } from './transformRequest' export class ModuleNode { /** @@ -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 @@ -62,11 +63,17 @@ export class ModuleGraph { safeModulesPath = new Set() constructor( - private resolveId: (url: string) => Promise + private resolveId: ( + url: string, + ssr: boolean + ) => Promise ) {} - async getModuleByUrl(rawUrl: string): Promise { - const [url] = await this.resolveUrl(rawUrl) + async getModuleByUrl( + rawUrl: string, + ssr?: boolean + ): Promise { + const [url] = await this.resolveUrl(rawUrl, ssr) return this.urlToModuleMap.get(url) } @@ -88,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) }) } @@ -111,7 +127,8 @@ export class ModuleGraph { mod: ModuleNode, importedModules: Set, acceptedModules: Set, - isSelfAccepting: boolean + isSelfAccepting: boolean, + ssr?: boolean ): Promise | undefined> { mod.isSelfAccepting = isSelfAccepting const prevImports = mod.importedModules @@ -121,7 +138,7 @@ export class ModuleGraph { for (const imported of importedModules) { const dep = typeof imported === 'string' - ? await this.ensureEntryFromUrl(imported) + ? await this.ensureEntryFromUrl(imported, ssr) : imported dep.importers.add(mod) nextImports.add(dep) @@ -141,15 +158,15 @@ export class ModuleGraph { for (const accepted of acceptedModules) { const dep = typeof accepted === 'string' - ? await this.ensureEntryFromUrl(accepted) + ? await this.ensureEntryFromUrl(accepted, ssr) : accepted deps.add(dep) } return noLongerImported } - async ensureEntryFromUrl(rawUrl: string): Promise { - const [url, resolvedId, meta] = await this.resolveUrl(rawUrl) + async ensureEntryFromUrl(rawUrl: string, ssr?: boolean): Promise { + const [url, resolvedId, meta] = await this.resolveUrl(rawUrl, ssr) let mod = this.urlToModuleMap.get(url) if (!mod) { mod = new ModuleNode(url) @@ -197,9 +214,9 @@ export class ModuleGraph { // 1. remove the HMR timestamp query (?t=xxxx) // 2. resolve its extension so that urls with or without extension all map to // the same module - async resolveUrl(url: string): Promise { + async resolveUrl(url: string, ssr?: boolean): Promise { url = removeImportQuery(removeTimestampQuery(url)) - const resolved = await this.resolveId(url) + const resolved = await this.resolveId(url, !!ssr) const resolvedId = resolved?.id || url const ext = extname(cleanUrl(resolvedId)) const { pathname, search, hash } = parseUrl(url) diff --git a/packages/vite/src/node/server/openBrowser.ts b/packages/vite/src/node/server/openBrowser.ts index 658e7ab3e859eb..5eeb7554e606bb 100644 --- a/packages/vite/src/node/server/openBrowser.ts +++ b/packages/vite/src/node/server/openBrowser.ts @@ -10,10 +10,10 @@ import path from 'path' import open from 'open' -import execa from 'execa' -import chalk from 'chalk' +import spawn from 'cross-spawn' +import colors from 'picocolors' import { execSync } from 'child_process' -import { Logger } from '../logger' +import type { Logger } from '../logger' // https://github.com/sindresorhus/open#app const OSX_CHROME = 'google chrome' @@ -40,14 +40,14 @@ export function openBrowser( function executeNodeScript(scriptPath: string, url: string, logger: Logger) { const extraArgs = process.argv.slice(2) - const child = execa('node', [scriptPath, ...extraArgs, url], { + const child = spawn(process.execPath, [scriptPath, ...extraArgs, url], { stdio: 'inherit' }) child.on('close', (code) => { if (code !== 0) { logger.error( - chalk.red( - `\nThe script specified as BROWSER environment variable failed.\n\n${chalk.cyan( + colors.red( + `\nThe script specified as BROWSER environment variable failed.\n\n${colors.cyan( scriptPath )} exited with code ${code}.` ), diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts index 91f0f81201ace1..5efc2670c0f81a 100644 --- a/packages/vite/src/node/server/pluginContainer.ts +++ b/packages/vite/src/node/server/pluginContainer.ts @@ -31,8 +31,8 @@ SOFTWARE. import fs from 'fs' import { resolve, join } from 'path' -import { Plugin } from '../plugin' -import { +import type { Plugin } from '../plugin' +import type { InputOptions, MinimalPluginContext, OutputOptions, @@ -49,12 +49,11 @@ import { TransformResult } from 'rollup' import * as acorn from 'acorn' -import acornClassFields from 'acorn-class-fields' -import acornStaticClassFeatures from 'acorn-static-class-features' -import { 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 { FSWatcher } from 'chokidar' +import type { FSWatcher } from 'chokidar' import { createDebugger, ensureWatchedFile, @@ -67,11 +66,12 @@ import { timeFrom } from '../utils' import { FS_PREFIX } from '../constants' -import chalk from 'chalk' -import { ResolvedConfig } from '../config' +import colors from 'picocolors' +import type { ResolvedConfig } from '../config' import { buildErrorMessage } from './middlewares/error' -import { ModuleGraph } from './moduleGraph' +import type { ModuleGraph } from './moduleGraph' import { performance } from 'perf_hooks' +import type * as postcss from 'postcss' export interface PluginContainerOptions { cwd?: string @@ -90,6 +90,10 @@ export interface PluginContainer { options?: { skip?: Set ssr?: boolean + /** + * @internal + */ + scan?: boolean } ): Promise transform( @@ -124,10 +128,7 @@ type PluginContext = Omit< | 'load' > -export let parser = acorn.Parser.extend( - acornClassFields, - acornStaticClassFeatures -) +export let parser = acorn.Parser export async function createPluginContainer( { plugins, logger, root, build: { rollupOptions } }: ResolvedConfig, @@ -161,9 +162,9 @@ export async function createPluginContainer( function warnIncompatibleMethod(method: string, plugin: string) { logger.warn( - chalk.cyan(`[plugin:${plugin}] `) + - chalk.yellow( - `context method ${chalk.bold( + colors.cyan(`[plugin:${plugin}] `) + + colors.yellow( + `context method ${colors.bold( `${method}()` )} is not supported in serve mode. This plugin is likely not vite-compatible.` ) @@ -215,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 @@ -244,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 } @@ -290,7 +296,7 @@ export async function createPluginContainer( const err = formatError(e, position, this) const msg = buildErrorMessage( err, - [chalk.yellow(`warning: ${err.message}`)], + [colors.yellow(`warning: ${err.message}`)], false ) logger.warn(msg, { @@ -314,11 +320,20 @@ export async function createPluginContainer( position: number | { column: number; line: number } | undefined, ctx: Context ) { - const err = (typeof e === 'string' ? new Error(e) : e) as RollupError + const err = ( + typeof e === 'string' ? new Error(e) : e + ) as postcss.CssSyntaxError & RollupError + if (err.pluginCode) { + return err // The plugin likely called `this.error` + } + if (err.file && err.name === 'CssSyntaxError') { + err.id = normalizePath(err.file) + } if (ctx._activePlugin) err.plugin = ctx._activePlugin.name if (ctx._activeId && !err.id) err.id = ctx._activeId if (ctx._activeCode) { err.pluginCode = ctx._activeCode + const pos = position != null ? position @@ -326,13 +341,14 @@ export async function createPluginContainer( ? err.pos : // some rollup plugins, e.g. json, sets position instead of pos (err as any).position + if (pos != null) { let errLocation try { errLocation = numberToPos(ctx._activeCode, pos) } catch (err2) { logger.error( - chalk.red( + colors.red( `Error in error handler:\n${err2.stack || err2.message}\n` ), // print extra newline to separate the two errors @@ -363,7 +379,21 @@ export async function createPluginContainer( line: (err as any).line, column: (err as any).column } - err.frame = err.frame || generateCodeFrame(ctx._activeCode, err.loc) + err.frame = err.frame || generateCodeFrame(err.id!, err.loc) + } + + if (err.loc && ctx instanceof TransformContext) { + const rawSourceMap = ctx._getCombinedSourcemap() + if (rawSourceMap) { + const traced = new TraceMap(rawSourceMap as any) + const { source, line, column } = originalPositionFor(traced, { + line: Number(err.loc.line), + column: Number(err.loc.column) + }) + if (source && line != null && column != null) { + err.loc = { file: source, line, column } + } + } } } return err @@ -398,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 @@ -412,7 +442,7 @@ export async function createPluginContainer( ? new MagicString(this.originalCode).generateMap({ includeContent: true, hires: true, - source: this.filename + source: cleanUrl(this.filename) }) : null } @@ -439,11 +469,7 @@ export async function createPluginContainer( (await plugin.options.call(minimalContext, options)) || options } if (options.acornInjectPlugins) { - parser = acorn.Parser.extend( - ...[acornClassFields, acornStaticClassFeatures].concat( - options.acornInjectPlugins - ) - ) + parser = acorn.Parser.extend(options.acornInjectPlugins as any) } return { acorn, @@ -470,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 @@ -488,7 +516,7 @@ export async function createPluginContainer( ctx as any, rawId, importer, - { ssr } + { ssr, scan } ) if (!result) continue @@ -516,7 +544,9 @@ export async function createPluginContainer( if (!seenResolves[key]) { seenResolves[key] = true debugResolve( - `${timeFrom(resolveStart)} ${chalk.cyan(rawId)} -> ${chalk.dim(id)}` + `${timeFrom(resolveStart)} ${colors.cyan(rawId)} -> ${colors.dim( + id + )}` ) } } 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 777e91abf9438c..a52d17d17458ba 100644 --- a/packages/vite/src/node/server/send.ts +++ b/packages/vite/src/node/server/send.ts @@ -1,8 +1,7 @@ -import { IncomingMessage, ServerResponse } from 'http' +import type { IncomingMessage, OutgoingHttpHeaders, ServerResponse } from 'http' import getEtag from 'etag' -import { SourceMap } from 'rollup' - -const isDebug = process.env.DEBUG +import type { SourceMap } from 'rollup' +import { getCodeWithSourcemap } from './sourcemap' const alias: Record = { js: 'application/javascript', @@ -11,48 +10,55 @@ const alias: Record = { json: 'application/json' } +export interface SendOptions { + etag?: string + cacheControl?: string + headers?: OutgoingHttpHeaders + map?: SourceMap | null +} + export function send( req: IncomingMessage, res: ServerResponse, content: string | Buffer, type: string, - etag = getEtag(content, { weak: true }), - cacheControl = 'no-cache', - map?: SourceMap | null + options: SendOptions ): void { + const { + etag = getEtag(content, { weak: true }), + cacheControl = 'no-cache', + headers, + map + } = options + if (res.writableEnded) { return } if (req.headers['if-none-match'] === etag) { res.statusCode = 304 - return res.end() + res.end() + return } res.setHeader('Content-Type', alias[type] || type) res.setHeader('Cache-Control', cacheControl) res.setHeader('Etag', etag) + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]!) + } + } + // 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 9f9eafbc130a84..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 { Logger } from '../logger' -import { createDebugger } from '../utils' +import type { Logger } from '../logger' +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 4381529dba1c8e..baafe95e8416f3 100644 --- a/packages/vite/src/node/server/transformRequest.ts +++ b/packages/vite/src/node/server/transformRequest.ts @@ -2,9 +2,9 @@ import { promises as fs } from 'fs' import path from 'path' import getEtag from 'etag' import * as convertSourceMap from 'convert-source-map' -import { SourceDescription, SourceMap } from 'rollup' -import { ViteDevServer } from '..' -import chalk from 'chalk' +import type { SourceDescription, SourceMap } from 'rollup' +import type { ViteDevServer } from '..' +import colors from 'picocolors' import { createDebugger, cleanUrl, @@ -44,28 +44,86 @@ 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) : '' const ssr = !!options.ssr - const module = await server.moduleGraph.getModuleByUrl(url) + const module = await server.moduleGraph.getModuleByUrl(url, ssr) // check if we have a fresh cache const cached = @@ -82,7 +140,8 @@ async function doTransform( } // resolve - const id = (await pluginContainer.resolveId(url))?.id || url + const id = + (await pluginContainer.resolveId(url, undefined, { ssr }))?.id || url const file = cleanUrl(id) let code: string | null = null @@ -147,7 +206,7 @@ async function doTransform( } // ensure module in graph after successful load - const mod = await moduleGraph.ensureEntryFromUrl(url) + const mod = await moduleGraph.ensureEntryFromUrl(url, ssr) ensureWatchedFile(watcher, mod.file, root) // transform @@ -163,7 +222,7 @@ async function doTransform( // no transform applied, keep code as-is isDebug && debugTransform( - timeFrom(transformStart) + chalk.dim(` [skipped] ${prettyUrl}`) + timeFrom(transformStart) + colors.dim(` [skipped] ${prettyUrl}`) ) } else { isDebug && debugTransform(`${timeFrom(transformStart)} ${prettyUrl}`) @@ -178,17 +237,20 @@ async function doTransform( } } - if (ssr) { - return (mod.ssrTransformResult = await ssrTransform( - code, - map as SourceMap, - url - )) - } else { - return (mod.transformResult = { - code, - map, - etag: getEtag(code, { weak: true }) - } as TransformResult) + const result = ssr + ? await ssrTransform(code, map as SourceMap, url) + : ({ + 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 74b4ad8142e81a..3c6875e2475c64 100644 --- a/packages/vite/src/node/server/ws.ts +++ b/packages/vite/src/node/server/ws.ts @@ -1,36 +1,95 @@ -import chalk from 'chalk' -import { Server, STATUS_CODES } from 'http' -import { - createServer as createHttpsServer, - ServerOptions as HttpsServerOptions -} from 'https' -import { WebSocketServer as WebSocket, ServerOptions } from 'ws' -import { ErrorPayload, HMRPayload } from 'types/hmrPayload' -import { ResolvedConfig } from '..' +import colors from 'picocolors' +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, WebSocket as WebSocketRaw } from 'ws' +import { WebSocketServer as WebSocketServerRaw } from 'ws' +import type { CustomPayload, ErrorPayload, HMRPayload } from 'types/hmrPayload' +import type { ResolvedConfig } from '..' import { isObject } from '../utils' -import { Socket } from 'net' +import type { Socket } from 'net' export const HMR_HEADER = 'vite-hmr' +export type WebSocketCustomListener = ( + data: T, + client: WebSocketClient +) => void + export interface WebSocketServer { - on: WebSocket['on'] - off: WebSocket['off'] + /** + * Get all connected clients. + */ + clients: Set + /** + * Boardcast events to all clients + */ send(payload: HMRPayload): void + /** + * Send custom event + */ + send(event: string, payload?: CustomPayload['data']): void + /** + * Disconnect all clients and terminate the server. + */ close(): Promise + /** + * Handle custom event emitted by `import.meta.hot.send` + */ + on: WebSocketServerRaw['on'] & { + (event: string, listener: WebSocketCustomListener): void + } + /** + * Unregister event listener. + */ + off: WebSocketServerRaw['off'] & { + (event: string, listener: WebSocketCustomListener): 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) => { @@ -40,7 +99,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 @@ -59,18 +119,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)) @@ -81,12 +156,36 @@ export function createWebSocketServer( wss.on('error', (e: Error & { code: string }) => { if (e.code !== 'EADDRINUSE') { config.logger.error( - chalk.red(`WebSocket server error:\n${e.stack || e.message}`), + colors.red(`WebSocket server error:\n${e.stack || e.message}`), { error: e } ) } }) + // 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 @@ -94,9 +193,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 @@ -113,6 +242,9 @@ export function createWebSocketServer( close() { return new Promise((resolve, reject) => { + wss.clients.forEach((client) => { + client.terminate() + }) wss.close((err) => { if (err) { reject(err) 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 a5c452d79c60e9..e086365ee25f16 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -1,3 +1,4 @@ +import { transformWithEsbuild } from '../../plugins/esbuild' import { traverseHtml } from '../../plugins/html' import { ssrTransform } from '../ssrTransform' @@ -230,6 +231,20 @@ test('rewrite variable in string interpolation in function nested arguments', as expect(result.deps).toEqual(['vue']) }) +// #6520 +test('rewrite variables in default value of destructuring params', async () => { + const result = await ssrTransform( + `import { fn } from 'vue';function A({foo = fn}){ return {}; }`, + null, + null + ) + expect(result.code).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"vue\\"); + function A({foo = __vite_ssr_import_0__.fn}){ return {}; }" + `) + expect(result.deps).toEqual(['vue']) +}) + test('do not rewrite when function declaration is in scope', async () => { const result = await ssrTransform( `import { fn } from 'vue';function A(){ function fn() {}; return { fn }; }`, @@ -289,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 });" `) }) @@ -336,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 });" `) }) @@ -375,3 +390,270 @@ test('overwrite bindings', async () => { " `) }) + +test('Empty array pattern', async () => { + expect( + (await ssrTransform(`const [, LHS, RHS] = inMatch;`, null, null)).code + ).toMatchInlineSnapshot(`"const [, LHS, RHS] = inMatch;"`) +}) + +test('function argument destructure', async () => { + expect( + ( + await ssrTransform( + ` +import { foo, bar } from 'foo' +const a = ({ _ = foo() }) => {} +function b({ _ = bar() }) {} +function c({ _ = bar() + foo() }) {} +`, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foo\\"); + + const a = ({ _ = __vite_ssr_import_0__.foo() }) => {} + function b({ _ = __vite_ssr_import_0__.bar() }) {} + function c({ _ = __vite_ssr_import_0__.bar() + __vite_ssr_import_0__.foo() }) {} + " + `) +}) + +test('object destructure alias', async () => { + expect( + ( + await ssrTransform( + ` +import { n } from 'foo' +const a = () => { + const { type: n = 'bar' } = {} + console.log(n) +} +`, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foo\\"); + + const a = () => { + const { type: n = 'bar' } = {} + console.log(n) + } + " + `) +}) + +test('nested object destructure alias', async () => { + expect( + ( + await ssrTransform( + ` +import { remove, add, get, set, rest, objRest } from 'vue' + +function a() { + const { + o: { remove }, + a: { b: { c: [ add ] }}, + d: [{ get }, set, ...rest], + ...objRest + } = foo + + remove() + add() + get() + set() + rest() + objRest() +} + +remove() +add() +get() +set() +rest() +objRest() +`, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"vue\\"); + + + function a() { + const { + o: { remove }, + a: { b: { c: [ add ] }}, + d: [{ get }, set, ...rest], + ...objRest + } = foo + + remove() + add() + get() + set() + rest() + objRest() + } + + __vite_ssr_import_0__.remove() + __vite_ssr_import_0__.add() + __vite_ssr_import_0__.get() + __vite_ssr_import_0__.set() + __vite_ssr_import_0__.rest() + __vite_ssr_import_0__.objRest() + " + `) +}) + +test('class props', async () => { + expect( + ( + await ssrTransform( + ` +import { remove, add } from 'vue' + +class A { + remove = 1 + add = null +} +`, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"vue\\"); + + + const add = __vite_ssr_import_0__.add; + const remove = __vite_ssr_import_0__.remove; + class A { + remove = 1 + add = null + } + " + `) +}) + +test('declare scope', async () => { + expect( + ( + await ssrTransform( + ` +import { aaa, bbb, ccc, ddd } from 'vue' + +function foobar() { + ddd() + + const aaa = () => { + bbb(ccc) + ddd() + } + const bbb = () => { + console.log('hi') + } + const ccc = 1 + function ddd() {} + + aaa() + bbb() + ccc() +} + +aaa() +bbb() +`, + null, + null + ) + ).code + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"vue\\"); + + + function foobar() { + ddd() + + const aaa = () => { + bbb(ccc) + ddd() + } + const bbb = () => { + console.log('hi') + } + const ccc = 1 + function ddd() {} + + aaa() + bbb() + ccc() + } + + __vite_ssr_import_0__.aaa() + __vite_ssr_import_0__.bbb() + " + `) +}) + +test('jsx', async () => { + const code = ` + import React from 'react' + import { Foo, Slot } from 'foo' + + function Bar({ Slot = }) { + return ( + <> + + + ) + } + ` + const id = '/foo.jsx' + const result = await transformWithEsbuild(code, id) + expect((await ssrTransform(result.code, null, '/foo.jsx')).code) + .toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"react\\"); + + const __vite_ssr_import_1__ = await __vite_ssr_import__(\\"foo\\"); + + function Bar({ Slot: Slot2 = /* @__PURE__ */ __vite_ssr_import_0__.default.createElement(__vite_ssr_import_1__.Foo, null) }) { + return /* @__PURE__ */ __vite_ssr_import_0__.default.createElement(__vite_ssr_import_0__.default.Fragment, null, /* @__PURE__ */ __vite_ssr_import_0__.default.createElement(Slot2, null)); + } + " + `) +}) + +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 3549d5653dfc95..800a2307dabae6 100644 --- a/packages/vite/src/node/ssr/ssrExternal.ts +++ b/packages/vite/src/node/ssr/ssrExternal.ts @@ -1,6 +1,7 @@ import fs from 'fs' import path from 'path' -import { tryNodeResolve, InternalResolveOptions } from '../plugins/resolve' +import type { InternalResolveOptions } from '../plugins/resolve' +import { tryNodeResolve } from '../plugins/resolve' import { createDebugger, isDefined, @@ -8,11 +9,21 @@ import { normalizePath, resolveFrom } from '../utils' -import { Logger, ResolvedConfig } from '..' +import type { Logger, ResolvedConfig } from '..' 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. @@ -21,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 [] @@ -64,6 +79,9 @@ export function resolveSSRExternal( return externals } +const CJS_CONTENT_RE = + /\bmodule\.exports\b|\bexports[.\[]|\brequire\s*\(|\bObject\.(defineProperty|defineProperties|assign)\s*\(\s*exports\b/ + // do we need to do this ahead of time or could we do it lazily? function collectExternals( root: string, @@ -157,13 +175,13 @@ function collectExternals( } // check if the entry is cjs const content = fs.readFileSync(esmEntry, 'utf-8') - if (/\bmodule\.exports\b|\bexports[.\[]|\brequire\s*\(/.test(content)) { + if (CJS_CONTENT_RE.test(content)) { ssrExternals.add(id) continue } logger.warn( - `${id} is incorrectly packaged. Please contact the package author to fix.` + `${id} doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.` ) } } diff --git a/packages/vite/src/node/ssr/ssrManifestPlugin.ts b/packages/vite/src/node/ssr/ssrManifestPlugin.ts index 76b2a1f561962c..69184150bb97b7 100644 --- a/packages/vite/src/node/ssr/ssrManifestPlugin.ts +++ b/packages/vite/src/node/ssr/ssrManifestPlugin.ts @@ -1,9 +1,11 @@ -import { relative } from 'path' -import { normalizePath } from '@rollup/pluginutils' -import { ResolvedConfig } from '..' -import { Plugin } from '../plugin' -import { chunkToEmittedCssFileMap } from '../plugins/css' -import { chunkToEmittedAssetsMap } from '../plugins/asset' +import { relative, basename, join, dirname } from 'path' +import { parse as parseImports } from 'es-module-lexer' +import type { ImportSpecifier } from 'es-module-lexer' +import type { OutputChunk } from 'rollup' +import type { ResolvedConfig } from '..' +import type { Plugin } from '../plugin' +import { preloadMethod } from '../plugins/importAnalysisBuild' +import { normalizePath } from '../utils' export function ssrManifestPlugin(config: ResolvedConfig): Plugin { // module id => preload assets mapping @@ -16,35 +18,68 @@ 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) => { + // 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) }) } - if (assetFiles) { - assetFiles.forEach((file) => { - mappedChunks.push(base + file) - }) + chunk.viteMetadata.importedAssets.forEach((file) => { + mappedChunks.push(base + file) + }) + } + if (chunk.code.includes(preloadMethod)) { + // generate css deps map + const code = chunk.code + let imports: ImportSpecifier[] + try { + imports = parseImports(code)[0].filter((i) => i.d > -1) + } catch (e: any) { + this.error(e, e.idx) + } + if (imports.length) { + for (let index = 0; index < imports.length; index++) { + 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 + } } } } } 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 ffd6838790af8e..de31c6a20266c5 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -1,7 +1,8 @@ import path from 'path' import { pathToFileURL } from 'url' -import { ViteDevServer } from '../server' +import type { ViteDevServer } from '../server' import { + bareImportRE, dynamicImport, isBuiltin, unwrapId, @@ -16,8 +17,10 @@ import { ssrDynamicImportKey } from './ssrTransform' import { transformRequest } from '../server/transformRequest' -import { InternalResolveOptions, tryNodeResolve } from '../plugins/resolve' +import type { InternalResolveOptions } from '../plugins/resolve' +import { tryNodeResolve } from '../plugins/resolve' import { hookNodeResolve } from '../plugins/ssrRequireHook' +import { NULL_BYTE_PLACEHOLDER } from '../constants' interface SSRContext { global: typeof globalThis @@ -32,9 +35,10 @@ export async function ssrLoadModule( url: string, server: ViteDevServer, context: SSRContext = { global }, - urlStack: string[] = [] + urlStack: string[] = [], + fixStacktrace?: boolean ): Promise { - url = unwrapId(url) + url = unwrapId(url).replace(NULL_BYTE_PLACEHOLDER, '\0') // when we instantiate multiple dependency modules in parallel, they may // point to shared modules. We need to avoid duplicate instantiation attempts @@ -45,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(() => { @@ -61,10 +71,11 @@ 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) + const mod = await moduleGraph.ensureEntryFromUrl(url, true) if (mod.ssrModule) { return mod.ssrModule @@ -129,7 +140,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 { @@ -185,16 +202,18 @@ async function instantiateModule( ssrExportAll ) } catch (e) { - const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph) - rebindErrorStacktrace(e, stacktrace) - server.config.logger.error( - `Error when evaluating SSR module ${url}:\n${stacktrace}`, - { - timestamp: true, - clear: server.config.clearScreen, - error: e - } - ) + if (e.stack && fixStacktrace !== false) { + const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph) + rebindErrorStacktrace(e, stacktrace) + server.config.logger.error( + `Error when evaluating SSR module ${url}:\n${stacktrace}`, + { + timestamp: true, + clear: server.config.clearScreen, + error: e + } + ) + } throw e } @@ -228,13 +247,24 @@ async function nodeImport( // When an ESM module imports an ESM dependency, this hook is *not* used. const unhookNodeResolve = hookNodeResolve( (nodeResolve) => (id, parent, isMain, options) => { - // Fix #5709, use require to resolve files with the '.node' file extension. - // See detail, https://nodejs.org/api/addons.html#addons_loading_addons_using_require - if (id[0] === '.' || isBuiltin(id) || id.endsWith('.node')) { + // Use the Vite resolver only for bare imports while skipping + // 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) { - return viteResolve(id, parent.id) + let resolved = viteResolve(id, parent.id) + if (resolved) { + // hookNodeResolve must use platform-specific path.normalize + // to be compatible with dynamicImport (#6080) + resolved = path.normalize(resolved) + } + return resolved } // Importing a CJS module from an ESM module. In this case, the import // specifier is already an absolute path, so this is a no-op. @@ -271,7 +301,18 @@ async function nodeImport( // rollup-style default import interop for cjs function proxyESM(mod: any) { - const defaultExport = getDefaultExport(mod) + // This is the only sensible option when the exports object is a primitve + if (isPrimitive(mod)) return { default: mod } + + let defaultExport = 'default' in mod ? mod.default : mod + + if (!isPrimitive(defaultExport) && '__esModule' in defaultExport) { + mod = defaultExport + if ('default' in defaultExport) { + defaultExport = defaultExport.default + } + } + return new Proxy(mod, { get(mod, prop) { if (prop === 'default') return defaultExport @@ -280,33 +321,6 @@ function proxyESM(mod: any) { }) } -function getDefaultExport(moduleExports: any) { - // `moduleExports` is one of the following: - // - `const moduleExports = require(file)` - // - `const moduleExports = await import(file)` - let defaultExport = - 'default' in moduleExports ? moduleExports.default : moduleExports - - // Node.js doesn't support `__esModule`, see https://github.com/nodejs/node/issues/40891 - // This means we need to unwrap the `__esModule` wrapper ourselves. - // - // For example: - // ```ts - // export default 'hi' - // ``` - // - // Which TypeScript transpiles to: - // ```js - // use strict"; - // exports.__esModule = true; - // exports["default"] = 'hi'; - // ``` - // - // This means that `moduleExports.default` denotes `{ __esModule, default: 'hi }` thus the actual - // default lives in `moduleExports.default.default`. - if (defaultExport && '__esModule' in defaultExport) { - defaultExport = defaultExport.default - } - - return defaultExport +function isPrimitive(value: any) { + return !value || (typeof value !== 'object' && typeof value !== 'function') } diff --git a/packages/vite/src/node/ssr/ssrStacktrace.ts b/packages/vite/src/node/ssr/ssrStacktrace.ts index d4689553ea21d7..5ffd7d2e186545 100644 --- a/packages/vite/src/node/ssr/ssrStacktrace.ts +++ b/packages/vite/src/node/ssr/ssrStacktrace.ts @@ -1,5 +1,5 @@ -import { SourceMapConsumer, RawSourceMap } from 'source-map' -import { ModuleGraph } from '../server/moduleGraph' +import { TraceMap, originalPositionFor } from '@jridgewell/trace-mapping' +import type { ModuleGraph } from '../server/moduleGraph' let offset: number try { @@ -31,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 487208560a7e9b..56b75f8dd14913 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -1,17 +1,18 @@ import MagicString from 'magic-string' -import { SourceMap } from 'rollup' -import { TransformResult } from '../server/transformRequest' +import type { SourceMap } from 'rollup' +import type { TransformResult } from '../server/transformRequest' import { parser } from '../server/pluginContainer' -import { +import type { Identifier, Node as _Node, Property, - Function as FunctionNode + Function as FunctionNode, + Pattern } from 'estree' import { extract_names as extractNames } from 'periscopic' import { walk as eswalk } from 'estree-walker' import { combineSourcemaps } from '../utils' -import { RawSourceMap } from '@ampproject/remapping/dist/types/types' +import type { RawSourceMap } from '@ampproject/remapping' type Node = _Node & { start: number @@ -65,7 +66,7 @@ export async function ssrTransform( } function defineExport(position: number, name: string, local = name) { - s.appendRight( + s.appendLeft( position, `\nObject.defineProperty(${ssrModuleExportsKey}, "${name}", ` + `{ enumerable: true, configurable: true, get(){ return ${local} }});` @@ -157,7 +158,8 @@ export async function ssrTransform( s.overwrite( node.start, node.start + 14 /* 'export default'.length */, - `${ssrModuleExportsKey}.default =` + `${ssrModuleExportsKey}.default =`, + { contentOnly: true } ) } } @@ -179,6 +181,7 @@ export async function ssrTransform( // 3. convert references to import bindings & import.meta references walk(ast, { onIdentifier(id, parent, parentStack) { + const grandparent = parentStack[1] const binding = idToImportMap.get(id.name) if (!binding) { return @@ -188,30 +191,33 @@ export async function ssrTransform( // { 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}`) } } else if ( - parent.type === 'ClassDeclaration' && - id === parent.superClass + (parent.type === 'PropertyDefinition' && + grandparent?.type === 'ClassBody') || + (parent.type === 'ClassDeclaration' && id === parent.superClass) ) { if (!declaredConst.has(id.name)) { declaredConst.add(id.name) // locate the top-most node containing the class declaration - const topNode = parentStack[1] + const topNode = parentStack[parentStack.length - 2] 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) } @@ -254,6 +260,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 @@ -263,19 +271,14 @@ function walk( { onIdentifier, onImportMeta, onDynamicImport }: Visitors ) { const parentStack: Node[] = [] - const scope: Record = Object.create(null) const scopeMap = new WeakMap<_Node, Set>() + const identifiers: [id: any, stack: Node[]][] = [] const setScope = (node: FunctionNode, name: string) => { let scopeIds = scopeMap.get(node) if (scopeIds && scopeIds.has(name)) { return } - if (name in scope) { - scope[name]++ - } else { - scope[name] = 1 - } if (!scopeIds) { scopeIds = new Set() scopeMap.set(node, scopeIds) @@ -283,13 +286,42 @@ function walk( scopeIds.add(name) } + function isInScope(name: string, parents: Node[]) { + return parents.some((node) => node && scopeMap.get(node)?.has(name)) + } + function handlePattern(p: Pattern, parentFunction: FunctionNode) { + if (p.type === 'Identifier') { + setScope(parentFunction, p.name) + } else if (p.type === 'RestElement') { + handlePattern(p.argument, parentFunction) + } else if (p.type === 'ObjectPattern') { + p.properties.forEach((property) => { + if (property.type === 'RestElement') { + setScope(parentFunction, (property.argument as Identifier).name) + } else { + handlePattern(property.value, parentFunction) + } + }) + } else if (p.type === 'ArrayPattern') { + p.elements.forEach((element) => { + if (element) { + handlePattern(element, parentFunction) + } + }) + } else if (p.type === 'AssignmentPattern') { + handlePattern(p.left, parentFunction) + } else { + setScope(parentFunction, (p as any).name) + } + } + ;(eswalk as any)(root, { enter(node: Node, parent: Node | null) { if (node.type === 'ImportDeclaration') { return this.skip() } - parent && parentStack.push(parent) + parent && parentStack.unshift(parent) if (node.type === 'MetaProperty' && node.meta.name === 'import') { onImportMeta(node) @@ -298,8 +330,12 @@ function walk( } if (node.type === 'Identifier') { - if (!scope[node.name] && isRefIdentifier(node, parent!, parentStack)) { - onIdentifier(node, parent!, parentStack) + if ( + !isInScope(node.name, parentStack) && + isRefIdentifier(node, parent!, parentStack) + ) { + // record the identifier, for DFS -> BFS + identifiers.push([node, parentStack.slice(0)]) } } else if (isFunction(node)) { // If it is a function declaration, it could be shadowing an import @@ -312,64 +348,57 @@ function walk( } // walk function expressions and add its arguments to known identifiers // so that we don't prefix them - node.params.forEach((p) => - (eswalk as any)(p.type === 'AssignmentPattern' ? p.left : p, { + node.params.forEach((p) => { + if (p.type === 'ObjectPattern' || p.type === 'ArrayPattern') { + handlePattern(p, node) + return + } + ;(eswalk as any)(p.type === 'AssignmentPattern' ? p.left : p, { enter(child: Node, parent: Node) { + // skip params default value of destructure + if ( + parent?.type === 'AssignmentPattern' && + parent?.right === child + ) { + return this.skip() + } if (child.type !== 'Identifier') return // do not record as scope variable if is a destructuring keyword if (isStaticPropertyKey(child, parent)) return // do not record if this is a default value // assignment of a destructuring variable if ( - (parent?.type === 'AssignmentPattern' && - parent?.right === child) || (parent?.type === 'TemplateLiteral' && - parent?.expressions.includes(child)) + parent?.expressions.includes(child)) || + (parent?.type === 'CallExpression' && parent?.callee === child) ) { return } setScope(node, child.name) } }) - ) + }) } 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) { - if (node.id.type === 'ObjectPattern') { - node.id.properties.forEach((property) => { - if (property.type === 'RestElement') { - setScope(parentFunction, (property.argument as Identifier).name) - } else { - setScope(parentFunction, (property.value as Identifier).name) - } - }) - } else if (node.id.type === 'ArrayPattern') { - node.id.elements.forEach((element) => { - setScope(parentFunction, (element as Identifier).name) - }) - } else { - setScope(parentFunction, (node.id as Identifier).name) - } + handlePattern(node.id, parentFunction) } } }, leave(node: Node, parent: Node | null) { - parent && parentStack.pop() - const scopeIds = scopeMap.get(node) - if (scopeIds) { - scopeIds.forEach((id: string) => { - scope[id]-- - if (scope[id] === 0) { - delete scope[id] - } - }) - } + parent && parentStack.shift() } }) + + // emit the identifier events in BFS so the hoisted declarations + // can be captured correctly + identifiers.forEach(([node, stack]) => { + if (!isInScope(node.name, stack)) onIdentifier(node, stack[0], stack) + }) } function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { @@ -401,7 +430,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 } @@ -445,12 +474,7 @@ function isFunction(node: _Node): node is FunctionNode { } function findParentFunction(parentStack: _Node[]): FunctionNode | undefined { - for (let i = parentStack.length - 1; i >= 0; i--) { - const node = parentStack[i] - if (isFunction(node)) { - return node - } - } + return parentStack.find((i) => isFunction(i)) as FunctionNode } function isInDestructuringAssignment( @@ -461,15 +485,7 @@ function isInDestructuringAssignment( parent && (parent.type === 'Property' || parent.type === 'ArrayPattern') ) { - let i = parentStack.length - while (i--) { - const p = parentStack[i] - if (p.type === 'AssignmentExpression') { - return true - } else if (p.type !== 'Property' && !p.type.endsWith('Pattern')) { - break - } - } + return parentStack.some((i) => i.type === 'AssignmentExpression') } return false } diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 4f005f21c3cf54..edb3410751868a 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -1,5 +1,5 @@ import debug from 'debug' -import chalk from 'chalk' +import colors from 'picocolors' import fs from 'fs' import os from 'os' import path from 'path' @@ -9,17 +9,16 @@ 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 { FSWatcher } from 'chokidar' +import type { FSWatcher } from 'chokidar' import remapping from '@ampproject/remapping' -import { - 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' export function slash(p: string): string { return p.replace(/\\/g, '/') @@ -32,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, ' > ') @@ -138,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 { @@ -146,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 } @@ -188,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 = [ @@ -221,7 +269,7 @@ export function injectQuery(url: string, queryToInject: string): string { } pathname = decodeURIComponent(pathname) return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${ - hash || '' + hash ?? '' }` } @@ -251,11 +299,11 @@ export function timeFrom(start: number, subtract = 0): string { const time: number | string = performance.now() - start - subtract const timeString = (time.toFixed(2) + `ms`).padEnd(5, ' ') if (time < 10) { - return chalk.green(timeString) + return colors.green(timeString) } else if (time < 50) { - return chalk.yellow(timeString) + return colors.yellow(timeString) } else { - return chalk.red(timeString) + return colors.red(timeString) } } @@ -275,11 +323,11 @@ export function prettifyUrl(url: string, root: string): string { if (file.startsWith('@')) { file = `${file}/${seg[npmIndex + 2]}` } - file = `npm: ${chalk.dim(file)}${isSourceMap ? ` (source map)` : ``}` + file = `npm: ${colors.dim(file)}${isSourceMap ? ` (source map)` : ``}` } - return chalk.dim(file) + return colors.dim(file) } else { - return chalk.dim(url) + return colors.dim(url) } } @@ -291,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) } } @@ -326,7 +382,9 @@ export function posToNumber( const { line, column } = pos let start = 0 for (let i = 0; i < line - 1; i++) { - start += lines[i].length + 1 + if (lines[i]) { + start += lines[i].length + 1 + } } return start + column } @@ -419,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 } @@ -463,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, @@ -515,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: [], @@ -539,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 @@ -550,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 @@ -563,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 } @@ -581,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) { @@ -631,3 +722,13 @@ export const usingDynamicImport = typeof jest === 'undefined' export const dynamicImport = usingDynamicImport ? new Function('file', 'return import(file)') : require + +export function parseRequest(id: string): Record | null { + const { search } = parseUrl(id) + if (!search) { + return null + } + return Object.fromEntries(new URLSearchParams(search.slice(1))) +} + +export const blankReplacer = (match: string) => ' '.repeat(match.length) diff --git a/packages/vite/types/alias.d.ts b/packages/vite/types/alias.d.ts index aa70ec5bb59eb2..3f4393586f1299 100644 --- a/packages/vite/types/alias.d.ts +++ b/packages/vite/types/alias.d.ts @@ -27,7 +27,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { PluginHooks } from 'rollup' +import type { PluginHooks } from 'rollup' export interface Alias { find: string | RegExp diff --git a/packages/vite/types/chokidar.d.ts b/packages/vite/types/chokidar.d.ts index 8882f026390d4e..d56d507ccff183 100644 --- a/packages/vite/types/chokidar.d.ts +++ b/packages/vite/types/chokidar.d.ts @@ -28,28 +28,29 @@ THE SOFTWARE. */ /// -import * as fs from 'fs' -import { Matcher } from './anymatch' +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/http-proxy.d.ts b/packages/vite/types/http-proxy.d.ts index 3ad701f12b08af..5a681cc1e3f170 100644 --- a/packages/vite/types/http-proxy.d.ts +++ b/packages/vite/types/http-proxy.d.ts @@ -13,11 +13,11 @@ /// -import * as net from 'net' -import * as http from 'http' +import type * as net from 'net' +import type * as http from 'http' import * as events from 'events' -import * as url from 'url' -import * as stream from 'stream' +import type * as url from 'url' +import type * as stream from 'stream' export namespace HttpProxy { export type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed diff --git a/packages/vite/types/importMeta.d.ts b/packages/vite/types/importMeta.d.ts index 7a96d76fe3b8c4..1fd39b993d5142 100644 --- a/packages/vite/types/importMeta.d.ts +++ b/packages/vite/types/importMeta.d.ts @@ -1,3 +1,22 @@ +// This file is an augmentation to the built-in ImportMeta interface +// Thus cannot contain any top-level imports +// + +/* eslint-disable @typescript-eslint/consistent-type-imports */ + +// 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 + } +} + interface ImportMeta { url: string @@ -40,23 +59,21 @@ interface ImportMeta { cb: (data: any) => void ): void } + + send(event: string, data?: any): void } readonly env: ImportMetaEnv - glob(pattern: string): Record< - string, - () => Promise<{ - [key: string]: any - }> - > + glob( + pattern: string, + options?: GlobOptions + ): Record Promise> - globEager(pattern: string): Record< - string, - { - [key: string]: any - } - > + globEager( + pattern: string, + options?: GlobOptions + ): Record } interface ImportMetaEnv { diff --git a/packages/vite/types/shims.d.ts b/packages/vite/types/shims.d.ts index 12bf327229f34c..68aa799cb6a863 100644 --- a/packages/vite/types/shims.d.ts +++ b/packages/vite/types/shims.d.ts @@ -17,16 +17,6 @@ declare module 'http-proxy' { export = proxy } -declare module 'acorn-class-fields' { - const plugin: any - export = plugin -} - -declare module 'acorn-static-class-features' { - const plugin: any - export default plugin -} - declare module 'connect-history-api-fallback' { const plugin: any export = plugin @@ -38,7 +28,7 @@ declare module 'launch-editor-middleware' { } declare module 'postcss-load-config' { - import { ProcessOptions, Plugin } from 'postcss' + import type { ProcessOptions, Plugin } from 'postcss' function load( inline: any, root: string @@ -50,7 +40,7 @@ declare module 'postcss-load-config' { } declare module 'postcss-import' { - import { Plugin } from 'postcss' + import type { Plugin } from 'postcss' const plugin: (options: { resolve: ( id: string, @@ -62,13 +52,13 @@ declare module 'postcss-import' { } declare module 'postcss-modules' { - import { Plugin } from 'postcss' + import type { Plugin } from 'postcss' const plugin: (options: any) => Plugin export = plugin } declare module '@rollup/plugin-dynamic-import-vars' { - import { Plugin } from 'rollup' + import type { Plugin } from 'rollup' interface Options { include?: string | RegExp | (string | RegExp)[] @@ -81,7 +71,7 @@ declare module '@rollup/plugin-dynamic-import-vars' { } declare module 'rollup-plugin-web-worker-loader' { - import { Plugin } from 'rollup' + import type { Plugin } from 'rollup' interface Options { targetPlatform?: string @@ -103,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 3a174f9df47ea7..29732ebf3e0d8a 100644 --- a/packages/vite/types/ws.d.ts +++ b/packages/vite/types/ws.d.ts @@ -1,7 +1,7 @@ -// Inlined to avoid extra dependency -// MIT Licensed https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/LICENSE +// Modified and inlined to avoid extra dependency +// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ws/index.d.ts -// Type definitions for ws 7.4 +// Type definitions for ws 8.5 // Project: https://github.com/websockets/ws // Definitions by: Paul Loyd // Margus Lamp @@ -10,12 +10,13 @@ // teidesu // Bartosz Wojtkowiak // Kyle Hensel +// Samuel Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// import { EventEmitter } from 'events' -import { +import type { Agent, ClientRequest, ClientRequestArgs, @@ -23,287 +24,289 @@ import { OutgoingHttpHeaders, Server as HTTPServer } from 'http' -import { Server as HTTPSServer } from 'https' -import { Socket } from 'net' -import { Duplex, DuplexOptions } from 'stream' -import { SecureContextOptions } from 'tls' -import { URL } from 'url' -import { ZlibOptions } from 'zlib' - -export declare namespace WebSocket { - // WebSocket socket. - export class WebSocket extends EventEmitter { - /** The connection is not yet open. */ - static readonly CONNECTING: 0 - /** The connection is open and ready to communicate. */ - static readonly OPEN: 1 - /** The connection is in the process of closing. */ - static readonly CLOSING: 2 - /** The connection is closed. */ - static readonly CLOSED: 3 - - binaryType: 'nodebuffer' | 'arraybuffer' | 'fragments' - readonly bufferedAmount: number - readonly extensions: string - readonly protocol: string - /** The current state of the connection */ - readonly readyState: - | typeof WebSocket.CONNECTING - | typeof WebSocket.OPEN - | typeof WebSocket.CLOSING - | typeof WebSocket.CLOSED - readonly url: string - - /** The connection is not yet open. */ - readonly CONNECTING: 0 - /** The connection is open and ready to communicate. */ - readonly OPEN: 1 - /** The connection is in the process of closing. */ - readonly CLOSING: 2 - /** The connection is closed. */ - readonly CLOSED: 3 - - onopen: (event: WebSocket.OpenEvent) => void - onerror: (event: WebSocket.ErrorEvent) => void - onclose: (event: WebSocket.CloseEvent) => void - onmessage: (event: WebSocket.MessageEvent) => void - - constructor( - address: string | URL, - options?: WebSocket.ClientOptions | ClientRequestArgs - ) - constructor( - address: string | URL, - protocols?: string | string[], - options?: WebSocket.ClientOptions | ClientRequestArgs - ) - - close(code?: number, data?: string): void - ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void - pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void - send(data: any, cb?: (err?: Error) => void): void - send( - data: any, - options: { - mask?: boolean | undefined - binary?: boolean | undefined - compress?: boolean | undefined - fin?: boolean | undefined - }, - cb?: (err?: Error) => void - ): void - terminate(): void - - // HTML5 WebSocket events - addEventListener( - method: 'message', - cb: (event: { data: any; type: string; target: WebSocket }) => void, - options?: WebSocket.EventListenerOptions - ): void - addEventListener( - method: 'close', - cb: (event: { - wasClean: boolean - code: number - reason: string - target: WebSocket - }) => void, - options?: WebSocket.EventListenerOptions - ): void - addEventListener( - method: 'error', - cb: (event: { - error: any - message: any - type: string - target: WebSocket - }) => void, - options?: WebSocket.EventListenerOptions - ): void - addEventListener( - method: 'open', - cb: (event: { target: WebSocket }) => void, - options?: WebSocket.EventListenerOptions - ): void - addEventListener( - method: string, - listener: () => void, - options?: WebSocket.EventListenerOptions - ): void - - removeEventListener( - method: 'message', - cb?: (event: { data: any; type: string; target: WebSocket }) => void - ): void - removeEventListener( - method: 'close', - cb?: (event: { - wasClean: boolean - code: number - reason: string - target: WebSocket - }) => void - ): void - removeEventListener( - method: 'error', - cb?: (event: { - error: any - message: any - type: string - target: WebSocket - }) => void - ): void - removeEventListener( - method: 'open', - cb?: (event: { target: WebSocket }) => void - ): void - removeEventListener(method: string, listener?: () => void): void - - // Events - on( - event: 'close', - listener: (this: WebSocket, code: number, reason: string) => void - ): this - on(event: 'error', listener: (this: WebSocket, err: Error) => void): this - on( - event: 'upgrade', - listener: (this: WebSocket, request: IncomingMessage) => void - ): this - on( - event: 'message', - listener: (this: WebSocket, data: WebSocket.Data) => void - ): this - on(event: 'open', listener: (this: WebSocket) => void): this - on( - event: 'ping' | 'pong', - listener: (this: WebSocket, data: Buffer) => void - ): this - on( - event: 'unexpected-response', - listener: ( - this: WebSocket, - request: ClientRequest, - response: IncomingMessage - ) => void - ): this - on( - event: string | symbol, - listener: (this: WebSocket, ...args: any[]) => void - ): this +import type { Server as HTTPSServer } from 'https' +import type { Duplex, DuplexOptions } from 'stream' +import type { SecureContextOptions } from 'tls' +import type { URL } from 'url' +import type { ZlibOptions } from 'zlib' + +// WebSocket socket. +declare class WebSocket extends EventEmitter { + /** The connection is not yet open. */ + static readonly CONNECTING: 0 + /** The connection is open and ready to communicate. */ + static readonly OPEN: 1 + /** The connection is in the process of closing. */ + static readonly CLOSING: 2 + /** The connection is closed. */ + static readonly CLOSED: 3 + + 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: + | typeof WebSocket.CONNECTING + | typeof WebSocket.OPEN + | typeof WebSocket.CLOSING + | typeof WebSocket.CLOSED + readonly url: string + + /** The connection is not yet open. */ + readonly CONNECTING: 0 + /** The connection is open and ready to communicate. */ + readonly OPEN: 1 + /** The connection is in the process of closing. */ + readonly CLOSING: 2 + /** The connection is closed. */ + readonly CLOSED: 3 + + 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 + ) + constructor( + address: string | URL, + protocols?: string | string[], + options?: WebSocket.ClientOptions | ClientRequestArgs + ) + + close(code?: number, data?: string | Buffer): void + ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void + pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void + send(data: any, cb?: (err?: Error) => void): void + send( + data: any, + options: { + mask?: boolean | undefined + binary?: boolean | undefined + compress?: boolean | undefined + fin?: boolean | undefined + }, + cb?: (err?: Error) => void + ): void + terminate(): void - once( - event: 'close', - listener: (this: WebSocket, code: number, reason: string) => void - ): this - once(event: 'error', listener: (this: WebSocket, err: Error) => void): this - once( - event: 'upgrade', - listener: (this: WebSocket, request: IncomingMessage) => void - ): this - once( - event: 'message', - listener: (this: WebSocket, data: WebSocket.Data) => void - ): this - once(event: 'open', listener: (this: WebSocket) => void): this - once( - event: 'ping' | 'pong', - listener: (this: WebSocket, data: Buffer) => void - ): this - once( - event: 'unexpected-response', - listener: ( - this: WebSocket, - request: ClientRequest, - response: IncomingMessage - ) => void - ): this - once( - event: string | symbol, - listener: (this: WebSocket, ...args: any[]) => void - ): this - - off( - event: 'close', - listener: (this: WebSocket, code: number, reason: string) => void - ): this - off(event: 'error', listener: (this: WebSocket, err: Error) => void): this - off( - event: 'upgrade', - listener: (this: WebSocket, request: IncomingMessage) => void - ): this - off( - event: 'message', - listener: (this: WebSocket, data: WebSocket.Data) => void - ): this - off(event: 'open', listener: (this: WebSocket) => void): this - off( - event: 'ping' | 'pong', - listener: (this: WebSocket, data: Buffer) => void - ): this - off( - event: 'unexpected-response', - listener: ( - this: WebSocket, - request: ClientRequest, - response: IncomingMessage - ) => void - ): this - off( - event: string | symbol, - listener: (this: WebSocket, ...args: any[]) => void - ): this + /** + * 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', + cb: (event: WebSocket.MessageEvent) => void, + options?: WebSocket.EventListenerOptions + ): void + addEventListener( + method: 'close', + cb: (event: WebSocket.CloseEvent) => void, + options?: WebSocket.EventListenerOptions + ): void + addEventListener( + method: 'error', + cb: (event: WebSocket.ErrorEvent) => void, + options?: WebSocket.EventListenerOptions + ): void + addEventListener( + method: 'open', + cb: (event: WebSocket.Event) => void, + options?: WebSocket.EventListenerOptions + ): void + + removeEventListener( + method: 'message', + cb: (event: WebSocket.MessageEvent) => void + ): void + removeEventListener( + method: 'close', + cb: (event: WebSocket.CloseEvent) => void + ): void + removeEventListener( + method: 'error', + cb: (event: WebSocket.ErrorEvent) => void + ): void + removeEventListener( + method: 'open', + cb: (event: WebSocket.Event) => void + ): void + + // Events + on( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this + on(event: 'error', listener: (this: WebSocket, err: Error) => void): this + on( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this + on( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this + on(event: 'open', listener: (this: WebSocket) => void): this + on( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this + on( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this + on( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this + + once( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this + once(event: 'error', listener: (this: WebSocket, err: Error) => void): this + once( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this + once( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this + once(event: 'open', listener: (this: WebSocket) => void): this + once( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this + once( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this + once( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this + + off( + event: 'close', + listener: (this: WebSocket, code: number, reason: Buffer) => void + ): this + off(event: 'error', listener: (this: WebSocket, err: Error) => void): this + off( + event: 'upgrade', + listener: (this: WebSocket, request: IncomingMessage) => void + ): this + off( + event: 'message', + listener: ( + this: WebSocket, + data: WebSocket.RawData, + isBinary: boolean + ) => void + ): this + off(event: 'open', listener: (this: WebSocket) => void): this + off( + event: 'ping' | 'pong', + listener: (this: WebSocket, data: Buffer) => void + ): this + off( + event: 'unexpected-response', + listener: ( + this: WebSocket, + request: ClientRequest, + response: IncomingMessage + ) => void + ): this + off( + event: string | symbol, + listener: (this: WebSocket, ...args: any[]) => void + ): this + + addListener( + event: 'close', + listener: (code: number, reason: Buffer) => void + ): this + addListener(event: 'error', listener: (err: Error) => void): this + addListener( + event: 'upgrade', + listener: (request: IncomingMessage) => void + ): this + addListener( + event: 'message', + listener: (data: WebSocket.RawData, isBinary: boolean) => void + ): this + addListener(event: 'open', listener: () => void): this + addListener(event: 'ping' | 'pong', listener: (data: Buffer) => void): this + addListener( + event: 'unexpected-response', + listener: (request: ClientRequest, response: IncomingMessage) => void + ): this + addListener(event: string | symbol, listener: (...args: any[]) => void): this + + removeListener( + event: 'close', + listener: (code: number, reason: Buffer) => void + ): this + removeListener(event: 'error', listener: (err: Error) => void): this + removeListener( + event: 'upgrade', + listener: (request: IncomingMessage) => void + ): this + removeListener( + event: 'message', + listener: (data: WebSocket.RawData, isBinary: boolean) => void + ): this + removeListener(event: 'open', listener: () => void): this + removeListener(event: 'ping' | 'pong', listener: (data: Buffer) => void): this + removeListener( + event: 'unexpected-response', + listener: (request: ClientRequest, response: IncomingMessage) => void + ): this + removeListener( + event: string | symbol, + listener: (...args: any[]) => void + ): this +} - addListener( - event: 'close', - listener: (code: number, message: string) => void - ): this - addListener(event: 'error', listener: (err: Error) => void): this - addListener( - event: 'upgrade', - listener: (request: IncomingMessage) => void - ): this - addListener( - event: 'message', - listener: (data: WebSocket.Data) => void - ): this - addListener(event: 'open', listener: () => void): this - addListener(event: 'ping' | 'pong', listener: (data: Buffer) => void): this - addListener( - event: 'unexpected-response', - listener: (request: ClientRequest, response: IncomingMessage) => void - ): this - addListener( - event: string | symbol, - listener: (...args: any[]) => void - ): this +declare const WebSocketAlias: typeof WebSocket +interface WebSocketAlias extends WebSocket {} // tslint:disable-line no-empty-interface - removeListener( - event: 'close', - listener: (code: number, message: string) => void - ): this - removeListener(event: 'error', listener: (err: Error) => void): this - removeListener( - event: 'upgrade', - listener: (request: IncomingMessage) => void - ): this - removeListener( - event: 'message', - listener: (data: WebSocket.Data) => void - ): this - removeListener(event: 'open', listener: () => void): this - removeListener( - event: 'ping' | 'pong', - listener: (data: Buffer) => void - ): this - removeListener( - event: 'unexpected-response', - listener: (request: ClientRequest, response: IncomingMessage) => void - ): this - removeListener( - event: string | symbol, - listener: (...args: any[]) => void - ): this - } +declare namespace WebSocket { + /** + * Data represents the raw message payload received over the WebSocket. + */ + type RawData = Buffer | ArrayBuffer | Buffer[] /** * Data represents the message payload received over the WebSocket. @@ -344,6 +347,7 @@ export 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 @@ -357,6 +361,7 @@ export declare namespace WebSocket { checkServerIdentity?(servername: string, cert: CertMeta): boolean rejectUnauthorized?: boolean | undefined maxPayload?: number | undefined + skipUTF8Validation?: boolean | undefined } interface PerMessageDeflateOptions { @@ -382,7 +387,7 @@ export declare namespace WebSocket { concurrencyLimit?: number | undefined } - interface OpenEvent { + interface Event { type: string target: WebSocket } @@ -421,12 +426,17 @@ export declare namespace WebSocket { | VerifyClientCallbackAsync | VerifyClientCallbackSync | undefined - handleProtocols?: any + handleProtocols?: ( + protocols: Set, + request: IncomingMessage + ) => string | false path?: string | undefined noServer?: boolean | undefined clientTracking?: boolean | undefined perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined maxPayload?: number | undefined + skipUTF8Validation?: boolean | undefined + WebSocket?: typeof WebSocket.WebSocket | undefined } interface AddressInfo { @@ -436,10 +446,10 @@ export declare namespace WebSocket { } // WebSocket Server - export class Server extends EventEmitter { + class Server extends EventEmitter { options: ServerOptions path: string - clients: Set + clients: Set constructor(options?: ServerOptions, callback?: () => void) @@ -447,58 +457,61 @@ export declare namespace WebSocket { close(cb?: (err?: Error) => void): void handleUpgrade( request: IncomingMessage, - socket: Socket, + 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( @@ -511,7 +524,7 @@ export 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', @@ -524,9 +537,17 @@ export declare namespace WebSocket { ): this } + const WebSocketServer: typeof Server + interface WebSocketServer extends Server {} // tslint:disable-line no-empty-interface + const WebSocket: typeof WebSocketAlias + interface WebSocket extends WebSocketAlias {} // tslint:disable-line no-empty-interface + // WebSocket stream function createWebSocketStream( websocket: WebSocket, options?: DuplexOptions ): Duplex } + +// export = WebSocket +export { WebSocket, WebSocketAlias } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 210c92ed29b5b7..22de761586a2f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,91 +8,85 @@ importers: .: specifiers: - '@microsoft/api-extractor': ^7.18.19 + '@microsoft/api-extractor': ^7.19.5 '@types/fs-extra': ^9.0.13 - '@types/jest': ^27.0.3 - '@types/node': ^16.11.9 + '@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.4.0 - '@typescript-eslint/parser': ^5.4.0 - chalk: ^4.1.2 - conventional-changelog-cli: ^2.1.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.13.12 - eslint: ^8.3.0 - eslint-define-config: ^1.1.4 + esbuild: ^0.14.27 + eslint: ^8.11.0 + eslint-define-config: ^1.3.0 eslint-plugin-node: ^11.1.0 execa: ^5.1.1 - fs-extra: ^10.0.0 - jest: ^27.3.1 - lint-staged: ^12.1.1 + fs-extra: ^10.0.1 + jest: ^27.5.1 + lint-staged: ^12.3.7 minimist: ^1.2.5 node-fetch: ^2.6.6 npm-run-all: ^4.1.5 - playwright-chromium: ^1.16.3 - prettier: 2.4.1 + picocolors: ^1.0.0 + playwright-chromium: ^1.20.0 + prettier: 2.6.0 prompts: ^2.4.2 rimraf: ^3.0.2 rollup: ^2.59.0 semver: ^7.3.5 - sirv: ^1.0.18 - ts-jest: ^27.0.7 + simple-git-hooks: ^2.7.0 + sirv: ^2.0.2 + ts-jest: ^27.1.3 ts-node: ^10.4.0 - typescript: ~4.4.4 + typescript: ~4.5.4 vite: workspace:* - vitepress: ^0.20.1 - yorkie: ^2.0.0 + vitepress: ^0.22.3 devDependencies: - '@microsoft/api-extractor': 7.18.19 + '@microsoft/api-extractor': 7.19.5 '@types/fs-extra': 9.0.13 - '@types/jest': 27.0.3 - '@types/node': 16.11.9 + '@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.4.0_8fbd82ef37e23da98dfca9805cf945cd - '@typescript-eslint/parser': 5.4.0_eslint@8.3.0+typescript@4.4.4 - chalk: 4.1.2 - conventional-changelog-cli: 2.1.1 + '@typescript-eslint/eslint-plugin': 5.16.0_1324a086488ab25887f801dfb12f1aba + '@typescript-eslint/parser': 5.16.0_eslint@8.11.0+typescript@4.5.4 + conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 - esbuild: 0.13.12 - eslint: 8.3.0 - eslint-define-config: 1.1.4 - eslint-plugin-node: 11.1.0_eslint@8.3.0 + esbuild: 0.14.27 + eslint: 8.11.0 + eslint-define-config: 1.3.0 + eslint-plugin-node: 11.1.0_eslint@8.11.0 execa: 5.1.1 - fs-extra: 10.0.0 - jest: 27.3.1_ts-node@10.4.0 - lint-staged: 12.1.1 + fs-extra: 10.0.1 + jest: 27.5.1_ts-node@10.4.0 + lint-staged: 12.3.7 minimist: 1.2.5 node-fetch: 2.6.6 npm-run-all: 4.1.5 - playwright-chromium: 1.16.3 - prettier: 2.4.1 + picocolors: 1.0.0 + playwright-chromium: 1.20.0 + prettier: 2.6.0 prompts: 2.4.2 rimraf: 3.0.2 - rollup: 2.59.0 + rollup: 2.62.0 semver: 7.3.5 - sirv: 1.0.18 - ts-jest: 27.0.7_b626c82449d36ccae0aa7169b15092e6 - ts-node: 10.4.0_7dd5cf9af763e621261d5cc88a052be2 - typescript: 4.4.4 + simple-git-hooks: 2.7.0 + sirv: 2.0.2 + ts-jest: 27.1.3_4dfe14e0e8266437469ae0475a5c09ac + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 + typescript: 4.5.4 vite: link:packages/vite - vitepress: 0.20.1 - yorkie: 2.0.0 - - packages/create-app: - specifiers: - create-vite: latest - kolorist: ^1.5.0 - dependencies: - create-vite: link:../create-vite - kolorist: 1.5.0 + vitepress: 0.22.3 packages/create-vite: specifiers: - kolorist: ^1.5.0 + kolorist: ^1.5.1 minimist: ^1.2.5 prompts: ^2.4.2 dependencies: - kolorist: 1.5.0 + kolorist: 1.5.1 minimist: 1.2.5 prompts: 2.4.2 @@ -106,10 +100,10 @@ importers: specifiers: aliased-module: file:./dir/module resolve-linked: workspace:* - vue: ^3.2.23 + vue: ^3.2.25 dependencies: aliased-module: link:dir/module - vue: 3.2.23 + vue: 3.2.26 devDependencies: resolve-linked: link:../resolve-linked @@ -121,9 +115,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: {} @@ -134,15 +131,17 @@ 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.43.4 + sass: 1.45.1 stylus: 0.55.0 packages/playground/css-codesplit: @@ -151,6 +150,20 @@ importers: packages/playground/css-codesplit-cjs: specifiers: {} + packages/playground/css-sourcemap: + specifiers: + convert-source-map: ^1.8.0 + less: ^4.1.2 + magic-string: ^0.25.7 + sass: ^1.43.4 + stylus: ^0.55.0 + devDependencies: + convert-source-map: 1.8.0 + less: 4.1.2 + magic-string: 0.25.7 + sass: 1.45.1 + stylus: 0.55.0 + packages/playground/css/css-dep: specifiers: {} @@ -178,11 +191,14 @@ importers: devDependencies: cross-env: 7.0.3 + packages/playground/env-nested: + specifiers: {} + packages/playground/extensions: specifiers: - vue: ^3.2.23 + vue: ^3.2.25 dependencies: - vue: 3.2.23 + vue: 3.2.26 packages/playground/file-delete-restore: specifiers: @@ -209,21 +225,33 @@ importers: packages/playground/json: specifiers: - vue: ^3.2.23 + json-module: file:./json-module + vue: ^3.2.25 devDependencies: - vue: 3.2.23 + 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: @@ -284,13 +312,16 @@ 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 - vue: ^3.2.23 + url: ^0.11.0 + vue: ^3.2.25 vuex: ^4.0.0 dependencies: axios: 0.24.0 @@ -300,14 +331,17 @@ 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.2 + phoenix: 1.6.5 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 resolve-linked: link:../resolve-linked - vue: 3.2.23 - vuex: 4.0.2_vue@3.2.23 + url: 0.11.0 + vue: 3.2.26 + vuex: 4.0.2_vue@3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue @@ -332,6 +366,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 @@ -350,7 +390,7 @@ importers: missing-dep: link:missing-dep multi-entry-dep: link:multi-entry-dep devDependencies: - express: 4.17.1 + express: 4.17.2 packages/playground/optimize-missing-deps/missing-dep: specifiers: @@ -364,11 +404,11 @@ importers: packages/playground/preload: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.23 + vue: ^3.2.25 vue-router: ^4.0.0 dependencies: - vue: 3.2.23 - vue-router: 4.0.12_vue@3.2.23 + vue: 3.2.26 + vue-router: 4.0.12_vue@3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue @@ -402,13 +442,13 @@ importers: react-dom: ^17.0.2 react-switch: ^6.0.0 dependencies: - '@emotion/react': 11.5.0_react@17.0.2 + '@emotion/react': 11.7.1_react@17.0.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 react-switch: 6.0.0_react-dom@17.0.2+react@17.0.2 devDependencies: - '@babel/plugin-proposal-pipeline-operator': 7.16.0 - '@emotion/babel-plugin': 11.3.0 + '@babel/plugin-proposal-pipeline-operator': 7.16.5 + '@emotion/babel-plugin': 11.7.2 '@vitejs/plugin-react': link:../../plugin-react packages/playground/resolve: @@ -416,6 +456,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 @@ -423,9 +464,10 @@ importers: resolve-exports-path: link:./exports-path resolve-linked: workspace:* dependencies: - '@babel/runtime': 7.16.0 + '@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 @@ -433,6 +475,9 @@ importers: resolve-exports-path: link:exports-path resolve-linked: link:../resolve-linked + packages/playground/resolve-config: + specifiers: {} + packages/playground/resolve-linked: specifiers: {} @@ -454,35 +499,75 @@ 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 cross-env: ^7.0.3 + define-properties-exports: file:./define-properties-exports + define-property-exports: file:./define-property-exports express: ^4.17.1 - node-addon: link:./node-addon + forwarded-export: file:./forwarded-export + object-assigned-exports: file:./object-assigned-exports + only-object-assigned-exports: file:./only-object-assigned-exports + primitive-export: file:./primitive-export read-file-content: file:./read-file-content - dependencies: - node-addon: link:node-addon + require-absolute: file:./require-absolute + ts-transpiled-exports: file:./ts-transpiled-exports + dependencies: + bcrypt: 5.0.1 + define-properties-exports: link:define-properties-exports + define-property-exports: link:define-property-exports + forwarded-export: link:forwarded-export + object-assigned-exports: link:object-assigned-exports + only-object-assigned-exports: link:only-object-assigned-exports + primitive-export: link:primitive-export read-file-content: link:read-file-content + require-absolute: link:require-absolute + ts-transpiled-exports: link:ts-transpiled-exports devDependencies: cross-env: 7.0.3 - express: 4.17.1 + express: 4.17.2 - packages/playground/ssr-deps/node-addon: - specifiers: - node-gyp: ^8.4.1 - dependencies: - node-gyp: 8.4.1 + packages/playground/ssr-deps/define-properties-exports: + specifiers: {} + + packages/playground/ssr-deps/define-property-exports: + specifiers: {} + + packages/playground/ssr-deps/forwarded-export: + specifiers: {} + + packages/playground/ssr-deps/object-assigned-exports: + specifiers: {} + + packages/playground/ssr-deps/only-object-assigned-exports: + specifiers: {} + + packages/playground/ssr-deps/primitive-export: + specifiers: {} packages/playground/ssr-deps/read-file-content: specifiers: {} + packages/playground/ssr-deps/require-absolute: + specifiers: {} + + packages/playground/ssr-deps/ts-transpiled-exports: + specifiers: {} + packages/playground/ssr-html: specifiers: cross-env: ^7.0.3 express: ^4.17.1 devDependencies: cross-env: 7.0.3 - express: 4.17.1 + express: 4.17.2 packages/playground/ssr-pug: specifiers: @@ -491,7 +576,7 @@ importers: pug: ^3.0.2 devDependencies: cross-env: 7.0.3 - express: 4.17.1 + express: 4.17.2 pug: 3.0.2 packages/playground/ssr-react: @@ -514,8 +599,8 @@ importers: '@vitejs/plugin-react': link:../../plugin-react compression: 1.7.4 cross-env: 7.0.3 - express: 4.17.1 - serve-static: 1.14.1 + express: 4.17.2 + serve-static: 1.14.2 packages/playground/ssr-vue: specifiers: @@ -527,22 +612,22 @@ importers: example-external-component: file:example-external-component express: ^4.17.1 serve-static: ^1.14.1 - vue: ^3.2.23 + vue: ^3.2.25 vue-router: ^4.0.0 vuex: ^4.0.2 dependencies: example-external-component: link:example-external-component - vue: 3.2.23 - vue-router: 4.0.12_vue@3.2.23 - vuex: 4.0.2_vue@3.2.23 + vue: 3.2.26 + vue-router: 4.0.12_vue@3.2.26 + vuex: 4.0.2_vue@3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue '@vitejs/plugin-vue-jsx': link:../../plugin-vue-jsx compression: 1.7.4 cross-env: 7.0.3 dep-import-type: link:dep-import-type - express: 4.17.1 - serve-static: 1.14.1 + express: 4.17.2 + serve-static: 1.14.2 packages/playground/ssr-vue/dep-import-type: specifiers: {} @@ -566,13 +651,13 @@ importers: '@vitejs/plugin-vue': workspace:* autoprefixer: ^10.4.0 tailwindcss: ^2.2.19 - vue: ^3.2.23 + vue: ^3.2.25 vue-router: ^4.0.0 dependencies: autoprefixer: 10.4.0 tailwindcss: 2.2.19_6d1fa3babc9cc84b994ff99ef39d1aff - vue: 3.2.23 - vue-router: 4.0.12_vue@3.2.23 + vue: 3.2.26 + vue-router: 4.0.12_vue@3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue @@ -591,255 +676,300 @@ importers: pug: ^3.0.2 sass: ^1.43.4 stylus: ^0.55.0 - vue: ^3.2.23 + vue: ^3.2.25 dependencies: lodash-es: 4.17.21 - vue: 3.2.23 + vue: 3.2.26 devDependencies: '@vitejs/plugin-vue': link:../../plugin-vue js-yaml: 4.1.0 less: 4.1.2 pug: 3.0.2 - sass: 1.43.4 + sass: 1.45.1 stylus: 0.55.0 packages/playground/vue-jsx: specifiers: '@vitejs/plugin-vue': workspace:* '@vitejs/plugin-vue-jsx': workspace:* - vue: ^3.2.23 + vue: ^3.2.25 dependencies: - vue: 3.2.23 + vue: 3.2.26 devDependencies: '@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:* + convert-source-map: ^1.8.0 + less: ^4.1.2 + sass: ^1.43.4 + vue: ^3.2.31 + dependencies: + vue: 3.2.31 + devDependencies: + '@vitejs/plugin-vue': link:../../plugin-vue + convert-source-map: 1.8.0 + less: 4.1.2 + sass: 1.45.1 + packages/playground/wasm: specifiers: {} packages/playground/worker: - specifiers: {} + specifiers: + '@vitejs/plugin-vue-jsx': workspace:* + devDependencies: + '@vitejs/plugin-vue-jsx': link:../../plugin-vue-jsx packages/plugin-legacy: specifiers: - '@babel/standalone': ^7.16.4 - core-js: ^3.19.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.4 - core-js: 3.19.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.0 - '@babel/plugin-transform-react-jsx': ^7.16.0 - '@babel/plugin-transform-react-jsx-development': ^7.16.0 - '@babel/plugin-transform-react-jsx-self': ^7.16.0 - '@babel/plugin-transform-react-jsx-source': ^7.16.0 - '@rollup/pluginutils': ^4.1.1 + '@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.0 - '@babel/plugin-transform-react-jsx': 7.16.0_@babel+core@7.16.0 - '@babel/plugin-transform-react-jsx-development': 7.16.0_@babel+core@7.16.0 - '@babel/plugin-transform-react-jsx-self': 7.16.0_@babel+core@7.16.0 - '@babel/plugin-transform-react-jsx-source': 7.16.0_@babel+core@7.16.0 - '@rollup/pluginutils': 4.1.1 + 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.1 + '@rollup/pluginutils': ^4.2.0 '@types/hash-sum': ^1.0.0 - '@vue/compiler-sfc': ^3.2.23 - debug: ^4.3.2 + 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.23 + vue: ^3.2.31 devDependencies: - '@rollup/pluginutils': 4.1.1 + '@rollup/pluginutils': 4.2.0 '@types/hash-sum': 1.0.0 - '@vue/compiler-sfc': 3.2.23 - debug: 4.3.2 + debug: 4.3.4 hash-sum: 2.0.0 - rollup: 2.59.0 + rollup: 2.62.0 slash: 4.0.0 source-map: 0.6.1 - vue: 3.2.23 + vue: 3.2.31 packages/plugin-vue-jsx: specifiers: - '@babel/core': ^7.16.0 + '@babel/core': ^7.17.8 '@babel/plugin-syntax-import-meta': ^7.10.4 - '@babel/plugin-transform-typescript': ^7.16.1 - '@rollup/pluginutils': ^4.1.1 + '@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.0 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.16.0 - '@babel/plugin-transform-typescript': 7.16.1_@babel+core@7.16.0 - '@rollup/pluginutils': 4.1.1 - '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.16.0 + '@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.1 - '@babel/parser': ^7.16.4 - '@babel/types': ^7.16.0 - '@rollup/plugin-alias': ^3.1.8 - '@rollup/plugin-commonjs': ^21.0.1 - '@rollup/plugin-dynamic-import-vars': ^1.4.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.2 + '@rollup/plugin-dynamic-import-vars': ^1.4.2 '@rollup/plugin-json': ^4.1.0 - '@rollup/plugin-node-resolve': 13.0.6 - '@rollup/plugin-typescript': ^8.3.0 - '@rollup/pluginutils': ^4.1.1 + '@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.9 + '@types/node': ^16.11.26 '@types/resolve': ^1.20.1 - '@types/sass': ~1.43.0 + '@types/sass': ~1.43.1 '@types/stylus': ^0.48.36 - '@types/ws': ^8.2.0 - '@vue/compiler-dom': ^3.2.22 - acorn: ^8.6.0 - acorn-class-fields: ^1.0.0 - acorn-static-class-features: ^1.0.0 + '@types/ws': ^8.5.3 + '@vue/compiler-dom': ^3.2.31 + acorn: ^8.7.0 cac: 6.7.9 - chalk: ^4.1.2 - 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 - debug: ^4.3.2 - dotenv: ^10.0.0 + cross-spawn: ^7.0.3 + debug: ^4.3.4 + dotenv: ^14.3.2 dotenv-expand: ^5.1.0 - es-module-lexer: ^0.9.3 - esbuild: ^0.13.12 + es-module-lexer: ^0.10.4 + esbuild: ^0.14.27 estree-walker: ^2.0.2 etag: ^1.8.1 - execa: ^5.1.1 - fast-glob: ^3.2.7 + fast-glob: ^3.2.11 fsevents: ~2.3.2 http-proxy: ^1.18.1 - launch-editor-middleware: ^2.2.1 - magic-string: ^0.25.7 + json5: ^2.2.1 + launch-editor-middleware: ^2.3.0 + magic-string: ^0.26.1 micromatch: ^4.0.4 - mime: ^3.0.0 + mrmime: ^1.0.0 + node-forge: ^1.3.0 okie: ^1.0.1 open: ^8.4.0 periscopic: ^2.0.3 - postcss: ^8.3.11 + picocolors: ^1.0.0 + postcss: ^8.4.12 postcss-import: ^14.0.2 - postcss-load-config: ^3.1.0 - postcss-modules: ^4.2.2 - resolve: ^1.20.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 - selfsigned: ^1.10.11 - sirv: ^1.0.18 - 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.2.3 + ws: ^8.5.0 dependencies: - esbuild: 0.13.12 - postcss: 8.3.11 - resolve: 1.20.0 - rollup: 2.59.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.1 - '@babel/parser': 7.16.4 - '@babel/types': 7.16.0 - '@rollup/plugin-alias': 3.1.8_rollup@2.59.0 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.59.0 - '@rollup/plugin-dynamic-import-vars': 1.4.1_rollup@2.59.0 - '@rollup/plugin-json': 4.1.0_rollup@2.59.0 - '@rollup/plugin-node-resolve': 13.0.6_rollup@2.59.0 - '@rollup/plugin-typescript': 8.3.0_80f1acc233e4df93aa4e78959e046afc - '@rollup/pluginutils': 4.1.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@2.62.0 + '@rollup/plugin-commonjs': 21.0.2_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.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.9 + '@types/node': 16.11.26 '@types/resolve': 1.20.1 - '@types/sass': 1.43.0 + '@types/sass': 1.43.1 '@types/stylus': 0.48.36 - '@types/ws': 8.2.0 - '@vue/compiler-dom': 3.2.22 - acorn: 8.6.0 - acorn-class-fields: 1.0.0_acorn@8.6.0 - acorn-static-class-features: 1.0.0_acorn@8.6.0 + '@types/ws': 8.5.3 + '@vue/compiler-dom': 3.2.31 + acorn: 8.7.0 cac: 6.7.9 - chalk: 4.1.2 - 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 - debug: 4.3.2 - dotenv: 10.0.0 + cross-spawn: 7.0.3 + 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 - execa: 5.1.1 - fast-glob: 3.2.7 - http-proxy: 1.18.1_debug@4.3.2 - launch-editor-middleware: 2.2.1 - magic-string: 0.25.7 + 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.26.1 micromatch: 4.0.4 - mime: 3.0.0 + mrmime: 1.0.0 + node-forge: 1.3.0 okie: 1.0.1 open: 8.4.0 periscopic: 2.0.3 - postcss-import: 14.0.2_postcss@8.3.11 - postcss-load-config: 3.1.0_ts-node@10.4.0 - postcss-modules: 4.2.2_postcss@8.3.11 + picocolors: 1.0.0 + postcss-import: 14.0.2_postcss@8.4.12 + postcss-load-config: 3.1.3_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.59.0 - selfsigned: 1.10.11 - sirv: 1.0.18 - 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.6.0 - tsconfck: 1.1.1_typescript@4.4.4 + terser: 5.12.1 + tsconfck: 1.2.1_typescript@4.5.4 tslib: 2.3.1 types: link:types - ws: 8.2.3 + ws: 8.5.0 packages: + /@algolia/autocomplete-core/1.5.0: + resolution: {integrity: sha512-E7+VJwcvwMM8vPeaVn7fNUgix8WHV8A1WUeHDi2KHemCaaGc8lvUnP3QnvhMxiDhTe7OpMEv4o2TBUMyDgThaw==} + dependencies: + '@algolia/autocomplete-shared': 1.5.0 + dev: true + + /@algolia/autocomplete-preset-algolia/1.5.0_algoliasearch@4.11.0: + resolution: {integrity: sha512-iiFxKERGHkvkiupmrFJbvESpP/zv5jSgH714XRiP5LDvUHaYOo4GLAwZCFf2ef/L5tdtPBARvekn6k1Xf33gjA==} + peerDependencies: + '@algolia/client-search': ^4.9.1 + algoliasearch: ^4.9.1 + dependencies: + '@algolia/autocomplete-shared': 1.5.0 + algoliasearch: 4.11.0 + dev: true + + /@algolia/autocomplete-shared/1.5.0: + resolution: {integrity: sha512-bRSkqHHHSwZYbFY3w9hgMyQRm86Wz27bRaGCbNldLfbk0zUjApmE4ajx+ZCVSLqxvcUEjMqZFJzDsder12eKsg==} + dev: true + /@algolia/cache-browser-local-storage/4.11.0: resolution: {integrity: sha512-4sr9vHIG1fVA9dONagdzhsI/6M5mjs/qOe2xUP0yBmwsTsuwiZq3+Xu6D3dsxsuFetcJgC6ydQoCW8b7fDJHYQ==} dependencies: @@ -930,187 +1060,339 @@ packages: '@algolia/requester-common': 4.11.0 dev: true - /@ampproject/remapping/1.0.1: - resolution: {integrity: sha512-Ta9bMA3EtUHDaZJXqUoT5cn/EecwOp+SXpKJqxDbDuMbLvEMu6YTyDDuvTWeStODfdmXyfMo7LymQyPkN3BicA==} + /@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/compat-data/7.16.0: - resolution: {integrity: sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew==} + /@babel/code-frame/7.16.7: + resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.16.10 - /@babel/core/7.16.0: - resolution: {integrity: sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==} + /@babel/compat-data/7.16.4: + resolution: {integrity: sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==} + engines: {node: '>=6.9.0'} + dev: true + + /@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.0 - '@babel/helper-compilation-targets': 7.16.0_@babel+core@7.16.0 - '@babel/helper-module-transforms': 7.16.0 - '@babel/helpers': 7.16.0 - '@babel/parser': 7.16.2 - '@babel/template': 7.16.0 - '@babel/traverse': 7.16.0 - '@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.2 + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.0 semver: 6.3.0 - source-map: 0.5.7 transitivePeerDependencies: - supports-color + dev: true - /@babel/generator/7.16.0: - resolution: {integrity: sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==} + /@babel/core/7.17.8: + resolution: {integrity: sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.16.0 + '@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 + 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.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.0_@babel+core@7.16.0: - resolution: {integrity: sha512-S7iaOT1SYlqK0sQaCi21RX4+13hmdmnxIEAnQUB/eh7GeAnRjOUgTYpLkUOiRXzD+yog1JxP0qyAQZ7ZxVxLVg==} + /@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.0 - '@babel/core': 7.16.0 - '@babel/helper-validator-option': 7.14.5 - browserslist: 4.17.6 + '@babel/compat-data': 7.16.4 + '@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.0_@babel+core@7.16.0: - resolution: {integrity: sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==} + /@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.0 - '@babel/helper-annotate-as-pure': 7.16.0 - '@babel/helper-function-name': 7.16.0 - '@babel/helper-member-expression-to-functions': 7.16.0 - '@babel/helper-optimise-call-expression': 7.16.0 - '@babel/helper-replace-supers': 7.16.0 - '@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-function-name/7.16.0: - resolution: {integrity: sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==} + /@babel/helper-environment-visitor/7.16.7: + resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} 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/types': 7.17.0 - /@babel/helper-get-function-arity/7.16.0: - resolution: {integrity: sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==} + /@babel/helper-function-name/7.16.7: + resolution: {integrity: sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==} engines: {node: '>=6.9.0'} dependencies: - '@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.7: + resolution: {integrity: sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==} + engines: {node: '>=6.9.0'} + dependencies: + '@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.0: - resolution: {integrity: sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==} + /@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.0: - resolution: {integrity: sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==} + /@babel/helper-module-imports/7.16.7: + resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-module-imports': 7.16.0 - '@babel/helper-replace-supers': 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.0 - '@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-plugin-utils/7.14.5: - resolution: {integrity: sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==} + /@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-plugin-utils/7.16.7: + resolution: {integrity: sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==} engines: {node: '>=6.9.0'} - /@babel/helper-replace-supers/7.16.0: - resolution: {integrity: sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==} + /@babel/helper-replace-supers/7.16.7: + resolution: {integrity: sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-member-expression-to-functions': 7.16.0 - '@babel/helper-optimise-call-expression': 7.16.0 - '@babel/traverse': 7.16.0 - '@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/helpers/7.16.0: - resolution: {integrity: sha512-dVRM0StFMdKlkt7cVcGgwD8UMaBfWJHl3A83Yfs8GQ3MO0LHIIIMvK7Fa0RGOGUQ10qikLaX6D7o5htcQWgTMQ==} + /@babel/helper-validator-option/7.16.7: + resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==} + engines: {node: '>=6.9.0'} + + /@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.0 - '@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==} @@ -1120,237 +1402,288 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.16.2: - resolution: {integrity: sha512-RUVpT0G2h6rOZwqLDTrKk7ksNv7YpAilTnYe1/Q+eDjxEceRMKVWbCsX7t8h6C1qCFi/1Y8WZjcEPBAFG27GPw==} + /@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.16.4: - resolution: {integrity: sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==} + /@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.0: - resolution: {integrity: sha512-y9WbLfaPDDkShmU89N1spx54ELht7rXE2jWDzCgc23OmTwliEK9NSoR8KZdtjr1mR3QfG7D6mcDHmI4M0bhMQA==} + /@babel/plugin-proposal-pipeline-operator/7.16.5: + resolution: {integrity: sha512-aMw3gPJYa2F6mVnL6QuHr9NtAScspBPTVXU2kaup7FVl02Hr4tY2diaGNdismAOmiroWa/2ENy4EFyoz81ACLg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/helper-plugin-utils': 7.14.5 - '@babel/plugin-syntax-pipeline-operator': 7.16.0 + '@babel/helper-plugin-utils': 7.16.5 + '@babel/plugin-syntax-pipeline-operator': 7.16.5 dev: true - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.16.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.16.0: + /@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.16.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.5 + dev: true - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.16.0: + /@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.17.8 + '@babel/helper-plugin-utils': 7.16.5 + dev: false + + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-jsx/7.16.0: - resolution: {integrity: sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==} + /@babel/plugin-syntax-jsx/7.16.5: + resolution: {integrity: sha512-42OGssv9NPk4QHKVgIHlzeLgPOW5rGgfV5jzG90AhcXXIv6hu/eqj63w4VgvRxdvZY3AlYeDgPiSJ3BqAd1Y6Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/helper-plugin-utils': 7.14.5 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-jsx/7.16.0_@babel+core@7.16.0: - resolution: {integrity: sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==} + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@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.0: + /@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.17.2: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.16.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-pipeline-operator/7.16.0: - resolution: {integrity: sha512-wUWeLyChgsQ2cVp3vDtDqnwmDHdTiRyxuEeGRGwmPxp7YcNyQw+axni5R+WO/TF565j36Pp8zRU1qnY5etf4BQ==} + /@babel/plugin-syntax-pipeline-operator/7.16.5: + resolution: {integrity: sha512-JNPDHcP1DfYkVMREaQtRo6h8aaZBvK/dlKSRJpZcFv3wD9ZDg4qwwYzTmFxY4hTpwSKyty6rqLb6KIP52v11ig==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/helper-plugin-utils': 7.14.5 + '@babel/helper-plugin-utils': 7.16.5 dev: true - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.16.0: + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 dev: true - /@babel/plugin-syntax-typescript/7.16.0_@babel+core@7.16.0: - resolution: {integrity: sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ==} + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.2 + '@babel/helper-plugin-utils': 7.16.7 + dev: true - /@babel/plugin-transform-react-jsx-development/7.16.0_@babel+core@7.16.0: - resolution: {integrity: sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw==} + /@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.0 - '@babel/plugin-transform-react-jsx': 7.16.0_@babel+core@7.16.0 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-transform-react-jsx-self/7.16.0_@babel+core@7.16.0: - resolution: {integrity: sha512-97yCFY+2GvniqOThOSjPor8xUoDiQ0STVWAQMl3pjhJoFVe5DuXDLZCRSZxu9clx+oRCbTiXGgKEG/Yoyo6Y+w==} + /@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.0 - '@babel/helper-plugin-utils': 7.14.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.0_@babel+core@7.16.0: - resolution: {integrity: sha512-8yvbGGrHOeb/oyPc9tzNoe9/lmIjz3HLa9Nc5dMGDyNpGjfFrk8D2KdEq9NRkftZzeoQEW6yPQ29TMZtrLiUUA==} + /@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.0 - '@babel/helper-plugin-utils': 7.14.5 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-transform-react-jsx/7.16.0_@babel+core@7.16.0: - resolution: {integrity: sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw==} + /@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.0 - '@babel/helper-annotate-as-pure': 7.16.0 - '@babel/helper-module-imports': 7.16.0 - '@babel/helper-plugin-utils': 7.14.5 - '@babel/plugin-syntax-jsx': 7.16.0_@babel+core@7.16.0 - '@babel/types': 7.16.0 + '@babel/core': 7.17.8 + '@babel/helper-plugin-utils': 7.16.7 + dev: false + + /@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.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.1_@babel+core@7.16.0: - resolution: {integrity: sha512-NO4XoryBng06jjw/qWEU2LhcLJr1tWkhpMam/H4eas/CDKMX/b2/Ylb6EI256Y7+FVPCawwSM1rrJNOpDiz+Lg==} + /@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.16.0 - '@babel/helper-create-class-features-plugin': 7.16.0_@babel+core@7.16.0 - '@babel/helper-plugin-utils': 7.14.5 - '@babel/plugin-syntax-typescript': 7.16.0_@babel+core@7.16.0 + '@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 - /@babel/runtime/7.16.0: - resolution: {integrity: sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw==} + /@babel/runtime/7.16.5: + resolution: {integrity: sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 - /@babel/standalone/7.16.4: - resolution: {integrity: sha512-FDRLwjeQfPm5jaHNuB+vwNyGCp24Ah3kEsbLzKmh0eSru+QCr4DmjgbRPoz71AwXLVtXU+l/i7MlVlIj5XO7Gw==} + /@babel/standalone/7.17.8: + resolution: {integrity: sha512-tr3SDpVnxR/fzrxyG+HZPAyEA9eTHZIAjy4eqrc7m+KBwsdo1YvTbUfJ6teWHQ177mk6GmdmltsIiOYCcvRPWA==} engines: {node: '>=6.9.0'} dev: false @@ -1359,24 +1692,89 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.16.0 - '@babel/parser': 7.16.2 - '@babel/types': 7.16.0 + '@babel/parser': 7.16.6 + '@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.0: - resolution: {integrity: sha512-qQ84jIs1aRQxaGaxSysII9TuDaguZ5yVrEuC0BN2vcPlalwfLovVmCjbFDPECPXcYM/wLvNFfp8uDOliLxIoUQ==} + /@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==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.16.0 - '@babel/generator': 7.16.0 - '@babel/helper-function-name': 7.16.0 + '@babel/generator': 7.16.5 + '@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/parser': 7.16.2 - '@babel/types': 7.16.0 - debug: 4.3.2 + '@babel/helper-split-export-declaration': 7.16.7 + '@babel/parser': 7.16.6 + '@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==} @@ -1385,6 +1783,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 @@ -1405,40 +1817,45 @@ packages: '@cspotcode/source-map-consumer': 0.8.0 dev: true - /@docsearch/css/1.0.0-alpha.28: - resolution: {integrity: sha512-1AhRzVdAkrWwhaxTX6/R7SnFHz8yLz1W8I/AldlTrfbNvZs9INk1FZiEFTJdgHaP68nhgQNWSGlQiDiI3y2RYg==} + /@docsearch/css/3.0.0-alpha.42: + resolution: {integrity: sha512-AGwI2AXUacYhVOHmYnsXoYDJKO6Ued2W+QO80GERbMLhC7GH5tfvtW5REs/s7jSdcU3vzFoxT8iPDBCh/PkrlQ==} dev: true - /@docsearch/js/1.0.0-alpha.28: - resolution: {integrity: sha512-2g7aPhBy7FoEyeZW2G3LYHWVa8CFvqyozEz8PXt3hyywdFcmEIqmoCRwn8kboVftrOKCjtPcuLCewsaBoB3uiw==} + /@docsearch/js/3.0.0-alpha.42: + resolution: {integrity: sha512-8rxxsvFKS5GzDX2MYMETeib4EOwAkoxVUHFP5R4tSENXojhuCEy3np+k3Q0c9WPT+MUmWLxKJab5jyl0jmaeBQ==} dependencies: - '@docsearch/react': 1.0.0-alpha.28 - preact: 10.5.15 + '@docsearch/react': 3.0.0-alpha.42 + preact: 10.6.4 transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' - react - react-dom dev: true - /@docsearch/react/1.0.0-alpha.28: - resolution: {integrity: sha512-XjJOnCBXn+UZmtuDmgzlVIHnnvh6yHVwG4aFq8AXN6xJEIX3f180FvGaowFWAxgdtHplJxFGux0Xx4piHqBzIw==} + /@docsearch/react/3.0.0-alpha.42: + resolution: {integrity: sha512-1aOslZJDxwUUcm2QRNmlEePUgL8P5fOAeFdOLDMctHQkV2iTja9/rKVbkP8FZbIUnZxuuCCn8ErLrjD/oXWOag==} peerDependencies: - react: ^16.8.0 - react-dom: ^16.8.0 + '@types/react': '>= 16.8.0 < 18.0.0' + react: '>= 16.8.0 < 18.0.0' + react-dom: '>= 16.8.0 < 18.0.0' dependencies: - '@docsearch/css': 1.0.0-alpha.28 - '@francoischalifour/autocomplete-core': 1.0.0-alpha.28 - '@francoischalifour/autocomplete-preset-algolia': 1.0.0-alpha.28 + '@algolia/autocomplete-core': 1.5.0 + '@algolia/autocomplete-preset-algolia': 1.5.0_algoliasearch@4.11.0 + '@docsearch/css': 3.0.0-alpha.42 algoliasearch: 4.11.0 + transitivePeerDependencies: + - '@algolia/client-search' dev: true - /@emotion/babel-plugin/11.3.0: - resolution: {integrity: sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==} + /@emotion/babel-plugin/11.7.2: + resolution: {integrity: sha512-6mGSCWi9UzXut/ZAN6lGFu33wGR3SJisNl3c0tvlmb8XChH1b2SUvxvnOh7hvLpqyRdHHU9AiazV3Cwbk5SXKQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: '@babel/helper-module-imports': 7.16.0 - '@babel/plugin-syntax-jsx': 7.16.0 - '@babel/runtime': 7.16.0 + '@babel/plugin-syntax-jsx': 7.16.5 + '@babel/runtime': 7.16.5 '@emotion/hash': 0.8.0 '@emotion/memoize': 0.7.5 '@emotion/serialize': 1.0.2 @@ -1447,17 +1864,17 @@ packages: escape-string-regexp: 4.0.0 find-root: 1.1.0 source-map: 0.5.7 - stylis: 4.0.10 + stylis: 4.0.13 dev: true - /@emotion/cache/11.5.0: - resolution: {integrity: sha512-mAZ5QRpLriBtaj/k2qyrXwck6yeoz1V5lMt/jfj6igWU35yYlNKs2LziXVgvH81gnJZ+9QQNGelSsnuoAy6uIw==} + /@emotion/cache/11.7.1: + resolution: {integrity: sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A==} dependencies: '@emotion/memoize': 0.7.5 - '@emotion/sheet': 1.0.3 + '@emotion/sheet': 1.1.0 '@emotion/utils': 1.0.0 '@emotion/weak-memoize': 0.2.5 - stylis: 4.0.10 + stylis: 4.0.13 dev: false /@emotion/hash/0.8.0: @@ -1466,8 +1883,8 @@ packages: /@emotion/memoize/0.7.5: resolution: {integrity: sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==} - /@emotion/react/11.5.0_react@17.0.2: - resolution: {integrity: sha512-MYq/bzp3rYbee4EMBORCn4duPQfgpiEB5XzrZEBnUZAL80Qdfr7CEv/T80jwaTl/dnZmt9SnTa8NkTrwFNpLlw==} + /@emotion/react/11.7.1_react@17.0.2: + resolution: {integrity: sha512-DV2Xe3yhkF1yT4uAUoJcYL1AmrnO5SVsdfvu+fBuS7IbByDeTVx9+wFmvx9Idzv7/78+9Mgx2Hcmr7Fex3tIyw==} peerDependencies: '@babel/core': ^7.0.0 '@types/react': '*' @@ -1478,10 +1895,10 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.16.0 - '@emotion/cache': 11.5.0 + '@babel/runtime': 7.16.5 + '@emotion/cache': 11.7.1 '@emotion/serialize': 1.0.2 - '@emotion/sheet': 1.0.3 + '@emotion/sheet': 1.1.0 '@emotion/utils': 1.0.0 '@emotion/weak-memoize': 0.2.5 hoist-non-react-statics: 3.3.2 @@ -1495,10 +1912,10 @@ packages: '@emotion/memoize': 0.7.5 '@emotion/unitless': 0.7.5 '@emotion/utils': 1.0.0 - csstype: 3.0.9 + csstype: 3.0.10 - /@emotion/sheet/1.0.3: - resolution: {integrity: sha512-YoX5GyQ4db7LpbmXHMuc8kebtBGP6nZfRC5Z13OKJMixBEwdZrJ914D6yJv/P+ZH/YY3F5s89NYX2hlZAf3SRQ==} + /@emotion/sheet/1.1.0: + resolution: {integrity: sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==} dev: false /@emotion/unitless/0.7.5: @@ -1511,15 +1928,15 @@ packages: resolution: {integrity: sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==} dev: false - /@eslint/eslintrc/1.0.4: - resolution: {integrity: sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==} + /@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.2 - espree: 9.1.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 @@ -1528,24 +1945,12 @@ packages: - supports-color dev: true - /@francoischalifour/autocomplete-core/1.0.0-alpha.28: - resolution: {integrity: sha512-rL9x+72btViw+9icfBKUJjZj87FgjFrD2esuTUqtj4RAX3s4AuVZiN8XEsfjQBSc6qJk31cxlvqZHC/BIyYXgg==} - dev: true - - /@francoischalifour/autocomplete-preset-algolia/1.0.0-alpha.28: - resolution: {integrity: sha512-bprfNmYt1opFUFEtD2XfY/kEsm13bzHQgU80uMjhuK0DJ914IjolT1GytpkdM6tJ4MBvyiJPP+bTtWO+BZ7c7w==} - dev: true - - /@gar/promisify/1.1.2: - resolution: {integrity: sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==} - dev: false - - /@humanwhocodes/config-array/0.6.0: - resolution: {integrity: sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==} + /@humanwhocodes/config-array/0.9.2: + resolution: {integrity: sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.2 + debug: 4.3.4 minimatch: 3.0.4 transitivePeerDependencies: - supports-color @@ -1580,20 +1985,20 @@ packages: engines: {node: '>=8'} dev: true - /@jest/console/27.3.1: - resolution: {integrity: sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw==} + /@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.2.5 - '@types/node': 16.11.9 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 chalk: 4.1.2 - jest-message-util: 27.3.1 - jest-util: 27.3.1 + jest-message-util: 27.5.1 + jest-util: 27.5.1 slash: 3.0.0 dev: true - /@jest/core/27.3.1_ts-node@10.4.0: - resolution: {integrity: sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg==} + /@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 @@ -1601,30 +2006,30 @@ packages: node-notifier: optional: true dependencies: - '@jest/console': 27.3.1 - '@jest/reporters': 27.3.1 - '@jest/test-result': 27.3.1 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.3.0 - jest-config: 27.3.1_ts-node@10.4.0 - jest-haste-map: 27.3.1 - jest-message-util: 27.3.1 - jest-regex-util: 27.0.6 - jest-resolve: 27.3.1 - jest-resolve-dependencies: 27.3.1 - jest-runner: 27.3.1 - jest-runtime: 27.3.1 - jest-snapshot: 27.3.1 - jest-util: 27.3.1 - jest-validate: 27.3.1 - jest-watcher: 27.3.1 + 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 @@ -1637,39 +2042,39 @@ packages: - utf-8-validate dev: true - /@jest/environment/27.3.1: - resolution: {integrity: sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw==} + /@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.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 - jest-mock: 27.3.0 + '@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.3.1: - resolution: {integrity: sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA==} + /@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.2.5 + '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 16.11.9 - jest-message-util: 27.3.1 - jest-mock: 27.3.0 - jest-util: 27.3.1 + '@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.3.1: - resolution: {integrity: sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg==} + /@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.3.1 - '@jest/types': 27.2.5 - expect: 27.3.1 + '@jest/environment': 27.5.1 + '@jest/types': 27.5.1 + expect: 27.5.1 dev: true - /@jest/reporters/27.3.1: - resolution: {integrity: sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w==} + /@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 @@ -1678,25 +2083,25 @@ packages: optional: true dependencies: '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 27.3.1 - '@jest/test-result': 27.3.1 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.0.5 - jest-haste-map: 27.3.1 - jest-resolve: 27.3.1 - jest-util: 27.3.1 - jest-worker: 27.3.1 + 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 @@ -1706,53 +2111,53 @@ packages: - supports-color dev: true - /@jest/source-map/27.0.6: - resolution: {integrity: sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==} + /@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.3.1: - resolution: {integrity: sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg==} + /@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.3.1 - '@jest/types': 27.2.5 - '@types/istanbul-lib-coverage': 2.0.3 + '@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.3.1: - resolution: {integrity: sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA==} + /@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.3.1 - graceful-fs: 4.2.8 - jest-haste-map: 27.3.1 - jest-runtime: 27.3.1 + '@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.3.1: - resolution: {integrity: sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ==} + /@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.0 - '@jest/types': 27.2.5 + '@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.3.1 - jest-regex-util: 27.0.6 - jest-util: 27.3.1 + 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.1 + pirates: 4.0.4 slash: 3.0.0 source-map: 0.6.1 write-file-atomic: 3.0.3 @@ -1760,46 +2165,82 @@ packages: - supports-color dev: true - /@jest/types/27.2.5: - resolution: {integrity: sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ==} + /@jest/types/27.4.2: + resolution: {integrity: sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/istanbul-lib-coverage': 2.0.3 + '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.11.9 + '@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==} - engines: {node: '>=6.0.0'} + /@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.26 + '@types/yargs': 16.0.4 + chalk: 4.1.2 dev: true - /@microsoft/api-extractor-model/7.13.16: - resolution: {integrity: sha512-ttdxVXsTWL5dd26W1YNLe3LgDsE0EE273aZlcLe58W0opymBybCYU1Mn+OHQM8BuErrdvdN8LdpWAAbkiOEN/Q==} + /@jridgewell/resolve-uri/3.0.5: + resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==} + engines: {node: '>=6.0.0'} + + /@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==} + hasBin: true + dependencies: + detect-libc: 1.0.3 + https-proxy-agent: 5.0.0 + make-dir: 3.1.0 + node-fetch: 2.6.6 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.3.5 + tar: 6.1.11 + transitivePeerDependencies: + - supports-color + dev: false + + /@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.43.2 + '@rushstack/node-core-library': 3.45.1 dev: true - /@microsoft/api-extractor/7.18.19: - resolution: {integrity: sha512-aY+/XR7PtQXtnqNPFRs3/+iVRlQJpo6uLTjO2g7PqmnMywl3GBU3bCgAlV/khZtAQbIs6Le57XxmSE6rOqbcfg==} + /@microsoft/api-extractor/7.19.5: + resolution: {integrity: sha512-ra5r8P7PocOpemrZRccI3Tf1+wukI0gT6ncRB448QSxSYlmqKuvez95YUSYPwHIN/ztKL0cn5PfMOauU1lZfGQ==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.13.16 + '@microsoft/api-extractor-model': 7.15.4 '@microsoft/tsdoc': 0.13.2 '@microsoft/tsdoc-config': 0.15.2 - '@rushstack/node-core-library': 3.43.2 - '@rushstack/rig-package': 0.3.5 - '@rushstack/ts-command-line': 4.10.4 + '@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 semver: 7.3.5 source-map: 0.6.1 - typescript: 4.4.4 + typescript: 4.5.4 dev: true /@microsoft/tsdoc-config/0.15.2: @@ -1843,26 +2284,11 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.13.0 - /@npmcli/fs/1.0.0: - resolution: {integrity: sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==} - dependencies: - '@gar/promisify': 1.1.2 - semver: 7.3.5 - dev: false - - /@npmcli/move-file/1.1.2: - resolution: {integrity: sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==} - engines: {node: '>=10'} - dependencies: - mkdirp: 1.0.4 - rimraf: 3.0.2 - dev: false - - /@peculiar/asn1-schema/2.0.38: - resolution: {integrity: sha512-zZ64UpCTm9me15nuCpPgJghSdbEm8atcDQPCyK+bKXjZAQ1735NCZXCSCfbckbQ4MH36Rm9403n/qMq77LFDzQ==} + /@peculiar/asn1-schema/2.0.44: + resolution: {integrity: sha512-uaCnjQ9A9WwQSMuDJcNOCYEPXTahgKbFMvI7eMOMd8lXgx0J1eU7F3BoMsK5PFxa3dVUxjSQbaOjfgGoeHGgoQ==} dependencies: '@types/asn1js': 2.0.2 - asn1js: 2.1.1 + asn1js: 2.2.0 pvtsutils: 1.2.1 tslib: 2.3.1 dev: true @@ -1874,100 +2300,100 @@ packages: tslib: 2.3.1 dev: true - /@peculiar/webcrypto/1.2.0: - resolution: {integrity: sha512-ln2CvfmTzXSr877zM1+3JTyvbtaDXsoDivvEyeYAzB4RQIM+Pw82gp1nQFp9xM4BylBBrip/R36Gp+WJFCoU3Q==} + /@peculiar/webcrypto/1.2.3: + resolution: {integrity: sha512-q7wDfZy3k/tpnsYB23/MyyDkjn6IdHh8w+xwoVMS5cu6CjVoFzngXDZEOOuSE4zus2yO6ciQhhHxd4XkLpwVnQ==} engines: {node: '>=10.12.0'} dependencies: - '@peculiar/asn1-schema': 2.0.38 + '@peculiar/asn1-schema': 2.0.44 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.2.1 tslib: 2.3.1 - webcrypto-core: 1.3.0 + webcrypto-core: 1.4.0 dev: true /@polka/url/1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/plugin-alias/3.1.8_rollup@2.59.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 dependencies: - rollup: 2.59.0 + rollup: 2.62.0 slash: 3.0.0 dev: true - /@rollup/plugin-commonjs/21.0.1_rollup@2.59.0: - resolution: {integrity: sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==} + /@rollup/plugin-commonjs/21.0.2_rollup@2.62.0: + resolution: {integrity: sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==} engines: {node: '>= 8.0.0'} peerDependencies: rollup: ^2.38.3 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.59.0 + '@rollup/pluginutils': 3.1.0_rollup@2.62.0 commondir: 1.0.1 estree-walker: 2.0.2 glob: 7.2.0 is-reference: 1.2.1 magic-string: 0.25.7 - resolve: 1.20.0 - rollup: 2.59.0 + resolve: 1.22.0 + rollup: 2.62.0 dev: true - /@rollup/plugin-dynamic-import-vars/1.4.1_rollup@2.59.0: - resolution: {integrity: sha512-izHpMs9w8U8CLwyHTXE55H4ytGVaf2ZtlKIWxKigghw6ZC6Mx6AXCsixSY6JOchuX9BN4ZkeN8egLRTS+BxO+w==} + /@rollup/plugin-dynamic-import-vars/1.4.2_rollup@2.62.0: + resolution: {integrity: sha512-SEaS9Pf0RyaZ/oJ1knLZT+Fu0X6DlyTfUcoE7XKkiKJjNaB+8SLoHmDVRhomo5RpWHPyd+B00G/bE5R5+Q+HEg==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.59.0 + '@rollup/pluginutils': 4.2.0 estree-walker: 2.0.2 - globby: 11.0.4 + fast-glob: 3.2.11 magic-string: 0.25.7 - rollup: 2.59.0 + rollup: 2.62.0 dev: true - /@rollup/plugin-json/4.1.0_rollup@2.59.0: + /@rollup/plugin-json/4.1.0_rollup@2.62.0: resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} peerDependencies: rollup: ^1.20.0 || ^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.59.0 - rollup: 2.59.0 + '@rollup/pluginutils': 3.1.0_rollup@2.62.0 + rollup: 2.62.0 dev: true - /@rollup/plugin-node-resolve/13.0.6_rollup@2.59.0: - resolution: {integrity: sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==} + /@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 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.59.0 + '@rollup/pluginutils': 3.1.0_rollup@2.62.0 '@types/resolve': 1.17.1 builtin-modules: 3.2.0 deepmerge: 4.2.2 is-module: 1.0.0 - resolve: 1.20.0 - rollup: 2.59.0 + resolve: 1.22.0 + rollup: 2.62.0 dev: true - /@rollup/plugin-typescript/8.3.0_80f1acc233e4df93aa4e78959e046afc: - 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 tslib: '*' typescript: '>=3.7.0' dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.59.0 - resolve: 1.20.0 - rollup: 2.59.0 + '@rollup/pluginutils': 3.1.0_rollup@2.62.0 + resolve: 1.22.0 + rollup: 2.62.0 tslib: 2.3.1 - typescript: 4.4.4 + typescript: 4.5.4 dev: true - /@rollup/pluginutils/3.1.0_rollup@2.59.0: + /@rollup/pluginutils/3.1.0_rollup@2.62.0: resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} peerDependencies: @@ -1976,18 +2402,18 @@ packages: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.3.0 - rollup: 2.59.0 + rollup: 2.62.0 dev: true - /@rollup/pluginutils/4.1.1: - resolution: {integrity: sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==} + /@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.43.2: - resolution: {integrity: sha512-b7AEhSf6CvZgvuDcWMFDeKx2mQSn9AVnMQVyxNxFeHCtLz3gJicqCOlw2GOXM8HKh6PInLdil/NVCDcstwSrIw==} + /@rushstack/node-core-library/3.45.1: + resolution: {integrity: sha512-BwdssTNe007DNjDBxJgInHg8ePytIPyT0La7ZZSQZF9+rSkT42AygXPGvbGsyFfEntjr4X37zZSJI7yGzL16cQ==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -1997,18 +2423,18 @@ packages: resolve: 1.17.0 semver: 7.3.5 timsort: 0.3.0 - z-schema: 3.18.4 + z-schema: 5.0.2 dev: true - /@rushstack/rig-package/0.3.5: - resolution: {integrity: sha512-CvqWw+E81U5lRBN/lUj7Ngr/XQa/PPb2jAS5QcLP7WL+IMUl+3+Cc2qYrsDoB4zke81kz+usWGmBQpBzGMLmAA==} + /@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.4: - resolution: {integrity: sha512-4T5ao4UgDb6LmiRj4GumvG3VT/p6RSMgl7TN7S58ifaAGN2GeTNBajFCDdJs9QQP0d/4tA5p0SFzT7Ps5Byirg==} + /@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 @@ -2031,6 +2457,7 @@ packages: /@tootallnate/once/1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} + dev: true /@tsconfig/node10/1.0.8: resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} @@ -2056,33 +2483,33 @@ packages: resolution: {integrity: sha512-t4YHCgtD+ERvH0FyxvNlYwJ2ezhqw7t+Ygh4urQ7dJER8i185JPv6oIM3ey5YQmGN6Zp9EMbpohkjZi9t3UxwA==} dev: true - /@types/babel__core/7.1.16: - resolution: {integrity: sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==} + /@types/babel__core/7.1.17: + resolution: {integrity: sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==} dependencies: - '@babel/parser': 7.16.2 - '@babel/types': 7.16.0 - '@types/babel__generator': 7.6.3 + '@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 dev: true - /@types/babel__generator/7.6.3: - resolution: {integrity: sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==} + /@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.2 - '@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: @@ -2093,6 +2520,12 @@ packages: resolution: {integrity: sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg==} dev: true + /@types/cross-spawn/6.0.2: + resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} + dependencies: + '@types/node': 16.11.26 + dev: true + /@types/debug/4.1.7: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} dependencies: @@ -2103,40 +2536,40 @@ 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.9 + '@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.9 + '@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.9 + '@types/node': 16.11.26 dev: true /@types/hash-sum/1.0.0: resolution: {integrity: sha512-FdLBT93h3kcZ586Aee66HPCVJ6qvxVjBlDWNmxSGSbCZe9hTsjRKdSsl4y1T+3zfujxo9auykQMnFsfyHWD7wg==} dev: true - /@types/istanbul-lib-coverage/2.0.3: - resolution: {integrity: sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==} + /@types/istanbul-lib-coverage/2.0.4: + resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true /@types/istanbul-lib-report/3.0.0: resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} dependencies: - '@types/istanbul-lib-coverage': 2.0.3 + '@types/istanbul-lib-coverage': 2.0.4 dev: true /@types/istanbul-reports/3.0.1: @@ -2145,11 +2578,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.3.1 - pretty-format: 27.3.1 + jest-matcher-utils: 27.5.1 + pretty-format: 27.5.1 dev: true /@types/json-schema/7.0.9: @@ -2186,8 +2619,8 @@ packages: resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} dev: true - /@types/node/16.11.9: - resolution: {integrity: sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==} + /@types/node/16.11.26: + resolution: {integrity: sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==} dev: true /@types/normalize-package-data/2.4.1: @@ -2197,24 +2630,30 @@ packages: /@types/parse-json/4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} - /@types/prettier/2.4.1: - resolution: {integrity: sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw==} + /@types/prettier/2.4.2: + resolution: {integrity: sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==} + dev: true + + /@types/prompts/2.0.14: + resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} + dependencies: + '@types/node': 16.11.26 dev: true /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 dev: true /@types/resolve/1.20.1: resolution: {integrity: sha512-Ku5+GPFa12S3W26Uwtw+xyrtIpaZsGYHH6zxNbZlstmlvMYSZRzOwzwsXbxlVUbHyUucctSyuFtu6bNxwYomIw==} dev: true - /@types/sass/1.43.0: - resolution: {integrity: sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==} + /@types/sass/1.43.1: + resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 dev: true /@types/semver/7.3.9: @@ -2232,13 +2671,13 @@ packages: /@types/stylus/0.48.36: resolution: {integrity: sha512-7klEq45BUE8ZJWkYWy1E442DcCs0wi0FkFY1Tjr6EJ7edL77t9w/QmOwlkFumBMqHlatDBtrA2xgfRrGqkUkzg==} dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 dev: true - /@types/ws/8.2.0: - resolution: {integrity: sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==} + /@types/ws/8.5.3: + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 dev: true /@types/yargs-parser/20.2.1: @@ -2255,12 +2694,12 @@ packages: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 dev: true optional: true - /@typescript-eslint/eslint-plugin/5.4.0_8fbd82ef37e23da98dfca9805cf945cd: - resolution: {integrity: sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==} + /@typescript-eslint/eslint-plugin/5.16.0_1324a086488ab25887f801dfb12f1aba: + resolution: {integrity: sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2270,74 +2709,76 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.4.0_eslint@8.3.0+typescript@4.4.4 - '@typescript-eslint/parser': 5.4.0_eslint@8.3.0+typescript@4.4.4 - '@typescript-eslint/scope-manager': 5.4.0 - debug: 4.3.2 - eslint: 8.3.0 + '@typescript-eslint/parser': 5.16.0_eslint@8.11.0+typescript@4.5.4 + '@typescript-eslint/scope-manager': 5.16.0 + '@typescript-eslint/type-utils': 5.16.0_eslint@8.11.0+typescript@4.5.4 + '@typescript-eslint/utils': 5.16.0_eslint@8.11.0+typescript@4.5.4 + debug: 4.3.4 + eslint: 8.11.0 functional-red-black-tree: 1.0.1 - ignore: 5.1.9 + ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.5 - tsutils: 3.21.0_typescript@4.4.4 - typescript: 4.4.4 + tsutils: 3.21.0_typescript@4.5.4 + typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.4.0_eslint@8.3.0+typescript@4.4.4: - resolution: {integrity: sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==} + /@typescript-eslint/parser/5.16.0_eslint@8.11.0+typescript@4.5.4: + resolution: {integrity: sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '*' + 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.4.0 - '@typescript-eslint/types': 5.4.0 - '@typescript-eslint/typescript-estree': 5.4.0_typescript@4.4.4 - eslint: 8.3.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.3.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.11.0 + typescript: 4.5.4 transitivePeerDependencies: - supports-color - - typescript dev: true - /@typescript-eslint/parser/5.4.0_eslint@8.3.0+typescript@4.4.4: - resolution: {integrity: sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==} + /@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.11.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.4.0 - '@typescript-eslint/types': 5.4.0 - '@typescript-eslint/typescript-estree': 5.4.0_typescript@4.4.4 - debug: 4.3.2 - eslint: 8.3.0 - typescript: 4.4.4 + '@typescript-eslint/utils': 5.16.0_eslint@8.11.0+typescript@4.5.4 + debug: 4.3.4 + eslint: 8.11.0 + tsutils: 3.21.0_typescript@4.5.4 + typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.4.0: - resolution: {integrity: sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==} + /@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.4.0 - '@typescript-eslint/visitor-keys': 5.4.0 dev: true - /@typescript-eslint/types/5.4.0: - resolution: {integrity: sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree/5.4.0_typescript@4.4.4: - resolution: {integrity: sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==} + /@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: '*' @@ -2345,40 +2786,58 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.4.0 - '@typescript-eslint/visitor-keys': 5.4.0 - debug: 4.3.2 + '@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 - tsutils: 3.21.0_typescript@4.4.4 - typescript: 4.4.4 + tsutils: 3.21.0_typescript@4.5.4 + typescript: 4.5.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.16.0_eslint@8.11.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: + '@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.11.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.11.0 transitivePeerDependencies: - supports-color + - typescript dev: true - /@typescript-eslint/visitor-keys/5.4.0: - resolution: {integrity: sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==} + /@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.4.0 - eslint-visitor-keys: 3.1.0 + '@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.0: + /@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.0_@babel+core@7.16.0 + '@babel/plugin-syntax-jsx': 7.16.5_@babel+core@7.17.8 '@babel/template': 7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.5 '@babel/types': 7.16.0 '@vue/babel-helper-vue-transform-on': 1.0.2 - camelcase: 6.2.0 + camelcase: 6.2.1 html-tags: 3.1.0 svg-tags: 1.0.0 transitivePeerDependencies: @@ -2386,185 +2845,155 @@ packages: - supports-color dev: false - /@vue/compiler-core/3.2.21: - resolution: {integrity: sha512-NhhiQZNG71KNq1h5pMW/fAXdTF7lJRaSI7LDm2edhHXVz1ROMICo8SreUmQnSf4Fet0UPBVqJ988eF4+936iDQ==} + /@vue/compiler-core/3.2.26: + resolution: {integrity: sha512-N5XNBobZbaASdzY9Lga2D9Lul5vdCIOXvUMd6ThcN8zgqQhPKfCV+wfAJNNJKQkSHudnYRO2gEB+lp0iN3g2Tw==} dependencies: - '@babel/parser': 7.16.2 - '@vue/shared': 3.2.21 + '@babel/parser': 7.16.6 + '@vue/shared': 3.2.26 estree-walker: 2.0.2 source-map: 0.6.1 - dev: true - /@vue/compiler-core/3.2.22: - resolution: {integrity: sha512-uAkovrVeTcjzpiM4ECmVaMrv/bjdgAaLzvjcGqQPBEyUrcqsCgccT9fHJ/+hWVGhyMahmBwLqcn4guULNx7sdw==} + /@vue/compiler-core/3.2.31: + resolution: {integrity: sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==} dependencies: - '@babel/parser': 7.16.2 - '@vue/shared': 3.2.22 + '@babel/parser': 7.17.8 + '@vue/shared': 3.2.31 estree-walker: 2.0.2 source-map: 0.6.1 - dev: true - /@vue/compiler-core/3.2.23: - resolution: {integrity: sha512-4ZhiI/orx+7EJ1B+0zjgvXMV2uRN+XBfG06UN2sJfND9rH5gtEQT3QmO4erum1o6Irl7y754W8/KSaDJh4EUQg==} + /@vue/compiler-dom/3.2.26: + resolution: {integrity: sha512-smBfaOW6mQDxcT3p9TKT6mE22vjxjJL50GFVJiI0chXYGU/xzC05QRGrW3HHVuJrmLTLx5zBhsZ2dIATERbarg==} dependencies: - '@babel/parser': 7.16.4 - '@vue/shared': 3.2.23 - estree-walker: 2.0.2 - source-map: 0.6.1 + '@vue/compiler-core': 3.2.26 + '@vue/shared': 3.2.26 - /@vue/compiler-dom/3.2.21: - resolution: {integrity: sha512-gsJD3DpYZSYquiA7UIPsMDSlAooYWDvHPq9VRsqzJEk2PZtFvLvHPb4aaMD8Ufd62xzYn32cnnkzsEOJhyGilA==} + /@vue/compiler-dom/3.2.31: + resolution: {integrity: sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==} dependencies: - '@vue/compiler-core': 3.2.21 - '@vue/shared': 3.2.21 - dev: true + '@vue/compiler-core': 3.2.31 + '@vue/shared': 3.2.31 - /@vue/compiler-dom/3.2.22: - resolution: {integrity: sha512-VZdsw/VuO1ODs8K7NQwnMQzKITDkIFlYYC03SVnunuf6eNRxBPEonSyqbWNoo6qNaHAEBTG6VVcZC5xC9bAx1g==} + /@vue/compiler-sfc/3.2.26: + resolution: {integrity: sha512-ePpnfktV90UcLdsDQUh2JdiTuhV0Skv2iYXxfNMOK/F3Q+2BO0AulcVcfoksOpTJGmhhfosWfMyEaEf0UaWpIw==} dependencies: - '@vue/compiler-core': 3.2.22 - '@vue/shared': 3.2.22 - dev: true - - /@vue/compiler-dom/3.2.23: - resolution: {integrity: sha512-X2Nw8QFc5lgoK3kio5ktM95nqmLUH+q+N/PbV4kCHzF1avqv/EGLnAhaaF0Iu4bewNvHJAAhhwPZFeoV/22nbw==} - dependencies: - '@vue/compiler-core': 3.2.23 - '@vue/shared': 3.2.23 - - /@vue/compiler-sfc/3.2.21: - resolution: {integrity: sha512-+yDlUSebKpz/ovxM2vLRRx7w/gVfY767pOfYTgbIhAs+ogvIV2BsIt4fpxlThnlCNChJ+yE0ERUNoROv2kEGEQ==} - dependencies: - '@babel/parser': 7.16.2 - '@vue/compiler-core': 3.2.21 - '@vue/compiler-dom': 3.2.21 - '@vue/compiler-ssr': 3.2.21 - '@vue/ref-transform': 3.2.21 - '@vue/shared': 3.2.21 + '@babel/parser': 7.16.6 + '@vue/compiler-core': 3.2.26 + '@vue/compiler-dom': 3.2.26 + '@vue/compiler-ssr': 3.2.26 + '@vue/reactivity-transform': 3.2.26 + '@vue/shared': 3.2.26 estree-walker: 2.0.2 magic-string: 0.25.7 - postcss: 8.3.11 + postcss: 8.4.5 source-map: 0.6.1 - dev: true - /@vue/compiler-sfc/3.2.23: - resolution: {integrity: sha512-Aw+pb50Q5zTjyvWod8mNKmYZDRGHJBptmNNWE+84ZxrzEztPgMz8cNYIzWGbwcFVkmJlhvioAMvKnB+LM/sjSA==} + /@vue/compiler-sfc/3.2.31: + resolution: {integrity: sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==} dependencies: - '@babel/parser': 7.16.4 - '@vue/compiler-core': 3.2.23 - '@vue/compiler-dom': 3.2.23 - '@vue/compiler-ssr': 3.2.23 - '@vue/ref-transform': 3.2.23 - '@vue/shared': 3.2.23 + '@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.3.11 + postcss: 8.4.12 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.21: - resolution: {integrity: sha512-eU+A0iWYy+1zAo2CRIJ0zSVlv1iuGAIbNRCnllSJ31pV1lX3jypJYzGbJlSRAbB7VP6E+tYveVT1Oq8JKewa3g==} + /@vue/compiler-ssr/3.2.26: + resolution: {integrity: sha512-2mywLX0ODc4Zn8qBoA2PDCsLEZfpUGZcyoFRLSOjyGGK6wDy2/5kyDOWtf0S0UvtoyVq95OTSGIALjZ4k2q/ag==} dependencies: - '@vue/compiler-dom': 3.2.21 - '@vue/shared': 3.2.21 - dev: true + '@vue/compiler-dom': 3.2.26 + '@vue/shared': 3.2.26 - /@vue/compiler-ssr/3.2.23: - resolution: {integrity: sha512-Bqzn4jFyXPK1Ehqiq7e/czS8n62gtYF1Zfeu0DrR5uv+SBllh7LIvZjZU6+c8qbocAd3/T3I3gn2cZGmnDb6zg==} + /@vue/compiler-ssr/3.2.31: + resolution: {integrity: sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==} dependencies: - '@vue/compiler-dom': 3.2.23 - '@vue/shared': 3.2.23 + '@vue/compiler-dom': 3.2.31 + '@vue/shared': 3.2.31 - /@vue/devtools-api/6.0.0-beta.20: - resolution: {integrity: sha512-21u2jFOk8jbAneeGpDwZQ0W66RJa0IBDUyVl6SgKnn2cRFjLWzKj+ukXjpLhYr1KASyCe5E5U4jXwChVo0YUAw==} + /@vue/devtools-api/6.0.0-beta.21.1: + resolution: {integrity: sha512-FqC4s3pm35qGVeXRGOjTsRzlkJjrBLriDS9YXbflHLsfA9FrcKzIyWnLXoNm+/7930E8rRakXuAc2QkC50swAw==} dev: false - /@vue/reactivity/3.2.21: - resolution: {integrity: sha512-7C57zFm/5E3SSTUhVuYj1InDwuJ+GIVQ/z+H43C9sST85gIThGXVhksl1yWTAadf8Yz4T5lSbqi5Ds8U/ueWcw==} - dependencies: - '@vue/shared': 3.2.21 - dev: true - - /@vue/reactivity/3.2.23: - resolution: {integrity: sha512-8RGVr/5Kpgb/EkCjgHXqttgA5IMc6n0lIXFY4TVbMkzdXrvaIhzBd7Te44oIDsTSYVKZLpfHd6/wEnuDqE8vFw==} - dependencies: - '@vue/shared': 3.2.23 - - /@vue/ref-transform/3.2.21: - resolution: {integrity: sha512-uiEWWBsrGeun9O7dQExYWzXO3rHm/YdtFNXDVqCSoPypzOVxWxdiL+8hHeWzxMB58fVuV2sT80aUtIVyaBVZgQ==} + /@vue/reactivity-transform/3.2.26: + resolution: {integrity: sha512-XKMyuCmzNA7nvFlYhdKwD78rcnmPb7q46uoR00zkX6yZrUmcCQ5OikiwUEVbvNhL5hBJuvbSO95jB5zkUon+eQ==} dependencies: - '@babel/parser': 7.16.2 - '@vue/compiler-core': 3.2.21 - '@vue/shared': 3.2.21 + '@babel/parser': 7.16.6 + '@vue/compiler-core': 3.2.26 + '@vue/shared': 3.2.26 estree-walker: 2.0.2 magic-string: 0.25.7 - dev: true - /@vue/ref-transform/3.2.23: - resolution: {integrity: sha512-gW0GD2PSAs/th7mC7tPB/UwpIQxclbApVtsDtscDmOJXb2+cdu60ny+SuHNgfrlUT/JqWKQHq7jFKO4woxLNaA==} + /@vue/reactivity-transform/3.2.31: + resolution: {integrity: sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==} dependencies: - '@babel/parser': 7.16.4 - '@vue/compiler-core': 3.2.23 - '@vue/shared': 3.2.23 + '@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/runtime-core/3.2.21: - resolution: {integrity: sha512-7oOxKaU0D2IunOAMOOHZgJVrHg63xwng8BZx3fbgmakqEIMwHhQcp+5GV1sOg/sWW7R4UhaRDIUCukO2GRVK2Q==} + /@vue/reactivity/3.2.26: + resolution: {integrity: sha512-h38bxCZLW6oFJVDlCcAiUKFnXI8xP8d+eO0pcDxx+7dQfSPje2AO6M9S9QO6MrxQB7fGP0DH0dYQ8ksf6hrXKQ==} dependencies: - '@vue/reactivity': 3.2.21 - '@vue/shared': 3.2.21 - dev: true + '@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.23: - resolution: {integrity: sha512-wSI5lmY2kCGLf89iiygqxVh6/5bsawz78Me9n1x4U2bHnN0yf3PWyuhN0WgIE8VfEaF7e75E333uboNEIFjgkg==} + /@vue/runtime-core/3.2.31: + resolution: {integrity: sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==} dependencies: - '@vue/reactivity': 3.2.23 - '@vue/shared': 3.2.23 + '@vue/reactivity': 3.2.31 + '@vue/shared': 3.2.31 - /@vue/runtime-dom/3.2.21: - resolution: {integrity: sha512-apBdriD6QsI4ywbllY8kjr9/0scGuStDuvLbJULPQkFPtHzntd51bP5PQTQVAEIc9kwnTozmj6x6ZdX/cwo7xA==} + /@vue/runtime-dom/3.2.26: + resolution: {integrity: sha512-dY56UIiZI+gjc4e8JQBwAifljyexfVCkIAu/WX8snh8vSOt/gMSEGwPRcl2UpYpBYeyExV8WCbgvwWRNt9cHhQ==} dependencies: - '@vue/runtime-core': 3.2.21 - '@vue/shared': 3.2.21 - csstype: 2.6.18 - dev: true + '@vue/runtime-core': 3.2.26 + '@vue/shared': 3.2.26 + csstype: 2.6.19 - /@vue/runtime-dom/3.2.23: - resolution: {integrity: sha512-z6lp0888NkLmxD9j2sGoll8Kb7J743s8s6w7GbiyUc4WZwm0KJ35B4qTFDMoIU0G7CatS6Z+yRTpPHc6srtByg==} + /@vue/runtime-dom/3.2.31: + resolution: {integrity: sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==} dependencies: - '@vue/runtime-core': 3.2.23 - '@vue/shared': 3.2.23 - csstype: 2.6.18 + '@vue/runtime-core': 3.2.31 + '@vue/shared': 3.2.31 + csstype: 2.6.19 - /@vue/server-renderer/3.2.21_vue@3.2.21: - resolution: {integrity: sha512-QBgYqVgI7XCSBCqGa4LduV9vpfQFdZBOodFmq5Txk5W/v1KrJ1LoOh2Q0RHiRgtoK/UR9uyvRVcYqOmwHkZNEg==} + /@vue/server-renderer/3.2.26_vue@3.2.26: + resolution: {integrity: sha512-Jp5SggDUvvUYSBIvYEhy76t4nr1vapY/FIFloWmQzn7UxqaHrrBpbxrqPcTrSgGrcaglj0VBp22BKJNre4aA1w==} peerDependencies: - vue: 3.2.21 + vue: 3.2.26 dependencies: - '@vue/compiler-ssr': 3.2.21 - '@vue/shared': 3.2.21 - vue: 3.2.21 - dev: true + '@vue/compiler-ssr': 3.2.26 + '@vue/shared': 3.2.26 + vue: 3.2.26 - /@vue/server-renderer/3.2.23_vue@3.2.23: - resolution: {integrity: sha512-mgQ2VAE5WjeZELJKNbwE69uiBNpN+3LyL0ZDki1bJWVwHD2fhPfx7pwyYuiucE81xz2LxVsyGxhKKUL997g8vw==} + /@vue/server-renderer/3.2.31_vue@3.2.31: + resolution: {integrity: sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==} peerDependencies: - vue: 3.2.23 + vue: 3.2.31 dependencies: - '@vue/compiler-ssr': 3.2.23 - '@vue/shared': 3.2.23 - vue: 3.2.23 - - /@vue/shared/3.2.21: - resolution: {integrity: sha512-5EQmIPK6gw4UVYUbM959B0uPsJ58+xoMESCZs3N89XyvJ9e+fX4pqEPrOGV8OroIk3SbEvJcC+eYc8BH9JQrHA==} - dev: true + '@vue/compiler-ssr': 3.2.31 + '@vue/shared': 3.2.31 + vue: 3.2.31 - /@vue/shared/3.2.22: - resolution: {integrity: sha512-qWVav014mpjEtbWbEgl0q9pEyrrIySKum8UVYjwhC6njrKzknLZPvfuYdQyVbApsqr94tf/3dP4pCuZmmjdCWQ==} - dev: true + /@vue/shared/3.2.26: + resolution: {integrity: sha512-vPV6Cq+NIWbH5pZu+V+2QHE9y1qfuTq49uNWw4f7FDEeZaDU2H2cx5jcUZOAKW7qTrUS4k6qZPbMy1x4N96nbA==} - /@vue/shared/3.2.23: - resolution: {integrity: sha512-U+/Jefa0QfXUF2qVy9Dqlrb6HKJSr9/wJcM66wXmWcTOoqg7hOWzF4qruDle51pyF4x3wMn6TSH54UdjKjCKMA==} + /@vue/shared/3.2.31: + resolution: {integrity: sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==} /@wessberg/stringutil/1.0.19: resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} @@ -2591,20 +3020,10 @@ packages: resolution: {integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==} engines: {node: '>= 0.6'} dependencies: - mime-types: 2.1.33 + mime-types: 2.1.34 negotiator: 0.6.2 dev: true - /acorn-class-fields/1.0.0_acorn@8.6.0: - resolution: {integrity: sha512-l+1FokF34AeCXGBHkrXFmml9nOIRI+2yBnBpO5MaVAaTIJ96irWLtcCxX+7hAp6USHFCe+iyyBB4ZhxV807wmA==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6 || ^7 || ^8 - dependencies: - acorn: 8.6.0 - acorn-private-class-elements: 1.0.0_acorn@8.6.0 - dev: true - /acorn-globals/6.0.0: resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} dependencies: @@ -2612,12 +3031,12 @@ packages: acorn-walk: 7.2.0 dev: true - /acorn-jsx/5.3.2_acorn@8.6.0: + /acorn-jsx/5.3.2_acorn@8.7.0: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.6.0 + acorn: 8.7.0 dev: true /acorn-node/1.8.2: @@ -2628,25 +3047,6 @@ packages: xtend: 4.0.2 dev: false - /acorn-private-class-elements/1.0.0_acorn@8.6.0: - resolution: {integrity: sha512-zYNcZtxKgVCg1brS39BEou86mIao1EV7eeREG+6WMwKbuYTeivRRs6S2XdWnboRde6G9wKh2w+WBydEyJsJ6mg==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6.1.0 || ^7 || ^8 - dependencies: - acorn: 8.6.0 - dev: true - - /acorn-static-class-features/1.0.0_acorn@8.6.0: - resolution: {integrity: sha512-XZJECjbmMOKvMHiNzbiPXuXpLAJfN3dAKtfIYbk1eHiWdsutlek+gS7ND4B8yJ3oqvHo1NxfafnezVmq7NXK0A==} - engines: {node: '>=4.8.2'} - peerDependencies: - acorn: ^6.1.0 || ^7 || ^8 - dependencies: - acorn: 8.6.0 - acorn-private-class-elements: 1.0.0_acorn@8.6.0 - dev: true - /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} @@ -2661,14 +3061,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - /acorn/8.5.0: - resolution: {integrity: sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /acorn/8.6.0: - resolution: {integrity: sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==} + /acorn/8.7.0: + resolution: {integrity: sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -2681,20 +3075,9 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.2 - transitivePeerDependencies: - - supports-color - - /agentkeepalive/4.1.4: - resolution: {integrity: sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==} - engines: {node: '>= 8.0.0'} - dependencies: - debug: 4.3.2 - depd: 1.1.2 - humanize-ms: 1.2.1 + debug: 4.3.3 transitivePeerDependencies: - supports-color - dev: false /aggregate-error/3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} @@ -2702,6 +3085,7 @@ packages: dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 + dev: true /ajv/6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -2731,11 +3115,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'} @@ -2838,11 +3217,11 @@ packages: resolution: {integrity: sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=} dev: true - /asn1js/2.1.1: - resolution: {integrity: sha512-t9u0dU0rJN4ML+uxgN6VM2Z4H5jWIYm0w8LsZLzMJaQsgL3IJNbxHgmbWDvJAwspyHpDFuzUaUFh4c05UB4+6g==} + /asn1js/2.2.0: + 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: @@ -2871,36 +3250,36 @@ packages: peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.17.6 - caniuse-lite: 1.0.30001278 - fraction.js: 4.1.1 + browserslist: 4.19.1 + caniuse-lite: 1.0.30001294 + fraction.js: 4.1.2 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss-value-parser: 4.1.0 + postcss-value-parser: 4.2.0 dev: false /axios/0.24.0: resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} dependencies: - follow-redirects: 1.14.5 + follow-redirects: 1.14.6 transitivePeerDependencies: - debug dev: false - /babel-jest/27.3.1_@babel+core@7.16.0: - resolution: {integrity: sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ==} + /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.0 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 - '@types/babel__core': 7.1.16 + '@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.2.0_@babel+core@7.16.0 + 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 @@ -2910,7 +3289,7 @@ packages: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.14.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 @@ -2919,53 +3298,53 @@ packages: - supports-color dev: true - /babel-plugin-jest-hoist/27.2.0: - resolution: {integrity: sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw==} + /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 - '@types/babel__core': 7.1.16 + '@babel/template': 7.16.7 + '@babel/types': 7.17.0 + '@types/babel__core': 7.1.17 '@types/babel__traverse': 7.14.2 dev: true /babel-plugin-macros/2.8.0: resolution: {integrity: sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.5 cosmiconfig: 6.0.0 resolve: 1.20.0 dev: true - /babel-preset-current-node-syntax/1.0.1_@babel+core@7.16.0: + /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.0 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.16.0 - '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.16.0 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.16.0 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.16.0 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.16.0 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.16.0 - dev: true - - /babel-preset-jest/27.2.0_@babel+core@7.16.0: - resolution: {integrity: sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg==} + '@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.0 - babel-plugin-jest-hoist: 27.2.0 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.0 + '@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: @@ -2983,27 +3362,38 @@ packages: engines: {node: '>=6.0.0'} dev: true - /big.js/5.2.2: - resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} - dev: true + /bcrypt/5.0.1: + resolution: {integrity: sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==} + engines: {node: '>= 10.0.0'} + requiresBuild: true + dependencies: + '@mapbox/node-pre-gyp': 1.0.8 + node-addon-api: 3.2.1 + transitivePeerDependencies: + - 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'} - /body-parser/1.19.0: - resolution: {integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==} + /body-parser/1.19.1: + resolution: {integrity: sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==} engines: {node: '>= 0.8'} dependencies: - bytes: 3.1.0 + bytes: 3.1.1 content-type: 1.0.4 debug: 2.6.9 depd: 1.1.2 - http-errors: 1.7.2 + http-errors: 1.8.1 iconv-lite: 0.4.24 on-finished: 2.3.0 - qs: 6.7.0 - raw-body: 2.4.0 + qs: 6.9.6 + raw-body: 2.4.2 type-is: 1.6.18 dev: true @@ -3023,13 +3413,13 @@ packages: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} dev: true - /browserslist/4.17.6: - resolution: {integrity: sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==} + /browserslist/4.19.1: + resolution: {integrity: sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001278 - electron-to-chromium: 1.3.890 + caniuse-lite: 1.0.30001294 + electron-to-chromium: 1.4.29 escalade: 3.1.1 node-releases: 2.0.1 picocolors: 1.0.0 @@ -3072,8 +3462,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /bytes/3.1.0: - resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} + /bytes/3.1.1: + resolution: {integrity: sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==} engines: {node: '>= 0.8'} /cac/6.7.9: @@ -3081,30 +3471,6 @@ packages: engines: {node: '>=8'} dev: true - /cacache/15.3.0: - resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} - engines: {node: '>= 10'} - dependencies: - '@npmcli/fs': 1.0.0 - '@npmcli/move-file': 1.1.2 - chownr: 2.0.0 - fs-minipass: 2.1.0 - glob: 7.2.0 - infer-owner: 1.0.4 - lru-cache: 6.0.0 - minipass: 3.1.5 - minipass-collect: 1.0.2 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - mkdirp: 1.0.4 - p-map: 4.0.0 - promise-inflight: 1.0.1 - rimraf: 3.0.2 - ssri: 8.0.1 - tar: 6.1.11 - unique-filename: 1.1.1 - dev: false - /call-bind/1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -3135,12 +3501,12 @@ packages: engines: {node: '>=6'} dev: true - /camelcase/6.2.0: - resolution: {integrity: sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==} + /camelcase/6.2.1: + resolution: {integrity: sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==} engines: {node: '>=10'} - /caniuse-lite/1.0.30001278: - resolution: {integrity: sha512-mpF9KeH8u5cMoEmIic/cr7PNS+F5LWBk0t2ekGT60lFf0Wq+n9LspAj0g3P+o7DQhD3sUdlMln4YFAWhFYn9jg==} + /caniuse-lite/1.0.30001294: + resolution: {integrity: sha512-LiMlrs1nSKZ8qkNhpUf5KD0Al1KCBE3zaT7OLOwEkagXMEDij98SiOovn9wxVGQpklk9vVC/pUSqgYmkmKOS8g==} /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -3182,24 +3548,35 @@ 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 + dev: true + /chownr/2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} dev: false - /ci-info/1.6.0: - resolution: {integrity: sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==} - dev: true - - /ci-info/3.2.0: - resolution: {integrity: sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==} + /ci-info/3.3.0: + resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} dev: true /cjs-module-lexer/1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} dev: true - /cjstoesm/1.1.4_typescript@4.4.4: + /cjstoesm/1.1.4_typescript@4.5.4: resolution: {integrity: sha512-cixLJwK2HS8R8J1jJcYwlrLxWUbdNms5EmVQuvP3O0CGvHNv2WVd2gnqTP/tbTEYzbgWiSYQBZDoAakqsSl94Q==} engines: {node: '>=10.0.0'} hasBin: true @@ -3209,18 +3586,19 @@ packages: '@wessberg/stringutil': 1.0.19 chalk: 4.1.2 commander: 7.2.0 - compatfactory: 0.0.6_typescript@4.4.4 + compatfactory: 0.0.6_typescript@4.5.4 crosspath: 0.0.8 fast-glob: 3.2.7 helpertypes: 0.0.2 reserved-words: 0.1.2 resolve: 1.20.0 - typescript: 4.4.4 + typescript: 4.5.4 dev: true /clean-stack/2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} + dev: true /cli-cursor/3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} @@ -3261,11 +3639,6 @@ packages: wrap-ansi: 7.0.0 dev: true - /clone/2.1.2: - resolution: {integrity: sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=} - engines: {node: '>=0.8'} - dev: true - /cluster-key-slot/1.1.0: resolution: {integrity: sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==} engines: {node: '>=0.10.0'} @@ -3297,8 +3670,8 @@ packages: /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - /color-string/1.6.0: - resolution: {integrity: sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==} + /color-string/1.9.0: + resolution: {integrity: sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==} dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 @@ -3309,11 +3682,11 @@ packages: hasBin: true dev: false - /color/4.0.1: - resolution: {integrity: sha512-rpZjOKN5O7naJxkH2Rx1sZzzBgaiWECc6BYXjeCE6kF0kcASJYbUq02u7JqIHwCb/j3NhV+QhRL2683aICeGZA==} + /color/4.1.0: + resolution: {integrity: sha512-o2rkkxyLGgYoeUy1OodXpbPAQNmlNBrirQ8ODO8QutzDiDMNdezSOZLNnusQ6pUpCQJUsaJIo9DZJKqa2HgH7A==} dependencies: color-convert: 2.0.1 - color-string: 1.6.0 + color-string: 1.9.0 dev: false /colorette/2.0.16: @@ -3325,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'} @@ -3334,13 +3712,9 @@ packages: /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + requiresBuild: true dev: true - /commander/6.2.1: - resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} - engines: {node: '>= 6'} - dev: false - /commander/7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} @@ -3349,7 +3723,6 @@ packages: /commander/8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} - dev: true /commenting/1.1.0: resolution: {integrity: sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==} @@ -3366,21 +3739,21 @@ packages: dot-prop: 5.3.0 dev: true - /compatfactory/0.0.6_typescript@4.4.4: + /compatfactory/0.0.6_typescript@4.5.4: resolution: {integrity: sha512-F1LpdNxgxay4UdanmeL75+guJPDg2zu8bFZDVih/kse5hA3oa+aMgvk4tLwq7AFBpy3S0ilnPdSfYsTl/L9NXA==} engines: {node: '>=10.0.0'} peerDependencies: typescript: '>=3.x || >= 4.x' dependencies: helpertypes: 0.0.2 - typescript: 4.4.4 + typescript: 4.5.4 dev: true /compressible/2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} dependencies: - mime-db: 1.50.0 + mime-db: 1.51.0 dev: true /compression/1.7.4: @@ -3421,15 +3794,15 @@ packages: /constantinople/4.0.1: resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==} dependencies: - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.6 '@babel/types': 7.16.0 dev: true - /content-disposition/0.5.3: - resolution: {integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==} + /content-disposition/0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} dependencies: - safe-buffer: 5.1.2 + safe-buffer: 5.2.1 dev: true /content-type/1.0.4: @@ -3452,13 +3825,13 @@ packages: q: 1.5.1 dev: true - /conventional-changelog-cli/2.1.1: - resolution: {integrity: sha512-xMGQdKJ+4XFDDgfX5aK7UNFduvJMbvF5BB+g0OdVhA3rYdYyhctrIE2Al+WYdZeKTdg9YzMWF2iFPT8MupIwng==} + /conventional-changelog-cli/2.2.2: + resolution: {integrity: sha512-8grMV5Jo8S0kP3yoMeJxV2P5R6VJOqK72IiSV9t/4H5r/HiRqEBQ83bYGuz4Yzfdj4bjaAEhZN/FFbsFXr5bOA==} engines: {node: '>=10'} hasBin: true dependencies: add-stream: 1.0.0 - conventional-changelog: 3.1.24 + conventional-changelog: 3.1.25 lodash: 4.17.21 meow: 8.1.2 tempfile: 3.0.0 @@ -3471,8 +3844,8 @@ packages: q: 1.5.1 dev: true - /conventional-changelog-conventionalcommits/4.6.1: - resolution: {integrity: sha512-lzWJpPZhbM1R0PIzkwzGBCnAkH5RKJzJfFQZcl/D+2lsJxAwGnDKBqn/F4C1RD31GJNn8NuKWQzAZDAVXPp2Mw==} + /conventional-changelog-conventionalcommits/4.6.2: + resolution: {integrity: sha512-fo+VhM0VtD3wdHZtrPhgvTFjAhAMUjYeQV6B5+DB/cupG1O554pJdTwrvBInq8JLHl+GucKQpZycMPye/OpgSw==} engines: {node: '>=10'} dependencies: compare-func: 2.0.0 @@ -3557,14 +3930,14 @@ packages: through2: 4.0.2 dev: true - /conventional-changelog/3.1.24: - resolution: {integrity: sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg==} + /conventional-changelog/3.1.25: + resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} engines: {node: '>=10'} dependencies: conventional-changelog-angular: 5.0.13 conventional-changelog-atom: 2.0.8 conventional-changelog-codemirror: 2.0.8 - conventional-changelog-conventionalcommits: 4.6.1 + conventional-changelog-conventionalcommits: 4.6.2 conventional-changelog-core: 4.2.4 conventional-changelog-ember: 2.0.9 conventional-changelog-eslint: 3.0.9 @@ -3604,11 +3977,6 @@ packages: resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} dev: true - /cookie/0.4.0: - resolution: {integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==} - engines: {node: '>= 0.6'} - dev: true - /cookie/0.4.1: resolution: {integrity: sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==} engines: {node: '>= 0.6'} @@ -3620,8 +3988,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.19.1: - resolution: {integrity: sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg==} + /core-js/3.21.1: + resolution: {integrity: sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==} requiresBuild: true dev: false @@ -3671,14 +4039,6 @@ packages: cross-spawn: 7.0.3 dev: true - /cross-spawn/5.1.0: - resolution: {integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=} - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - /cross-spawn/6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -3746,11 +4106,11 @@ packages: cssom: 0.3.8 dev: true - /csstype/2.6.18: - resolution: {integrity: sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==} + /csstype/2.6.19: + resolution: {integrity: sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==} - /csstype/3.0.9: - resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==} + /csstype/3.0.10: + resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} /d/1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} @@ -3796,8 +4156,19 @@ packages: dev: true optional: true - /debug/4.3.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} + /debug/4.3.3: + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -3806,9 +4177,10 @@ packages: optional: true dependencies: ms: 2.1.2 + dev: true - /debug/4.3.2_supports-color@9.0.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} + /debug/4.3.4_supports-color@9.2.1: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -3817,7 +4189,7 @@ packages: optional: true dependencies: ms: 2.1.2 - supports-color: 9.0.2 + supports-color: 9.2.1 dev: true /decamelize-keys/1.1.0: @@ -3892,11 +4264,18 @@ packages: /depd/1.1.2: resolution: {integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=} engines: {node: '>= 0.6'} + dev: true /destroy/1.0.4: resolution: {integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=} dev: true + /detect-libc/1.0.3: + resolution: {integrity: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=} + engines: {node: '>=0.10'} + hasBin: true + dev: false + /detect-newline/3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -3923,8 +4302,8 @@ packages: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: false - /diff-sequences/27.0.6: - resolution: {integrity: sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==} + /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 @@ -3973,9 +4352,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: @@ -3987,8 +4366,8 @@ packages: resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true - /electron-to-chromium/1.3.890: - resolution: {integrity: sha512-VWlVXSkv0cA/OOehrEyqjUTHwV8YXCPTfPvbtoeU2aHR21vI4Ejh5aC4AxUwOmbLbBgb6Gd3URZahoCxtBqCYQ==} + /electron-to-chromium/1.4.29: + resolution: {integrity: sha512-N2Jbwxo5Rum8G2YXeUxycs1sv4Qme/ry71HG73bv8BvZl+I/4JtRgK/En+ST/Wh/yF1fqvVCY4jZBgMxnhjtBA==} /emittery/0.8.1: resolution: {integrity: sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==} @@ -4002,44 +4381,21 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true - /emojis-list/3.0.0: - resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} - engines: {node: '>= 4'} - dev: true - /encodeurl/1.0.2: resolution: {integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=} engines: {node: '>= 0.8'} dev: true - /encoding/0.1.13: - resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} - requiresBuild: true - dependencies: - iconv-lite: 0.6.3 - dev: false - optional: true - /end-of-stream/1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: 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'} - - /err-code/2.0.3: - resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} - dev: false + dev: true /errno/0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} @@ -4068,12 +4424,12 @@ packages: has-symbols: 1.0.2 internal-slot: 1.0.3 is-callable: 1.2.4 - is-negative-zero: 2.0.1 + is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.1 is-string: 1.0.7 - is-weakref: 1.0.1 - object-inspect: 1.11.0 + is-weakref: 1.0.2 + object-inspect: 1.12.0 object-keys: 1.1.1 object.assign: 4.1.2 string.prototype.trimend: 1.0.4 @@ -4081,8 +4437,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: @@ -4117,147 +4473,192 @@ packages: ext: 1.6.0 dev: false - /esbuild-android-arm64/0.13.12: - resolution: {integrity: sha512-TSVZVrb4EIXz6KaYjXfTzPyyRpXV5zgYIADXtQsIenjZ78myvDGaPi11o4ZSaHIwFHsuwkB6ne5SZRBwAQ7maw==} + /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.13.12: - resolution: {integrity: sha512-c51C+N+UHySoV2lgfWSwwmlnLnL0JWj/LzuZt9Ltk9ub1s2Y8cr6SQV5W3mqVH1egUceew6KZ8GyI4nwu+fhsw==} + /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.13.12: - resolution: {integrity: sha512-JvAMtshP45Hd8A8wOzjkY1xAnTKTYuP/QUaKp5eUQGX+76GIie3fCdUUr2ZEKdvpSImNqxiZSIMziEiGB5oUmQ==} + /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.13.12: - resolution: {integrity: sha512-r6On/Skv9f0ZjTu6PW5o7pdXr8aOgtFOEURJZYf1XAJs0IQ+gW+o1DzXjVkIoT+n1cm3N/t1KRJfX71MPg/ZUA==} + /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.13.12: - resolution: {integrity: sha512-F6LmI2Q1gii073kmBE3NOTt/6zLL5zvZsxNLF8PMAwdHc+iBhD1vzfI8uQZMJA1IgXa3ocr3L3DJH9fLGXy6Yw==} + /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.13.12: - resolution: {integrity: sha512-U1UZwG3UIwF7/V4tCVAo/nkBV9ag5KJiJTt+gaCmLVWH3bPLX7y+fNlhIWZy8raTMnXhMKfaTvWZ9TtmXzvkuQ==} + /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.13.12: - resolution: {integrity: sha512-YpXSwtu2NxN3N4ifJxEdsgd6Q5d8LYqskrAwjmoCT6yQnEHJSF5uWcxv783HWN7lnGpJi9KUtDvYsnMdyGw71Q==} + /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.13.12: - resolution: {integrity: sha512-SyiT/JKxU6J+DY2qUiSLZJqCAftIt3uoGejZ0HDnUM2MGJqEGSGh7p1ecVL2gna3PxS4P+j6WAehCwgkBPXNIw==} + /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.13.12: - resolution: {integrity: sha512-sgDNb8kb3BVodtAlcFGgwk+43KFCYjnFOaOfJibXnnIojNWuJHpL6aQJ4mumzNWw8Rt1xEtDQyuGK9f+Y24jGA==} + /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.13.12: - resolution: {integrity: sha512-qQJHlZBG+QwVIA8AbTEtbvF084QgDi4DaUsUnA+EolY1bxrG+UyOuGflM2ZritGhfS/k7THFjJbjH2wIeoKA2g==} + /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.13.12: - resolution: {integrity: sha512-2dSnm1ldL7Lppwlo04CGQUpwNn5hGqXI38OzaoPOkRsBRWFBozyGxTFSee/zHFS+Pdh3b28JJbRK3owrrRgWNw==} + /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.13.12: - resolution: {integrity: sha512-D4raxr02dcRiQNbxOLzpqBzcJNFAdsDNxjUbKkDMZBkL54Z0vZh4LRndycdZAMcIdizC/l/Yp/ZsBdAFxc5nbA==} + /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.13.12: - resolution: {integrity: sha512-KuLCmYMb2kh05QuPJ+va60bKIH5wHL8ypDkmpy47lzwmdxNsuySeCMHuTv5o2Af1RUn5KLO5ZxaZeq4GEY7DaQ==} + /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.13.12: - resolution: {integrity: sha512-jBsF+e0woK3miKI8ufGWKG3o3rY9DpHvCVRn5eburMIIE+2c+y3IZ1srsthKyKI6kkXLvV4Cf/E7w56kLipMXw==} + /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.13.12: - resolution: {integrity: sha512-L9m4lLFQrFeR7F+eLZXG82SbXZfUhyfu6CexZEil6vm+lc7GDCE0Q8DiNutkpzjv1+RAbIGVva9muItQ7HVTkQ==} + /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.13.12: - resolution: {integrity: sha512-k4tX4uJlSbSkfs78W5d9+I9gpd+7N95W7H2bgOMFPsYREVJs31+Q2gLLHlsnlY95zBoPQMIzHooUIsixQIBjaQ==} + /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.13.12: - resolution: {integrity: sha512-2tTv/BpYRIvuwHpp2M960nG7uvL+d78LFW/ikPItO+2GfK51CswIKSetSpDii+cjz8e9iSPgs+BU4o8nWICBwQ==} + /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.13.12: - resolution: {integrity: sha512-vTKKUt+yoz61U/BbrnmlG9XIjwpdIxmHB8DlPR0AAW6OdS+nBQBci6LUHU2q9WbBobMEIQxxDpKbkmOGYvxsow==} + /esbuild/0.14.27: + resolution: {integrity: sha512-MZQt5SywZS3hA9fXnMhR22dv0oPGh6QtjJRIYbgL1AeqAoQZE+Qn5ppGYQAoHv/vq827flj4tIJ79Mrdiwk46Q==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-arm64: 0.13.12 - esbuild-darwin-64: 0.13.12 - esbuild-darwin-arm64: 0.13.12 - esbuild-freebsd-64: 0.13.12 - esbuild-freebsd-arm64: 0.13.12 - esbuild-linux-32: 0.13.12 - esbuild-linux-64: 0.13.12 - esbuild-linux-arm: 0.13.12 - esbuild-linux-arm64: 0.13.12 - esbuild-linux-mips64le: 0.13.12 - esbuild-linux-ppc64le: 0.13.12 - esbuild-netbsd-64: 0.13.12 - esbuild-openbsd-64: 0.13.12 - esbuild-sunos-64: 0.13.12 - esbuild-windows-32: 0.13.12 - esbuild-windows-64: 0.13.12 - esbuild-windows-arm64: 0.13.12 + 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==} @@ -4294,32 +4695,32 @@ packages: source-map: 0.6.1 dev: true - /eslint-define-config/1.1.4: - resolution: {integrity: sha512-B1o0OTL32lPXwjjCpe+HtowrHqAlldInkU9PWVs+BsSi3E1GgjGIsiEz0g/1jHpBjP8zZMWh+DmdaB7gdLjUKQ==} - 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.3.0: + /eslint-plugin-es/3.0.1_eslint@8.11.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.3.0 + eslint: 8.11.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-node/11.1.0_eslint@8.3.0: + /eslint-plugin-node/11.1.0_eslint@8.11.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.3.0 - eslint-plugin-es: 3.0.1_eslint@8.3.0 + eslint: 8.11.0 + eslint-plugin-es: 3.0.1_eslint@8.11.0 eslint-utils: 2.1.0 - ignore: 5.1.9 + ignore: 5.2.0 minimatch: 3.0.4 resolve: 1.20.0 semver: 6.3.0 @@ -4333,8 +4734,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 @@ -4348,13 +4749,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.3.0: + /eslint-utils/3.0.0_eslint@8.11.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.3.0 + eslint: 8.11.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4368,29 +4769,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.3.0: - resolution: {integrity: sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==} + /eslint/8.11.0: + resolution: {integrity: sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.0.4 - '@humanwhocodes/config-array': 0.6.0 + '@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.2 + debug: 4.3.3 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.3.0 - eslint-visitor-keys: 3.1.0 - espree: 9.1.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.11.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 @@ -4398,7 +4798,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 @@ -4409,9 +4809,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 @@ -4420,13 +4818,13 @@ packages: - supports-color dev: true - /espree/9.1.0: - resolution: {integrity: sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==} + /espree/9.3.1: + resolution: {integrity: sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.6.0 - acorn-jsx: 5.3.2_acorn@8.6.0 - eslint-visitor-keys: 3.1.0 + acorn: 8.7.0 + acorn-jsx: 5.3.2_acorn@8.7.0 + eslint-visitor-keys: 3.3.0 dev: true /esprima/4.0.1: @@ -4485,19 +4883,6 @@ packages: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true - /execa/0.8.0: - resolution: {integrity: sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=} - engines: {node: '>=4'} - dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.5 - strip-eof: 1.0.0 - dev: true - /execa/5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -4509,7 +4894,7 @@ packages: merge-stream: 2.0.0 npm-run-path: 4.0.1 onetime: 5.1.2 - signal-exit: 3.0.5 + signal-exit: 3.0.6 strip-final-newline: 2.0.0 dev: true @@ -4518,28 +4903,26 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect/27.3.1: - resolution: {integrity: sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg==} + /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.2.5 - ansi-styles: 5.2.0 - jest-get-type: 27.3.1 - jest-matcher-utils: 27.3.1 - jest-message-util: 27.3.1 - jest-regex-util: 27.0.6 + '@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.1: - resolution: {integrity: sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==} + /express/4.17.2: + resolution: {integrity: sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==} engines: {node: '>= 0.10.0'} dependencies: accepts: 1.3.7 array-flatten: 1.1.1 - body-parser: 1.19.0 - content-disposition: 0.5.3 + body-parser: 1.19.1 + content-disposition: 0.5.4 content-type: 1.0.4 - cookie: 0.4.0 + cookie: 0.4.1 cookie-signature: 1.0.6 debug: 2.6.9 depd: 1.1.2 @@ -4554,12 +4937,12 @@ packages: parseurl: 1.3.3 path-to-regexp: 0.1.7 proxy-addr: 2.0.7 - qs: 6.7.0 + qs: 6.9.6 range-parser: 1.2.1 - safe-buffer: 5.1.2 - send: 0.17.1 - serve-static: 1.14.1 - setprototypeof: 1.1.1 + safe-buffer: 5.2.1 + send: 0.17.2 + serve-static: 1.14.2 + setprototypeof: 1.2.0 statuses: 1.5.0 type-is: 1.6.18 utils-merge: 1.0.1 @@ -4577,7 +4960,7 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true dependencies: - debug: 4.3.2 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -4590,6 +4973,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'} @@ -4599,6 +4992,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==} @@ -4674,16 +5068,16 @@ packages: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.2.2 + flatted: 3.2.4 rimraf: 3.0.2 dev: true - /flatted/3.2.2: - resolution: {integrity: sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==} + /flatted/3.2.4: + resolution: {integrity: sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==} dev: true - /follow-redirects/1.14.5: - resolution: {integrity: sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==} + /follow-redirects/1.14.6: + resolution: {integrity: sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -4697,7 +5091,7 @@ packages: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 - mime-types: 2.1.33 + mime-types: 2.1.34 dev: true /formdata-node/2.5.0: @@ -4712,8 +5106,8 @@ packages: engines: {node: '>= 0.6'} dev: true - /fraction.js/4.1.1: - resolution: {integrity: sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==} + /fraction.js/4.1.2: + resolution: {integrity: sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA==} dev: false /fresh/0.5.2: @@ -4728,12 +5122,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 @@ -4742,7 +5146,7 @@ packages: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} dependencies: - minipass: 3.1.5 + minipass: 3.1.6 dev: false /fs.realpath/1.0.0: @@ -4762,25 +5166,25 @@ packages: resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=} dev: true - /gauge/4.0.0: - resolution: {integrity: sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16} + /gauge/3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} dependencies: - ansi-regex: 5.0.1 aproba: 2.0.0 color-support: 1.1.3 console-control-strings: 1.1.0 has-unicode: 2.0.1 - signal-exit: 3.0.5 + object-assign: 4.1.1 + signal-exit: 3.0.6 string-width: 4.2.3 strip-ansi: 6.0.1 wide-align: 1.1.5 dev: false - /generic-names/2.0.1: - resolution: {integrity: sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==} + /generic-names/4.0.0: + resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==} dependencies: - loader-utils: 1.4.0 + loader-utils: 3.2.0 dev: true /gensync/1.0.0-beta.2: @@ -4816,11 +5220,6 @@ packages: yargs: 16.2.0 dev: true - /get-stream/3.0.0: - resolution: {integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=} - engines: {node: '>=4'} - dev: true - /get-stream/5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -4915,8 +5314,8 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.7 - ignore: 5.1.9 + fast-glob: 3.2.11 + ignore: 5.2.0 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -4929,6 +5328,10 @@ 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==} @@ -4940,7 +5343,7 @@ packages: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.14.3 + uglify-js: 3.15.0 dev: true /hard-rejection/2.1.0: @@ -4960,11 +5363,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - /has-flag/5.0.1: - resolution: {integrity: sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==} - engines: {node: '>=12'} - dev: true - /has-symbols/1.0.2: resolution: {integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==} engines: {node: '>= 0.4'} @@ -5002,7 +5400,7 @@ packages: /history/4.10.1: resolution: {integrity: sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.5 loose-envify: 1.4.0 resolve-pathname: 3.0.0 tiny-invariant: 1.2.0 @@ -5057,27 +5455,17 @@ packages: /http-cache-semantics/4.1.0: resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==} - - /http-errors/1.7.2: - resolution: {integrity: sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==} - engines: {node: '>= 0.6'} - dependencies: - depd: 1.1.2 - inherits: 2.0.3 - setprototypeof: 1.1.1 - statuses: 1.5.0 - toidentifier: 1.0.0 dev: true - /http-errors/1.7.3: - resolution: {integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==} + /http-errors/1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} engines: {node: '>= 0.6'} dependencies: depd: 1.1.2 inherits: 2.0.4 - setprototypeof: 1.1.1 + setprototypeof: 1.2.0 statuses: 1.5.0 - toidentifier: 1.0.0 + toidentifier: 1.0.1 dev: true /http-proxy-agent/4.0.1: @@ -5086,16 +5474,17 @@ packages: dependencies: '@tootallnate/once': 1.1.2 agent-base: 6.0.2 - debug: 4.3.2 + debug: 4.3.4 transitivePeerDependencies: - supports-color + dev: true - /http-proxy/1.18.1_debug@4.3.2: + /http-proxy/1.18.1_debug@4.3.4: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.14.5 + follow-redirects: 1.14.6 requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -5106,7 +5495,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.2 + debug: 4.3.3 transitivePeerDependencies: - supports-color @@ -5115,12 +5504,6 @@ packages: engines: {node: '>=10.17.0'} dev: true - /humanize-ms/1.2.1: - resolution: {integrity: sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=} - dependencies: - ms: 2.1.3 - dev: false - /iconv-lite/0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -5128,34 +5511,21 @@ packages: safer-buffer: 2.1.2 dev: true - /iconv-lite/0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: false - optional: true - /icss-replace-symbols/1.1.0: resolution: {integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=} dev: true - /icss-utils/5.1.0_postcss@8.3.11: + /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.3.11 - 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.1.9: - resolution: {integrity: sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==} + /ignore/5.2.0: + resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} dev: true @@ -5167,11 +5537,16 @@ packages: dev: true optional: true + /immutable/4.0.0: + resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==} + dev: true + /import-cwd/3.0.0: resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==} engines: {node: '>=8'} dependencies: import-from: 3.0.0 + dev: false /import-fresh/3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} @@ -5185,6 +5560,7 @@ packages: engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 + dev: false /import-lazy/4.0.0: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} @@ -5203,14 +5579,12 @@ packages: /imurmurhash/0.1.4: resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} engines: {node: '>=0.8.19'} + dev: true /indent-string/4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - - /infer-owner/1.0.4: - resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - dev: false + dev: true /inflight/1.0.6: resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} @@ -5218,10 +5592,6 @@ packages: once: 1.4.0 wrappy: 1.0.2 - /inherits/2.0.3: - resolution: {integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=} - dev: true - /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -5238,12 +5608,12 @@ packages: side-channel: 1.0.4 dev: true - /ioredis/4.28.0: - resolution: {integrity: sha512-I+zkeeWp3XFgPT2CtJKxvaF5FjGBGt4yGYljRjQecdQKteThuAsKqffeF1lgHVlYnuNeozRbPOCDNZ7tDWPeig==} + /ioredis/4.28.2: + resolution: {integrity: sha512-kQ+Iv7+c6HsDdPP2XUHaMv8DhnSeAeKEwMbaoqsXYbO+03dItXt7+5jGQDRyjdRUV2rFJbzg7P4Qt1iX2tqkOg==} engines: {node: '>=6'} dependencies: cluster-key-slot: 1.1.0 - debug: 4.3.2 + debug: 4.3.3 denque: 1.5.1 lodash.defaults: 4.2.0 lodash.flatten: 4.4.0 @@ -5259,6 +5629,7 @@ packages: /ip/1.1.5: resolution: {integrity: sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=} + dev: true /ipaddr.js/1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} @@ -5297,13 +5668,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-ci/1.2.1: - resolution: {integrity: sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==} - hasBin: true - dependencies: - ci-info: 1.6.0 - dev: true - /is-color-stop/1.1.0: resolution: {integrity: sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=} dependencies: @@ -5320,6 +5684,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'} @@ -5364,16 +5733,12 @@ packages: dependencies: is-extglob: 2.1.1 - /is-lambda/1.0.1: - resolution: {integrity: sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=} - dev: false - /is-module/1.0.0: resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=} dev: true - /is-negative-zero/2.0.1: - resolution: {integrity: sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==} + /is-negative-zero/2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} dev: true @@ -5409,7 +5774,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: @@ -5424,11 +5789,6 @@ packages: resolution: {integrity: sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==} dev: true - /is-stream/1.1.0: - resolution: {integrity: sha1-EtSj3U5o4Lec6428hBc66A2RykQ=} - engines: {node: '>=0.10.0'} - dev: true - /is-stream/2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -5459,8 +5819,8 @@ packages: resolution: {integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=} dev: true - /is-weakref/1.0.1: - resolution: {integrity: sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==} + /is-weakref/1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true @@ -5486,30 +5846,19 @@ packages: /isexe/2.0.0: resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} + dev: true /istanbul-lib-coverage/3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} 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.0 - '@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.0 - '@babel/parser': 7.16.2 + '@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 @@ -5530,50 +5879,50 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.2 + debug: 4.3.4 istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: - supports-color dev: true - /istanbul-reports/3.0.5: - resolution: {integrity: sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==} + /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.3.0: - resolution: {integrity: sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg==} + /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.2.5 + '@jest/types': 27.5.1 execa: 5.1.1 throat: 6.0.1 dev: true - /jest-circus/27.3.1: - resolution: {integrity: sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw==} + /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.3.1 - '@jest/test-result': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.3.1 + expect: 27.5.1 is-generator-fn: 2.1.0 - jest-each: 27.3.1 - jest-matcher-utils: 27.3.1 - jest-message-util: 27.3.1 - jest-runtime: 27.3.1 - jest-snapshot: 27.3.1 - jest-util: 27.3.1 - pretty-format: 27.3.1 + 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 @@ -5581,8 +5930,8 @@ packages: - supports-color dev: true - /jest-cli/27.3.1_ts-node@10.4.0: - resolution: {integrity: sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q==} + /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: @@ -5591,16 +5940,16 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.3.1_ts-node@10.4.0 - '@jest/test-result': 27.3.1 - '@jest/types': 27.2.5 + '@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.3.1_ts-node@10.4.0 - jest-util: 27.3.1 - jest-validate: 27.3.1 + 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: @@ -5611,8 +5960,8 @@ packages: - utf-8-validate dev: true - /jest-config/27.3.1_ts-node@10.4.0: - resolution: {integrity: sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg==} + /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' @@ -5620,28 +5969,31 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.16.0 - '@jest/test-sequencer': 27.3.1 - '@jest/types': 27.2.5 - babel-jest: 27.3.1_@babel+core@7.16.0 + '@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.2.0 + ci-info: 3.3.0 deepmerge: 4.2.2 glob: 7.2.0 - graceful-fs: 4.2.8 - jest-circus: 27.3.1 - jest-environment-jsdom: 27.3.1 - jest-environment-node: 27.3.1 - jest-get-type: 27.3.1 - jest-jasmine2: 27.3.1 - jest-regex-util: 27.0.6 - jest-resolve: 27.3.1 - jest-runner: 27.3.1 - jest-util: 27.3.1 - jest-validate: 27.3.1 + 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.3.1 - ts-node: 10.4.0_7dd5cf9af763e621261d5cc88a052be2 + parse-json: 5.2.0 + pretty-format: 27.5.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 transitivePeerDependencies: - bufferutil - canvas @@ -5649,44 +6001,44 @@ packages: - utf-8-validate dev: true - /jest-diff/27.3.1: - resolution: {integrity: sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ==} + /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.0.6 - jest-get-type: 27.3.1 - pretty-format: 27.3.1 + diff-sequences: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-docblock/27.0.6: - resolution: {integrity: sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==} + /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.3.1: - resolution: {integrity: sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ==} + /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.2.5 + '@jest/types': 27.5.1 chalk: 4.1.2 - jest-get-type: 27.3.1 - jest-util: 27.3.1 - pretty-format: 27.3.1 + jest-get-type: 27.5.1 + jest-util: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-environment-jsdom/27.3.1: - resolution: {integrity: sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg==} + /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.3.1 - '@jest/fake-timers': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 - jest-mock: 27.3.0 - jest-util: 27.3.1 + '@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 @@ -5695,111 +6047,110 @@ packages: - utf-8-validate dev: true - /jest-environment-node/27.3.1: - resolution: {integrity: sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw==} + /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.3.1 - '@jest/fake-timers': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 - jest-mock: 27.3.0 - jest-util: 27.3.1 + '@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.3.1: - resolution: {integrity: sha512-+Ilqi8hgHSAdhlQ3s12CAVNd8H96ZkQBfYoXmArzZnOfAtVAJEiPDBirjByEblvG/4LPJmkL+nBqPO3A1YJAEg==} + /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.3.1: - resolution: {integrity: sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg==} + /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.2.5 + '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.5 - '@types/node': 16.11.9 + '@types/node': 16.11.26 anymatch: 3.1.2 fb-watchman: 2.0.1 - graceful-fs: 4.2.8 - jest-regex-util: 27.0.6 - jest-serializer: 27.0.6 - jest-util: 27.3.1 - jest-worker: 27.3.1 + 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.3.1: - resolution: {integrity: sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg==} + /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.0 - '@jest/environment': 27.3.1 - '@jest/source-map': 27.0.6 - '@jest/test-result': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.3.1 + expect: 27.5.1 is-generator-fn: 2.1.0 - jest-each: 27.3.1 - jest-matcher-utils: 27.3.1 - jest-message-util: 27.3.1 - jest-runtime: 27.3.1 - jest-snapshot: 27.3.1 - jest-util: 27.3.1 - pretty-format: 27.3.1 + 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.3.1: - resolution: {integrity: sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg==} + /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.3.1 - pretty-format: 27.3.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-matcher-utils/27.3.1: - resolution: {integrity: sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w==} + /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.3.1 - jest-get-type: 27.3.1 - pretty-format: 27.3.1 + jest-diff: 27.5.1 + jest-get-type: 27.5.1 + pretty-format: 27.5.1 dev: true - /jest-message-util/27.3.1: - resolution: {integrity: sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg==} + /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.2.5 + '@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.3.1 + pretty-format: 27.5.1 slash: 3.0.0 stack-utils: 2.0.5 dev: true - /jest-mock/27.3.0: - resolution: {integrity: sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw==} + /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.2.5 - '@types/node': 16.11.9 + '@jest/types': 27.5.1 + '@types/node': 16.11.26 dev: true - /jest-pnp-resolver/1.2.2_jest-resolve@27.3.1: + /jest-pnp-resolver/1.2.2_jest-resolve@27.5.1: resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} engines: {node: '>=6'} peerDependencies: @@ -5808,66 +6159,65 @@ packages: jest-resolve: optional: true dependencies: - jest-resolve: 27.3.1 + jest-resolve: 27.5.1 dev: true - /jest-regex-util/27.0.6: - resolution: {integrity: sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==} + /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.3.1: - resolution: {integrity: sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A==} + /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.2.5 - jest-regex-util: 27.0.6 - jest-snapshot: 27.3.1 + '@jest/types': 27.5.1 + jest-regex-util: 27.5.1 + jest-snapshot: 27.5.1 transitivePeerDependencies: - supports-color dev: true - /jest-resolve/27.3.1: - resolution: {integrity: sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw==} + /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.2.5 + '@jest/types': 27.5.1 chalk: 4.1.2 - graceful-fs: 4.2.8 - jest-haste-map: 27.3.1 - jest-pnp-resolver: 1.2.2_jest-resolve@27.3.1 - jest-util: 27.3.1 - jest-validate: 27.3.1 - 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.3.1: - resolution: {integrity: sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww==} + /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.3.1 - '@jest/environment': 27.3.1 - '@jest/test-result': 27.3.1 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.0.6 - jest-environment-jsdom: 27.3.1 - jest-environment-node: 27.3.1 - jest-haste-map: 27.3.1 - jest-leak-detector: 27.3.1 - jest-message-util: 27.3.1 - jest-resolve: 27.3.1 - jest-runtime: 27.3.1 - jest-util: 27.3.1 - jest-worker: 27.3.1 - source-map-support: 0.5.20 + 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: - bufferutil @@ -5876,128 +6226,134 @@ packages: - utf-8-validate dev: true - /jest-runtime/27.3.1: - resolution: {integrity: sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg==} + /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.3.1 - '@jest/environment': 27.3.1 - '@jest/globals': 27.3.1 - '@jest/source-map': 27.0.6 - '@jest/test-result': 27.3.1 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 - '@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.3.1 - jest-message-util: 27.3.1 - jest-mock: 27.3.0 - jest-regex-util: 27.0.6 - jest-resolve: 27.3.1 - jest-snapshot: 27.3.1 - jest-util: 27.3.1 - jest-validate: 27.3.1 + 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.0.6: - resolution: {integrity: sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==} + /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.9 - graceful-fs: 4.2.8 + '@types/node': 16.11.26 + graceful-fs: 4.2.9 dev: true - /jest-snapshot/27.3.1: - resolution: {integrity: sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg==} + /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.0 - '@babel/generator': 7.16.0 - '@babel/parser': 7.16.2 - '@babel/plugin-syntax-typescript': 7.16.0_@babel+core@7.16.0 - '@babel/traverse': 7.16.0 - '@babel/types': 7.16.0 - '@jest/transform': 27.3.1 - '@jest/types': 27.2.5 + '@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.1 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.0 + '@types/prettier': 2.4.2 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.2 chalk: 4.1.2 - expect: 27.3.1 - graceful-fs: 4.2.8 - jest-diff: 27.3.1 - jest-get-type: 27.3.1 - jest-haste-map: 27.3.1 - jest-matcher-utils: 27.3.1 - jest-message-util: 27.3.1 - jest-resolve: 27.3.1 - jest-util: 27.3.1 + 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.3.1 + pretty-format: 27.5.1 semver: 7.3.5 transitivePeerDependencies: - supports-color dev: true - /jest-util/27.3.1: - resolution: {integrity: sha512-8fg+ifEH3GDryLQf/eKZck1DEs2YuVPBCMOaHQxVVLmQwl/CDhWzrvChTX4efLZxGrw+AA0mSXv78cyytBt/uw==} + /jest-util/27.4.2: + resolution: {integrity: sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@jest/types': 27.4.2 + '@types/node': 16.11.26 chalk: 4.1.2 - ci-info: 3.2.0 - graceful-fs: 4.2.8 + ci-info: 3.3.0 + graceful-fs: 4.2.9 + picomatch: 2.3.0 + dev: true + + /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.5.1 + '@types/node': 16.11.26 + chalk: 4.1.2 + ci-info: 3.3.0 + graceful-fs: 4.2.9 picomatch: 2.3.0 dev: true - /jest-validate/27.3.1: - resolution: {integrity: sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q==} + /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.2.5 - camelcase: 6.2.0 + '@jest/types': 27.5.1 + camelcase: 6.2.1 chalk: 4.1.2 - jest-get-type: 27.3.1 + jest-get-type: 27.5.1 leven: 3.1.0 - pretty-format: 27.3.1 + pretty-format: 27.5.1 dev: true - /jest-watcher/27.3.1: - resolution: {integrity: sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA==} + /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.3.1 - '@jest/types': 27.2.5 - '@types/node': 16.11.9 + '@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.3.1 + jest-util: 27.5.1 string-length: 4.0.2 dev: true - /jest-worker/27.3.1: - resolution: {integrity: sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==} + /jest-worker/27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.11.9 + '@types/node': 16.11.26 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest/27.3.1_ts-node@10.4.0: - resolution: {integrity: sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng==} + /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: @@ -6006,9 +6362,9 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.3.1_ts-node@10.4.0 + '@jest/core': 27.5.1_ts-node@10.4.0 import-local: 3.0.3 - jest-cli: 27.3.1_ts-node@10.4.0 + jest-cli: 27.5.1_ts-node@10.4.0 transitivePeerDependencies: - bufferutil - canvas @@ -6057,7 +6413,7 @@ packages: optional: true dependencies: abab: 2.0.5 - acorn: 8.6.0 + acorn: 8.7.0 acorn-globals: 6.0.0 cssom: 0.4.4 cssstyle: 2.3.0 @@ -6081,7 +6437,7 @@ packages: whatwg-encoding: 1.0.5 whatwg-mimetype: 2.3.0 whatwg-url: 8.7.0 - ws: 7.5.5 + ws: 7.5.6 xml-name-validator: 3.0.0 transitivePeerDependencies: - bufferutil @@ -6113,13 +6469,6 @@ packages: resolution: {integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=} dev: true - /json5/1.0.1: - resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} - hasBin: true - dependencies: - minimist: 1.2.5 - dev: true - /json5/2.2.0: resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==} engines: {node: '>=6'} @@ -6127,10 +6476,16 @@ packages: dependencies: minimist: 1.2.5 + /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: @@ -6138,7 +6493,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=} @@ -6166,20 +6521,20 @@ packages: engines: {node: '>=6'} dev: true - /kolorist/1.5.0: - resolution: {integrity: sha512-pPobydIHK884YBtkS/tWSZXpSAEpcMbilyun3KL37ot935qL2HNKm/tI45i/Rd+MxdIWEhm7/LmUQzWZYK+Qhg==} + /kolorist/1.5.1: + resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==} dev: false - /launch-editor-middleware/2.2.1: - resolution: {integrity: sha512-s0UO2/gEGiCgei3/2UN3SMuUj1phjQN8lcpnvgLSz26fAzNWPQ6Nf/kF5IFClnfU2ehp6LrmKdMU/beveO+2jg==} + /launch-editor-middleware/2.3.0: + resolution: {integrity: sha512-GJR64trLdFFwCoL9DMn/d1SZX0OzTDPixu4mcfWTShQ4tIqCHCGvlg9fOEYQXyBlrSMQwylsJfUWncheShfV2w==} dependencies: - launch-editor: 2.2.1 + launch-editor: 2.3.0 dev: true - /launch-editor/2.2.1: - resolution: {integrity: sha512-On+V7K2uZK6wK7x691ycSUbLD/FyKKelArkbaAMSSJU8JmqmhwN2+mnJDNINuJWSrh2L0kDk+ZQtbC/gOWUwLw==} + /launch-editor/2.3.0: + resolution: {integrity: sha512-3QrsCXejlWYHjBPFXTyGNhPj4rrQdB+5+r5r3wArpLH201aR+nWUgw/zKKkTmilCfY/sv6u8qo98pNvtg8LUTA==} dependencies: - chalk: 2.4.2 + picocolors: 1.0.0 shell-quote: 1.7.3 dev: true @@ -6193,7 +6548,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 @@ -6226,43 +6581,47 @@ packages: resolution: {integrity: sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==} engines: {node: '>=10'} - /lines-and-columns/1.1.6: - resolution: {integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=} + /lines-and-columns/1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /lint-staged/12.1.1: - resolution: {integrity: sha512-zOmteWgJwTfZXcj6vXSnjeDDI/fvkKI2KOqRdc84ZFc2ZMDKXEeiTITtaskE3HiNrHraFmYVBpnMSZHngLoogA==} + /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.2_supports-color@9.0.2 - enquirer: 2.3.6 + debug: 4.3.4_supports-color@9.2.1 execa: 5.1.1 lilconfig: 2.0.4 - listr2: 3.13.3_enquirer@2.3.6 + listr2: 4.0.2 micromatch: 4.0.4 normalize-path: 3.0.0 - object-inspect: 1.11.0 + object-inspect: 1.12.0 + pidtree: 0.5.0 string-argv: 0.3.1 - supports-color: 9.0.2 + supports-color: 9.2.1 yaml: 1.10.2 + transitivePeerDependencies: + - enquirer dev: true - /listr2/3.13.3_enquirer@2.3.6: - resolution: {integrity: sha512-VqAgN+XVfyaEjSaFewGPcDs5/3hBbWVaX1VgWv2f52MF7US45JuARlArULctiB44IIcEk3JF7GtoFCLqEdeuPA==} - 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: + enquirer: + optional: true dependencies: cli-truncate: 2.1.0 - clone: 2.1.2 colorette: 2.0.16 - enquirer: 2.3.6 log-update: 4.0.0 p-map: 4.0.0 - rxjs: 7.4.0 + rfdc: 1.3.0 + rxjs: 7.5.2 through: 2.3.8 wrap-ansi: 7.0.0 dev: true @@ -6271,19 +6630,15 @@ 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 dev: true - /loader-utils/1.4.0: - resolution: {integrity: sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==} - engines: {node: '>=4.0.0'} - dependencies: - big.js: 5.2.2 - emojis-list: 3.0.0 - json5: 1.0.1 + /loader-utils/3.2.0: + resolution: {integrity: sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==} + engines: {node: '>= 12.13.0'} dev: true /locate-path/2.0.0: @@ -6365,13 +6720,6 @@ packages: js-tokens: 4.0.0 dev: false - /lru-cache/4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true - /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -6383,6 +6731,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'} @@ -6398,36 +6752,11 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 - dev: true /make-error/1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true - /make-fetch-happen/9.1.0: - resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==} - engines: {node: '>= 10'} - dependencies: - agentkeepalive: 4.1.4 - cacache: 15.3.0 - http-cache-semantics: 4.1.0 - http-proxy-agent: 4.0.1 - https-proxy-agent: 5.0.0 - is-lambda: 1.0.1 - lru-cache: 6.0.0 - minipass: 3.1.5 - minipass-collect: 1.0.2 - minipass-fetch: 1.4.1 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - negotiator: 0.6.2 - promise-retry: 2.0.1 - socks-proxy-agent: 6.1.0 - ssri: 8.0.1 - transitivePeerDependencies: - - supports-color - dev: false - /makeerror/1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} dependencies: @@ -6500,8 +6829,8 @@ packages: engines: {node: '>= 0.6'} dev: true - /mime-db/1.50.0: - resolution: {integrity: sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==} + /mime-db/1.51.0: + resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==} engines: {node: '>= 0.6'} dev: true @@ -6512,23 +6841,18 @@ packages: mime-db: 1.46.0 dev: true - /mime-types/2.1.33: - resolution: {integrity: sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==} + /mime-types/2.1.34: + resolution: {integrity: sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==} engines: {node: '>= 0.6'} dependencies: - mime-db: 1.50.0 + mime-db: 1.51.0 dev: true /mime/1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true - dev: true - - /mime/2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true + requiresBuild: true dev: true /mime/3.0.0: @@ -6547,14 +6871,14 @@ packages: engines: {node: '>=4'} dev: true - /mini-create-react-context/0.4.1_prop-types@15.7.2+react@17.0.2: + /mini-create-react-context/0.4.1_prop-types@15.8.0+react@17.0.2: resolution: {integrity: sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==} peerDependencies: prop-types: ^15.0.0 react: ^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@babel/runtime': 7.16.0 - prop-types: 15.7.2 + '@babel/runtime': 7.16.5 + prop-types: 15.8.0 react: 17.0.2 tiny-warning: 1.0.3 dev: false @@ -6566,29 +6890,29 @@ packages: dependencies: '@iarna/toml': 2.2.5 '@mrbbot/node-fetch': 4.6.0 - '@peculiar/webcrypto': 1.2.0 + '@peculiar/webcrypto': 1.2.3 chokidar: 3.5.2 - cjstoesm: 1.1.4_typescript@4.4.4 + cjstoesm: 1.1.4_typescript@4.5.4 dotenv: 8.6.0 env-paths: 2.2.1 event-target-shim: 6.0.2 formdata-node: 2.5.0 html-rewriter-wasm: 0.3.2 http-cache-semantics: 4.1.0 - ioredis: 4.28.0 + ioredis: 4.28.2 kleur: 4.1.4 node-cron: 2.0.3 picomatch: 2.3.0 sanitize-filename: 1.6.3 selfsigned: 1.10.11 semiver: 1.1.0 - source-map-support: 0.5.20 + source-map-support: 0.5.21 tslib: 2.3.1 - typescript: 4.4.4 + typescript: 4.5.4 typeson: 6.1.0 typeson-registry: 1.0.0-alpha.39 web-streams-polyfill: 3.2.0 - ws: 7.5.5 + ws: 7.5.6 yargs: 16.2.0 youch: 2.2.2 transitivePeerDependencies: @@ -6614,47 +6938,8 @@ packages: /minimist/1.2.5: resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - /minipass-collect/1.0.2: - resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.1.5 - dev: false - - /minipass-fetch/1.4.1: - resolution: {integrity: sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==} - engines: {node: '>=8'} - dependencies: - minipass: 3.1.5 - minipass-sized: 1.0.3 - minizlib: 2.1.2 - optionalDependencies: - encoding: 0.1.13 - dev: false - - /minipass-flush/1.0.5: - resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.1.5 - dev: false - - /minipass-pipeline/1.2.4: - resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} - engines: {node: '>=8'} - dependencies: - minipass: 3.1.5 - dev: false - - /minipass-sized/1.0.3: - resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} - engines: {node: '>=8'} - dependencies: - minipass: 3.1.5 - dev: false - - /minipass/3.1.5: - resolution: {integrity: sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==} + /minipass/3.1.6: + resolution: {integrity: sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==} engines: {node: '>=8'} dependencies: yallist: 4.0.0 @@ -6664,7 +6949,7 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} dependencies: - minipass: 3.1.5 + minipass: 3.1.6 yallist: 4.0.0 dev: false @@ -6687,12 +6972,13 @@ packages: resolution: {integrity: sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==} dev: true - /ms/2.0.0: - resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} + /mrmime/1.0.0: + resolution: {integrity: sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==} + engines: {node: '>=10'} dev: true - /ms/2.1.1: - resolution: {integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==} + /ms/2.0.0: + resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} dev: true /ms/2.1.2: @@ -6700,6 +6986,7 @@ packages: /ms/2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: true /mustache/4.2.0: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} @@ -6711,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 @@ -6730,6 +7022,7 @@ packages: /negotiator/0.6.2: resolution: {integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==} engines: {node: '>= 0.6'} + dev: true /neo-async/2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -6743,6 +7036,10 @@ packages: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true + /node-addon-api/3.2.1: + resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + dev: false + /node-cron/2.0.3: resolution: {integrity: sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==} engines: {node: '>=6.0.0'} @@ -6763,41 +7060,21 @@ packages: engines: {node: 4.x || >=6.0.0} dependencies: whatwg-url: 5.0.0 - dev: true /node-forge/0.10.0: resolution: {integrity: sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==} engines: {node: '>= 6.0.0'} dev: true - /node-gyp/8.4.1: - resolution: {integrity: sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==} - engines: {node: '>= 10.12.0'} - hasBin: true - dependencies: - env-paths: 2.2.1 - glob: 7.2.0 - graceful-fs: 4.2.8 - make-fetch-happen: 9.1.0 - nopt: 5.0.0 - npmlog: 6.0.0 - rimraf: 3.0.2 - semver: 7.3.5 - tar: 6.1.11 - which: 2.0.2 - transitivePeerDependencies: - - supports-color - dev: false + /node-forge/1.3.0: + resolution: {integrity: sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==} + engines: {node: '>= 6.13.0'} + dev: true /node-int64/0.4.0: resolution: {integrity: sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=} dev: true - /node-modules-regexp/1.0.0: - resolution: {integrity: sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=} - engines: {node: '>=0.10.0'} - dev: true - /node-releases/2.0.1: resolution: {integrity: sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==} @@ -6813,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 @@ -6823,16 +7100,11 @@ 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 - /normalize-path/1.0.0: - resolution: {integrity: sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=} - engines: {node: '>=0.10.0'} - dev: true - /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -6862,13 +7134,6 @@ packages: string.prototype.padend: 3.1.3 dev: true - /npm-run-path/2.0.2: - resolution: {integrity: sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=} - engines: {node: '>=4'} - dependencies: - path-key: 2.0.1 - dev: true - /npm-run-path/4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -6876,13 +7141,12 @@ packages: path-key: 3.1.1 dev: true - /npmlog/6.0.0: - resolution: {integrity: sha512-03ppFRGlsyUaQFbGC2C8QWJN/C/K7PsfyD9aQdhVKAQIH4sQBc8WASqFBP7O+Ut4d2oo5LoeoboB3cGdBZSp6Q==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16} + /npmlog/5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} dependencies: are-we-there-yet: 2.0.0 console-control-strings: 1.1.0 - gauge: 4.0.0 + gauge: 3.0.2 set-blocking: 2.0.0 dev: false @@ -6899,8 +7163,8 @@ packages: engines: {node: '>= 6'} dev: false - /object-inspect/1.11.0: - resolution: {integrity: sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==} + /object-inspect/1.12.0: + resolution: {integrity: sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==} dev: true /object-keys/1.1.1: @@ -6985,11 +7249,6 @@ packages: word-wrap: 1.2.3 dev: true - /p-finally/1.0.0: - resolution: {integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=} - engines: {node: '>=4'} - dev: true - /p-limit/1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} @@ -7028,6 +7287,7 @@ packages: engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 + dev: true /p-try/1.0.0: resolution: {integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=} @@ -7039,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 @@ -7065,7 +7325,7 @@ packages: '@babel/code-frame': 7.16.0 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.1.6 + lines-and-columns: 1.2.4 /parse-node-version/1.0.1: resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} @@ -7140,8 +7400,8 @@ packages: is-reference: 1.2.1 dev: true - /phoenix/1.6.2: - resolution: {integrity: sha512-VjR27NETvrLSj8rI6DlpVAfo7pCYth/9+1OCoTof4LKEbq0141ze/tdxFHHZzVQSok3gqJUo2h/tqbxR3r8eyw==} + /phoenix/1.6.5: + resolution: {integrity: sha512-Krhx9IwB1Lzj+MqK5bz8CI2ULxjdO63CAjdAZni2lSa1LW3zNflMnsVeQLOu6jz8TDl9wtUKfx3vNSZDAB8jQw==} dev: false /picocolors/1.0.0: @@ -7157,6 +7417,12 @@ packages: 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'} @@ -7173,11 +7439,16 @@ packages: dev: true optional: true - /pirates/4.0.1: - resolution: {integrity: sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==} + /pirates/4.0.4: + resolution: {integrity: sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==} engines: {node: '>= 6'} + dev: true + + /pixelmatch/5.2.1: + resolution: {integrity: sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==} + hasBin: true dependencies: - node-modules-regexp: 1.0.0 + pngjs: 4.0.1 dev: true /pkg-dir/4.2.0: @@ -7187,38 +7458,40 @@ packages: find-up: 4.1.0 dev: true - /playwright-chromium/1.16.3: - resolution: {integrity: sha512-wXKjf9UYB2WtzC3C+3CCn9bNO6svRGY+F1vjm2UMxW/9wjyclLFkbcV3P6EztGQ0Ngrov9BQwvtmpjIZuKk8dQ==} + /playwright-chromium/1.20.0: + resolution: {integrity: sha512-5qyHaW2kFguX4eAne2MgS7AxZBfQ+hN2X0t5SD5mxOTAgwciEAhMNc06o9NxILnRcmF8QSXGg19OSb8VMUBLzg==} engines: {node: '>=12'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.16.3 + playwright-core: 1.20.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: true - /playwright-core/1.16.3: - resolution: {integrity: sha512-16hF27IvQheJee+DbhC941AUZLjbJgfZFWi9YPS4LKEk/lKFhZI+9TiFD0sboYqb9eaEWvul47uR5xxTVbE4iw==} + /playwright-core/1.20.0: + resolution: {integrity: sha512-d25IRcdooS278Cijlp8J8A5fLQZ+/aY3dKRJvgX5yjXA69N0huIUdnh3xXSgn+LsQ9DCNmB7Ngof3eY630jgdA==} engines: {node: '>=12'} hasBin: true dependencies: + colors: 1.4.0 commander: 8.3.0 - debug: 4.3.2 + 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.0 + socks-proxy-agent: 6.1.1 stack-utils: 2.0.5 - ws: 7.5.5 + ws: 8.4.2 yauzl: 2.10.0 yazl: 2.5.1 transitivePeerDependencies: @@ -7227,21 +7500,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.3.11: + /postcss-import/14.0.2_postcss@8.4.12: resolution: {integrity: sha512-BJ2pVK4KhUyMcqjuKs9RijV5tatNzNa73e/32aBVE/ejYPe37iH+6vAu9WvqUkB5OAYgLHzbSvzHnorybJCm9g==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.3.11 - postcss-value-parser: 4.1.0 + 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: @@ -7249,7 +7527,7 @@ packages: engines: {node: '>=10.0'} dependencies: camelcase-css: 2.0.1 - postcss: 8.3.11 + postcss: 8.4.5 dev: false /postcss-load-config/3.1.0_ts-node@10.4.0: @@ -7263,63 +7541,78 @@ packages: dependencies: import-cwd: 3.0.0 lilconfig: 2.0.4 - ts-node: 10.4.0_7dd5cf9af763e621261d5cc88a052be2 + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 + yaml: 1.10.2 + dev: false + + /postcss-load-config/3.1.3_ts-node@10.4.0: + resolution: {integrity: sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw==} + engines: {node: '>= 10'} + peerDependencies: + ts-node: '>=9.0.0' + peerDependenciesMeta: + ts-node: + optional: true + dependencies: + lilconfig: 2.0.4 + ts-node: 10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6 yaml: 1.10.2 + dev: true - /postcss-modules-extract-imports/3.0.0_postcss@8.3.11: + /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.3.11 + postcss: 8.4.12 dev: true - /postcss-modules-local-by-default/4.0.0_postcss@8.3.11: + /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.3.11 - postcss: 8.3.11 - postcss-selector-parser: 6.0.6 - postcss-value-parser: 4.1.0 + 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.3.11: + /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.3.11 - postcss-selector-parser: 6.0.6 + postcss: 8.4.12 + postcss-selector-parser: 6.0.8 dev: true - /postcss-modules-values/4.0.0_postcss@8.3.11: + /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.3.11 - postcss: 8.3.11 + icss-utils: 5.1.0_postcss@8.4.12 + postcss: 8.4.12 dev: true - /postcss-modules/4.2.2_postcss@8.3.11: - resolution: {integrity: sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==} + /postcss-modules/4.3.1_postcss@8.4.12: + resolution: {integrity: sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==} peerDependencies: postcss: ^8.0.0 dependencies: - generic-names: 2.0.1 + generic-names: 4.0.0 icss-replace-symbols: 1.1.0 lodash.camelcase: 4.3.0 - postcss: 8.3.11 - postcss-modules-extract-imports: 3.0.0_postcss@8.3.11 - postcss-modules-local-by-default: 4.0.0_postcss@8.3.11 - postcss-modules-scope: 3.0.0_postcss@8.3.11 - postcss-modules-values: 4.0.0_postcss@8.3.11 + 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 @@ -7329,10 +7622,10 @@ packages: peerDependencies: postcss: ^8.2.14 dependencies: - postcss-selector-parser: 6.0.6 + postcss-selector-parser: 6.0.8 - /postcss-selector-parser/6.0.6: - resolution: {integrity: sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==} + /postcss-selector-parser/6.0.8: + resolution: {integrity: sha512-D5PG53d209Z1Uhcc0qAZ5U3t5HagH3cxu+WLZ22jt3gLUpXM4eXXfiO14jiDWST3NNooX/E8wISfOhZ9eIjGTQ==} engines: {node: '>=4'} dependencies: cssesc: 3.0.0 @@ -7342,19 +7635,27 @@ packages: resolution: {integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==} dev: false - /postcss-value-parser/4.1.0: - resolution: {integrity: sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==} + /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.3.11: - resolution: {integrity: sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA==} + /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: 0.6.2 + source-map-js: 1.0.2 - /preact/10.5.15: - resolution: {integrity: sha512-5chK29n6QcJc3m1lVrKQSQ+V7K1Gb8HeQY6FViQ5AxCAEGu3DaHffWNDkC9+miZgsLvbvU9rxbV1qinGHMHzqA==} + /preact/10.6.4: + resolution: {integrity: sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==} dev: true /prelude-ls/1.1.2: @@ -7367,17 +7668,16 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier/2.4.1: - resolution: {integrity: sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==} + /prettier/2.6.0: + resolution: {integrity: sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==} engines: {node: '>=10.13.0'} hasBin: true dev: true - /pretty-format/27.3.1: - resolution: {integrity: sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA==} + /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.2.5 ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 17.0.2 @@ -7401,18 +7701,6 @@ packages: engines: {node: '>=0.4.0'} dev: true - /promise-inflight/1.0.1: - resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} - dev: false - - /promise-retry/2.0.1: - resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} - engines: {node: '>=10'} - dependencies: - err-code: 2.0.3 - retry: 0.12.0 - dev: false - /promise/7.3.1: resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} dependencies: @@ -7426,8 +7714,8 @@ packages: kleur: 3.0.3 sisteransi: 1.0.5 - /prop-types/15.7.2: - resolution: {integrity: sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==} + /prop-types/15.8.0: + resolution: {integrity: sha512-fDGekdaHh65eI3lMi5OnErU6a8Ighg2KjcjQxO7m8VHyWjcPyj5kiOgV1LQDOOOgVy3+5FgjXvdSSX7B8/5/4g==} dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 @@ -7437,9 +7725,9 @@ 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.5 + signal-exit: 3.0.6 dev: true /proxy-addr/2.0.7: @@ -7459,10 +7747,6 @@ packages: dev: true optional: true - /pseudomap/1.0.2: - resolution: {integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM=} - dev: true - /psl/1.8.0: resolution: {integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==} dev: true @@ -7565,19 +7849,23 @@ 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'} dev: true - /purgecss/4.0.3: - resolution: {integrity: sha512-PYOIn5ibRIP34PBU9zohUcCI09c7drPJJtTDAc0Q6QlRz2/CHQ8ywGLdE7ZhxU2VTqB7p5wkvj5Qcm05Rz3Jmw==} + /purgecss/4.1.3: + resolution: {integrity: sha512-99cKy4s+VZoXnPxaoM23e5ABcP851nC2y2GROkkjS8eJaJtlciGavd7iYAw2V84WeBqggZ12l8ef44G99HmTaw==} hasBin: true dependencies: - commander: 6.2.1 + commander: 8.3.0 glob: 7.2.0 - postcss: 8.3.11 - postcss-selector-parser: 6.0.6 + postcss: 8.4.5 + postcss-selector-parser: 6.0.8 dev: false /pvtsutils/1.2.1: @@ -7586,8 +7874,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 @@ -7596,11 +7884,17 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} dev: true - /qs/6.7.0: - resolution: {integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==} + /qs/6.9.6: + resolution: {integrity: sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==} 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==} @@ -7619,12 +7913,12 @@ packages: engines: {node: '>= 0.6'} dev: true - /raw-body/2.4.0: - resolution: {integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==} + /raw-body/2.4.2: + resolution: {integrity: sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==} engines: {node: '>= 0.8'} dependencies: - bytes: 3.1.0 - http-errors: 1.7.2 + bytes: 3.1.1 + http-errors: 1.8.1 iconv-lite: 0.4.24 unpipe: 1.0.0 dev: true @@ -7658,10 +7952,10 @@ packages: peerDependencies: react: '>=15' dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.5 history: 4.10.1 loose-envify: 1.4.0 - prop-types: 15.7.2 + prop-types: 15.8.0 react: 17.0.2 react-router: 5.2.1_react@17.0.2 tiny-invariant: 1.2.0 @@ -7673,13 +7967,13 @@ packages: peerDependencies: react: '>=15' dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.5 history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 - mini-create-react-context: 0.4.1_prop-types@15.7.2+react@17.0.2 + mini-create-react-context: 0.4.1_prop-types@15.8.0+react@17.0.2 path-to-regexp: 1.8.0 - prop-types: 15.7.2 + prop-types: 15.8.0 react: 17.0.2 react-is: 16.13.1 tiny-invariant: 1.2.0 @@ -7692,7 +7986,7 @@ packages: react: ^15.3.0 || ^16.0.0 || ^17.0.0 react-dom: ^15.3.0 || ^16.0.0 || ^17.0.0 dependencies: - prop-types: 15.7.2 + prop-types: 15.8.0 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 dev: false @@ -7858,7 +8152,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 @@ -7868,22 +8162,35 @@ 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'} dependencies: onetime: 5.1.2 - signal-exit: 3.0.5 + signal-exit: 3.0.6 dev: true /retry/0.12.0: resolution: {integrity: sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=} engines: {node: '>= 4'} + dev: true /reusify/1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + /rfdc/1.3.0: + resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} + dev: true + /rgb-regex/1.0.1: resolution: {integrity: sha1-wODWiC3w4jviVKR16O3UGRX+rrE=} dev: false @@ -7898,8 +8205,8 @@ packages: dependencies: glob: 7.2.0 - /rollup-plugin-license/2.6.0_rollup@2.59.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 @@ -7910,14 +8217,14 @@ packages: magic-string: 0.25.7 mkdirp: 1.0.4 moment: 2.29.1 - package-name-regex: 2.0.4 - rollup: 2.59.0 + package-name-regex: 2.0.5 + rollup: 2.62.0 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 dev: true - /rollup/2.59.0: - resolution: {integrity: sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==} + /rollup/2.62.0: + resolution: {integrity: sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -7928,10 +8235,10 @@ packages: dependencies: queue-microtask: 1.2.3 - /rxjs/7.4.0: - resolution: {integrity: sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==} + /rxjs/7.5.2: + resolution: {integrity: sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==} dependencies: - tslib: 2.1.0 + tslib: 2.3.1 dev: true /safe-buffer/5.1.2: @@ -7942,6 +8249,7 @@ packages: /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true /sanitize-filename/1.6.3: resolution: {integrity: sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==} @@ -7949,12 +8257,14 @@ packages: truncate-utf8-bytes: 1.0.2 dev: true - /sass/1.43.4: - resolution: {integrity: sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==} + /sass/1.45.1: + resolution: {integrity: sha512-pwPRiq29UR0o4X3fiQyCtrESldXvUQAAE0QmcJTpsI4kuHHcLzZ54M1oNBVIXybQv8QF2zfkpFcTxp8ta97dUA==} 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.2 dev: true /sax/1.2.4: @@ -8006,8 +8316,8 @@ packages: dependencies: lru-cache: 6.0.0 - /send/0.17.1: - resolution: {integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==} + /send/0.17.2: + resolution: {integrity: sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==} engines: {node: '>= 0.8.0'} dependencies: debug: 2.6.9 @@ -8017,30 +8327,30 @@ packages: escape-html: 1.0.3 etag: 1.8.1 fresh: 0.5.2 - http-errors: 1.7.3 + http-errors: 1.8.1 mime: 1.6.0 - ms: 2.1.1 + ms: 2.1.3 on-finished: 2.3.0 range-parser: 1.2.1 statuses: 1.5.0 dev: true - /serve-static/1.14.1: - resolution: {integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==} + /serve-static/1.14.2: + resolution: {integrity: sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==} engines: {node: '>= 0.8.0'} dependencies: encodeurl: 1.0.2 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.17.1 + send: 0.17.2 dev: true /set-blocking/2.0.0: resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} dev: false - /setprototypeof/1.1.1: - resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} + /setprototypeof/1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true /shebang-command/1.2.0: @@ -8076,11 +8386,17 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.1.1 - object-inspect: 1.11.0 + object-inspect: 1.12.0 dev: true - /signal-exit/3.0.5: - resolution: {integrity: sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==} + /signal-exit/3.0.6: + resolution: {integrity: sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==} + + /simple-git-hooks/2.7.0: + resolution: {integrity: sha512-nQe6ASMO9zn5/htIrU37xEIHGr9E6wikXelLbOeTcfsX2O++DHaVug7RSQoq+kO7DvZTH37WA5gW49hN9HTDmQ==} + hasBin: true + requiresBuild: true + dev: true /simple-swizzle/0.2.2: resolution: {integrity: sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=} @@ -8088,13 +8404,13 @@ packages: is-arrayish: 0.3.2 dev: false - /sirv/1.0.18: - resolution: {integrity: sha512-f2AOPogZmXgJ9Ma2M22ZEhc1dNtRIzcEkiflMFeVTRq+OViOZMvH1IPMVOwrKaxpSaHioBJiDR0SluRqGa7atA==} + /sirv/2.0.2: + resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} engines: {node: '>= 10'} dependencies: '@polka/url': 1.0.0-next.21 - mime: 2.6.0 - totalist: 1.1.0 + mrmime: 1.0.0 + totalist: 3.0.0 dev: true /sisteransi/1.0.5: @@ -8139,16 +8455,18 @@ packages: /smart-buffer/4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: true - /socks-proxy-agent/6.1.0: - resolution: {integrity: sha512-57e7lwCN4Tzt3mXz25VxOErJKXlPfXmkMLnk310v/jwW20jWRVcgsOit+xNkN3eIEdB47GwnfAEBLacZ/wVIKg==} + /socks-proxy-agent/6.1.1: + resolution: {integrity: sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==} engines: {node: '>= 10'} dependencies: agent-base: 6.0.2 - debug: 4.3.2 + debug: 4.3.4 socks: 2.6.1 transitivePeerDependencies: - supports-color + dev: true /socks/2.6.1: resolution: {integrity: sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==} @@ -8156,25 +8474,20 @@ packages: dependencies: ip: 1.1.5 smart-buffer: 4.2.0 + dev: true - /source-map-js/0.6.2: - resolution: {integrity: sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==} + /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 dev: true - /source-map-support/0.5.20: - resolution: {integrity: sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - /source-map-support/0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -8210,7 +8523,7 @@ packages: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.10 + spdx-license-ids: 3.0.11 dev: true /spdx-exceptions/2.3.0: @@ -8221,7 +8534,7 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.10 + spdx-license-ids: 3.0.11 dev: true /spdx-expression-validate/2.0.0: @@ -8230,8 +8543,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /spdx-license-ids/3.0.10: - resolution: {integrity: sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==} + /spdx-license-ids/3.0.11: + resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} dev: true /spdx-ranges/2.1.1: @@ -8262,13 +8575,6 @@ packages: resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=} dev: true - /ssri/8.0.1: - resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.1.5 - dev: false - /stack-trace/0.0.10: resolution: {integrity: sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=} dev: true @@ -8385,21 +8691,11 @@ packages: engines: {node: '>=8'} dev: true - /strip-eof/1.0.0: - resolution: {integrity: sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=} - engines: {node: '>=0.10.0'} - dev: true - /strip-final-newline/2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} dev: true - /strip-indent/2.0.0: - resolution: {integrity: sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=} - engines: {node: '>=4'} - dev: true - /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -8412,8 +8708,8 @@ packages: engines: {node: '>=8'} dev: true - /stylis/4.0.10: - resolution: {integrity: sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==} + /stylis/4.0.13: + resolution: {integrity: sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==} /stylus/0.55.0: resolution: {integrity: sha512-MuzIIVRSbc8XxHH7FjkvWqkIcr1BvoMZoR/oFuAJDlh7VSaNJzrB4uJ38GRQa+mWjLXODAMzeDe0xi9GYbGwnw==} @@ -8448,11 +8744,9 @@ packages: has-flag: 4.0.0 dev: true - /supports-color/9.0.2: - resolution: {integrity: sha512-ii6tc8ImGFrgMPYq7RVAMKkhPo9vk8uA+D3oKbJq/3Pk2YSMv1+9dUAesa9UxMbxBTvxwKTQffBahNVNxEvM8Q==} + /supports-color/9.2.1: + resolution: {integrity: sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ==} engines: {node: '>=12'} - dependencies: - has-flag: 5.0.1 dev: true /supports-hyperlinks/2.2.0: @@ -8463,6 +8757,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 @@ -8471,8 +8769,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: @@ -8485,15 +8783,15 @@ packages: dependencies: arg: 5.0.1 autoprefixer: 10.4.0 - bytes: 3.1.0 + bytes: 3.1.1 chalk: 4.1.2 chokidar: 3.5.2 - color: 4.0.1 + color: 4.1.0 cosmiconfig: 7.0.1 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 @@ -8508,10 +8806,10 @@ packages: postcss-js: 3.0.3 postcss-load-config: 3.1.0_ts-node@10.4.0 postcss-nested: 5.0.6 - postcss-selector-parser: 6.0.6 - postcss-value-parser: 4.1.0 + postcss-selector-parser: 6.0.8 + postcss-value-parser: 4.2.0 pretty-hrtime: 1.0.3 - purgecss: 4.0.3 + purgecss: 4.1.3 quick-lru: 5.1.1 reduce-css-calc: 2.1.8 resolve: 1.20.0 @@ -8529,15 +8827,15 @@ packages: postcss: ^8.0.9 dependencies: arg: 5.0.1 - bytes: 3.1.0 + bytes: 3.1.1 chalk: 4.1.2 chokidar: 3.5.2 - color: 4.0.1 + color: 4.1.0 cosmiconfig: 7.0.1 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 @@ -8552,10 +8850,10 @@ packages: postcss-js: 3.0.3 postcss-load-config: 3.1.0_ts-node@10.4.0 postcss-nested: 5.0.6 - postcss-selector-parser: 6.0.6 - postcss-value-parser: 4.1.0 + postcss-selector-parser: 6.0.8 + postcss-value-parser: 4.2.0 pretty-hrtime: 1.0.3 - purgecss: 4.0.3 + purgecss: 4.1.3 quick-lru: 5.1.1 reduce-css-calc: 2.1.8 resolve: 1.20.0 @@ -8570,7 +8868,7 @@ packages: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 3.1.5 + minipass: 3.1.6 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 @@ -8597,17 +8895,12 @@ packages: supports-hyperlinks: 2.2.0 dev: true - /terser/5.10.0_acorn@8.6.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.6.0 + acorn: 8.7.0 commander: 2.20.3 source-map: 0.7.3 source-map-support: 0.5.21 @@ -8689,8 +8982,8 @@ packages: dependencies: is-number: 7.0.0 - /toidentifier/1.0.0: - resolution: {integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==} + /toidentifier/1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} dev: true @@ -8698,8 +8991,8 @@ packages: resolution: {integrity: sha1-zCAOqyYT9BZtJ/+a/HylbUnfbrQ=} dev: true - /totalist/1.1.0: - resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==} + /totalist/3.0.0: + resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} engines: {node: '>=6'} dev: true @@ -8714,7 +9007,6 @@ packages: /tr46/0.0.3: resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} - dev: true /tr46/2.1.0: resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==} @@ -8734,14 +9026,15 @@ packages: utf8-byte-length: 1.0.4 dev: true - /ts-jest/27.0.7_b626c82449d36ccae0aa7169b15092e6: - resolution: {integrity: sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q==} + /ts-jest/27.1.3_4dfe14e0e8266437469ae0475a5c09ac: + resolution: {integrity: sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==} 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 jest: ^27.0.0 typescript: '>=3.8 <5.0' peerDependenciesMeta: @@ -8751,21 +9044,24 @@ packages: optional: true babel-jest: optional: true + esbuild: + optional: true dependencies: - '@types/jest': 27.0.3 + '@types/jest': 27.4.1 bs-logger: 0.2.6 + esbuild: 0.14.27 fast-json-stable-stringify: 2.1.0 - jest: 27.3.1_ts-node@10.4.0 - jest-util: 27.3.1 + jest: 27.5.1_ts-node@10.4.0 + jest-util: 27.4.2 json5: 2.2.0 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.5 - typescript: 4.4.4 + typescript: 4.5.4 yargs-parser: 20.2.9 dev: true - /ts-node/10.4.0_7dd5cf9af763e621261d5cc88a052be2: + /ts-node/10.4.0_44ef5af6cbbc24239b4e70b5c7b0d7a6: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -8784,20 +9080,20 @@ packages: '@tsconfig/node12': 1.0.9 '@tsconfig/node14': 1.0.1 '@tsconfig/node16': 1.0.2 - '@types/node': 16.11.9 - acorn: 8.5.0 + '@types/node': 16.11.26 + acorn: 8.7.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.4.4 + typescript: 4.5.4 yn: 3.1.1 dev: true - /tsconfck/1.1.1_typescript@4.4.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 @@ -8805,29 +9101,25 @@ packages: typescript: optional: true dependencies: - typescript: 4.4.4 + typescript: 4.5.4 dev: true /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib/2.1.0: - resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} - dev: true - /tslib/2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} dev: true - /tsutils/3.21.0_typescript@4.4.4: + /tsutils/3.21.0_typescript@4.5.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.4.4 + typescript: 4.5.4 dev: true /type-check/0.3.2: @@ -8879,7 +9171,7 @@ packages: engines: {node: '>= 0.6'} dependencies: media-typer: 0.3.0 - mime-types: 2.1.33 + mime-types: 2.1.34 dev: true /type/1.2.0: @@ -8896,8 +9188,8 @@ packages: is-typedarray: 1.0.0 dev: true - /typescript/4.4.4: - resolution: {integrity: sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==} + /typescript/4.5.4: + resolution: {integrity: sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -8920,8 +9212,8 @@ packages: resolution: {integrity: sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==} dev: true - /uglify-js/3.14.3: - resolution: {integrity: sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==} + /uglify-js/3.15.0: + resolution: {integrity: sha512-x+xdeDWq7FiORDvyIJ0q/waWd4PhjBNOm5dQUOq2AKC0IEjxOS66Ha9tctiVDGcRQuh69K7fgU5oRuTK4cysSg==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true @@ -8937,18 +9229,6 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unique-filename/1.1.1: - resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} - dependencies: - unique-slug: 2.0.2 - dev: false - - /unique-slug/2.0.2: - resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==} - dependencies: - imurmurhash: 0.1.4 - dev: false - /universalify/0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -8969,6 +9249,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 @@ -8995,7 +9282,7 @@ packages: resolution: {integrity: sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==} engines: {node: '>=10.12.0'} dependencies: - '@types/istanbul-lib-coverage': 2.0.3 + '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.8.0 source-map: 0.7.3 dev: true @@ -9007,8 +9294,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /validator/8.2.0: - resolution: {integrity: sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA==} + /validator/13.7.0: + resolution: {integrity: sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==} engines: {node: '>= 0.10'} dev: true @@ -9021,18 +9308,20 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/0.20.1: - resolution: {integrity: sha512-2SOlvRv0bvPrQ3RPtp7Fh/G1MKidrsgAgYz18OvV+nIJb9iiYo0GUVHKN3OYswMh+vH78NyTeA1Q5v4YJ/H9LQ==} - 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': 1.0.0-alpha.28 - '@docsearch/js': 1.0.0-alpha.28 + '@docsearch/css': 3.0.0-alpha.42 + '@docsearch/js': 3.0.0-alpha.42 '@vitejs/plugin-vue': link:packages/plugin-vue prismjs: 1.25.0 vite: link:packages/vite - vue: 3.2.21 + vue: 3.2.31 transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' - react - react-dom dev: true @@ -9042,41 +9331,40 @@ packages: engines: {node: '>=0.10.0'} dev: true - /vue-router/4.0.12_vue@3.2.23: + /vue-router/4.0.12_vue@3.2.26: resolution: {integrity: sha512-CPXvfqe+mZLB1kBWssssTiWg4EQERyqJZes7USiqfW9B5N2x+nHlnsM1D3b5CaJ6qgCvMmYJnz+G0iWjNCvXrg==} peerDependencies: vue: ^3.0.0 dependencies: - '@vue/devtools-api': 6.0.0-beta.20 - vue: 3.2.23 + '@vue/devtools-api': 6.0.0-beta.21.1 + vue: 3.2.26 dev: false - /vue/3.2.21: - resolution: {integrity: sha512-jpy7ckXdyclfRzqLjL4mtq81AkzQleE54KjZsJg/9OorNVurAxdlU5XpD49GpjKdnftuffKUvx2C5jDOrgc/zg==} + /vue/3.2.26: + resolution: {integrity: sha512-KD4lULmskL5cCsEkfhERVRIOEDrfEL9CwAsLYpzptOGjaGFNWo3BQ9g8MAb7RaIO71rmVOziZ/uEN/rHwcUIhg==} dependencies: - '@vue/compiler-dom': 3.2.21 - '@vue/compiler-sfc': 3.2.21 - '@vue/runtime-dom': 3.2.21 - '@vue/server-renderer': 3.2.21_vue@3.2.21 - '@vue/shared': 3.2.21 - dev: true + '@vue/compiler-dom': 3.2.26 + '@vue/compiler-sfc': 3.2.26 + '@vue/runtime-dom': 3.2.26 + '@vue/server-renderer': 3.2.26_vue@3.2.26 + '@vue/shared': 3.2.26 - /vue/3.2.23: - resolution: {integrity: sha512-MGp9JZC37lzGhwSu6c1tQxrQbXbw7XKFqtYh7SFwNrNK899FPxGAHwSHMZijMChTSC3uZrD2BGO/3EHOgMJ0cw==} + /vue/3.2.31: + resolution: {integrity: sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==} dependencies: - '@vue/compiler-dom': 3.2.23 - '@vue/compiler-sfc': 3.2.23 - '@vue/runtime-dom': 3.2.23 - '@vue/server-renderer': 3.2.23_vue@3.2.23 - '@vue/shared': 3.2.23 + '@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.23: + /vuex/4.0.2_vue@3.2.26: resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==} peerDependencies: vue: ^3.0.2 dependencies: - '@vue/devtools-api': 6.0.0-beta.20 - vue: 3.2.23 + '@vue/devtools-api': 6.0.0-beta.21.1 + vue: 3.2.26 dev: false /w3c-hr-time/1.0.2: @@ -9103,19 +9391,18 @@ packages: engines: {node: '>= 8'} dev: true - /webcrypto-core/1.3.0: - resolution: {integrity: sha512-/+Hz+uNM6T8FtizWRYMNdGTXxWaljLFzQ5GKU4WqCTZKpaki94YqDA39h/SpWxEZfgkVMZzrqqtPlfy2+BloQw==} + /webcrypto-core/1.4.0: + resolution: {integrity: sha512-HY3Zo0GcRIQUUDnlZ/shGjN+4f7LVMkdJZoGPog+oHhJsJdMz6iM8Za5xZ0t6qg7Fx/JXXz+oBv2J2p982hGTQ==} dependencies: - '@peculiar/asn1-schema': 2.0.38 + '@peculiar/asn1-schema': 2.0.44 '@peculiar/json-schema': 1.1.12 - asn1js: 2.1.1 + asn1js: 2.2.0 pvtsutils: 1.2.1 tslib: 2.3.1 dev: true /webidl-conversions/3.0.1: resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} - dev: true /webidl-conversions/5.0.0: resolution: {integrity: sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==} @@ -9142,7 +9429,6 @@ packages: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true /whatwg-url/8.7.0: resolution: {integrity: sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==} @@ -9176,6 +9462,7 @@ packages: hasBin: true dependencies: isexe: 2.0.0 + dev: true /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -9187,7 +9474,7 @@ packages: resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.6 '@babel/types': 7.16.0 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 @@ -9228,12 +9515,12 @@ packages: dependencies: imurmurhash: 0.1.4 is-typedarray: 1.0.0 - signal-exit: 3.0.5 + signal-exit: 3.0.6 typedarray-to-buffer: 3.1.5 dev: true - /ws/7.5.5: - resolution: {integrity: sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==} + /ws/7.5.6: + resolution: {integrity: sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==} engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 @@ -9245,8 +9532,21 @@ packages: optional: true dev: true - /ws/8.2.3: - resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==} + /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 @@ -9275,10 +9575,6 @@ packages: engines: {node: '>=10'} dev: true - /yallist/2.1.2: - resolution: {integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=} - dev: true - /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -9322,17 +9618,6 @@ packages: engines: {node: '>=6'} dev: true - /yorkie/2.0.0: - resolution: {integrity: sha512-jcKpkthap6x63MB4TxwCyuIGkV0oYP/YRyuQU5UO0Yz/E/ZAu+653/uov+phdmO54n6BcvFRyyt0RRrWdN2mpw==} - engines: {node: '>=4'} - requiresBuild: true - dependencies: - execa: 0.8.0 - is-ci: 1.2.1 - normalize-path: 1.0.0 - strip-indent: 2.0.0 - dev: true - /youch/2.2.2: resolution: {integrity: sha512-/FaCeG3GkuJwaMR34GHVg0l8jCbafZLHiFowSjqLlqhC6OMyf2tPJBu8UirF7/NI9X/R5ai4QfEKUCOxMAGxZQ==} dependencies: @@ -9342,13 +9627,14 @@ packages: stack-trace: 0.0.10 dev: true - /z-schema/3.18.4: - resolution: {integrity: sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==} + /z-schema/5.0.2: + resolution: {integrity: sha512-40TH47ukMHq5HrzkeVE40Ad7eIDKaRV2b+Qpi2prLc9X9eFJFzV7tMe5aH12e6avaSS/u5l653EQOv+J9PirPw==} + engines: {node: '>=8.0.0'} hasBin: true dependencies: lodash.get: 4.4.2 lodash.isequal: 4.5.0 - validator: 8.2.0 + validator: 13.7.0 optionalDependencies: commander: 2.20.3 dev: true 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/jestPerTestSetup.ts b/scripts/jestPerTestSetup.ts index d0863c5983dec7..150c02eed5b76c 100644 --- a/scripts/jestPerTestSetup.ts +++ b/scripts/jestPerTestSetup.ts @@ -2,18 +2,16 @@ import fs from 'fs-extra' import * as http from 'http' import { resolve, dirname } from 'path' import sirv from 'sirv' -import { - createServer, - build, +import type { ViteDevServer, - UserConfig, + InlineConfig, PluginOption, ResolvedConfig, Logger } from 'vite' -import { Page } from 'playwright-chromium' -// eslint-disable-next-line node/no-extraneous-import -import { RollupError, RollupWatcher, RollupWatcherEvent } from 'rollup' +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 @@ -46,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()) } @@ -90,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: { @@ -114,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 = @@ -135,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) @@ -170,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__) { @@ -195,7 +209,7 @@ function startStaticServer(): Promise { serve(req, res) } })) - let port = 5000 + let port = 4173 return new Promise((resolve, reject) => { const onError = (e: any) => { if (e.code === 'EADDRINUSE') { @@ -220,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) @@ -262,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/patchFileDeps.cjs b/scripts/patchFileDeps.ts similarity index 61% rename from scripts/patchFileDeps.cjs rename to scripts/patchFileDeps.ts index dbb42caadd38f4..0e90bbe8adece2 100644 --- a/scripts/patchFileDeps.cjs +++ b/scripts/patchFileDeps.ts @@ -3,19 +3,20 @@ // This script is called from postinstall hooks in playground packages that // uses the file: protocol, and copies the file: deps into node_modules. -const fs = require('fs-extra') -const path = require('path') +import { copySync, removeSync } from 'fs-extra' +import { join, resolve } from 'path' + const root = process.cwd() -const pkg = require(path.join(root, 'package.json')) +const pkg = require(join(root, 'package.json')) -let hasPatched -for (const [key, val] of Object.entries(pkg.dependencies)) { +let hasPatched: boolean = false +for (const [key, val] of Object.entries(pkg.dependencies)) { if (val.startsWith('file:')) { hasPatched = true - const src = path.resolve(root, val.slice('file:'.length)) - const dest = path.resolve(root, 'node_modules', key) - fs.removeSync(dest) - fs.copySync(src, dest, { + const src = resolve(root, val.slice('file:'.length)) + const dest = resolve(root, 'node_modules', key) + removeSync(dest) + copySync(src, dest, { dereference: true }) console.log(`patched ${val}`) @@ -26,5 +27,5 @@ if (hasPatched) { // remove node_modules/.ignored as pnpm will think our patched files are // installed by another package manager and move them into this directory. // On further installs it will error out if this directory is not empty. - fs.removeSync(path.resolve(root, 'node_modules', '.ignored')) + removeSync(resolve(root, 'node_modules', '.ignored')) } 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.cjs b/scripts/release.cjs deleted file mode 100644 index d7f258bc70d140..00000000000000 --- a/scripts/release.cjs +++ /dev/null @@ -1,219 +0,0 @@ -// @ts-check - -/** - * modified from https://github.com/vuejs/vue-next/blob/master/scripts/release.js - */ -const execa = require('execa') -const path = require('path') -const fs = require('fs') -const args = require('minimist')(process.argv.slice(2)) -const semver = require('semver') -const chalk = require('chalk') -const prompts = require('prompts') - -const pkgDir = process.cwd() -const pkgPath = path.resolve(pkgDir, 'package.json') -/** - * @type {{ name: string, version: string }} - */ -const pkg = require(pkgPath) -const pkgName = pkg.name.replace(/^@vitejs\//, '') -const currentVersion = pkg.version -/** - * @type {boolean} - */ -const isDryRun = args.dry -/** - * @type {boolean} - */ -const skipBuild = args.skipBuild - -/** - * @type {import('semver').ReleaseType[]} - */ -const versionIncrements = [ - 'patch', - 'minor', - 'major', - 'prepatch', - 'preminor', - 'premajor', - 'prerelease' -] - -/** - * @param {import('semver').ReleaseType} i - */ -const inc = (i) => semver.inc(currentVersion, i, 'beta') - -/** - * @param {string} bin - * @param {string[]} args - * @param {object} opts - */ -const run = (bin, args, opts = {}) => - execa(bin, args, { stdio: 'inherit', ...opts }) - -/** - * @param {string} bin - * @param {string[]} args - * @param {object} opts - */ -const dryRun = (bin, args, opts = {}) => - console.log(chalk.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts) - -const runIfNotDry = isDryRun ? dryRun : run - -/** - * @param {string} msg - */ -const step = (msg) => console.log(chalk.cyan(msg)) - -async function main() { - let targetVersion = args._[0] - - if (!targetVersion) { - // no explicit version, offer suggestions - /** - * @type {{ release: string }} - */ - const { release } = 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 })) - }) - - if (release === 'custom') { - /** - * @type {{ version: string }} - */ - const res = await prompts({ - type: 'text', - name: 'version', - message: 'Input custom version', - initial: currentVersion - }) - targetVersion = res.version - } else { - targetVersion = release.match(/\((.*)\)/)[1] - } - } - - if (!semver.valid(targetVersion)) { - throw new Error(`invalid target version: ${targetVersion}`) - } - - const tag = - pkgName === 'vite' ? `v${targetVersion}` : `${pkgName}@${targetVersion}` - - if (targetVersion.includes('beta') && !args.tag) { - /** - * @type {{ tagBeta: boolean }} - */ - const { tagBeta } = await prompts({ - type: 'confirm', - name: 'tagBeta', - message: `Publish under dist-tag "beta"?` - }) - - if (tagBeta) args.tag = 'beta' - } - - /** - * @type {{ yes: boolean }} - */ - const { yes } = await prompts({ - type: 'confirm', - name: 'yes', - message: `Releasing ${tag}. Confirm?` - }) - - if (!yes) { - return - } - - step('\nUpdating package version...') - updateVersion(targetVersion) - - step('\nBuilding package...') - if (!skipBuild && !isDryRun) { - await run('pnpm', ['run', 'build']) - } else { - console.log(`(skipped)`) - } - - step('\nGenerating changelog...') - await run('pnpm', ['run', 'changelog']) - - const { stdout } = await run('git', ['diff'], { stdio: 'pipe' }) - if (stdout) { - step('\nCommitting changes...') - await runIfNotDry('git', ['add', '-A']) - await runIfNotDry('git', ['commit', '-m', `release: ${tag}`]) - await runIfNotDry('git', ['tag', tag]) - } else { - console.log('No changes to commit.') - } - - 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.`) - } - - console.log() -} - -/** - * @param {string} version - */ -function updateVersion(version) { - const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) - pkg.version = version - fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n') -} - -/** - * @param {string} version - * @param {Function} runIfNotDry - */ -async function publishPackage(version, runIfNotDry) { - 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(chalk.green(`Successfully published ${pkgName}@${version}`)) - } catch (e) { - if (e.stderr.match(/previously published/)) { - console.log(chalk.red(`Skipping already published: ${pkgName}`)) - } else { - throw e - } - } -} - -main().catch((err) => { - console.error(err) -}) diff --git a/scripts/release.ts b/scripts/release.ts new file mode 100644 index 00000000000000..5c32c13b5cf5c8 --- /dev/null +++ b/scripts/release.ts @@ -0,0 +1,125 @@ +import prompts from 'prompts' +import semver from 'semver' +import colors from 'picocolors' +import { + args, + getPackageInfo, + getVersionChoices, + isDryRun, + logRecentCommits, + packages, + run, + runIfNotDry, + step, + updateTemplateVersions, + updateVersion +} from './releaseUtils' + +async function main(): Promise { + let targetVersion: string | undefined + + const { pkg }: { pkg: string } = await prompts({ + type: 'select', + name: 'pkg', + message: 'Select package', + choices: packages.map((i) => ({ value: i, title: i })) + }) + + if (!pkg) return + + await logRecentCommits(pkg) + + const { currentVersion, pkgName, pkgPath, pkgDir } = getPackageInfo(pkg) + + if (!targetVersion) { + const { release }: { release: string } = await prompts({ + type: 'select', + name: 'release', + message: 'Select release type', + choices: getVersionChoices(currentVersion) + }) + + if (release === 'custom') { + const res: { version: string } = await prompts({ + type: 'text', + name: 'version', + message: 'Input custom version', + initial: currentVersion + }) + targetVersion = res.version + } else { + targetVersion = release + } + } + + if (!semver.valid(targetVersion)) { + throw new Error(`invalid target version: ${targetVersion}`) + } + + const tag = + pkgName === 'vite' ? `v${targetVersion}` : `${pkgName}@${targetVersion}` + + if (targetVersion.includes('beta') && !args.tag) { + args.tag = 'beta' + } + + const { yes }: { yes: boolean } = await prompts({ + type: 'confirm', + name: 'yes', + message: `Releasing ${colors.yellow(tag)} Confirm?` + }) + + if (!yes) { + return + } + + step('\nUpdating package version...') + updateVersion(pkgPath, targetVersion) + if (pkgName === 'create-vite') updateTemplateVersions() + + step('\nGenerating 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) { + step('\nCommitting changes...') + await runIfNotDry('git', ['add', '-A']) + await runIfNotDry('git', ['commit', '-m', `release: ${tag}`]) + await runIfNotDry('git', ['tag', tag]) + } else { + console.log('No changes to commit.') + return + } + + 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() +} + +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"] + } +} diff --git a/scripts/verifyCommit.cjs b/scripts/verifyCommit.cjs deleted file mode 100644 index fbbff40796a8d7..00000000000000 --- a/scripts/verifyCommit.cjs +++ /dev/null @@ -1,25 +0,0 @@ -// Invoked on the commit-msg git hook by yorkie. - -const chalk = require('chalk') -const msgPath = process.env.GIT_PARAMS -const msg = require('fs').readFileSync(msgPath, 'utf-8').trim() - -const releaseRE = /^v\d/ -const commitRE = - /^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/ - -if (!releaseRE.test(msg) && !commitRE.test(msg)) { - console.log() - console.error( - ` ${chalk.bgRed.white(' ERROR ')} ${chalk.red( - `invalid commit message format.` - )}\n\n` + - chalk.red( - ` Proper commit message format is required for automated changelog generation. Examples:\n\n` - ) + - ` ${chalk.green(`feat: add 'comments' option`)}\n` + - ` ${chalk.green(`fix: handle events on blur (close #28)`)}\n\n` + - chalk.red(` See .github/commit-convention.md for more details.\n`) - ) - process.exit(1) -} diff --git a/scripts/verifyCommit.ts b/scripts/verifyCommit.ts new file mode 100644 index 00000000000000..e433e3aa1aa3e5 --- /dev/null +++ b/scripts/verifyCommit.ts @@ -0,0 +1,28 @@ +// Invoked on the commit-msg git hook by simple-git-hooks. + +import colors from 'picocolors' +import { readFileSync } from 'fs' + +// get $1 from commit-msg script +const msgPath = process.argv[2] +const msg = readFileSync(msgPath, 'utf-8').trim() + +const releaseRE = /^v\d/ +const commitRE = + /^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/ + +if (!releaseRE.test(msg) && !commitRE.test(msg)) { + console.log() + console.error( + ` ${colors.bgRed(colors.white(' ERROR '))} ${colors.red( + `invalid commit message format.` + )}\n\n` + + colors.red( + ` Proper commit message format is required for automated changelog generation. Examples:\n\n` + ) + + ` ${colors.green(`feat: add 'comments' option`)}\n` + + ` ${colors.green(`fix: handle events on blur (close #28)`)}\n\n` + + colors.red(` See .github/commit-convention.md for more details.\n`) + ) + process.exit(1) +}