Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update profile watchers and utilities to use Zowe SDK enhancements #3296

Merged
merged 16 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@types/jest": "^29.2.3",
"@types/mocha": "^10.0.1",
"@types/node": "^18.19.14",
"@types/node": "^20.14.8",
"@types/vscode": "^1.73.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

### New features and enhancements

- Update Zowe SDKs to `8.2.0` to get the latest enhancements from Imperative.
- Update Zowe SDKs to `8.8.2` to get the latest enhancements from Imperative.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue or PR link we could provide here?


### Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ describe("_handleConflict", () => {
});
});
describe("_handleError", () => {
it("calls ErrorCorrelator.displayError to display error to user - no options provided", async () => {
const displayErrorMock = jest.spyOn(ErrorCorrelator.prototype, "displayError").mockReturnValue(new Promise((res, rej) => {}));
it("calls ErrorCorrelator.displayError to display error to user - no options provided", () => {
const displayErrorMock = jest.spyOn(ErrorCorrelator.prototype, "displayError").mockReturnValue(new Promise((_res, _rej) => {}));
const prov = new (BaseProvider as any)();
prov._handleError(new Error("example"));
expect(displayErrorMock).toHaveBeenCalledWith(ZoweExplorerApiType.All, new Error("example"), {
Expand All @@ -555,8 +555,8 @@ describe("_handleError", () => {
templateArgs: undefined,
});
});
it("calls ErrorCorrelator.displayError to display error to user - options provided", async () => {
const displayErrorMock = jest.spyOn(ErrorCorrelator.prototype, "displayError").mockReturnValue(new Promise((res, rej) => {}));
it("calls ErrorCorrelator.displayError to display error to user - options provided", () => {
const displayErrorMock = jest.spyOn(ErrorCorrelator.prototype, "displayError").mockReturnValue(new Promise((_res, _rej) => {}));
const prov = new (BaseProvider as any)();
prov._handleError(new Error("example"), {
additionalContext: "Failed to list data sets",
Expand Down
16 changes: 8 additions & 8 deletions packages/zowe-explorer-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
},
"dependencies": {
"@types/vscode": "^1.53.2",
"@zowe/core-for-zowe-sdk": "^8.2.0",
"@zowe/imperative": "^8.2.0",
"@zowe/core-for-zowe-sdk": "^8.8.2",
"@zowe/imperative": "^8.8.2",
"@zowe/secrets-for-zowe-sdk": "^8.1.2",
"@zowe/zos-console-for-zowe-sdk": "^8.2.0",
"@zowe/zos-files-for-zowe-sdk": "^8.2.0",
"@zowe/zos-jobs-for-zowe-sdk": "^8.2.0",
"@zowe/zos-tso-for-zowe-sdk": "^8.2.0",
"@zowe/zos-uss-for-zowe-sdk": "^8.2.0",
"@zowe/zosmf-for-zowe-sdk": "^8.2.0",
"@zowe/zos-console-for-zowe-sdk": "^8.8.2",
"@zowe/zos-files-for-zowe-sdk": "^8.8.2",
"@zowe/zos-jobs-for-zowe-sdk": "^8.8.2",
"@zowe/zos-tso-for-zowe-sdk": "^8.8.2",
"@zowe/zos-uss-for-zowe-sdk": "^8.8.2",
"@zowe/zosmf-for-zowe-sdk": "^8.8.2",
"deep-object-diff": "^1.1.9",
"mustache": "^4.2.0",
"semver": "^7.6.0"
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum
- Fix Windows-specific hangs when saving members that contain JCL via the FTP extension. Thanks @tiantn & @std4lqi. [#2533](https://github.com/zowe/vscode-extension-for-zowe/issues/2533)
- Removed outdated vscode-nls webpack plug-in [#2253](https://github.com/zowe/vscode-extension-for-zowe/issues/2253)
- Fixed ECONNRESET error when trying to upload or create an empty data set member. [#2350](https://github.com/zowe/vscode-extension-for-zowe/issues/2350)
- Updated Zowe SDKs to `8.8.2` for technical currency. [#3296](https://github.com/zowe/zowe-explorer-vscode/pull/3296)
- Updated additional dependencies for technical currency purposes.

## `3.0.0-next.202409251932`
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-ftp-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"vscode": "^1.79.0"
},
"dependencies": {
"@zowe/zos-files-for-zowe-sdk": "^8.2.0",
"@zowe/zos-files-for-zowe-sdk": "^8.8.2",
"@zowe/zos-ftp-for-zowe-cli": "^3.0.0",
"@zowe/zos-jobs-for-zowe-sdk": "^8.2.0",
"@zowe/zos-jobs-for-zowe-sdk": "^8.8.2",
"@zowe/zowe-explorer-api": "3.1.0-SNAPSHOT",
"tmp": "0.2.3"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Fixed an issue where opening a PDS member after renaming an expanded PDS resulted in an error. [#3314](https://github.com/zowe/zowe-explorer-vscode/issues/3314)
- Fixed issue where users were not prompted to enter credentials if a 401 error was encountered when opening files, data sets or spools in the editor. [#3197](https://github.com/zowe/zowe-explorer-vscode/issues/3197)
- Fixed issue where profile credential updates or token changes were not reflected within the filesystem. [#3289](https://github.com/zowe/zowe-explorer-vscode/issues/3289)
- Fixed issue to update the success message when changing authentication from token to basic through the 'Change Authentication' option.
- Fixed issue to update the success message when changing authentication from token to basic through the 'Change Authentication' option. [#3316](https://github.com/zowe/zowe-explorer-vscode/pull/3316)
- Fixed an issue where editing a team config file or updating credentials in OS vault could trigger multiple events for a single action. [#3296](https://github.com/zowe/zowe-explorer-vscode/pull/3296)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please write out "config"
  • Would it be appropriate to add an article here?: " ... updating credentials in the OS vault ... "
  • Should we explain what type of "vault" we're talking about?: " ... the OS credentials/security/kitten vault ..."

- Updated Zowe SDKs to `8.8.2` for technical currency. [#3296](https://github.com/zowe/zowe-explorer-vscode/pull/3296)

## `3.0.2`

Expand Down
71 changes: 5 additions & 66 deletions packages/zowe-explorer/__tests__/__mocks__/@zowe/imperative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ export interface ICredentialManagerNameMap {
credMgrZEName?: string;
}

export class BrightProfile {
constructor(public profile: Profile) {}
}

export class Session {
constructor(public ISession: ISessionOptions) {}
}
Expand All @@ -201,75 +197,18 @@ export class Profile {
constructor(public name: string, public type: string) {}
}

export class CliProfileManager {
constructor(options: ICliOptions) {}

public load(opts: ILoadOptions) {
return { name: "profile1", profile: {}, type: "zosmf" };
}
public loadAll() {
return [
{ name: "sestest", profile: {}, type: "zosmf" },
{ name: "profile1", profile: {}, type: "zosmf" },
{ name: "profile2", profile: {}, type: "zosmf" },
];
}
public getAllProfileNames() {
return ["name1", "name2"];
}
public save() {
return { name: "profile1", profile: {}, type: "zosmf" };
}
public update() {
return { name: "profile1", profile: {}, type: "zosmf" };
}
public delete() {
return { name: "profile1", profile: {}, type: "zosmf" };
}
public get configurations() {
return [
{
type: "zosmf",
schema: {
type: "object",
title: "test profile",
description: "test profile",
properties: {
sum: {
type: "number",
},
},
required: ["sum"],
},
},
{
type: "banana",
schema: {
type: "object",
title: "test banana",
description: "test banana",
properties: {
sum: {
type: "number",
},
},
required: ["sum"],
},
},
];
}

public static initialize() {}
}

export class ProfileInfo {
public static onlyV1ProfilesExist = false;
public onlyV1ProfilesExist = false;
constructor(appName: string, profInfoOpts?: IProfOpts) {}

public readProfilesFromDisk(teamCfgOpts?: IConfigOpts) {
return;
}

public profileManagerWillLoad(): boolean {
return true;
}

public addProfileTypeToSchema(
profileType: string,
typeInfo: {
Expand Down
Loading
Loading