From 88db73966f4ca63fc17f53ca2416ea80d762d4cd Mon Sep 17 00:00:00 2001 From: LitoMore Date: Mon, 25 Sep 2023 02:36:55 +0800 Subject: [PATCH] Fix color normalizer in `add-icon-data` script (#9613) --- package.json | 2 +- scripts/add-icon-data.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ecfc6e754..75bb7fdee 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "url": "https://opencollective.com/simple-icons" }, "devDependencies": { - "@inquirer/prompts": "1.0.0", + "@inquirer/prompts": "3.1.1", "chalk": "5.2.0", "editorconfig-checker": "5.0.1", "esbuild": "0.17.19", diff --git a/scripts/add-icon-data.js b/scripts/add-icon-data.js index cc9b903a1..7620b8546 100644 --- a/scripts/add-icon-data.js +++ b/scripts/add-icon-data.js @@ -58,7 +58,7 @@ const aliasesChoices = Object.entries( const getIconDataFromAnswers = (answers) => ({ title: answers.title, - hex: answers.hex.toUpperCase(), + hex: normalizeColor(answers.hex), source: answers.source, ...(answers.hasGuidelines ? { guidelines: answers.guidelines } : {}), ...(answers.hasLicense @@ -96,7 +96,6 @@ answers.title = await input({ answers.hex = await input({ message: 'Hex', validate: hexValidator, - filter: (text) => normalizeColor(text), transformer: hexTransformer, });