mirror of
https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git
synced 2026-11-18 16:23:38 +00:00
fix: don't read '3d'/'2fa' after a stack name as a framework version (#548)
The version pattern in _stack_query_requests_legacy had no trailing boundary, so 'react 3d ...' parsed as React 3 and the query got only deprecated rows (or none, for stacks without legacy guidance). Fixes #547
This commit is contained in:
parent
1f8857914d
commit
28b3b8dee8
@ -856,7 +856,7 @@ def _stack_query_requests_legacy(query, stack):
|
||||
if current_version is not None and stack_name is not None:
|
||||
matches = re.finditer(
|
||||
rf"\b(?:{stack_name})\s*(?:sdk|ui)?\s*(?:[@(]\s*)?(?:v(?:ersion)?\s*)?"
|
||||
rf"(\d+)(?:\.(\d+))?\s*\)?",
|
||||
rf"(\d+)(?:\.(\d+))?(?!\w)\s*\)?",
|
||||
normalized,
|
||||
)
|
||||
requested_versions = [
|
||||
|
||||
@ -116,6 +116,20 @@ class TestWebStackFreshness(unittest.TestCase):
|
||||
{row["Status"] for row in result["results"]}, {"deprecated"}
|
||||
)
|
||||
|
||||
def test_number_starting_a_word_is_not_a_version(self):
|
||||
cases = {
|
||||
"react": "react 3d canvas effect cleanup",
|
||||
"html-tailwind": "tailwind 2xl breakpoint",
|
||||
"angular": "angular 2fa login form",
|
||||
}
|
||||
for stack, query in cases.items():
|
||||
with self.subTest(stack=stack, query=query):
|
||||
result = search_stack(query, stack)
|
||||
self.assertGreater(result["count"], 0)
|
||||
self.assertNotIn(
|
||||
"deprecated", {row["Status"] for row in result["results"]}
|
||||
)
|
||||
|
||||
def test_old_major_without_curated_legacy_guidance_abstains(self):
|
||||
result = search_stack("Astro 5 content collections", "astro")
|
||||
self.assertEqual(result["count"], 0)
|
||||
|
||||
@ -856,7 +856,7 @@ def _stack_query_requests_legacy(query, stack):
|
||||
if current_version is not None and stack_name is not None:
|
||||
matches = re.finditer(
|
||||
rf"\b(?:{stack_name})\s*(?:sdk|ui)?\s*(?:[@(]\s*)?(?:v(?:ersion)?\s*)?"
|
||||
rf"(\d+)(?:\.(\d+))?\s*\)?",
|
||||
rf"(\d+)(?:\.(\d+))?(?!\w)\s*\)?",
|
||||
normalized,
|
||||
)
|
||||
requested_versions = [
|
||||
|
||||
@ -116,6 +116,20 @@ class TestWebStackFreshness(unittest.TestCase):
|
||||
{row["Status"] for row in result["results"]}, {"deprecated"}
|
||||
)
|
||||
|
||||
def test_number_starting_a_word_is_not_a_version(self):
|
||||
cases = {
|
||||
"react": "react 3d canvas effect cleanup",
|
||||
"html-tailwind": "tailwind 2xl breakpoint",
|
||||
"angular": "angular 2fa login form",
|
||||
}
|
||||
for stack, query in cases.items():
|
||||
with self.subTest(stack=stack, query=query):
|
||||
result = search_stack(query, stack)
|
||||
self.assertGreater(result["count"], 0)
|
||||
self.assertNotIn(
|
||||
"deprecated", {row["Status"] for row in result["results"]}
|
||||
)
|
||||
|
||||
def test_old_major_without_curated_legacy_guidance_abstains(self):
|
||||
result = search_stack("Astro 5 content collections", "astro")
|
||||
self.assertEqual(result["count"], 0)
|
||||
|
||||
@ -856,7 +856,7 @@ def _stack_query_requests_legacy(query, stack):
|
||||
if current_version is not None and stack_name is not None:
|
||||
matches = re.finditer(
|
||||
rf"\b(?:{stack_name})\s*(?:sdk|ui)?\s*(?:[@(]\s*)?(?:v(?:ersion)?\s*)?"
|
||||
rf"(\d+)(?:\.(\d+))?\s*\)?",
|
||||
rf"(\d+)(?:\.(\d+))?(?!\w)\s*\)?",
|
||||
normalized,
|
||||
)
|
||||
requested_versions = [
|
||||
|
||||
@ -116,6 +116,20 @@ class TestWebStackFreshness(unittest.TestCase):
|
||||
{row["Status"] for row in result["results"]}, {"deprecated"}
|
||||
)
|
||||
|
||||
def test_number_starting_a_word_is_not_a_version(self):
|
||||
cases = {
|
||||
"react": "react 3d canvas effect cleanup",
|
||||
"html-tailwind": "tailwind 2xl breakpoint",
|
||||
"angular": "angular 2fa login form",
|
||||
}
|
||||
for stack, query in cases.items():
|
||||
with self.subTest(stack=stack, query=query):
|
||||
result = search_stack(query, stack)
|
||||
self.assertGreater(result["count"], 0)
|
||||
self.assertNotIn(
|
||||
"deprecated", {row["Status"] for row in result["results"]}
|
||||
)
|
||||
|
||||
def test_old_major_without_curated_legacy_guidance_abstains(self):
|
||||
result = search_stack("Astro 5 content collections", "astro")
|
||||
self.assertEqual(result["count"], 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user