From 51a8a18567386ccdd7c0ddb39d5bcc852d5799ea Mon Sep 17 00:00:00 2001 From: Sanjoy Guin Date: Tue, 8 Oct 2024 23:52:14 +0530 Subject: [PATCH] feat: add auto-install dependencies for new typescript srcbook --- packages/web/src/routes/session.tsx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/packages/web/src/routes/session.tsx b/packages/web/src/routes/session.tsx index c40a95a9..6a287d75 100644 --- a/packages/web/src/routes/session.tsx +++ b/packages/web/src/routes/session.tsx @@ -310,23 +310,8 @@ function Session(props: SessionProps) { }); result = () => toast.dismiss(toastId); } else if (outdatedDependencies) { - toast.warning('Packages need to be installed', { - duration: 10000, - action: { - label: 'Install', - onClick: () => { - // If outdatedDependencies is an array, it usually menas those packages are not present - // inside of package.json yet. Thus we must specifically install them by name so they are - // installed and added to package.json. Otherwise, we just need to install what is already - // listed inside of package.json. - if (Array.isArray(outdatedDependencies)) { - npmInstall(outdatedDependencies); - } else { - npmInstall(); - } - }, - }, - }); + // Discard all the other possibilities and just install npm + npmInstall(); } return result;