{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":487836715,"defaultBranch":"master","name":"uap-core","ownerLogin":"masklinn","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2022-05-02T12:30:04.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6993?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1713904422.0","currentOid":""},"activityList":{"items":[{"before":"970cc5aaa2278aac0b4a19f2b16e7d5a5279a5bf","after":null,"ref":"refs/heads/fix-patch-minor-ua-tests","pushedAt":"2024-04-23T20:33:42.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"masklinn","name":null,"path":"/masklinn","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6993?s=80&v=4"}},{"before":"89316dc908a100636658f69ae119e89f52656501","after":"dd6c80e8d0700b11966e3142135ff59bbc74a7c4","ref":"refs/heads/0.3","pushedAt":"2024-04-20T19:35:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"masklinn","name":null,"path":"/masklinn","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6993?s=80&v=4"},"commit":{"message":"Update / rework spec\n\nUA spec I feel has major issues, especially that respecting it makes\nit impossible for tests to pass, leading to implementations having to\ncopy one another or do their own random hack (as the C# implementation\ndoes).\n\nThere are two major issues in the 0.2 spec:\n\nReplacement fields templating\n-----------------------------\n\nIt states that the OS fields have individual replacements, that is\nmatch `$1` is only used in `os_replacement`, match `$2` is only used\nin `os_v1_replacement`, etc...\n\nHowever there are multiple test suites which use `$1` in\n`os_v1_replacement` (macos, win, Box.Windows), and macOS also uses\n`$2` and `$3` in shifted position.\n\nThe reference implementation handle this by just making the OS fields\ninto \"full\" templates (that is all groups are available to all\nreplacement fields). The C# implementation instead tries to mess\naround with different orders for v1 and v2 based on what it finds\nthere.\n\nObviously it makes sense to standardise the behaviour of the standard\nimplementation instead of the hack of the C# lib.\n\nBut for uniformity and to allow for less redundant explanations, I\nthink it also makes sense to make the `user_agent_parsers` fields into\n\"full\" templates (that is, all groups are available) even if no parser\ncurrently uses that. In fact that's how the Python and Go\nimplementations behave already.\n\nSide-note: far from extending the spec, the reference implementation\ndoesn't even implement it in full as it only supports replacing `$1`\nin `family_replacement`, it has no support for templating at all in\n`v1_replacement`, `v2_replacement`, or `v3_replacement`.\n\n`Device#model_replacement` can't be required\n--------------------------------------------\n\nDespite what the spec currently says, one of the user agents\n(`Opera/9.80 (BlackBerry; Opera Mini/7.0.31437/28.3030; U; en)`) has\nno capturing group and no `model_replacement`, so it's not possible to\nparse it per-expectation if `model_replacement` is required.\n\nAs such, only `Device#device_replacement` should be required.\n\nAdd `patch_minor` to user agent\n-------------------------------\n\n`patch_minor` was added to the test file and some regexes starting at\n #322 but it was never added to the spec, so do that at least. It\nshould also be added to the reference implementation eventually,\nprobably.","shortMessageHtmlLink":"Update / rework spec"}},{"before":null,"after":"970cc5aaa2278aac0b4a19f2b16e7d5a5279a5bf","ref":"refs/heads/fix-patch-minor-ua-tests","pushedAt":"2024-04-20T19:14:25.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"masklinn","name":null,"path":"/masklinn","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6993?s=80&v=4"},"commit":{"message":"fix missing and extra `patch_minor` in ua tests\n\n`patch_minor` was added to regexes and some test_ua entries in #322.\n\nNeither spec nor reference implementation were ever updated for it, so\nmany regexes were merged (?) with a capture for `patch_minor` but\nwithout correctly asserting it, and a pair of cases specify a\n`patch_minor` which is not captured:\n\n- the facebook regex[^1] only has 4 capturing groups\n- same for the AWS regex[^2]\n\n[^1]: https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L176\n[^2]: https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L155","shortMessageHtmlLink":"fix missing and extra patch_minor in ua tests"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEOHq5KgA","startCursor":null,"endCursor":null}},"title":"Activity ยท masklinn/uap-core"}