playwright-core
Advanced tools
Comparing version 1.50.0-alpha-2025-01-11 to 1.50.0-alpha-2025-01-12
@@ -115,2 +115,10 @@ "use strict"; | ||
if (valueIsScalar) { | ||
const type = typeof value.value; | ||
if (type !== 'string' && type !== 'number' && type !== 'boolean') { | ||
errors.push({ | ||
message: 'Node value should be a string or a sequence', | ||
range: convertRange(entry.value.range || map.range) | ||
}); | ||
continue; | ||
} | ||
container.children.push({ | ||
@@ -151,3 +159,9 @@ ...childNode, | ||
message: 'Aria snapshot must be a YAML sequence, elements starting with " -"', | ||
range: convertRange(yamlDoc.contents.range) | ||
range: yamlDoc.contents ? convertRange(yamlDoc.contents.range) : [{ | ||
line: 0, | ||
col: 0 | ||
}, { | ||
line: 0, | ||
col: 0 | ||
}] | ||
}); | ||
@@ -181,3 +195,3 @@ } | ||
function valueOrRegex(value) { | ||
return value.startsWith('/') && value.endsWith('/') ? { | ||
return value.startsWith('/') && value.endsWith('/') && value.length > 1 ? { | ||
pattern: value.slice(1, -1) | ||
@@ -184,0 +198,0 @@ } : normalizeWhitespace(value); |
{ | ||
"name": "playwright-core", | ||
"version": "1.50.0-alpha-2025-01-11", | ||
"version": "1.50.0-alpha-2025-01-12", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7844389
109955