-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
37 changed files
with
777 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ Please note that we do not consider XSS via template expressions a valid attack | |
|
||
We would like to thank the following security researchers for responsibly disclosing security issues to us. | ||
|
||
- Jeet Pal - [GitHub](https://github.com/jeetpal2007) | [Email]([email protected]) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290 ) | ||
- Jeet Pal - [@jeetpal2007](https://github.com/jeetpal2007) | [Email]([email protected]) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290 ) | ||
- Mix - [@mnixry](https://github.com/mnixry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"private": true, | ||
"version": "3.0.0-vapor", | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].5", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "node scripts/dev.js vue vue-vapor", | ||
|
@@ -59,7 +59,7 @@ | |
"node": ">=18.12.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/parser": "^7.24.1", | ||
"@babel/parser": "^7.24.4", | ||
"@babel/types": "^7.24.0", | ||
"@codspeed/vitest-plugin": "^3.1.0", | ||
"@rollup/plugin-alias": "^5.1.0", | ||
|
@@ -70,10 +70,10 @@ | |
"@rollup/plugin-terser": "^0.4.4", | ||
"@types/hash-sum": "^1.0.2", | ||
"@types/minimist": "^1.2.5", | ||
"@types/node": "^20.12.5", | ||
"@types/node": "^20.12.7", | ||
"@types/semver": "^7.5.8", | ||
"@vitest/coverage-istanbul": "^1.4.0", | ||
"@vitest/ui": "^1.4.0", | ||
"@vitest/coverage-istanbul": "^1.5.0", | ||
"@vitest/ui": "^1.5.0", | ||
"@vue/consolidate": "1.0.0", | ||
"conventional-changelog-cli": "^4.1.0", | ||
"enquirer": "^2.4.1", | ||
|
@@ -87,32 +87,32 @@ | |
"jsdom": "^24.0.0", | ||
"lint-staged": "^15.2.2", | ||
"lodash": "^4.17.21", | ||
"magic-string": "^0.30.8", | ||
"magic-string": "^0.30.10", | ||
"markdown-table": "^3.0.3", | ||
"marked": "^12.0.1", | ||
"marked": "^12.0.2", | ||
"minimist": "^1.2.8", | ||
"npm-run-all2": "^6.1.2", | ||
"picocolors": "^1.0.0", | ||
"prettier": "^3.2.5", | ||
"pretty-bytes": "^6.1.1", | ||
"pug": "^3.0.2", | ||
"puppeteer": "~22.6.3", | ||
"puppeteer": "~22.6.5", | ||
"rimraf": "^5.0.5", | ||
"rollup": "^4.13.2", | ||
"rollup": "^4.16.1", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"rollup-plugin-polyfill-node": "^0.13.0", | ||
"semver": "^7.6.0", | ||
"serve": "^14.2.1", | ||
"simple-git-hooks": "^2.11.1", | ||
"terser": "^5.30.1", | ||
"terser": "^5.30.3", | ||
"todomvc-app-css": "^2.4.3", | ||
"tslib": "^2.6.2", | ||
"tsx": "^4.7.2", | ||
"typescript": "~5.4.5", | ||
"typescript-eslint": "^7.6.0", | ||
"vite": "^5.2.7", | ||
"vitest": "^1.4.0" | ||
"vite": "^5.2.10", | ||
"vitest": "^1.5.0" | ||
}, | ||
"pnpm": { | ||
"peerDependencyRules": { | ||
|
228 changes: 228 additions & 0 deletions
228
packages/compiler-core/__tests__/transforms/__snapshots__/transformElement.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`compiler: v-for > codegen > basic v-for 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return (_openBlock(), _createElementBlock("span")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > keyed template v-for 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createElementVNode: _createElementVNode } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return (_openBlock(), _createElementBlock(_Fragment, { key: item }, [ | ||
"hello", | ||
_createElementVNode("span") | ||
], 64 /* STABLE_FRAGMENT */)) | ||
}), 128 /* KEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > keyed v-for 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return (_openBlock(), _createElementBlock("span", { key: item })) | ||
}), 128 /* KEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > skipped key 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item, __, index) => { | ||
return (_openBlock(), _createElementBlock("span")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > skipped value & key 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (_, __, index) => { | ||
return (_openBlock(), _createElementBlock("span")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > skipped value 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (_, key, index) => { | ||
return (_openBlock(), _createElementBlock("span")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > template v-for 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createElementVNode: _createElementVNode } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return (_openBlock(), _createElementBlock(_Fragment, null, [ | ||
"hello", | ||
_createElementVNode("span") | ||
], 64 /* STABLE_FRAGMENT */)) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > template v-for key injection with single child 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return (_openBlock(), _createElementBlock("span", { | ||
key: item.id, | ||
id: item.id | ||
}, null, 8 /* PROPS */, ["id"])) | ||
}), 128 /* KEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > template v-for w/ <slot/> 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, renderSlot: _renderSlot } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return _renderSlot($slots, "default") | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > v-for on <slot/> 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, renderSlot: _renderSlot } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item) => { | ||
return _renderSlot($slots, "default") | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > v-for on element with custom directive 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, resolveDirective: _resolveDirective, withDirectives: _withDirectives } = _Vue | ||
const _directive_foo = _resolveDirective("foo") | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(list, (i) => { | ||
return _withDirectives((_openBlock(), _createElementBlock("div", null, null, 512 /* NEED_PATCH */)), [ | ||
[_directive_foo] | ||
]) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > v-for with constant expression 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode } = _Vue | ||
return (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (item) => { | ||
return _createElementVNode("p", null, _toDisplayString(item), 1 /* TEXT */) | ||
}), 64 /* STABLE_FRAGMENT */)) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > v-if + v-for 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode } = _Vue | ||
return ok | ||
? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(list, (i) => { | ||
return (_openBlock(), _createElementBlock("div")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
: _createCommentVNode("v-if", true) | ||
} | ||
}" | ||
`; | ||
|
||
exports[`compiler: v-for > codegen > v-if + v-for on <template> 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode } = _Vue | ||
return ok | ||
? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(list, (i) => { | ||
return (_openBlock(), _createElementBlock(_Fragment, null, [], 64 /* STABLE_FRAGMENT */)) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
: _createCommentVNode("v-if", true) | ||
} | ||
}" | ||
`; | ||
exports[`compiler: v-for > codegen > value + key + index 1`] = ` | ||
"const _Vue = Vue | ||
return function render(_ctx, _cache) { | ||
with (_ctx) { | ||
const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue | ||
return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (item, key, index) => { | ||
return (_openBlock(), _createElementBlock("span")) | ||
}), 256 /* UNKEYED_FRAGMENT */)) | ||
} | ||
}" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.