fix: maybe

This commit is contained in:
2023-11-17 13:22:28 +00:00
parent b625ccd8d6
commit 999b1ae6fc
772 changed files with 3923 additions and 30947 deletions

View File

@ -271,7 +271,7 @@ export default {
a11y_click_events_have_key_events: {
code: 'a11y-click-events-have-key-events',
message:
'A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.'
'A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.'
},
a11y_missing_content: /** @param {string} name */ (name) => ({
code: 'a11y-missing-content',

View File

@ -50,7 +50,7 @@ export function invalidate(renderer, scope, node, names, main_execution_context
if (
node.type === 'AssignmentExpression' &&
node.operator === '=' &&
nodes_match(node.left, node.right, ['trailingComments', 'leadingComments']) &&
nodes_match(node.left, node.right, ['trailingComments','leadingComments']) &&
tail.length === 0
) {
return get_invalidated(head, node);

View File

@ -1,4 +1,4 @@
export function nodes_match(a, b, ignoreKeys = []) {
export function nodes_match(a, b, ignoreKeys=[]) {
if (!!a !== !!b) return false;
if (Array.isArray(a) !== Array.isArray(b)) return false;
@ -8,12 +8,8 @@ export function nodes_match(a, b, ignoreKeys = []) {
return a.every((child, i) => nodes_match(child, b[i]));
}
const a_keys = Object.keys(a)
.sort()
.filter((key) => !ignoreKeys.includes(key));
const b_keys = Object.keys(b)
.sort()
.filter((key) => !ignoreKeys.includes(key));
const a_keys = Object.keys(a).sort().filter(key => !ignoreKeys.includes(key));
const b_keys = Object.keys(b).sort().filter(key => !ignoreKeys.includes(key));
if (a_keys.length !== b_keys.length) return false;

View File

@ -807,9 +807,6 @@ export function claim_html_tag(nodes, is_svg) {
detach(html_tag_nodes[0]);
detach(html_tag_nodes[html_tag_nodes.length - 1]);
const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);
if (claimed_nodes.length === 0) {
return new HtmlTagHydration(is_svg);
}
for (const n of claimed_nodes) {
n.claim_order = nodes.claim_info.total_claimed;
nodes.claim_info.total_claimed += 1;

View File

@ -6,5 +6,5 @@
* https://svelte.dev/docs/svelte-compiler#svelte-version
* @type {string}
*/
export const VERSION = '4.2.3';
export const VERSION = '4.2.2';
export const PUBLIC_VERSION = '4';