From bfdd3f021d110b656791ea6c49426ede45a77781 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 16 Dec 2024 16:37:26 +0200 Subject: [PATCH] chore(utils): fix tags when converting icon set info --- packages/utils/package.json | 2 +- packages/utils/src/icon-set/convert-info.ts | 5 +++++ packages/utils/tests/convert-info-test.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/utils/package.json b/packages/utils/package.json index 7f3b1d3..76dc2ef 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -3,7 +3,7 @@ "type": "module", "description": "Common functions for working with Iconify icon sets used by various packages.", "author": "Vjacheslav Trushkin", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "bugs": "https://github.com/iconify/iconify/issues", "homepage": "https://iconify.design/docs/libraries/utils/", diff --git a/packages/utils/src/icon-set/convert-info.ts b/packages/utils/src/icon-set/convert-info.ts index 31ccefe..0254c87 100644 --- a/packages/utils/src/icon-set/convert-info.ts +++ b/packages/utils/src/icon-set/convert-info.ts @@ -234,6 +234,11 @@ export function convertIconSetInfo( info.category = source.category; } + // Tags + if (source.tags instanceof Array) { + info.tags = source.tags; + } + // Palette switch (typeof source.palette) { case 'boolean': diff --git a/packages/utils/tests/convert-info-test.ts b/packages/utils/tests/convert-info-test.ts index 0eff41c..183433f 100644 --- a/packages/utils/tests/convert-info-test.ts +++ b/packages/utils/tests/convert-info-test.ts @@ -287,6 +287,7 @@ describe('Testing convertIconSetInfo', () => { height: 16, palette: false, category: 'General', + tags: ['Foo', 'Bar'], }; const result = convertIconSetInfo(item);