diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 04ecf049ca9..4296d0f39b6 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,3 +1,5 @@ +/* eslint-disable no-restricted-globals */ + const DOMGlobals = ['window', 'document'] const NodeGlobals = ['module', 'require'] @@ -9,12 +11,6 @@ module.exports = { plugins: ['jest'], rules: { 'no-debugger': 'error', - 'no-unused-vars': [ - 'error', - // we are only using this rule to check for unused arguments since TS - // catches unused variables but not args. - { varsIgnorePattern: '.*', args: 'none' } - ], // most of the codebase are expected to be env agnostic 'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals], @@ -72,6 +68,14 @@ module.exports = { 'no-restricted-syntax': 'off' } }, + // JavaScript files + { + files: ['*.js', '*.cjs'], + rules: { + // We only do `no-unused-vars` checks for js files, TS files are checked by TypeScript itself. + 'no-unused-vars': ['error', { vars: 'all', args: 'none' }] + } + }, // Node scripts { files: ['scripts/**', '*.{js,ts}', 'packages/**/index.js'], diff --git a/.github/contributing.md b/.github/contributing.md index 035cfb77a81..afdae671193 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -17,7 +17,11 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before ## Pull Request Guidelines -- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch. +- Vue core has two primary work branches: `main` and `minor`. + + - If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch. + + - Otherwise, it should be submitted against the `main` branch. - [Make sure to tick the "Allow edits from maintainers" box](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This allows us to directly make minor edits / refactors and saves a lot of time. @@ -57,7 +61,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before ## Development Setup -You will need [Node.js](https://nodejs.org) **version 16+**, and [PNPM](https://pnpm.io) **version 8+**. +You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**. We also recommend installing [ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier. @@ -181,7 +185,7 @@ Shortcut for starting the SFC Playground in local dev mode. This provides the fa ### `nr dev-esm` -Builds and watches `vue/dist/vue-runtime.esm-bundler.js` with all deps inlined using esbuild. This is useful when debugging the ESM build in a reproductions that require real build setups: link `packages/vue` globally, then link it into the project being debugged. +Builds and watches `vue/dist/vue-runtime.esm-bundler.js` with all deps inlined using esbuild. This is useful when debugging the ESM build in a reproduction that requires real build setups: link `packages/vue` globally, then link it into the project being debugged. ### `nr dev-compiler` diff --git a/.github/git-branch-workflow.excalidraw b/.github/git-branch-workflow.excalidraw new file mode 100644 index 00000000000..dd9127938da --- /dev/null +++ b/.github/git-branch-workflow.excalidraw @@ -0,0 +1,1746 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "arrow", + "version": 799, + "versionNonce": 529220601, + "isDeleted": false, + "id": "Gao2krnDddLMCj468JSWD", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 860.0129225738813, + "y": 663.9911710635109, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 133.75296854079784, + "height": 149.58016791936518, + "seed": 1415631543, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "hDC6an14QljktaZCUhcPF", + "focus": 0.09950793234484598, + "gap": 1.2432497743127229 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 25.209039386719837, + 85.96948921803892 + ], + [ + 133.75296854079784, + 149.58016791936518 + ] + ] + }, + { + "type": "arrow", + "version": 563, + "versionNonce": 290881303, + "isDeleted": false, + "id": "N3wyyEU7TQ8BsOQgxCmlR", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 292.88008929085873, + "y": 660.7027503334302, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 936.9972134376155, + "height": 1.3184243543457796, + "seed": 534235417, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 936.9972134376155, + -1.3184243543457796 + ] + ] + }, + { + "type": "arrow", + "version": 302, + "versionNonce": 883286489, + "isDeleted": false, + "id": "nRDWQs5nQa37yzCWTBiXC", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 293.1231624544633, + "y": 820.6017661012943, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 790.7091601354882, + "height": 0.35284814071621895, + "seed": 515907671, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "ggogfJT7E_bbfEog7Hjnp", + "focus": -0.14000162237652433, + "gap": 1 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 790.7091601354882, + -0.35284814071621895 + ] + ] + }, + { + "type": "text", + "version": 36, + "versionNonce": 981763127, + "isDeleted": false, + "id": "ZPdMAnEUq5Jgj1W07Zqiw", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 292.0450153578305, + "y": 619.3959946602608, + "strokeColor": "#1e1e1e", + "backgroundColor": "#b2f2bb", + "width": 46.875, + "height": 24, + "seed": 1311694519, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "main", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "main", + "lineHeight": 1.2, + "baseline": 20 + }, + { + "type": "text", + "version": 94, + "versionNonce": 18759353, + "isDeleted": false, + "id": "g9IkEIfu4vA8Qkwtw01Hi", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 290.88990199912035, + "y": 779.1760596323645, + "strokeColor": "#1e1e1e", + "backgroundColor": "#b2f2bb", + "width": 58.59375, + "height": 24, + "seed": 329886135, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "minor", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "minor", + "lineHeight": 1.2, + "baseline": 20 + }, + { + "type": "ellipse", + "version": 50, + "versionNonce": 1442112855, + "isDeleted": false, + "id": "RrdEQ7hwgGGDPhzDnuZj1", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 361.55609907891005, + "y": 649.8742329483416, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 2077639991, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 79, + "versionNonce": 1547173785, + "isDeleted": false, + "id": "Zmp49FKWxGSzKnVKomjQc", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 427.3015090315691, + "y": 650.256485100784, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 372652121, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 76, + "versionNonce": 586949239, + "isDeleted": false, + "id": "UOl9nLBksM7RPdH9mzjJa", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 490.9435520120701, + "y": 651.2601420343765, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 508667545, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 120, + "versionNonce": 874947705, + "isDeleted": false, + "id": "oMC55V0VO_hOXoZ1se8Kl", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 555.4481126698772, + "y": 650.7975189165487, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1914963513, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 66, + "versionNonce": 39762839, + "isDeleted": false, + "id": "DZY5DC5uVP7-U5c3ngIZ4", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 622.5167031502219, + "y": 649.3743647489936, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 165914713, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 107, + "versionNonce": 1689103705, + "isDeleted": false, + "id": "Vsw6oIiTM3fQypkiCic3f", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 690.330195260967, + "y": 650.6681412649529, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 280044345, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "lwYvAs-7FTjcwxKjcx0KV", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 148, + "versionNonce": 1986194201, + "isDeleted": false, + "id": "D14w9erv_2l53mINe2nSt", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 361.004283792179, + "y": 810.2809579853473, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1203257975, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 179, + "versionNonce": 1172811511, + "isDeleted": false, + "id": "6WO8xOpG0rf673b_bT0m7", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 426.74969374483805, + "y": 810.6632101377896, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 2056706967, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "mE8Mu0qKfFaWPCC5vmF_f", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 173, + "versionNonce": 820518905, + "isDeleted": false, + "id": "VB9U8oH-78hf530hIb_mG", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 490.391736725339, + "y": 811.6668670713822, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1149587639, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 218, + "versionNonce": 1227143191, + "isDeleted": false, + "id": "Bxv1hcS0VmxUwI0JLFH97", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 554.8962973831461, + "y": 811.2042439535543, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1864901079, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "M14Q0Uo1DBy2Ss2SOFSgW", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 167, + "versionNonce": 1387509977, + "isDeleted": false, + "id": "4v23gkfhy-hzk18YdkfLz", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 621.9648878634908, + "y": 809.7810897859994, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 462671607, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "vEF1cIIYYWKm84KLKqEz3", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 200, + "versionNonce": 774085943, + "isDeleted": false, + "id": "AtEf7o4WZQn4Zxq8EN5fH", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 689.7783799742359, + "y": 811.0748663019584, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1414322199, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "3heKY3vfe3-6ni4dX7Uqo", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 199, + "versionNonce": 1834563001, + "isDeleted": false, + "id": "ugDby5sBv4NKdNt8eC1sg", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 762.6179978227377, + "y": 810.2986003923828, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1598537015, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 211, + "versionNonce": 407428695, + "isDeleted": false, + "id": "Fwe4F2sB_0jptOZGYsusj", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 837.1081608628116, + "y": 810.859236882632, + "strokeColor": "#f08c00", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1340669527, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "M14Q0Uo1DBy2Ss2SOFSgW", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 57, + "versionNonce": 335287961, + "isDeleted": false, + "id": "mE8Mu0qKfFaWPCC5vmF_f", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 437.60867586595543, + "y": 830.4227236701945, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 0.5232394659406623, + "height": 33.25787987764363, + "seed": 482155929, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": { + "elementId": "6WO8xOpG0rf673b_bT0m7", + "focus": -0.1727591064041787, + "gap": 1.046152088903881 + }, + "endBinding": { + "elementId": "JALHBtowuh3_a86loej2x", + "focus": 0.015156451076917701, + "gap": 15.586906139714472 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.5232394659406623, + 33.25787987764363 + ] + ] + }, + { + "type": "arrow", + "version": 59, + "versionNonce": 1248394103, + "isDeleted": false, + "id": "AI-_jSAuzesxTqwRvpk0s", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 501.2878833373983, + "y": 652.3088851192829, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffc9c9", + "width": 0, + "height": 40.40111211199792, + "seed": 1052632343, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0, + -40.40111211199792 + ] + ] + }, + { + "type": "arrow", + "version": 261, + "versionNonce": 693099385, + "isDeleted": false, + "id": "lwYvAs-7FTjcwxKjcx0KV", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 786.7392304423553, + "y": 649.6016935672433, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffc9c9", + "width": 0, + "height": 40.40111211199792, + "seed": 1233043511, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": { + "elementId": "s0PKxsWTJSDbQeEl_WI-C", + "focus": 0.016372633695398757, + "gap": 1 + }, + "endBinding": { + "elementId": "9ia1Uwc5X0fRw5iaahmcT", + "focus": 0.025318405829282714, + "gap": 14.862364635333904 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 0, + -40.40111211199792 + ] + ] + }, + { + "type": "text", + "version": 121, + "versionNonce": 952661143, + "isDeleted": false, + "id": "qWW8uxDIcV3Bkj28uvRLr", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 454.32425448306674, + "y": 537.8854189061962, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 93.75, + "height": 57.599999999999994, + "seed": 809847769, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "patch\nrelease\ne.g. 3.3.8", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "patch\nrelease\ne.g. 3.3.8", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "text", + "version": 257, + "versionNonce": 1838679129, + "isDeleted": false, + "id": "9ia1Uwc5X0fRw5iaahmcT", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 741.0510307156029, + "y": 536.7382168199114, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 93.75, + "height": 57.599999999999994, + "seed": 213765431, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "lwYvAs-7FTjcwxKjcx0KV", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "patch\nrelease\ne.g. 3.3.9", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "patch\nrelease\ne.g. 3.3.9", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "text", + "version": 222, + "versionNonce": 1528547767, + "isDeleted": false, + "id": "JALHBtowuh3_a86loej2x", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 350.7264132088442, + "y": 879.2675096875524, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 168.75, + "height": 57.599999999999994, + "seed": 41180921, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "mE8Mu0qKfFaWPCC5vmF_f", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "pre minor\nrelease\ne.g. 3.4.0-alpha.1", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "pre minor\nrelease\ne.g. 3.4.0-alpha.1", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "arrow", + "version": 345, + "versionNonce": 1286082873, + "isDeleted": false, + "id": "3heKY3vfe3-6ni4dX7Uqo", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 699.5281288163526, + "y": 831.0290882554708, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 0.5502191262773977, + "height": 33.25154356841597, + "seed": 627698359, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613071, + "link": null, + "locked": false, + "startBinding": { + "elementId": "AtEf7o4WZQn4Zxq8EN5fH", + "focus": -0.05612657009295625, + "gap": 1.1451322685712295 + }, + "endBinding": { + "elementId": "9t6qH-tAxVUexkHHi2pd2", + "focus": 0.015156451076917755, + "gap": 15.586906139714358 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.5502191262773977, + 33.25154356841597 + ] + ] + }, + { + "type": "text", + "version": 365, + "versionNonce": 1049066199, + "isDeleted": false, + "id": "9t6qH-tAxVUexkHHi2pd2", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 617.3409291322284, + "y": 879.8675379636011, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 159.375, + "height": 57.599999999999994, + "seed": 1013545943, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "3heKY3vfe3-6ni4dX7Uqo", + "type": "arrow" + } + ], + "updated": 1698927613071, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "pre minor\nrelease\ne.g. 3.4.0-beta.1", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "pre minor\nrelease\ne.g. 3.4.0-beta.1", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "arrow", + "version": 788, + "versionNonce": 1810072089, + "isDeleted": false, + "id": "vEF1cIIYYWKm84KLKqEz3", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 630.3597332113623, + "y": 667.2735668205443, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 2.258228100583324, + "height": 140.75112333166828, + "seed": 2091697367, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "4v23gkfhy-hzk18YdkfLz", + "focus": 0.13930391883256707, + "gap": 1.8256906627890626 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.8426514015177418, + 69.09942755691065 + ], + [ + 2.258228100583324, + 140.75112333166828 + ] + ] + }, + { + "type": "arrow", + "version": 687, + "versionNonce": 2017318649, + "isDeleted": false, + "id": "M14Q0Uo1DBy2Ss2SOFSgW", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 370.5976915356099, + "y": 667.5155013947814, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 1.5329291446666957, + "height": 145.39303664953377, + "seed": 361678233, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.34892760581925586, + 83.56228079137543 + ], + [ + 1.1840015388474399, + 145.39303664953377 + ] + ] + }, + { + "type": "text", + "version": 537, + "versionNonce": 342487319, + "isDeleted": false, + "id": "CHAOOJMz7tNaG1VsG_uzT", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 384.81046417498214, + "y": 725.4677076298137, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 131.25, + "height": 57.599999999999994, + "seed": 1656007289, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "merge main\ninto minor\nbefore release", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "merge main\ninto minor\nbefore release", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "ellipse", + "version": 202, + "versionNonce": 876253145, + "isDeleted": false, + "id": "hDC6an14QljktaZCUhcPF", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 993.0386151813434, + "y": 810.335845473903, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1433430105, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "Gao2krnDddLMCj468JSWD", + "type": "arrow" + } + ], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "arrow", + "version": 1525, + "versionNonce": 777631287, + "isDeleted": false, + "id": "ces8IwHCpQlTnELpjFDIn", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1092.5386800881793, + "y": 827.5114796878765, + "strokeColor": "#f08c00", + "backgroundColor": "#ffc9c9", + "width": 0.3315362017829102, + "height": 49.45191086419197, + "seed": 225867737, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "8rWUxp-jRNGrGRmhHHfm4", + "focus": -0.2047594653982401, + "gap": 10.392197401393389 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.3315362017829102, + 49.45191086419197 + ] + ] + }, + { + "type": "text", + "version": 894, + "versionNonce": 1173171385, + "isDeleted": false, + "id": "8rWUxp-jRNGrGRmhHHfm4", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1047.251646167428, + "y": 887.3555879534618, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 112.5, + "height": 57.599999999999994, + "seed": 1600918713, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "ces8IwHCpQlTnELpjFDIn", + "type": "arrow" + } + ], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "stable minor\nrelease\ne.g. 3.4.0", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "stable minor\nrelease\ne.g. 3.4.0", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "ellipse", + "version": 201, + "versionNonce": 78435447, + "isDeleted": false, + "id": "3RHuRn_evSK0YUe02B4MY", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 909.9742423218671, + "y": 810.4142561718397, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 1199705047, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 371, + "versionNonce": 2093872087, + "isDeleted": false, + "id": "9h2Cu__8owLUgUGjGcWDe", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 848.4414471158692, + "y": 650.826922928275, + "strokeColor": "#1e1e1e", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 603147257, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 361, + "versionNonce": 1981618457, + "isDeleted": false, + "id": "s0PKxsWTJSDbQeEl_WI-C", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 777.1778842958995, + "y": 650.2466837635417, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 326722777, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "lwYvAs-7FTjcwxKjcx0KV", + "type": "arrow" + } + ], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 871, + "versionNonce": 1528156247, + "isDeleted": false, + "id": "3JAdSa7kqqSDSom5ZFDoE", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 904.3603861670398, + "y": 707.2413714353705, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 140.625, + "height": 57.599999999999994, + "seed": 1011049431, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "final merge\nmain into minor\nbefore release", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "final merge\nmain into minor\nbefore release", + "lineHeight": 1.2, + "baseline": 53 + }, + { + "type": "arrow", + "version": 591, + "versionNonce": 1714373785, + "isDeleted": false, + "id": "7kFBLq2Iczmj0lVnVk8Ad", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 1100.7141458557703, + "y": 814.2034531496416, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "width": 127.38209933342364, + "height": 144.5383600420214, + "seed": 25829591, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "Y7VXnuc9QEz2N2l9i0xrc", + "focus": 0.3932764551319699, + "gap": 5.928572790502042 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 88.94909573964219, + -43.721805169626464 + ], + [ + 127.38209933342364, + -144.5383600420214 + ] + ] + }, + { + "type": "text", + "version": 1208, + "versionNonce": 1254600055, + "isDeleted": false, + "id": "gwFWlPLabuYhxCOweJjWz", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1223.0464288187204, + "y": 725.1565933898091, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 150, + "height": 38.4, + "seed": 51102743, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "main merge minor\n(fast forward)", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "main merge minor\n(fast forward)", + "lineHeight": 1.2, + "baseline": 34 + }, + { + "type": "ellipse", + "version": 597, + "versionNonce": 1760381305, + "isDeleted": false, + "id": "Y7VXnuc9QEz2N2l9i0xrc", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1227.4473966637659, + "y": 647.6689320688656, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 412038615, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "7kFBLq2Iczmj0lVnVk8Ad", + "type": "arrow" + } + ], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 547, + "versionNonce": 1585505943, + "isDeleted": false, + "id": "ggogfJT7E_bbfEog7Hjnp", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 1083.7911569735343, + "y": 809.5203742153592, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 18.814646969963974, + "height": 18.814646969963974, + "seed": 741463161, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "nRDWQs5nQa37yzCWTBiXC", + "type": "arrow" + } + ], + "updated": 1698927613072, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 229, + "versionNonce": 1935127129, + "isDeleted": false, + "id": "eU-EgpwDD42CLYUEIDLaD", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 305.8405004265049, + "y": 389.31989430571576, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 581.25, + "height": 19.2, + "seed": 1086231577, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "- merge feature PRs into, and release minors from minor branch", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- merge feature PRs into, and release minors from minor branch", + "lineHeight": 1.2, + "baseline": 15 + }, + { + "type": "text", + "version": 397, + "versionNonce": 116088535, + "isDeleted": false, + "id": "Kt6VBAVD4sLM4IexsRGoX", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 305.4136207977353, + "y": 358.61173442109686, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 618.75, + "height": 19.2, + "seed": 273353945, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927617946, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "- merge fix / chore PRs into, and release patches from main branch", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- merge fix / chore PRs into, and release patches from main branch", + "lineHeight": 1.2, + "baseline": 15 + }, + { + "type": "text", + "version": 459, + "versionNonce": 440532793, + "isDeleted": false, + "id": "JwKEdnU6H_Nu74WbEAX5M", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 305.6723761009271, + "y": 418.3724478537203, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 459.375, + "height": 19.2, + "seed": 1001222329, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "- merge main into minor before each minor release", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- merge main into minor before each minor release", + "lineHeight": 1.2, + "baseline": 15 + }, + { + "type": "text", + "version": 602, + "versionNonce": 1108720119, + "isDeleted": false, + "id": "mb9ZoP803MiH7MTO8wH-2", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 305.0895924262568, + "y": 447.44321411383333, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 534.375, + "height": 19.2, + "seed": 264651479, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "- fast forward main to minor after a stable minor release", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "- fast forward main to minor after a stable minor release", + "lineHeight": 1.2, + "baseline": 15 + }, + { + "type": "text", + "version": 612, + "versionNonce": 1588872441, + "isDeleted": false, + "id": "IfJPOFiwrCibpaBQqc5g-", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "angle": 0, + "x": 646.7131179044119, + "y": 724.4984335940012, + "strokeColor": "#1e1e1e", + "backgroundColor": "#ffc9c9", + "width": 131.25, + "height": 57.599999999999994, + "seed": 1301100087, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1698927613072, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "merge main\ninto minor\nbefore release", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "merge main\ninto minor\nbefore release", + "lineHeight": 1.2, + "baseline": 53 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/.github/git-branch-workflow.png b/.github/git-branch-workflow.png new file mode 100644 index 00000000000..6c8ee07d484 Binary files /dev/null and b/.github/git-branch-workflow.png differ diff --git a/.github/issue-workflow.png b/.github/issue-workflow.png new file mode 100644 index 00000000000..92b1de0633c Binary files /dev/null and b/.github/issue-workflow.png differ diff --git a/.github/maintenance.md b/.github/maintenance.md new file mode 100644 index 00000000000..8d4317c6b01 --- /dev/null +++ b/.github/maintenance.md @@ -0,0 +1,122 @@ +# Vue Core Maintenance Handbook + +Unlike [contributing.md](./contributing.md), which targets external contributors, this document is mainly intended for team members responsible for maintaining the project. It provides guidelines on how to triage issues, review & merge PRs, and publish releases. However, it should also be valuable to external contributors even if you are not a maintainer, as it gives you a better idea of how the maintainers operate, and how you can better collaborate with them. And who knows - maybe one day you will join as a maintainer as well! + +- [Issue Triage Workflow](#issue-triage-workflow) +- [Pull Request Review Guidelines](#pull-request-review-guidelines) + - [Reviewing a Fix](#reviewing-a-fix) + - [Reviewing a Refactor](#reviewing-a-refactor) + - [Reviewing a Feature](#reviewing-a-feature) + - [Common Considerations for All PRs](#common-considerations-for-all-prs) +- [PR Merge Rules for Team Members](#pr-merge-rules-for-team-members) +- [Git Branch and Release Workflow](#git-branch-and-release-workflow) + +## Issue Triage Workflow + +![Workflow](./issue-workflow.png) + +## Pull Request Review Guidelines + +The first step of reviewing a PR is to identify its purpose. We can usually put a PR in one of these categories: + +- **Fix**: fixes some wrong behavior. Usually associated with an issue that has a reproduction of the behavior being fixed. +- **Refactor**: improves performance or code quality, but does not affect behavior. +- **Feature**: implements something that increases the public API surface. + +Depending on the type of the PR, different considerations need to be taken into account. + +### Reviewing a Fix + +- Is the PR fixing a well defined issue / bug report? + - If not, ask to clarify context / provide reproduction or failing test case +- In most cases, a fix PR should include a test case that fails without the fix. +- Is it the right fix? + - If not, guide user to rework the PR. + - If the needed change is small and obvious, can directly push to the PR or add inline suggestions to reduce the back-and-forth. +- Is the cost justified? + - Sometimes the fix for a rare edge case might be introducing disproportionately large overhead (perf or code size). We should try our best to reduce the overhead to make the fix a reasonable tradeoff. +- If the reviewer is not sure about a fix, try to leave a comment explaining the concerns / reservations so the contributor at least gets some feedback. + +#### Verifying a Fix + +- **Always locally verify that the fix indeed fixes the original behavior, either through a reproduction or a failing test case.** +- We will run [ecosystem-ci](https://github.com/vuejs/ecosystem-ci) before every release, but if you are concerned about the potential impact of a change, it never hurts to manually run ecosystem-ci by leaving a `/ecosystem-ci run` comment (only works for team members). +- Take extra caution with snapshot tests! The CI can be "passing" even if the code generated in the snapshot contains bugs. It's best to always accompany a snapshot test with extra `expect(code).toMatch(...)` assertions. + +### Reviewing a Refactor + +- Performance: if a refactor PR claims to improve performance, there should be benchmarks showcasing said performance unless the improvement is self-explanatory. + +- Code quality / stylistic PRs: we should be conservative on merging this type PRs because (1) they can be subjective in many cases, and (2) they often come with large git diffs, causing merge conflicts with other pending PRs, and leading to unwanted noise when tracing changes through git history. Use your best judgement on this type of PRs on whether they are worth it. + + - For PRs in this category that are approved, do not merge immediately. Group them before releasing a new minor, after all feature-oriented PRs are merged. + +### Reviewing a Feature + +- Feature PRs should always have clear context and explanation on why the feature should be added, ideally in the form of an RFC. If the PR doesn't explain what real-world problem it is solving, ask the contributor to clarify. + +- Decide if the feature should require an RFC process. The line isn't always clear, but a rough criteria is whether it is augmenting an existing API vs. adding a new API. Some examples: + + - Adding a new built-in component or directive is "significant" and definitely requires an RFC. + - Template syntax additions like adding a new `v-on` modifier or a new `v-bind` syntax sugar are "substantial". It would be nice to have an RFC for it, but a detailed explanation on the use case and reasoning behind the design directly in the PR itself can be acceptable. + - Small, low-impact additions like exposing a new utility type or adding a new app config option can be self-explanatory, but should still provide enough context in the PR. + +- Always ask if the use case can be solved with existing APIs. Vue already has a pretty large API surface, so we want to make sure every new addition either solves something that wasn't possible before, or significantly improves the DX of a common task. + +### Common Considerations for All PRs + +- Scope: a PR should only contain changes directly related to the problem being addressed. It should not contain unnecessary code style changes. + +- Implementation: code style should be consistent with the rest of the codebase, follow common best practices. Prefer code that is boring but easy to understand over "clever" code. + +- Size: bundle size matters. We have a GitHub action that compares the size change for every PR. We should always aim to realize the desired changes with the smallest amount of code size increase. + + - Sometimes we need to compare the size increase vs. perceived benefits to decide whether a change is justifiable. Also take extra care to make sure added code can be tree-shaken if not needed. + + - Make sure to put dev-only code in `__DEV__` branches so they are tree-shakable. + + - Runtime code is more sensitive to size increase than compiler code. + + - Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in @vue/shared are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`. + +- Performance + - Be careful about code changes in "hot paths", in particular the Virtual DOM renderer (`runtime-core/src/renderer.ts`) and component instantiation code. + +- Potential Breakage + - avoiding runtime behavior breakage is the highest priority + - if not sure, use `ecosystem-ci` to verify! + - some fix inevitably cause behavior change, these must be discussed case-by-case + - type level breakage (e.g upgrading TS) is possible between minors + +## PR Merge Rules for Team Members + +Given that the PR meets the review requirements: + +- Chore / dependencies bumps: can merge directly. +- Fixes / refactors: can merge with two or more approvals from team members. + - If you believe a PR looks good but you are not 100% confident to merge, label with "ready for merge" and Evan will provide a final review before merging. +- Features: if approved by two or more team members, label with "ready to merge". Evan will review periodically, or they can be raised and discussed at team meetings. + +## Git Branch and Release Workflow + +We use two primary work branches: `main` and `minor`. + +- The `main` branch is for stable releases. Changes that are bug fixes or refactors that do not affect the public API surface should land in this branch. We periodically release patch releases from the `main` branch. + +- The `minor` branch is the WIP branch for the next minor release. Changes that are new features or those that affect public API behavior should land in this branch. We will periodically release pre-releases (alpha / beta) for the next minor from this branch. + +Before each release, we merge latest `main` into `minor` so it would include the latest bug fixes. + +When the minor is ready, we do a final merge of `main` into `minor`, and then release a stable minor from this branch (e.g. `3.4.0`). After that, the `main` branch is fast-forwarded to the release commit, so the two branches are synced at each stable minor release. + +![Workflow](./git-branch-workflow.png) + +### Reasoning Behind the Workflow + +The reason behind this workflow is to allow merging and releasing of fixes and features in parallel. In the past, we used a linear trunk-based development model. While the linear model results in a clean git history, the downside is that we need to be careful about when to merge patches vs. features. + +Vue typically groups a number of features with the same scope in a minor release. We don't want to release a minor just because we happened to merge a feature PR along with a bunch of small bug fixes. So we usually "wait" until we feel we are ready to start working on a minor release before merging feature PRs. + +But in reality, there are always bugs to fix and patch release to work on - this caused the intervals between minors to drag on longer than we had hoped, and many feature PRs were left waiting for a long period of time. + +This is why we decided to separate bug fixes and feature PRs into separate branches. With this two-branch model, we are able to merge and release both types of changes in parallel. diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 8f8378edf9c..088913317c7 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -45,7 +45,6 @@ 'typescript', // ESM only - 'chalk', 'estree-walker' ] } diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 48df8f7a277..5e7bb63c22f 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -17,7 +17,7 @@ jobs: uses: pnpm/action-setup@v2 - name: Set node version to 18 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 cache: pnpm @@ -30,4 +30,4 @@ jobs: - name: Run prettier run: pnpm run format - - uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9 + - uses: autofix-ci/action@bee19d72e71787c12ca0f29de72f2833e437e4c9 diff --git a/.github/workflows/canary-minor.yml b/.github/workflows/canary-minor.yml index 2aa6db12b36..27fbd42c90c 100644 --- a/.github/workflows/canary-minor.yml +++ b/.github/workflows/canary-minor.yml @@ -20,7 +20,7 @@ jobs: uses: pnpm/action-setup@v2 - name: Set node version to 18 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index e2f411c8e09..61490232f66 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -17,10 +17,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.node-version' registry-url: 'https://registry.npmjs.org' cache: 'pnpm' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fd0389f41c..f70f98a3821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install @@ -44,10 +44,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install @@ -58,6 +58,31 @@ jobs: - name: Run ssr unit tests run: pnpm run test-unit server-renderer + benchmarks: + runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + env: + PUPPETEER_SKIP_DOWNLOAD: 'true' + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.node-version' + cache: 'pnpm' + + - run: pnpm install + + - name: Run benchmarks + uses: CodSpeedHQ/action@v1 + with: + run: pnpm vitest bench --run + token: ${{ secrets.CODSPEED_TOKEN }} + e2e-test: runs-on: ubuntu-latest if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -73,14 +98,14 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install - - run: node node_modules/puppeteer/install.js + - run: node node_modules/puppeteer/install.mjs - name: Run e2e tests run: pnpm run test-e2e @@ -96,10 +121,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install diff --git a/.github/workflows/ecosystem-ci-trigger.yml b/.github/workflows/ecosystem-ci-trigger.yml index bd3a2749431..25adf7c85f4 100644 --- a/.github/workflows/ecosystem-ci-trigger.yml +++ b/.github/workflows/ecosystem-ci-trigger.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run') steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const user = context.payload.sender.login @@ -43,7 +43,7 @@ jobs: }) throw new Error('not allowed') } - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 id: get-pr-data with: script: | @@ -58,7 +58,7 @@ jobs: branchName: pr.head.ref, repo: pr.head.repo.full_name } - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 id: trigger env: COMMENT: ${{ github.event.comment.body }} diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index cf01a5f6cdf..68a7d6c7a15 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'vuejs/core' runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v4 + - uses: dessant/lock-threads@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-inactive-days: '14' diff --git a/.github/workflows/size-data.yml b/.github/workflows/size-data.yml index 8068b8645b6..bb82aa18d58 100644 --- a/.github/workflows/size-data.yml +++ b/.github/workflows/size-data.yml @@ -24,10 +24,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to LTS - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: lts/* + node-version-file: '.node-version' cache: pnpm - name: Install dependencies diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index 8acf464ae37..78ae44bb7ea 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -26,10 +26,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to LTS - uses: actions/setup-node@v3 + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: lts/* + node-version-file: '.node-version' cache: pnpm - name: Install dependencies diff --git a/.node-version b/.node-version new file mode 100644 index 00000000000..209e3ef4b62 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20 diff --git a/CHANGELOG.md b/CHANGELOG.md index f2659ed589a..8e55285374b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,178 @@ +## [3.3.11](https://github.com/vuejs/core/compare/v3.3.10...v3.3.11) (2023-12-08) + + +### Bug Fixes + +* **custom-element:** correctly handle number type props in prod ([#8989](https://github.com/vuejs/core/issues/8989)) ([d74d364](https://github.com/vuejs/core/commit/d74d364d62db8e48881af6b5a75ce4fb5f36cc35)) +* **reactivity:** fix mutation on user proxy of reactive Array ([6ecbd5c](https://github.com/vuejs/core/commit/6ecbd5ce2a7f59314a8326a1d193874b87f4d8c8)), closes [#9742](https://github.com/vuejs/core/issues/9742) [#9751](https://github.com/vuejs/core/issues/9751) [#9750](https://github.com/vuejs/core/issues/9750) +* **runtime-dom:** fix width and height prop check condition ([5b00286](https://github.com/vuejs/core/commit/5b002869c533220706f9788b496b8ca8d8e98609)), closes [#9762](https://github.com/vuejs/core/issues/9762) +* **shared:** handle Map with symbol keys in toDisplayString ([#9731](https://github.com/vuejs/core/issues/9731)) ([364821d](https://github.com/vuejs/core/commit/364821d6bdb1775e2f55a69bcfb9f40f7acf1506)), closes [#9727](https://github.com/vuejs/core/issues/9727) +* **shared:** handle more Symbol cases in toDisplayString ([983d45d](https://github.com/vuejs/core/commit/983d45d4f8eb766b5a16b7ea93b86d3c51618fa6)) +* **Suspense:** properly get anchor when mount fallback vnode ([#9770](https://github.com/vuejs/core/issues/9770)) ([b700328](https://github.com/vuejs/core/commit/b700328342e17dc16b19316c2e134a26107139d2)), closes [#9769](https://github.com/vuejs/core/issues/9769) +* **types:** ref() return type should not be any when initial value is any ([#9768](https://github.com/vuejs/core/issues/9768)) ([cdac121](https://github.com/vuejs/core/commit/cdac12161ec27b45ded48854c3d749664b6d4a6d)) +* **watch:** should not fire pre watcher on child component unmount ([#7181](https://github.com/vuejs/core/issues/7181)) ([6784f0b](https://github.com/vuejs/core/commit/6784f0b1f8501746ea70d87d18ed63a62cf6b76d)), closes [#7030](https://github.com/vuejs/core/issues/7030) + + + +## [3.3.10](https://github.com/vuejs/core/compare/v3.3.9...v3.3.10) (2023-12-04) + + +### Bug Fixes + +* **app:** prevent template from being cached between apps with different options ([#9724](https://github.com/vuejs/core/issues/9724)) ([ec71585](https://github.com/vuejs/core/commit/ec715854ca12520b2afc9e9b3981cbae05ae5206)), closes [#9618](https://github.com/vuejs/core/issues/9618) +* **compiler-sfc:** avoid passing forEach index to genMap ([f12db7f](https://github.com/vuejs/core/commit/f12db7fb564a534cef2e5805cc9f54afe5d72fbf)) +* **compiler-sfc:** deindent pug/jade templates ([6345197](https://github.com/vuejs/core/commit/634519720a21fb5a6871454e1cadad7053a568b8)), closes [#3231](https://github.com/vuejs/core/issues/3231) [#3842](https://github.com/vuejs/core/issues/3842) [#7723](https://github.com/vuejs/core/issues/7723) +* **compiler-sfc:** fix :where and :is selector in scoped mode with multiple selectors ([#9735](https://github.com/vuejs/core/issues/9735)) ([c3e2c55](https://github.com/vuejs/core/commit/c3e2c556b532656b50b8ab5cd2d9eabc26622d63)), closes [#9707](https://github.com/vuejs/core/issues/9707) +* **compiler-sfc:** generate more treeshaking friendly code ([#9507](https://github.com/vuejs/core/issues/9507)) ([8d74ca0](https://github.com/vuejs/core/commit/8d74ca0e6fa2738ca6854b7e879ff59419f948c7)), closes [#9500](https://github.com/vuejs/core/issues/9500) +* **compiler-sfc:** support inferring generic types ([#8511](https://github.com/vuejs/core/issues/8511)) ([eb5e307](https://github.com/vuejs/core/commit/eb5e307c0be62002e62c4c800d0dfacb39b0d4ca)), closes [#8482](https://github.com/vuejs/core/issues/8482) +* **compiler-sfc:** support resolving components from props ([#8785](https://github.com/vuejs/core/issues/8785)) ([7cbcee3](https://github.com/vuejs/core/commit/7cbcee3d831241a8bd3588ae92d3f27e3641e25f)) +* **compiler-sfc:** throw error when failing to load TS during type resolution ([#8883](https://github.com/vuejs/core/issues/8883)) ([4936d2e](https://github.com/vuejs/core/commit/4936d2e11a8d0ca3704bfe408548cb26bb3fd5e9)) +* **cssVars:** cssVar names should be double-escaped when generating code for ssr ([#8824](https://github.com/vuejs/core/issues/8824)) ([5199a12](https://github.com/vuejs/core/commit/5199a12f8855cd06f24bf355708b5a2134f63176)), closes [#7823](https://github.com/vuejs/core/issues/7823) +* **deps:** update compiler to ^7.23.4 ([#9681](https://github.com/vuejs/core/issues/9681)) ([31f6ebc](https://github.com/vuejs/core/commit/31f6ebc4df84490ed29fb75e7bf4259200eb51f0)) +* **runtime-core:** Suspense get anchor properly in Transition ([#9309](https://github.com/vuejs/core/issues/9309)) ([65f3fe2](https://github.com/vuejs/core/commit/65f3fe273127a8b68e1222fbb306d28d85f01757)), closes [#8105](https://github.com/vuejs/core/issues/8105) +* **runtime-dom:** set width/height with units as attribute ([#8781](https://github.com/vuejs/core/issues/8781)) ([bfc1838](https://github.com/vuejs/core/commit/bfc1838f31199de3f189198a3c234fa7bae91386)) +* **ssr:** avoid computed being accidentally cached before server render ([#9688](https://github.com/vuejs/core/issues/9688)) ([30d5d93](https://github.com/vuejs/core/commit/30d5d93a92b2154406ec04f8aca6b217fa01177c)), closes [#5300](https://github.com/vuejs/core/issues/5300) +* **types:** expose emits as props in functional components ([#9234](https://github.com/vuejs/core/issues/9234)) ([887e54c](https://github.com/vuejs/core/commit/887e54c347ea9eac4c721b5e2288f054873d1d30)) +* **types:** fix reactive collection types ([#8960](https://github.com/vuejs/core/issues/8960)) ([ad27473](https://github.com/vuejs/core/commit/ad274737015c36906d76f3189203093fa3a2e4e7)), closes [#8904](https://github.com/vuejs/core/issues/8904) +* **types:** improve return type withKeys and withModifiers ([#9734](https://github.com/vuejs/core/issues/9734)) ([43c3cfd](https://github.com/vuejs/core/commit/43c3cfdec5ae5d70fa2a21e857abc2d73f1a0d07)) + + +### Performance Improvements + +* optimize on* prop check ([38aaa8c](https://github.com/vuejs/core/commit/38aaa8c88648c54fe2616ad9c0961288092fcb44)) +* **runtime-dom:** cache modifier wrapper functions ([da4a4fb](https://github.com/vuejs/core/commit/da4a4fb5e8eee3c6d31f24ebd79a9d0feca56cb2)), closes [#8882](https://github.com/vuejs/core/issues/8882) +* **v-on:** constant handlers with modifiers should not be treated as dynamic ([4d94ebf](https://github.com/vuejs/core/commit/4d94ebfe75174b340d2b794e699cad1add3600a9)) + + + +## [3.3.9](https://github.com/vuejs/core/compare/v3.3.8...v3.3.9) (2023-11-25) + + +### Bug Fixes + +* **compiler-core:** avoid rewriting scope variables in inline for loops ([#7245](https://github.com/vuejs/core/issues/7245)) ([a2d810e](https://github.com/vuejs/core/commit/a2d810eb40cef631f61991ca68b426ee9546aba0)), closes [#7238](https://github.com/vuejs/core/issues/7238) +* **compiler-core:** fix `resolveParserPlugins` decorators check ([#9566](https://github.com/vuejs/core/issues/9566)) ([9d0eba9](https://github.com/vuejs/core/commit/9d0eba916f3bf6fb5c03222400edae1a2db7444f)), closes [#9560](https://github.com/vuejs/core/issues/9560) +* **compiler-sfc:** consistently escape type-only prop names ([#8654](https://github.com/vuejs/core/issues/8654)) ([3e08d24](https://github.com/vuejs/core/commit/3e08d246dfd8523c54fb8e7a4a6fd5506ffb1bcc)), closes [#8635](https://github.com/vuejs/core/issues/8635) [#8910](https://github.com/vuejs/core/issues/8910) [vitejs/vite-plugin-vue#184](https://github.com/vitejs/vite-plugin-vue/issues/184) +* **compiler-sfc:** malformed filename on windows using path.posix.join() ([#9478](https://github.com/vuejs/core/issues/9478)) ([f18a174](https://github.com/vuejs/core/commit/f18a174979626b3429db93c5d5b7ae5448917c70)), closes [#8671](https://github.com/vuejs/core/issues/8671) [#9583](https://github.com/vuejs/core/issues/9583) [#9446](https://github.com/vuejs/core/issues/9446) [#9473](https://github.com/vuejs/core/issues/9473) +* **compiler-sfc:** support `:is` and `:where` selector in scoped css rewrite ([#8929](https://github.com/vuejs/core/issues/8929)) ([3227e50](https://github.com/vuejs/core/commit/3227e50b32105f8893f7dff2f29278c5b3a9f621)) +* **compiler-sfc:** support resolve extends interface for defineEmits ([#8470](https://github.com/vuejs/core/issues/8470)) ([9e1b74b](https://github.com/vuejs/core/commit/9e1b74bcd5fa4151f5d1bc02c69fbbfa4762f577)), closes [#8465](https://github.com/vuejs/core/issues/8465) +* **hmr/transition:** fix kept-alive component inside transition disappearing after hmr ([#7126](https://github.com/vuejs/core/issues/7126)) ([d11e978](https://github.com/vuejs/core/commit/d11e978fc98dcc83526c167e603b8308f317f786)), closes [#7121](https://github.com/vuejs/core/issues/7121) +* **hydration:** force hydration for v-bind with .prop modifier ([364f319](https://github.com/vuejs/core/commit/364f319d214226770d97c98d8fcada80c9e8dde3)), closes [#7490](https://github.com/vuejs/core/issues/7490) +* **hydration:** properly hydrate indeterminate prop ([34b5a5d](https://github.com/vuejs/core/commit/34b5a5da4ae9c9faccac237acd7acc8e7e017571)), closes [#7476](https://github.com/vuejs/core/issues/7476) +* **reactivity:** clear method on readonly collections should return undefined ([#7316](https://github.com/vuejs/core/issues/7316)) ([657476d](https://github.com/vuejs/core/commit/657476dcdb964be4fbb1277c215c073f3275728e)) +* **reactivity:** onCleanup also needs to be cleaned ([#8655](https://github.com/vuejs/core/issues/8655)) ([73fd810](https://github.com/vuejs/core/commit/73fd810eebdd383a2b4629f67736c4db1f428abd)), closes [#5151](https://github.com/vuejs/core/issues/5151) [#7695](https://github.com/vuejs/core/issues/7695) +* **ssr:** hydration `__vnode` missing for devtools ([#9328](https://github.com/vuejs/core/issues/9328)) ([5156ac5](https://github.com/vuejs/core/commit/5156ac5b38cfa80d3db26f2c9bf40cb22a7521cb)) +* **types:** allow falsy value types in `StyleValue` ([#7954](https://github.com/vuejs/core/issues/7954)) ([17aa92b](https://github.com/vuejs/core/commit/17aa92b79b31d8bb8b5873ddc599420cb9806db8)), closes [#7955](https://github.com/vuejs/core/issues/7955) +* **types:** defineCustomElement using defineComponent return type with emits ([#7937](https://github.com/vuejs/core/issues/7937)) ([5d932a8](https://github.com/vuejs/core/commit/5d932a8e6d14343c9d7fc7c2ecb58ac618b2f938)), closes [#7782](https://github.com/vuejs/core/issues/7782) +* **types:** fix `unref` and `toValue` when input union type contains ComputedRef ([#8748](https://github.com/vuejs/core/issues/8748)) ([176d476](https://github.com/vuejs/core/commit/176d47671271b1abc21b1508e9a493c7efca6451)), closes [#8747](https://github.com/vuejs/core/issues/8747) [#8857](https://github.com/vuejs/core/issues/8857) +* **types:** fix instance type when props type is incompatible with setup returned type ([#7338](https://github.com/vuejs/core/issues/7338)) ([0e1e8f9](https://github.com/vuejs/core/commit/0e1e8f919e5a74cdaadf9c80ee135088b25e7fa3)), closes [#5885](https://github.com/vuejs/core/issues/5885) +* **types:** fix shallowRef return type with union value type ([#7853](https://github.com/vuejs/core/issues/7853)) ([7c44800](https://github.com/vuejs/core/commit/7c448000b0def910c2cfabfdf7ff20a3d6bc844f)), closes [#7852](https://github.com/vuejs/core/issues/7852) +* **types:** more precise types for class bindings ([#8012](https://github.com/vuejs/core/issues/8012)) ([46e3374](https://github.com/vuejs/core/commit/46e33744c890bd49482c5e5c5cdea44e00ec84d5)) +* **types:** remove optional properties from defineProps return type ([#6421](https://github.com/vuejs/core/issues/6421)) ([94c049d](https://github.com/vuejs/core/commit/94c049d930d922069e38ea8700d7ff0970f71e61)), closes [#6420](https://github.com/vuejs/core/issues/6420) +* **types:** return type of withDefaults should be readonly ([#8601](https://github.com/vuejs/core/issues/8601)) ([f15debc](https://github.com/vuejs/core/commit/f15debc01acb22d23f5acee97e6f02db88cef11a)) +* **types:** revert class type restrictions ([5d077c8](https://github.com/vuejs/core/commit/5d077c8754cc14f85d2d6d386df70cf8c0d93842)), closes [#8012](https://github.com/vuejs/core/issues/8012) +* **types:** update jsx type definitions ([#8607](https://github.com/vuejs/core/issues/8607)) ([58e2a94](https://github.com/vuejs/core/commit/58e2a94871ae06a909c5f8bad07fb401193e6a38)) +* **types:** widen ClassValue type ([2424013](https://github.com/vuejs/core/commit/242401305944422d0c361b16101a4d18908927af)) +* **v-model:** avoid overwriting number input with same value ([#7004](https://github.com/vuejs/core/issues/7004)) ([40f4b77](https://github.com/vuejs/core/commit/40f4b77bb570868cb6e47791078767797e465989)), closes [#7003](https://github.com/vuejs/core/issues/7003) +* **v-model:** unnecessary value binding error should apply to dynamic instead of static binding ([2859b65](https://github.com/vuejs/core/commit/2859b653c9a22460e60233cac10fe139e359b046)), closes [#3596](https://github.com/vuejs/core/issues/3596) + + + +## [3.3.8](https://github.com/vuejs/core/compare/v3.3.7...v3.3.8) (2023-11-06) + + +### Bug Fixes + +* **compile-sfc:** support `Error` type in `defineProps` ([#5955](https://github.com/vuejs/core/issues/5955)) ([a989345](https://github.com/vuejs/core/commit/a9893458ec519aae442e1b99e64e6d74685cd22c)) +* **compiler-core:** known global should be shadowed by local variables in expression rewrite ([#9492](https://github.com/vuejs/core/issues/9492)) ([a75d1c5](https://github.com/vuejs/core/commit/a75d1c5c6242e91a73cc5ba01e6da620dea0b3d9)), closes [#9482](https://github.com/vuejs/core/issues/9482) +* **compiler-sfc:** fix dynamic directive arguments usage check for slots ([#9495](https://github.com/vuejs/core/issues/9495)) ([b39fa1f](https://github.com/vuejs/core/commit/b39fa1f8157647859331ce439c42ae016a49b415)), closes [#9493](https://github.com/vuejs/core/issues/9493) +* **deps:** update dependency @vue/repl to ^2.6.2 ([#9536](https://github.com/vuejs/core/issues/9536)) ([5cef325](https://github.com/vuejs/core/commit/5cef325f41e3b38657c72fa1a38dedeee1c7a60a)) +* **deps:** update dependency @vue/repl to ^2.6.3 ([#9540](https://github.com/vuejs/core/issues/9540)) ([176d590](https://github.com/vuejs/core/commit/176d59058c9aecffe9da4d4311e98496684f06d4)) +* **hydration:** fix tagName access error on comment/text node hydration mismatch ([dd8a0cf](https://github.com/vuejs/core/commit/dd8a0cf5dcde13d2cbd899262a0e07f16e14e489)), closes [#9531](https://github.com/vuejs/core/issues/9531) +* **types:** avoid exposing lru-cache types in generated dts ([462aeb3](https://github.com/vuejs/core/commit/462aeb3b600765e219ded2ee9a0ed1e74df61de0)), closes [#9521](https://github.com/vuejs/core/issues/9521) +* **warn:** avoid warning on empty children with Suspense ([#3962](https://github.com/vuejs/core/issues/3962)) ([405f345](https://github.com/vuejs/core/commit/405f34587a63a5f1e3d147b9848219ea98acc22d)) + + + +## [3.3.7](https://github.com/vuejs/core/compare/v3.3.6...v3.3.7) (2023-10-24) + + +### Bug Fixes + +* **compiler-sfc:** avoid gen useCssVars when targeting SSR ([#6979](https://github.com/vuejs/core/issues/6979)) ([c568778](https://github.com/vuejs/core/commit/c568778ea3265d8e57f788b00864c9509bf88a4e)), closes [#6926](https://github.com/vuejs/core/issues/6926) +* **compiler-ssr:** proper scope analysis for ssr vnode slot fallback ([#7184](https://github.com/vuejs/core/issues/7184)) ([e09c26b](https://github.com/vuejs/core/commit/e09c26bc9bc4394c2c2d928806d382515c2676f3)), closes [#7095](https://github.com/vuejs/core/issues/7095) +* correctly resolve types from relative paths on Windows ([#9446](https://github.com/vuejs/core/issues/9446)) ([089d36d](https://github.com/vuejs/core/commit/089d36d167dc7834065b03ca689f9b6a44eead8a)), closes [#8671](https://github.com/vuejs/core/issues/8671) +* **hmr:** fix hmr error for hoisted children array in v-for ([7334376](https://github.com/vuejs/core/commit/733437691f70ebca8dd6cc3bc8356f5b57d4d5d8)), closes [#6978](https://github.com/vuejs/core/issues/6978) [#7114](https://github.com/vuejs/core/issues/7114) +* **reactivity:** assigning array.length while observing a symbol property ([#7568](https://github.com/vuejs/core/issues/7568)) ([e9e2778](https://github.com/vuejs/core/commit/e9e2778e9ec5cca07c1df5f0c9b7b3595a1a3244)) +* **scheduler:** ensure jobs are in the correct order ([#7748](https://github.com/vuejs/core/issues/7748)) ([a8f6638](https://github.com/vuejs/core/commit/a8f663867b8cd2736b82204bc58756ef02441276)), closes [#7576](https://github.com/vuejs/core/issues/7576) +* **ssr:** fix hydration mismatch for disabled teleport at component root ([#9399](https://github.com/vuejs/core/issues/9399)) ([d8990fc](https://github.com/vuejs/core/commit/d8990fc6182d1c2cf0a8eab7b35a9d04df668507)), closes [#6152](https://github.com/vuejs/core/issues/6152) +* **Suspense:** calling hooks before the transition finishes ([#9388](https://github.com/vuejs/core/issues/9388)) ([00de3e6](https://github.com/vuejs/core/commit/00de3e61ed7a55e7d6c2e1987551d66ad0f909ff)), closes [#5844](https://github.com/vuejs/core/issues/5844) [#5952](https://github.com/vuejs/core/issues/5952) +* **transition/ssr:** make transition appear work with SSR ([#8859](https://github.com/vuejs/core/issues/8859)) ([5ea8a8a](https://github.com/vuejs/core/commit/5ea8a8a4fab4e19a71e123e4d27d051f5e927172)), closes [#6951](https://github.com/vuejs/core/issues/6951) +* **types:** fix ComponentCustomProps augmentation ([#9468](https://github.com/vuejs/core/issues/9468)) ([7374e93](https://github.com/vuejs/core/commit/7374e93f0281f273b90ab5a6724cc47332a01d6c)), closes [#8376](https://github.com/vuejs/core/issues/8376) +* **types:** improve `h` overload to support union of string and component ([#5432](https://github.com/vuejs/core/issues/5432)) ([16ecb44](https://github.com/vuejs/core/commit/16ecb44c89cd8299a3b8de33cccc2e2cc36f065b)), closes [#5431](https://github.com/vuejs/core/issues/5431) + + + +## [3.3.6](https://github.com/vuejs/core/compare/v3.3.5...v3.3.6) (2023-10-20) + + +### Bug Fixes + +* **compiler-sfc:** model name conflict ([#8798](https://github.com/vuejs/core/issues/8798)) ([df81da8](https://github.com/vuejs/core/commit/df81da8be97c8a1366563c7e3e01076ef02eb8f7)) +* **compiler-sfc:** support asset paths containing spaces ([#8752](https://github.com/vuejs/core/issues/8752)) ([36c99a9](https://github.com/vuejs/core/commit/36c99a9c6bb6bc306be054c3c8a85ff8ce50605a)) +* **compiler-ssr:** fix missing scopeId on server-rendered TransitionGroup ([#7557](https://github.com/vuejs/core/issues/7557)) ([61c1357](https://github.com/vuejs/core/commit/61c135742795aa5e3189a79c7dec6afa21bbc8d9)), closes [#7554](https://github.com/vuejs/core/issues/7554) +* **compiler-ssr:** fix ssr compile error for select with non-option children ([#9442](https://github.com/vuejs/core/issues/9442)) ([cdb2e72](https://github.com/vuejs/core/commit/cdb2e725e7ea297f1f4180fb04889a3b757bc84e)), closes [#9440](https://github.com/vuejs/core/issues/9440) +* **runtime-core:** delete stale slots which are present but undefined ([#6484](https://github.com/vuejs/core/issues/6484)) ([75b8722](https://github.com/vuejs/core/commit/75b872213574cb37e2c9e8a15f65613f867ca9a6)), closes [#9109](https://github.com/vuejs/core/issues/9109) +* **runtime-core:** fix error when using cssvars with disabled teleport ([#7341](https://github.com/vuejs/core/issues/7341)) ([8f0472c](https://github.com/vuejs/core/commit/8f0472c9abedb337dc256143b69d8ab8759dbf5c)), closes [#7342](https://github.com/vuejs/core/issues/7342) +* **teleport:** ensure descendent component would be unmounted correctly ([#6529](https://github.com/vuejs/core/issues/6529)) ([4162311](https://github.com/vuejs/core/commit/4162311efdb0db5ca458542e1604b19efa2fae0e)), closes [#6347](https://github.com/vuejs/core/issues/6347) +* **types:** support contenteditable="plaintext-only" ([#8796](https://github.com/vuejs/core/issues/8796)) ([26ca89e](https://github.com/vuejs/core/commit/26ca89e5cf734fbef81e182050d2a215ec8a437b)) + + +### Performance Improvements + +* replace Map/Set with WeakMap/WeakSet ([#8549](https://github.com/vuejs/core/issues/8549)) ([712f96d](https://github.com/vuejs/core/commit/712f96d6ac4d3d984732cba448cb84624daba850)) + + + +## [3.3.5](https://github.com/vuejs/core/compare/v3.3.4...v3.3.5) (2023-10-20) + + +### Bug Fixes + +* add isGloballyWhitelisted back, but deprecated ([#8556](https://github.com/vuejs/core/issues/8556)) ([63dfe8e](https://github.com/vuejs/core/commit/63dfe8eab499979bcc2f7829e82464e13899c895)), closes [#8416](https://github.com/vuejs/core/issues/8416) +* **build:** disable useDefineForClassFields in esbuild ([#9252](https://github.com/vuejs/core/issues/9252)) ([6d14fa8](https://github.com/vuejs/core/commit/6d14fa88e85d4c9e264be394ddb37a54ca6738a8)) +* **compat:** return value of vue compat set() ([#9377](https://github.com/vuejs/core/issues/9377)) ([e3c2d69](https://github.com/vuejs/core/commit/e3c2d699f694d9500ddee78571172a24f0e3b17a)) +* **compiler-sfc:** don't hoist props and emit ([#8535](https://github.com/vuejs/core/issues/8535)) ([24db951](https://github.com/vuejs/core/commit/24db9516d8b4857182ec1a3af86cb7346691679b)), closes [#7805](https://github.com/vuejs/core/issues/7805) [#7812](https://github.com/vuejs/core/issues/7812) +* **compiler-sfc:** don't registerTS when bundling for browsers ([#8582](https://github.com/vuejs/core/issues/8582)) ([6f45f76](https://github.com/vuejs/core/commit/6f45f76df2c43796b35067ef8f8b9a7bca454040)) +* **compiler-sfc:** fix using imported ref as template ref during dev ([#7593](https://github.com/vuejs/core/issues/7593)) ([776ebf2](https://github.com/vuejs/core/commit/776ebf25b2e7570e78ac1c148fc45c823c21a542)), closes [#7567](https://github.com/vuejs/core/issues/7567) +* **compiler-sfc:** handle dynamic directive arguments in template usage check ([#8538](https://github.com/vuejs/core/issues/8538)) ([e404a69](https://github.com/vuejs/core/commit/e404a699f48ae5c5a5da947f42679343192158c7)), closes [#8537](https://github.com/vuejs/core/issues/8537) +* **compiler-sfc:** ignore style v-bind in double slash comments ([#5409](https://github.com/vuejs/core/issues/5409)) ([381b497](https://github.com/vuejs/core/commit/381b4977af25ba5392704f72ec6b3f2394d87ae7)) +* **compiler-sfc:** pass options directly to stylus ([#3848](https://github.com/vuejs/core/issues/3848)) ([d6446a6](https://github.com/vuejs/core/commit/d6446a6d40774b79045a9ddba7b5fd5201d51450)) +* **compiler-sfc:** support resolve multiple re-export /w same source type name ([#8365](https://github.com/vuejs/core/issues/8365)) ([4fa8da8](https://github.com/vuejs/core/commit/4fa8da8576717c619e1e8c04d19038488c75fbea)), closes [#8364](https://github.com/vuejs/core/issues/8364) +* **compiler-sfc:** typo in experimental feature warnings ([#8513](https://github.com/vuejs/core/issues/8513)) ([fd1a3f9](https://github.com/vuejs/core/commit/fd1a3f95990d7c372fa1c0c40c55caca761a33a4)) +* **deps:** update dependency monaco-editor to ^0.44.0 ([#9237](https://github.com/vuejs/core/issues/9237)) ([8611874](https://github.com/vuejs/core/commit/8611874e09a827b6491173836c8942284d5de22c)) +* **deps:** update playground ([#9154](https://github.com/vuejs/core/issues/9154)) ([c8566a2](https://github.com/vuejs/core/commit/c8566a22b7cf37e6aefab7bad7b97ce2db9fae4c)) +* **playground:** fix github button style ([#7722](https://github.com/vuejs/core/issues/7722)) ([5ee992c](https://github.com/vuejs/core/commit/5ee992cfeabc6c4b871980c6057d0ac7140ad2fa)) +* **runtime-core:** swap client/server debug labels ([#9089](https://github.com/vuejs/core/issues/9089)) ([8f311c6](https://github.com/vuejs/core/commit/8f311c6f823f6776ca1c49bfbbbf8c7d9dea9cf1)) +* **ssr:** render correct initial selected state for select with v-model ([#7432](https://github.com/vuejs/core/issues/7432)) ([201c46d](https://github.com/vuejs/core/commit/201c46df07a38f3c2b73f384e8e6846dc62f224e)), closes [#7392](https://github.com/vuejs/core/issues/7392) +* **ssr:** reset current instance if setting up options component errors ([#7743](https://github.com/vuejs/core/issues/7743)) ([020851e](https://github.com/vuejs/core/commit/020851e57d9a9f727c6ea07e9c1575430af02b73)), closes [#7733](https://github.com/vuejs/core/issues/7733) +* **teleport:** handle target change while disabled ([#7837](https://github.com/vuejs/core/issues/7837)) ([140a89b](https://github.com/vuejs/core/commit/140a89b833bceed60838182b875d2953c70af114)), closes [#7835](https://github.com/vuejs/core/issues/7835) +* **transition:** handle possible auto value for transition/animation durations ([96c76fa](https://github.com/vuejs/core/commit/96c76facb7de37fc241ccd55e121fd60a49a1452)), closes [#8409](https://github.com/vuejs/core/issues/8409) +* **types/jsx:** add `inert` attribute and missing `hidden` values ([#8090](https://github.com/vuejs/core/issues/8090)) ([ceb0732](https://github.com/vuejs/core/commit/ceb0732e0b1bb4c8c505d80e97ff6fc89035fa90)) +* **types/jsx:** add missing loading attr for img element ([#6160](https://github.com/vuejs/core/issues/6160)) ([68d6b43](https://github.com/vuejs/core/commit/68d6b43f7e29b76aab2c6c1882885380a43fa3e3)) +* **types:** correct withDefaults return type for boolean prop with undefined default value ([#8602](https://github.com/vuejs/core/issues/8602)) ([f07cb18](https://github.com/vuejs/core/commit/f07cb18fedf9a446545aadf76bcdfb957c7ebcbd)) +* **types:** ensure nextTick return type reflect correct Promise value ([#8406](https://github.com/vuejs/core/issues/8406)) ([6a22b1f](https://github.com/vuejs/core/commit/6a22b1f6c287b60eda385df8a514335af8e040ea)) +* **types:** support correct types for style on svg elements ([#6322](https://github.com/vuejs/core/issues/6322)) ([364dc53](https://github.com/vuejs/core/commit/364dc53c7cc6f97d812ad175199c698faa92538e)) + + +### Performance Improvements + +* **compiler-sfc:** lazy require typescript ([d2c3d8b](https://github.com/vuejs/core/commit/d2c3d8b70b2df6e16f053a7ac58e6b04e7b2078f)) +* **custom-element:** cancel `MutationObserver` listener when disconnected ([#8666](https://github.com/vuejs/core/issues/8666)) ([24d98f0](https://github.com/vuejs/core/commit/24d98f03276de5b0fbced5a4c9d61b24e7d9d084)) +* mark `defineComponent` as side-effects-free ([#8512](https://github.com/vuejs/core/issues/8512)) ([438027c](https://github.com/vuejs/core/commit/438027cf9ecb63260f59d3027e0b188717694795)) + + + ## [3.3.4](https://github.com/vuejs/core/compare/v3.3.3...v3.3.4) (2023-05-18) diff --git a/README.md b/README.md index 17d9abc6bae..cbc05311ae7 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Vue.js is an MIT-licensed open source project with its ongoing development made

- sponsors + sponsors

diff --git a/package.json b/package.json index eb6165924c7..ba2427c6916 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, - "version": "3.3.4", - "packageManager": "pnpm@8.7.6", + "version": "3.3.11", + "packageManager": "pnpm@8.11.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -22,19 +22,21 @@ "test-dts": "run-s build-dts test-dts-only", "test-dts-only": "tsc -p ./packages/dts-test/tsconfig.test.json", "test-coverage": "vitest -c vitest.unit.config.ts --coverage", + "test-bench": "vitest bench", "release": "node scripts/release.js", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "dev-esm": "node scripts/dev.js -if esm-bundler-runtime", "dev-compiler": "run-p \"dev template-explorer\" serve", "dev-sfc": "run-s dev-sfc-prepare dev-sfc-run", - "dev-sfc-prepare": "node scripts/pre-dev-sfc.js || npm run build-compiler-cjs", + "dev-sfc-prepare": "node scripts/pre-dev-sfc.js || npm run build-all-cjs", "dev-sfc-serve": "vite packages/sfc-playground --host", - "dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve", + "dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev vue -ipf esm-browser-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve", "serve": "serve", "open": "open http://localhost:3000/packages/template-explorer/local.html", - "build-sfc-playground": "run-s build-compiler-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self", - "build-compiler-cjs": "node scripts/build.js compiler reactivity-transform shared -af cjs", + "build-sfc-playground": "run-s build-all-cjs build-runtime-esm build-browser-esm build-ssr-esm build-sfc-playground-self", + "build-all-cjs": "node scripts/build.js vue runtime compiler reactivity reactivity-transform shared -af cjs", "build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime", + "build-browser-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler && node scripts/build.js vue -f esm-browser", "build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser", "build-sfc-playground-self": "cd packages/sfc-playground && npm run build", "preinstall": "npx only-allow pnpm", @@ -54,57 +56,58 @@ ] }, "engines": { - "node": ">=16.14.0" + "node": ">=18.12.0" }, "devDependencies": { - "@babel/parser": "^7.22.16", - "@babel/types": "^7.22.19", - "@rollup/plugin-alias": "^5.0.0", - "@rollup/plugin-commonjs": "^25.0.4", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.2.1", - "@rollup/plugin-replace": "^5.0.2", - "@rollup/plugin-terser": "^0.4.3", - "@types/hash-sum": "^1.0.0", - "@types/node": "^16.18.52", - "@typescript-eslint/parser": "^6.7.2", - "@vitest/coverage-istanbul": "^0.34.4", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", + "@codspeed/vitest-plugin": "^2.3.1", + "@rollup/plugin-alias": "^5.0.1", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-json": "^6.0.1", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-replace": "^5.0.4", + "@rollup/plugin-terser": "^0.4.4", + "@types/hash-sum": "^1.0.2", + "@types/node": "^20.10.3", + "@typescript-eslint/parser": "^6.13.0", + "@vitest/coverage-istanbul": "^1.0.2", "@vue/consolidate": "0.17.3", - "chalk": "^4.1.0", "conventional-changelog-cli": "^4.1.0", "enquirer": "^2.4.1", - "esbuild": "^0.19.3", + "esbuild": "^0.19.5", "esbuild-plugin-polyfill-node": "^0.3.0", - "eslint": "^8.49.0", - "eslint-plugin-jest": "^27.4.0", + "eslint": "^8.54.0", + "eslint-plugin-jest": "^27.6.0", "estree-walker": "^2.0.2", "execa": "^8.0.1", "jsdom": "^22.1.0", - "lint-staged": "^14.0.1", + "lint-staged": "^15.1.0", "lodash": "^4.17.21", - "magic-string": "^0.30.3", + "magic-string": "^0.30.5", "markdown-table": "^3.0.3", - "marked": "^4.3.0", + "marked": "^9.1.6", "minimist": "^1.2.8", "npm-run-all": "^4.1.5", - "prettier": "^3.0.3", + "picocolors": "^1.0.0", + "prettier": "^3.1.0", "pretty-bytes": "^6.1.1", "pug": "^3.0.2", - "puppeteer": "~21.2.1", - "rimraf": "^5.0.1", - "rollup": "^3.29.2", - "rollup-plugin-dts": "^6.0.2", - "rollup-plugin-esbuild": "^6.0.0", + "puppeteer": "~21.5.2", + "rimraf": "^5.0.5", + "rollup": "^4.1.4", + "rollup-plugin-dts": "^6.1.0", + "rollup-plugin-esbuild": "^6.1.0", "rollup-plugin-polyfill-node": "^0.12.0", "semver": "^7.5.4", "serve": "^14.2.1", "simple-git-hooks": "^2.9.0", - "terser": "^5.19.4", - "todomvc-app-css": "^2.4.2", + "terser": "^5.22.0", + "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^3.12.10", - "typescript": "^5.1.6", - "vite": "^4.3.0", - "vitest": "^0.34.4" + "tsx": "^4.6.2", + "typescript": "^5.2.2", + "vite": "^5.0.5", + "vitest": "^1.0.0" } } diff --git a/packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap index 032d17e2646..2bdb4afa4c0 100644 --- a/packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap @@ -48,12 +48,12 @@ exports[`compiler: codegen > Element (callExpression + objectExpression + Templa " return function render(_ctx, _cache) { with (_ctx) { - return _createElementVNode(\\"div\\", { - id: \\"foo\\", + return _createElementVNode("div", { + id: "foo", [prop]: bar, [foo + bar]: bar }, [ - _createElementVNode(\\"p\\", { \\"some-key\\": \\"foo\\" }) + _createElementVNode("p", { "some-key": "foo" }) ], 16) } }" @@ -63,12 +63,12 @@ exports[`compiler: codegen > assets + temps 1`] = ` " return function render(_ctx, _cache) { with (_ctx) { - const _component_Foo = _resolveComponent(\\"Foo\\") - const _component_bar_baz = _resolveComponent(\\"bar-baz\\") - const _component_barbaz = _resolveComponent(\\"barbaz\\") - const _component_Qux = _resolveComponent(\\"Qux\\", true) - const _directive_my_dir_0 = _resolveDirective(\\"my_dir_0\\") - const _directive_my_dir_1 = _resolveDirective(\\"my_dir_1\\") + const _component_Foo = _resolveComponent("Foo") + const _component_bar_baz = _resolveComponent("bar-baz") + const _component_barbaz = _resolveComponent("barbaz") + const _component_Qux = _resolveComponent("Qux", true) + const _directive_my_dir_0 = _resolveDirective("my_dir_0") + const _directive_my_dir_1 = _resolveDirective("my_dir_1") let _temp0, _temp1, _temp2 return null @@ -80,7 +80,7 @@ exports[`compiler: codegen > comment 1`] = ` " return function render(_ctx, _cache) { with (_ctx) { - return _createCommentVNode(\\"foo\\") + return _createCommentVNode("foo") } }" `; @@ -135,7 +135,7 @@ return function render(_ctx, _cache) { exports[`compiler: codegen > hoists 1`] = ` " const _hoisted_1 = hello -const _hoisted_2 = { id: \\"foo\\" } +const _hoisted_2 = { id: "foo" } return function render(_ctx, _cache) { with (_ctx) { @@ -165,7 +165,7 @@ return function render(_ctx, _cache) { `; exports[`compiler: codegen > module mode preamble 1`] = ` -"import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \\"vue\\" +"import { createVNode as _createVNode, resolveDirective as _resolveDirective } from "vue" export function render(_ctx, _cache) { return null @@ -173,7 +173,7 @@ export function render(_ctx, _cache) { `; exports[`compiler: codegen > module mode preamble w/ optimizeImports: true 1`] = ` -"import { createVNode, resolveDirective } from \\"vue\\" +"import { createVNode, resolveDirective } from "vue" // Binding optimization for webpack code-split const _createVNode = createVNode, _resolveDirective = resolveDirective @@ -187,7 +187,7 @@ exports[`compiler: codegen > static text 1`] = ` " return function render(_ctx, _cache) { with (_ctx) { - return \\"hello\\" + return "hello" } }" `; diff --git a/packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap index e8b2efba79e..625485719cb 100644 --- a/packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap @@ -7,19 +7,19 @@ return function render(_ctx, _cache) { with (_ctx) { const { toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList, createElementVNode: _createElementVNode, normalizeClass: _normalizeClass } = _Vue - return (_openBlock(), _createElementBlock(\\"div\\", { - id: \\"foo\\", + return (_openBlock(), _createElementBlock("div", { + id: "foo", class: _normalizeClass(bar.baz) }, [ - _createTextVNode(_toDisplayString(world.burn()) + \\" \\", 1 /* TEXT */), + _createTextVNode(_toDisplayString(world.burn()) + " ", 1 /* TEXT */), ok - ? (_openBlock(), _createElementBlock(\\"div\\", { key: 0 }, \\"yes\\")) + ? (_openBlock(), _createElementBlock("div", { key: 0 }, "yes")) : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ - _createTextVNode(\\"no\\") + _createTextVNode("no") ], 64 /* STABLE_FRAGMENT */)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(list, (value, index) => { - return (_openBlock(), _createElementBlock(\\"div\\", null, [ - _createElementVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) + return (_openBlock(), _createElementBlock("div", null, [ + _createElementVNode("span", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) @@ -31,19 +31,19 @@ exports[`compiler: integration tests > function mode w/ prefixIdentifiers: true "const { toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList, createElementVNode: _createElementVNode, normalizeClass: _normalizeClass } = Vue return function render(_ctx, _cache) { - return (_openBlock(), _createElementBlock(\\"div\\", { - id: \\"foo\\", + return (_openBlock(), _createElementBlock("div", { + id: "foo", class: _normalizeClass(_ctx.bar.baz) }, [ - _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), + _createTextVNode(_toDisplayString(_ctx.world.burn()) + " ", 1 /* TEXT */), (_ctx.ok) - ? (_openBlock(), _createElementBlock(\\"div\\", { key: 0 }, \\"yes\\")) + ? (_openBlock(), _createElementBlock("div", { key: 0 }, "yes")) : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ - _createTextVNode(\\"no\\") + _createTextVNode("no") ], 64 /* STABLE_FRAGMENT */)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { - return (_openBlock(), _createElementBlock(\\"div\\", null, [ - _createElementVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) + return (_openBlock(), _createElementBlock("div", null, [ + _createElementVNode("span", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) @@ -51,22 +51,22 @@ return function render(_ctx, _cache) { `; exports[`compiler: integration tests > module mode 1`] = ` -"import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \\"vue\\" +"import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from "vue" export function render(_ctx, _cache) { - return (_openBlock(), _createElementBlock(\\"div\\", { - id: \\"foo\\", + return (_openBlock(), _createElementBlock("div", { + id: "foo", class: _normalizeClass(_ctx.bar.baz) }, [ - _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), + _createTextVNode(_toDisplayString(_ctx.world.burn()) + " ", 1 /* TEXT */), (_ctx.ok) - ? (_openBlock(), _createElementBlock(\\"div\\", { key: 0 }, \\"yes\\")) + ? (_openBlock(), _createElementBlock("div", { key: 0 }, "yes")) : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ - _createTextVNode(\\"no\\") + _createTextVNode("no") ], 64 /* STABLE_FRAGMENT */)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { - return (_openBlock(), _createElementBlock(\\"div\\", null, [ - _createElementVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) + return (_openBlock(), _createElementBlock("div", null, [ + _createElementVNode("span", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index e4728a46104..5217a15023d 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -390,7 +390,7 @@ exports[`compiler: parse > Errors > DUPLICATE_ATTRIBUTE >