From 1756fdfb99cd1734a0e80d5ea4c60c0bc5030845 Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Fri, 17 May 2024 15:33:19 +0530 Subject: [PATCH] remove legacy index file path from copying files script --- scripts/copyFiles.mjs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/copyFiles.mjs b/scripts/copyFiles.mjs index 1073cfe4a7f5d4..8ebf82814563b7 100644 --- a/scripts/copyFiles.mjs +++ b/scripts/copyFiles.mjs @@ -22,19 +22,17 @@ async function addLicense(packageData) { */ `; await Promise.all( - ['./index.js', './legacy/index.js', './modern/index.js', './node/index.js'].map( - async (file) => { - try { - await prepend(path.resolve(buildPath, file), license); - } catch (err) { - if (err.code === 'ENOENT') { - console.log(`Skipped license for ${file}`); - } else { - throw err; - } + ['./index.js', './modern/index.js', './node/index.js'].map(async (file) => { + try { + await prepend(path.resolve(buildPath, file), license); + } catch (err) { + if (err.code === 'ENOENT') { + console.log(`Skipped license for ${file}`); + } else { + throw err; } - }, - ), + } + }), ); }