From 9a19979ecb30c85e2cc1b03ea79b7dec2c29337f Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:12:30 +0200 Subject: [PATCH] feat: Always install from path if the resolved URL does not include npmjs. --- src/static/js/pluginfw/installer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/static/js/pluginfw/installer.ts b/src/static/js/pluginfw/installer.ts index 973bdd56f..18bfd968e 100644 --- a/src/static/js/pluginfw/installer.ts +++ b/src/static/js/pluginfw/installer.ts @@ -64,12 +64,12 @@ const migratePluginsFromNodeModules = async () => { .filter(([pkg, info]) => pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') .map(async ([pkg, info]) => { const _info = info as PackageInfo - if (!_info.resolved) { + if (!_info.resolved|| !_info.resolved.includes('npm')) { // Install from node_modules directory await linkInstaller.installFromPath(`${findEtherpadRoot()}/node_modules/${pkg}`); } else { - await linkInstaller.installPlugin(pkg); - } + await linkInstaller.installPlugin(pkg, _info.version); + } })); await persistInstalledPlugins(); };