Skip to content

Commit 4aa7a4a

Browse files
chore(shared): update patch flag name (#12831)
1 parent 4eb46e4 commit 4aa7a4a

File tree

6 files changed

+59
-59
lines changed

6 files changed

+59
-59
lines changed

packages/compiler-core/__tests__/transforms/__snapshots__/cacheStatic.spec.ts.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ return function render(_ctx, _cache) {
88
const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
99
1010
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
11-
_createElementVNode("div", { key: "foo" }, null, -1 /* HOISTED */)
11+
_createElementVNode("div", { key: "foo" }, null, -1 /* CACHED */)
1212
])))
1313
}
1414
}"
@@ -25,11 +25,11 @@ return function render(_ctx, _cache) {
2525
_createElementVNode("p", null, [
2626
_createElementVNode("span"),
2727
_createElementVNode("span")
28-
], -1 /* HOISTED */),
28+
], -1 /* CACHED */),
2929
_createElementVNode("p", null, [
3030
_createElementVNode("span"),
3131
_createElementVNode("span")
32-
], -1 /* HOISTED */)
32+
], -1 /* CACHED */)
3333
])))
3434
}
3535
}"
@@ -45,7 +45,7 @@ return function render(_ctx, _cache) {
4545
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
4646
_createElementVNode("div", null, [
4747
_createCommentVNode("comment")
48-
], -1 /* HOISTED */)
48+
], -1 /* CACHED */)
4949
])))
5050
}
5151
}"
@@ -59,9 +59,9 @@ return function render(_ctx, _cache) {
5959
const { createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
6060
6161
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
62-
_createElementVNode("span", null, null, -1 /* HOISTED */),
62+
_createElementVNode("span", null, null, -1 /* CACHED */),
6363
_createTextVNode("foo"),
64-
_createElementVNode("div", null, null, -1 /* HOISTED */)
64+
_createElementVNode("div", null, null, -1 /* CACHED */)
6565
])))
6666
}
6767
}"
@@ -75,7 +75,7 @@ return function render(_ctx, _cache) {
7575
const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
7676
7777
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
78-
_createElementVNode("span", { class: "inline" }, "hello", -1 /* HOISTED */)
78+
_createElementVNode("span", { class: "inline" }, "hello", -1 /* CACHED */)
7979
])))
8080
}
8181
}"
@@ -148,7 +148,7 @@ return function render(_ctx, _cache) {
148148
const { toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
149149
150150
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
151-
_createElementVNode("span", null, "foo " + _toDisplayString(1) + " " + _toDisplayString(true), -1 /* HOISTED */)
151+
_createElementVNode("span", null, "foo " + _toDisplayString(1) + " " + _toDisplayString(true), -1 /* CACHED */)
152152
])))
153153
}
154154
}"
@@ -162,7 +162,7 @@ return function render(_ctx, _cache) {
162162
const { toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
163163
164164
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
165-
_createElementVNode("span", { foo: 0 }, _toDisplayString(1), -1 /* HOISTED */)
165+
_createElementVNode("span", { foo: 0 }, _toDisplayString(1), -1 /* CACHED */)
166166
])))
167167
}
168168
}"
@@ -178,7 +178,7 @@ return function render(_ctx, _cache) {
178178
return (_openBlock(), _createElementBlock("div", null, [
179179
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(1, (i) => {
180180
return (_openBlock(), _createElementBlock("div", null, [...(_cache[0] || (_cache[0] = [
181-
_createElementVNode("span", { class: "hi" }, null, -1 /* HOISTED */)
181+
_createElementVNode("span", { class: "hi" }, null, -1 /* CACHED */)
182182
]))]))
183183
}), 256 /* UNKEYED_FRAGMENT */))
184184
]))
@@ -216,7 +216,7 @@ return function render(_ctx, _cache) {
216216
217217
return (_openBlock(), _createElementBlock("div", null, [
218218
_withDirectives((_openBlock(), _createElementBlock("svg", null, _cache[0] || (_cache[0] = [
219-
_createElementVNode("path", { d: "M2,3H5.5L12" }, null, -1 /* HOISTED */)
219+
_createElementVNode("path", { d: "M2,3H5.5L12" }, null, -1 /* CACHED */)
220220
]))), [
221221
[_directive_foo]
222222
])
@@ -402,7 +402,7 @@ return function render(_ctx, _cache) {
402402
return (_openBlock(), _createElementBlock("div", null, [
403403
ok
404404
? (_openBlock(), _createElementBlock("div", _hoisted_1, _cache[0] || (_cache[0] = [
405-
_createElementVNode("span", null, null, -1 /* HOISTED */)
405+
_createElementVNode("span", null, null, -1 /* CACHED */)
406406
])))
407407
: _createCommentVNode("v-if", true)
408408
]))
@@ -423,7 +423,7 @@ return function render(_ctx, _cache) {
423423
return (_openBlock(), _createElementBlock("div", null, [
424424
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(list, (i) => {
425425
return (_openBlock(), _createElementBlock("div", _hoisted_1, _cache[0] || (_cache[0] = [
426-
_createElementVNode("span", null, null, -1 /* HOISTED */)
426+
_createElementVNode("span", null, null, -1 /* CACHED */)
427427
])))
428428
}), 256 /* UNKEYED_FRAGMENT */))
429429
]))

packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`stringify static html > eligible content (elements > 20) + non-eligible
66
return function render(_ctx, _cache) {
77
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
88
_createStaticVNode("<span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span>", 20),
9-
_createElementVNode("div", { key: "1" }, "1", -1 /* HOISTED */),
9+
_createElementVNode("div", { key: "1" }, "1", -1 /* CACHED */),
1010
_createStaticVNode("<span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span>", 20)
1111
])))
1212
}"
@@ -54,7 +54,7 @@ return function render(_ctx, _cache) {
5454
_createElementVNode("option", { value: "1" }),
5555
_createElementVNode("option", { value: "1" }),
5656
_createElementVNode("option", { value: "1" })
57-
], -1 /* HOISTED */)
57+
], -1 /* CACHED */)
5858
])))
5959
}"
6060
`;
@@ -70,7 +70,7 @@ return function render(_ctx, _cache) {
7070
_createElementVNode("option", { value: 1 }),
7171
_createElementVNode("option", { value: 1 }),
7272
_createElementVNode("option", { value: 1 })
73-
], -1 /* HOISTED */)
73+
], -1 /* CACHED */)
7474
])))
7575
}"
7676
`;
@@ -87,7 +87,7 @@ return function render(_ctx, _cache) {
8787
_createElementVNode("span", { class: "foo" }, "foo"),
8888
_createElementVNode("span", { class: "foo" }, "foo"),
8989
_createElementVNode("img", { src: _imports_0_ })
90-
], -1 /* HOISTED */)
90+
], -1 /* CACHED */)
9191
])))
9292
}"
9393
`;

packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ export default {
861861
return (_ctx, _cache) => {
862862
return (_openBlock(), _createElementBlock(_Fragment, null, [
863863
_createElementVNode("div", null, _toDisplayString(count.value), 1 /* TEXT */),
864-
_cache[0] || (_cache[0] = _createElementVNode("div", null, "static", -1 /* HOISTED */))
864+
_cache[0] || (_cache[0] = _createElementVNode("div", null, "static", -1 /* CACHED */))
865865
], 64 /* STABLE_FRAGMENT */))
866866
}
867867
}

packages/compiler-sfc/__tests__/__snapshots__/templateTransformAssetUrl.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const _hoisted_1 = _imports_0 + '#fragment'
4141
4242
export function render(_ctx, _cache) {
4343
return (_openBlock(), _createElementBlock(_Fragment, null, [
44-
_cache[0] || (_cache[0] = _createElementVNode("use", { href: _hoisted_1 }, null, -1 /* HOISTED */)),
45-
_cache[1] || (_cache[1] = _createElementVNode("use", { href: _hoisted_1 }, null, -1 /* HOISTED */))
44+
_cache[0] || (_cache[0] = _createElementVNode("use", { href: _hoisted_1 }, null, -1 /* CACHED */)),
45+
_cache[1] || (_cache[1] = _createElementVNode("use", { href: _hoisted_1 }, null, -1 /* CACHED */))
4646
], 64 /* STABLE_FRAGMENT */))
4747
}"
4848
`;

packages/compiler-sfc/__tests__/__snapshots__/templateTransformSrcset.spec.ts.snap

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const _hoisted_2 = _imports_0 + ' 1x, ' + "/foo/logo.png" + ' 2x'
1010
1111
export function render(_ctx, _cache) {
1212
return (_openBlock(), _createElementBlock(_Fragment, null, [
13-
_cache[0] || (_cache[0] = _createElementVNode("img", { srcset: _hoisted_1 }, null, -1 /* HOISTED */)),
14-
_cache[1] || (_cache[1] = _createElementVNode("img", { srcset: _hoisted_2 }, null, -1 /* HOISTED */))
13+
_cache[0] || (_cache[0] = _createElementVNode("img", { srcset: _hoisted_1 }, null, -1 /* CACHED */)),
14+
_cache[1] || (_cache[1] = _createElementVNode("img", { srcset: _hoisted_2 }, null, -1 /* CACHED */))
1515
], 64 /* STABLE_FRAGMENT */))
1616
}"
1717
`;
@@ -35,51 +35,51 @@ export function render(_ctx, _cache) {
3535
_cache[0] || (_cache[0] = _createElementVNode("img", {
3636
src: "./logo.png",
3737
srcset: ""
38-
}, null, -1 /* HOISTED */)),
38+
}, null, -1 /* CACHED */)),
3939
_cache[1] || (_cache[1] = _createElementVNode("img", {
4040
src: "./logo.png",
4141
srcset: _hoisted_1
42-
}, null, -1 /* HOISTED */)),
42+
}, null, -1 /* CACHED */)),
4343
_cache[2] || (_cache[2] = _createElementVNode("img", {
4444
src: "./logo.png",
4545
srcset: _hoisted_2
46-
}, null, -1 /* HOISTED */)),
46+
}, null, -1 /* CACHED */)),
4747
_cache[3] || (_cache[3] = _createElementVNode("img", {
4848
src: "./logo.png",
4949
srcset: _hoisted_3
50-
}, null, -1 /* HOISTED */)),
50+
}, null, -1 /* CACHED */)),
5151
_cache[4] || (_cache[4] = _createElementVNode("img", {
5252
src: "./logo.png",
5353
srcset: _hoisted_4
54-
}, null, -1 /* HOISTED */)),
54+
}, null, -1 /* CACHED */)),
5555
_cache[5] || (_cache[5] = _createElementVNode("img", {
5656
src: "./logo.png",
5757
srcset: _hoisted_5
58-
}, null, -1 /* HOISTED */)),
58+
}, null, -1 /* CACHED */)),
5959
_cache[6] || (_cache[6] = _createElementVNode("img", {
6060
src: "./logo.png",
6161
srcset: _hoisted_6
62-
}, null, -1 /* HOISTED */)),
62+
}, null, -1 /* CACHED */)),
6363
_cache[7] || (_cache[7] = _createElementVNode("img", {
6464
src: "./logo.png",
6565
srcset: _hoisted_7
66-
}, null, -1 /* HOISTED */)),
66+
}, null, -1 /* CACHED */)),
6767
_cache[8] || (_cache[8] = _createElementVNode("img", {
6868
src: "/logo.png",
6969
srcset: "/logo.png, /logo.png 2x"
70-
}, null, -1 /* HOISTED */)),
70+
}, null, -1 /* CACHED */)),
7171
_cache[9] || (_cache[9] = _createElementVNode("img", {
7272
src: "https://example.com/logo.png",
7373
srcset: "https://example.com/logo.png, https://example.com/logo.png 2x"
74-
}, null, -1 /* HOISTED */)),
74+
}, null, -1 /* CACHED */)),
7575
_cache[10] || (_cache[10] = _createElementVNode("img", {
7676
src: "/logo.png",
7777
srcset: _hoisted_8
78-
}, null, -1 /* HOISTED */)),
78+
}, null, -1 /* CACHED */)),
7979
_cache[11] || (_cache[11] = _createElementVNode("img", {
8080
src: "data:image/png;base64,i",
8181
srcset: "data:image/png;base64,i 1x, data:image/png;base64,i 2x"
82-
}, null, -1 /* HOISTED */))
82+
}, null, -1 /* CACHED */))
8383
], 64 /* STABLE_FRAGMENT */))
8484
}"
8585
`;
@@ -92,51 +92,51 @@ export function render(_ctx, _cache) {
9292
_cache[0] || (_cache[0] = _createElementVNode("img", {
9393
src: "./logo.png",
9494
srcset: ""
95-
}, null, -1 /* HOISTED */)),
95+
}, null, -1 /* CACHED */)),
9696
_cache[1] || (_cache[1] = _createElementVNode("img", {
9797
src: "./logo.png",
9898
srcset: "/foo/logo.png"
99-
}, null, -1 /* HOISTED */)),
99+
}, null, -1 /* CACHED */)),
100100
_cache[2] || (_cache[2] = _createElementVNode("img", {
101101
src: "./logo.png",
102102
srcset: "/foo/logo.png 2x"
103-
}, null, -1 /* HOISTED */)),
103+
}, null, -1 /* CACHED */)),
104104
_cache[3] || (_cache[3] = _createElementVNode("img", {
105105
src: "./logo.png",
106106
srcset: "/foo/logo.png 2x"
107-
}, null, -1 /* HOISTED */)),
107+
}, null, -1 /* CACHED */)),
108108
_cache[4] || (_cache[4] = _createElementVNode("img", {
109109
src: "./logo.png",
110110
srcset: "/foo/logo.png, /foo/logo.png 2x"
111-
}, null, -1 /* HOISTED */)),
111+
}, null, -1 /* CACHED */)),
112112
_cache[5] || (_cache[5] = _createElementVNode("img", {
113113
src: "./logo.png",
114114
srcset: "/foo/logo.png 2x, /foo/logo.png"
115-
}, null, -1 /* HOISTED */)),
115+
}, null, -1 /* CACHED */)),
116116
_cache[6] || (_cache[6] = _createElementVNode("img", {
117117
src: "./logo.png",
118118
srcset: "/foo/logo.png 2x, /foo/logo.png 3x"
119-
}, null, -1 /* HOISTED */)),
119+
}, null, -1 /* CACHED */)),
120120
_cache[7] || (_cache[7] = _createElementVNode("img", {
121121
src: "./logo.png",
122122
srcset: "/foo/logo.png, /foo/logo.png 2x, /foo/logo.png 3x"
123-
}, null, -1 /* HOISTED */)),
123+
}, null, -1 /* CACHED */)),
124124
_cache[8] || (_cache[8] = _createElementVNode("img", {
125125
src: "/logo.png",
126126
srcset: "/logo.png, /logo.png 2x"
127-
}, null, -1 /* HOISTED */)),
127+
}, null, -1 /* CACHED */)),
128128
_cache[9] || (_cache[9] = _createElementVNode("img", {
129129
src: "https://example.com/logo.png",
130130
srcset: "https://example.com/logo.png, https://example.com/logo.png 2x"
131-
}, null, -1 /* HOISTED */)),
131+
}, null, -1 /* CACHED */)),
132132
_cache[10] || (_cache[10] = _createElementVNode("img", {
133133
src: "/logo.png",
134134
srcset: "/logo.png, /foo/logo.png 2x"
135-
}, null, -1 /* HOISTED */)),
135+
}, null, -1 /* CACHED */)),
136136
_cache[11] || (_cache[11] = _createElementVNode("img", {
137137
src: "data:image/png;base64,i",
138138
srcset: "data:image/png;base64,i 1x, data:image/png;base64,i 2x"
139-
}, null, -1 /* HOISTED */))
139+
}, null, -1 /* CACHED */))
140140
], 64 /* STABLE_FRAGMENT */))
141141
}"
142142
`;
@@ -162,51 +162,51 @@ export function render(_ctx, _cache) {
162162
_cache[0] || (_cache[0] = _createElementVNode("img", {
163163
src: "./logo.png",
164164
srcset: ""
165-
}, null, -1 /* HOISTED */)),
165+
}, null, -1 /* CACHED */)),
166166
_cache[1] || (_cache[1] = _createElementVNode("img", {
167167
src: "./logo.png",
168168
srcset: _hoisted_1
169-
}, null, -1 /* HOISTED */)),
169+
}, null, -1 /* CACHED */)),
170170
_cache[2] || (_cache[2] = _createElementVNode("img", {
171171
src: "./logo.png",
172172
srcset: _hoisted_2
173-
}, null, -1 /* HOISTED */)),
173+
}, null, -1 /* CACHED */)),
174174
_cache[3] || (_cache[3] = _createElementVNode("img", {
175175
src: "./logo.png",
176176
srcset: _hoisted_3
177-
}, null, -1 /* HOISTED */)),
177+
}, null, -1 /* CACHED */)),
178178
_cache[4] || (_cache[4] = _createElementVNode("img", {
179179
src: "./logo.png",
180180
srcset: _hoisted_4
181-
}, null, -1 /* HOISTED */)),
181+
}, null, -1 /* CACHED */)),
182182
_cache[5] || (_cache[5] = _createElementVNode("img", {
183183
src: "./logo.png",
184184
srcset: _hoisted_5
185-
}, null, -1 /* HOISTED */)),
185+
}, null, -1 /* CACHED */)),
186186
_cache[6] || (_cache[6] = _createElementVNode("img", {
187187
src: "./logo.png",
188188
srcset: _hoisted_6
189-
}, null, -1 /* HOISTED */)),
189+
}, null, -1 /* CACHED */)),
190190
_cache[7] || (_cache[7] = _createElementVNode("img", {
191191
src: "./logo.png",
192192
srcset: _hoisted_7
193-
}, null, -1 /* HOISTED */)),
193+
}, null, -1 /* CACHED */)),
194194
_cache[8] || (_cache[8] = _createElementVNode("img", {
195195
src: "/logo.png",
196196
srcset: _hoisted_8
197-
}, null, -1 /* HOISTED */)),
197+
}, null, -1 /* CACHED */)),
198198
_cache[9] || (_cache[9] = _createElementVNode("img", {
199199
src: "https://example.com/logo.png",
200200
srcset: "https://example.com/logo.png, https://example.com/logo.png 2x"
201-
}, null, -1 /* HOISTED */)),
201+
}, null, -1 /* CACHED */)),
202202
_cache[10] || (_cache[10] = _createElementVNode("img", {
203203
src: "/logo.png",
204204
srcset: _hoisted_9
205-
}, null, -1 /* HOISTED */)),
205+
}, null, -1 /* CACHED */)),
206206
_cache[11] || (_cache[11] = _createElementVNode("img", {
207207
src: "data:image/png;base64,i",
208208
srcset: "data:image/png;base64,i 1x, data:image/png;base64,i 2x"
209-
}, null, -1 /* HOISTED */))
209+
}, null, -1 /* CACHED */))
210210
], 64 /* STABLE_FRAGMENT */))
211211
}"
212212
`;

packages/shared/src/patchFlags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ export const PatchFlagNames: Record<PatchFlags, string> = {
139139
[PatchFlags.NEED_PATCH]: `NEED_PATCH`,
140140
[PatchFlags.DYNAMIC_SLOTS]: `DYNAMIC_SLOTS`,
141141
[PatchFlags.DEV_ROOT_FRAGMENT]: `DEV_ROOT_FRAGMENT`,
142-
[PatchFlags.CACHED]: `HOISTED`,
142+
[PatchFlags.CACHED]: `CACHED`,
143143
[PatchFlags.BAIL]: `BAIL`,
144144
}

0 commit comments

Comments
 (0)