From dddba283566021f3a54add9ce599e3fed9d0cd27 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 15 Nov 2021 19:12:57 +0100 Subject: [PATCH] browser: coalesce duplicate agent version in caniuse data Development version 95 in android is joined with and_chr. --- tools/mkcaniuse | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/mkcaniuse b/tools/mkcaniuse index 2d9759e..f72122b 100755 --- a/tools/mkcaniuse +++ b/tools/mkcaniuse @@ -6,6 +6,7 @@ use Data::Dump 'pp'; use JSON::PP; use File::stat; use Time::Piece; +use List::Util 'uniq'; our $VERSION = '1.03'; @@ -55,6 +56,10 @@ for my $feature (values %{ $data->{data} }) { } } +while (my ($agent, $row) = each %{ $data->{agents} }) { + $row->{versions} = [ uniq map { $_->{version} } @{ $row->{version_list} } ]; +} + say "# automatically generated by $0"; print '+', pp($data); -- 2.30.0