From 77ef48b4a4b9853af004af0046856a7e113a6367 Mon Sep 17 00:00:00 2001 From: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:54:34 -0400 Subject: [PATCH 1/3] fix: updated regex that itentifies deprecated profiles warning Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> --- __tests__/__packages__/cli-test-utils/src/TestUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/__packages__/cli-test-utils/src/TestUtils.ts b/__tests__/__packages__/cli-test-utils/src/TestUtils.ts index 5b0c702ff..9cfccc7c7 100644 --- a/__tests__/__packages__/cli-test-utils/src/TestUtils.ts +++ b/__tests__/__packages__/cli-test-utils/src/TestUtils.ts @@ -81,8 +81,8 @@ export function isStderrEmptyForProfilesCommand(output: Buffer): boolean { */ export function stripProfileDeprecationMessages(stderr: Buffer | string): string { return stderr.toString() - .replace(/Warning: The command 'profiles [a-z]+' is deprecated\./g, "") - .replace(/Recommended replacement: The 'config [a-z]+' command/g, "") + .replace(/Warning: The command 'profiles [a-z\s]+' is deprecated\./g, "") + .replace(/Recommended replacement: The 'config [a-z\s]+' command/g, "") .replace(/Recommended replacement: Edit your Zowe V2 configuration\s+zowe\.config\.json/g, "") .trim(); } From d68ab85cf56d995ebe9352bd1103ee8b827acc25 Mon Sep 17 00:00:00 2001 From: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:57:33 -0400 Subject: [PATCH 2/3] chore: udpate changelog Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> --- __tests__/__packages__/cli-test-utils/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/__tests__/__packages__/cli-test-utils/CHANGELOG.md b/__tests__/__packages__/cli-test-utils/CHANGELOG.md index 0ec6f57a6..2d6301f47 100644 --- a/__tests__/__packages__/cli-test-utils/CHANGELOG.md +++ b/__tests__/__packages__/cli-test-utils/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zowe CLI test utils package will be documented in this file. +## Recent Changes + +- BugFix: Updated deprecated-profile warning to include spaces. [zowe-cli-sample-plugin#113](https://github.com/zowe/zowe-cli-sample-plugin/pull/113) + ## `7.28.3` - BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191) From 9bea08419b932e421e5f1fd4c3386433267c7774 Mon Sep 17 00:00:00 2001 From: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:04:24 -0400 Subject: [PATCH 3/3] review: address PR feedback Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com> --- __tests__/__packages__/cli-test-utils/src/TestUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/__packages__/cli-test-utils/src/TestUtils.ts b/__tests__/__packages__/cli-test-utils/src/TestUtils.ts index 9cfccc7c7..61b66fc27 100644 --- a/__tests__/__packages__/cli-test-utils/src/TestUtils.ts +++ b/__tests__/__packages__/cli-test-utils/src/TestUtils.ts @@ -81,8 +81,8 @@ export function isStderrEmptyForProfilesCommand(output: Buffer): boolean { */ export function stripProfileDeprecationMessages(stderr: Buffer | string): string { return stderr.toString() - .replace(/Warning: The command 'profiles [a-z\s]+' is deprecated\./g, "") - .replace(/Recommended replacement: The 'config [a-z\s]+' command/g, "") + .replace(/Warning: The command 'profiles [\w\s]+' is deprecated\./g, "") + .replace(/Recommended replacement: The 'config [\w\s]+' command/g, "") .replace(/Recommended replacement: Edit your Zowe V2 configuration\s+zowe\.config\.json/g, "") .trim(); }