From ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Nov 2022 14:49:50 +0100 Subject: Add ability to install alpha/beta/rc plugin --- server/lib/plugins/yarn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/plugins/yarn.ts') diff --git a/server/lib/plugins/yarn.ts b/server/lib/plugins/yarn.ts index d105b95e0..9cf6ec9e9 100644 --- a/server/lib/plugins/yarn.ts +++ b/server/lib/plugins/yarn.ts @@ -1,7 +1,7 @@ import { outputJSON, pathExists } from 'fs-extra' import { join } from 'path' import { execShell } from '../../helpers/core-utils' -import { isNpmPluginNameValid, isPluginVersionValid } from '../../helpers/custom-validators/plugins' +import { isNpmPluginNameValid, isPluginStableOrUnstableVersionValid } from '../../helpers/custom-validators/plugins' import { logger } from '../../helpers/logger' import { CONFIG } from '../../initializers/config' import { getLatestPluginVersion } from './plugin-index' @@ -69,5 +69,5 @@ function checkNpmPluginNameOrThrow (name: string) { } function checkPluginVersionOrThrow (name: string) { - if (!isPluginVersionValid(name)) throw new Error('Invalid NPM plugin version to install') + if (!isPluginStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install') } -- cgit v1.2.3