From bd8e06b9ef3cd94b106ab889594301145ac7978b Mon Sep 17 00:00:00 2001 From: Ion Gireada Date: Fri, 4 Jul 2025 11:35:41 +0300 Subject: [PATCH] fix: :bug: update setup.js Update setup.js to use the latest version of inquirer package --- setup.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.js b/setup.js index d60c3ed..82a79df 100644 --- a/setup.js +++ b/setup.js @@ -2,11 +2,10 @@ const fs = require('fs'); const path = require('path'); -const inquirer = require('inquirer'); // Import Inquirer // List of files that need to be modified by the script const filesToModify = [ - 'project.json', + 'package.json', 'CONTRIBUTING.md', 'LICENSE', 'CODE_OF_CONDUCT.md', @@ -17,7 +16,7 @@ const filesToModify = [ * Collects all necessary inputs from the user using Inquirer. * @returns {Promise} An object containing all user inputs. */ -async function getUserInputs() { +async function getUserInputs(inquirer) { console.log('\n--- Project Setup ---'); console.log("Let's personalize your new repository."); console.log('Please provide the following information:'); @@ -208,8 +207,10 @@ async function processFiles(inputs) { * Main function to run the setup script. */ async function runSetup() { + let inquirer; try { - const inputs = await getUserInputs(); + inquirer = (await import('inquirer')).default; + const inputs = await getUserInputs(inquirer); await processFiles(inputs); console.log('\n--- Setup Complete! ---');