From 75a95db1d0ea3d4636e37932188994ee73ba1b20 Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Fri, 23 Apr 2021 13:26:59 -0700 Subject: [PATCH 1/3] Fix version conflix for plugins Signed-off-by: Anan Zhuang --- packages/osd-plugin-helpers/src/cli.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/osd-plugin-helpers/src/cli.ts b/packages/osd-plugin-helpers/src/cli.ts index 23d5273b5d1e..1015b0ae699a 100644 --- a/packages/osd-plugin-helpers/src/cli.ts +++ b/packages/osd-plugin-helpers/src/cli.ts @@ -94,17 +94,12 @@ export function runCli() { plugin ); - if (semver.satisfies(opensearchDashboardsVersion, '<7.9')) { + if (semver.satisfies(opensearchDashboardsVersion, '>1.0')) { log.error( - 'These tools are not designed to work with version before 7.9, please checkout an earlier version of OpenSearch Dashboards to build your plugin' + 'These tools are not designed to work with version greater than 1.0, please checkout an earlier version of OpenSearch Dashboards to build your plugin' ); process.exit(1); } - if (semver.satisfies(opensearchDashboardsVersion, '~7.9.0')) { - log.warning( - 'These tools might work with 7.9 versions, but there are known workarounds required. See https://github.com/elastic/kibana/issues/82466 for more info' - ); - } const sourceDir = plugin.directory; const buildDir = Path.resolve( From 723db9c71b30bc22efbeec4d3b1b7b1a6ad96f8a Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Fri, 23 Apr 2021 15:07:01 -0700 Subject: [PATCH 2/3] Give the check a wider version. Then maintaince would be just every bigger version Signed-off-by: Anan Zhuang --- packages/osd-plugin-helpers/src/cli.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/osd-plugin-helpers/src/cli.ts b/packages/osd-plugin-helpers/src/cli.ts index 1015b0ae699a..3cc25cd494a8 100644 --- a/packages/osd-plugin-helpers/src/cli.ts +++ b/packages/osd-plugin-helpers/src/cli.ts @@ -94,9 +94,9 @@ export function runCli() { plugin ); - if (semver.satisfies(opensearchDashboardsVersion, '>1.0')) { + if (semver.satisfies(opensearchDashboardsVersion, '>=2.0.0')) { log.error( - 'These tools are not designed to work with version greater than 1.0, please checkout an earlier version of OpenSearch Dashboards to build your plugin' + 'These tools are not designed to work with version greater than 1.x, please checkout an earlier version of OpenSearch Dashboards to build your plugin' ); process.exit(1); } From 1369fcc843ee73b6df5241d4d6adbecd69ad7290 Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Fri, 23 Apr 2021 17:49:16 -0700 Subject: [PATCH 3/3] Remove semver version check Signed-off-by: Anan Zhuang --- packages/osd-plugin-helpers/src/cli.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/osd-plugin-helpers/src/cli.ts b/packages/osd-plugin-helpers/src/cli.ts index 3cc25cd494a8..158e2578bde9 100644 --- a/packages/osd-plugin-helpers/src/cli.ts +++ b/packages/osd-plugin-helpers/src/cli.ts @@ -32,7 +32,6 @@ import Path from 'path'; -import semver from 'semver'; import { RunWithCommands, createFlagError, createFailError } from '@osd/dev-utils'; import { findOpenSearchDashboardsJson } from './find_opensearch_dashboards_json'; @@ -94,13 +93,6 @@ export function runCli() { plugin ); - if (semver.satisfies(opensearchDashboardsVersion, '>=2.0.0')) { - log.error( - 'These tools are not designed to work with version greater than 1.x, please checkout an earlier version of OpenSearch Dashboards to build your plugin' - ); - process.exit(1); - } - const sourceDir = plugin.directory; const buildDir = Path.resolve( plugin.directory,