Skip to content

Commit bf9ac43

Browse files
committed
Backport - Add new engine: LibWeb + Add new OS: SerenityOS
(cherry picked from commit a6c85d0)
1 parent 3f8b5ba commit bf9ac43

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/ua-parser.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@
697697
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
698698
/ekioh(flow)\/([\w\.]+)/i, // Flow
699699
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
700-
/(icab)[\/ ]([23]\.[\d\.]+)/i // iCab
700+
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
701+
/\b(libweb)/i
701702
], [NAME, VERSION], [
702703

703704
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
@@ -775,7 +776,7 @@
775776
], [[NAME, 'Solaris'], VERSION], [
776777
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, // Solaris
777778
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i, // AIX
778-
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX
779+
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
779780
/(unix) ?([\w\.]*)/i // UNIX
780781
], [NAME, VERSION]
781782
]

test/engine-test.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@
5353
"version" : "4.5.4"
5454
}
5555
},
56+
{
57+
"desc" : "LibWeb",
58+
"ua" : "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb",
59+
"expect" :
60+
{
61+
"name" : "LibWeb",
62+
"version" : "undefined"
63+
}
64+
},
5665
{
5766
"desc" : "NetFront",
5867
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",

test/os-test.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,5 +1204,14 @@
12041204
"name" : "Linspire",
12051205
"version" : "1.5.0.4"
12061206
}
1207+
},
1208+
{
1209+
"desc" : "SerenityOS",
1210+
"ua" : "Mozilla/4.0 (SerenityOS; x86) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb",
1211+
"expect" :
1212+
{
1213+
"name" : "SerenityOS",
1214+
"version" : "undefined"
1215+
}
12071216
}
12081217
]

0 commit comments

Comments
 (0)