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

Prep 3.0.1 #3202

Merged
merged 41 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cf1e708
check path instead of file name
JillieBeanSim Sep 25, 2024
3931871
add changelog, fix test, run package
JillieBeanSim Sep 25, 2024
c65183b
Merge branch 'main' into fix/editTeamConfig
zFernand0 Sep 26, 2024
0f28e1f
Merge branch 'main' into fix/editTeamConfig
SanthoshiBoyina1 Sep 30, 2024
3e249ae
Merge branch 'main' into fix/editTeamConfig
SanthoshiBoyina1 Sep 30, 2024
febe146
To address issue with opening project config in zowe dir
SanthoshiBoyina1 Sep 30, 2024
ac07f19
To fix pnpm lint failure
SanthoshiBoyina1 Sep 30, 2024
7ff8f64
To update CHANGELOG.md file
SanthoshiBoyina1 Oct 1, 2024
7ae63e5
fix(ZoweDatasetNode): Add contextOverride to PS node
traeok Oct 1, 2024
90dcce4
chore: add PR number to ZE changelog
traeok Oct 1, 2024
c089a9b
fix: Add check for binary in contextOverride
traeok Oct 1, 2024
dd65c86
Update release.config.js for Zowe V3 GA
t1m0thyj Oct 2, 2024
878080b
Merge branch 'main' into fix/fav-search/open-ps
traeok Oct 2, 2024
80ceae7
chore: missing newline in ZE changelog
traeok Oct 2, 2024
b43eccb
Merge pull request #3164 from zowe/t1m0thyj-patch-1
zFernand0 Oct 2, 2024
7fe72e0
Merge branch 'main' into fix/fav-search/open-ps
traeok Oct 2, 2024
873faf8
fix(ProfilesUtils): Pass paths to new ProfileInfo instance
traeok Oct 2, 2024
f9fbe14
chore: add changelog entry for ZE
traeok Oct 2, 2024
0c0b32f
chore: adjust changelog to match v2 port
traeok Oct 2, 2024
a850b0f
tests: Add unit test to verify readProfilesFromDisk behavior
traeok Oct 2, 2024
6ffe4ea
Merge branch 'main' into fix/editTeamConfig
SanthoshiBoyina1 Oct 3, 2024
99b0a65
To revert back logic to open the global config file
SanthoshiBoyina1 Oct 3, 2024
27836ed
Merge pull request #3138 from zowe/fix/editTeamConfig
JillieBeanSim Oct 3, 2024
bc7680e
Merge branch 'main' into fix/fav-search/open-ps
traeok Oct 3, 2024
77235a3
Merge pull request #3163 from zowe/fix/fav-search/open-ps
JillieBeanSim Oct 3, 2024
525b923
chore: update ZE changelog entries
traeok Oct 3, 2024
e86d394
Merge branch 'main' into fix/profiles/respect-paths
traeok Oct 3, 2024
785a7ee
Merge pull request #3169 from zowe/fix/profiles/respect-paths
zFernand0 Oct 7, 2024
64481f9
Remove sample VSCEs and restore carets for SDK deps (#3173)
t1m0thyj Oct 7, 2024
60dec5a
Add Sonar scan properties and remove old system test files (#3194)
t1m0thyj Oct 7, 2024
c0bf132
fix: prompt optimizations for create file/dir; address case of skippi…
traeok Oct 7, 2024
e53dad0
fix(ds): File extension detection misidentifies types (#3182)
t1m0thyj Oct 7, 2024
1657d76
deps: update lockfile to resolve audit failure (#3195)
traeok Oct 7, 2024
37a5102
Fix 401 error when opening PDS members after cred change (#3157)
t1m0thyj Oct 8, 2024
f1b2471
resolve FTP getContents bug for MVS and USS (#3200)
traeok Oct 8, 2024
44f35d7
chore: add missing license header
zFernand0 Oct 9, 2024
27c72da
patch: update lerna.json in preparation for a release
zFernand0 Oct 9, 2024
c8fd0e9
chore: update changelog files
zFernand0 Oct 9, 2024
64d3ee0
chore: update changelog :yum:
zFernand0 Oct 10, 2024
67b0471
Fix children in tree nodes persisting on error (#3224)
t1m0thyj Oct 10, 2024
c7daf0d
Merge branch 'main' into prep-3.0.1
t1m0thyj Oct 10, 2024
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
18 changes: 11 additions & 7 deletions .github/release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ module.exports = {
level: "minor"
},
{
name: "v2-lts",
channel: "zowe-v2-lts",
name: "v1-lts",
channel: "zowe-v1-lts",
level: "patch"
},
{
name: "v1-lts",
channel: "zowe-v1-lts",
name: "v2-lts",
channel: "zowe-v2-lts",
level: "patch"
},
{
name: "release/3.*",
channel: "next",
prerelease: true,
channel: "latest",
level: "patch"
}
// {
// name: "next",
// prerelease: true
// }
],
plugins: [
[
Expand All @@ -45,7 +49,7 @@ module.exports = {
{
$cwd: "packages/zowe-explorer-api",
aliasTags: {
"latest": ["zowe-v2-lts"],
"latest": ["zowe-v3-lts"],
},
npmPublish: true,
tarballDir: "dist",
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/zowe-explorer-samples.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ out
lib
!packages/eslint-plugin-zowe-explorer/**/lib
logs
testProfileData.ts
results
*.log
npm-shrinkwrap.json
Expand All @@ -24,7 +23,6 @@ coverage/
v8-compile-cache-0/
dist/
prebuilds/
samples/**/pnpm-lock.yaml
packages/zowe-explorer/**/.wdio-vscode-service
packages/zowe-explorer/__tests__/**/.zowe
packages/zowe-explorer/__tests__/**/.env
Expand Down
4 changes: 4 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.sources=packages/**/src
sonar.tests=packages/**/__tests__
sonar.test.inclusions=**/*.test.ts,**/*.steps.ts
sonar.cpd.exclusions=packages/**/__tests__
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.1.0-SNAPSHOT",
"version": "3.0.1",
"command": {
"version": {
"forcePublish": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"test:parallel": "pnpm -r --parallel --color test",
"package": "pnpm -r --sequential package",
"preinstall": "npx only-allow pnpm",
"update-sdks": "pnpm -r update \"@zowe/*@next\" \"!@zowe/zowe-explorer-api\" \"!@zowe/zos-ftp-for-zowe-cli\""
"update-sdks": "pnpm -r update \"@zowe/*@zowe-v3-lts\" \"!@zowe/zowe-explorer-api\" \"!@zowe/zos-ftp-for-zowe-cli\""
}
}
4 changes: 0 additions & 4 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen

## TBD Release

### New features and enhancements

### Bug fixes

## `3.0.0`

### New features and enhancements
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

## TBD Release

### New features and enhancements

### Bug fixes

- Updated the `ZoweTreeNode.setProfileToChoice` function so that it propagates profile changes to its child nodes. [#3150](https://github.com/zowe/zowe-explorer-vscode/issues/3150)

## `3.0.0`

### New features and enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe("ZoweTreeNode", () => {

it("setProfileToChoice should update profile for associated FSProvider entry", () => {
const node = makeNode("test", vscode.TreeItemCollapsibleState.None, undefined);
node.resourceUri = vscode.Uri.file(__dirname);
const fsEntry = {
metadata: {
profile: { name: "oldProfile" },
Expand All @@ -108,4 +109,23 @@ describe("ZoweTreeNode", () => {
expect(node.getProfileName()).toBe("newProfile");
expect(fsEntry.metadata.profile.name).toBe("newProfile");
});

it("setProfileToChoice should update child nodes with the new profile", () => {
const node = makeNode("test", vscode.TreeItemCollapsibleState.Expanded, undefined);
const nodeChild = makeNode("child", vscode.TreeItemCollapsibleState.None, undefined);
node.children = [nodeChild as any];
const setProfileToChoiceChildMock = jest.spyOn(nodeChild, "setProfileToChoice").mockImplementation();
const fsEntry = {
metadata: {
profile: { name: "oldProfile" },
},
};
const mockNewProfile = { name: "newProfile" } as unknown as imperative.IProfileLoaded;
const mockProvider = {
lookup: jest.fn().mockReturnValue(fsEntry),
} as unknown as BaseProvider;
node.setProfileToChoice(mockNewProfile, mockProvider);
expect(node.getProfileName()).toBe("newProfile");
expect(setProfileToChoiceChildMock).toHaveBeenCalledWith(mockNewProfile, mockProvider);
});
});
18 changes: 9 additions & 9 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.0.0",
"@zowe/imperative": "8.0.0",
"@zowe/secrets-for-zowe-sdk": "8.0.0",
"@zowe/zos-console-for-zowe-sdk": "8.0.0",
"@zowe/zos-files-for-zowe-sdk": "8.0.0",
"@zowe/zos-jobs-for-zowe-sdk": "8.0.0",
"@zowe/zos-tso-for-zowe-sdk": "8.0.0",
"@zowe/zos-uss-for-zowe-sdk": "8.0.0",
"@zowe/zosmf-for-zowe-sdk": "8.0.0",
"@zowe/core-for-zowe-sdk": "^8.1.1",
"@zowe/imperative": "^8.1.0",
"@zowe/secrets-for-zowe-sdk": "^8.1.0",
"@zowe/zos-console-for-zowe-sdk": "^8.1.1",
"@zowe/zos-files-for-zowe-sdk": "^8.1.1",
"@zowe/zos-jobs-for-zowe-sdk": "^8.1.1",
"@zowe/zos-tso-for-zowe-sdk": "^8.1.1",
"@zowe/zos-uss-for-zowe-sdk": "^8.1.1",
"@zowe/zosmf-for-zowe-sdk": "^8.1.1",
"deep-object-diff": "^1.1.9",
"mustache": "^4.2.0",
"semver": "^7.6.0"
Expand Down
1 change: 0 additions & 1 deletion packages/zowe-explorer-api/src/fs/types/abstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export type ConflictData = {
export interface IFileSystemEntry extends vscode.FileStat {
name: string;
metadata: EntryMetadata;
type: vscode.FileType;
wasAccessed: boolean;
data?: Uint8Array;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ export namespace ZoweExplorerZosmf {
*/
export class CommandApi extends CommonApi implements MainframeInteraction.ICommand {
public issueTsoCommandWithParms(command: string, parms: zostso.IStartTsoParms): Promise<zostso.IIssueResponse> {
// eslint-disable-next-line deprecation/deprecation
return zostso.IssueTso.issueTsoCommand(this.getSession(), parms.account, command, parms);
}

Expand Down
10 changes: 10 additions & 0 deletions packages/zowe-explorer-api/src/tree/IZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ export interface IZoweDatasetTreeNode extends IZoweTreeNode {
*/
encoding?: string;

/**
* Use Dataset-specific tree node for children.
*/
children?: IZoweDatasetTreeNode[];

/**
* Retrieves child nodes of this IZoweDatasetTreeNode
*
Expand Down Expand Up @@ -296,6 +301,11 @@ export interface IZoweUSSTreeNode extends IZoweTreeNode {
*/
onUpdateEmitter?: vscode.EventEmitter<IZoweUSSTreeNode>;

/**
* Use USS-specific tree node for children.
*/
children?: IZoweUSSTreeNode[];

/**
* Event that fires whenever an existing node is updated.
*/
Expand Down
11 changes: 8 additions & 3 deletions packages/zowe-explorer-api/src/tree/ZoweTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,14 @@ export class ZoweTreeNode extends vscode.TreeItem {
// Don't reassign profile, we want to keep object reference shared across nodes
this.profile.profile = aProfile.profile;
}
const fsEntry = fsProvider?.lookup(this.resourceUri, true);
if (fsEntry != null) {
fsEntry.metadata.profile = aProfile;
if (this.resourceUri != null) {
const fsEntry = fsProvider?.lookup(this.resourceUri, true);
if (fsEntry != null) {
fsEntry.metadata.profile = aProfile;
}
}
for (const child of this.children) {
(child as unknown as ZoweTreeNode).setProfileToChoice(aProfile, fsProvider);
}
}
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

## TBD Release

### New features and enhancements

### Bug fixes

- Fixed bug where the `getContents` MVS and USS APIs failed to return whenever a local file path was provided. [#3199](https://github.com/zowe/zowe-explorer-vscode/issues/3199)

## `3.0.0`

### New features and enhancements
Expand Down
13 changes: 13 additions & 0 deletions packages/zowe-explorer-ftp-extension/__mocks__/mockUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

// Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts
export const mocked = <T extends (..._args: any[]) => any>(fn: T): jest.Mock<ReturnType<T>> => fn as any;
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as tmp from "tmp";
import { Gui, imperative } from "@zowe/zowe-explorer-api";
import * as globals from "../../../src/globals";
import { ZoweFtpExtensionError } from "../../../src/ZoweFtpExtensionError";
import { mocked } from "../../../__mocks__/mockUtils";

// two methods to mock modules: create a __mocks__ file for zowe-explorer-api.ts and direct mock for extension.ts
jest.mock("../../../__mocks__/@zowe/zowe-explorer-api.ts");
Expand Down Expand Up @@ -93,6 +94,7 @@ describe("FtpMvsApi", () => {

expect(result.apiResponse.etag).toHaveLength(64);
expect(DataSetUtils.downloadDataSet).toHaveBeenCalledTimes(1);
expect(mocked(DataSetUtils.downloadDataSet).mock.calls[0][2].localFile).toBe(localFile);
expect(MvsApi.releaseConnection).toHaveBeenCalled();

expect((response._readableState.buffer.head?.data ?? response._readableState.buffer).toString()).toContain("Hello world");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import * as globals from "../../../src/globals";
import { ZoweFtpExtensionError } from "../../../src/ZoweFtpExtensionError";
import * as tmp from "tmp";
import { imperative } from "@zowe/zowe-explorer-api";
import { mocked } from "../../../__mocks__/mockUtils";

// two methods to mock modules: create a __mocks__ file for zowe-explorer-api.ts and direct mock for extension.ts
jest.mock("../../../__mocks__/@zowe/zowe-explorer-api.ts");
Expand Down Expand Up @@ -78,6 +79,7 @@ describe("FtpUssApi", () => {

expect(result.apiResponse.etag).toHaveLength(64);
expect(UssUtils.downloadFile).toHaveBeenCalledTimes(1);
expect(mocked(UssUtils.downloadFile).mock.calls[0][2].localFile).toBe(localFile);
expect(UssApi.releaseConnection).toHaveBeenCalled();

expect((response._readableState.buffer.head?.data ?? response._readableState.buffer).toString()).toContain("Hello world");
Expand Down
6 changes: 3 additions & 3 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.0.0",
"@zowe/zos-ftp-for-zowe-cli": "3.0.0",
"@zowe/zos-jobs-for-zowe-sdk": "8.0.0",
"@zowe/zos-files-for-zowe-sdk": "^8.1.1",
"@zowe/zos-ftp-for-zowe-cli": "^3.0.0",
"@zowe/zos-jobs-for-zowe-sdk": "^8.1.1",
"@zowe/zowe-explorer-api": "3.1.0-SNAPSHOT",
"tmp": "0.2.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class FtpMvsApi extends AbstractFtpApi implements MainframeInteraction.IM
const result = this.getDefaultResponse();
const transferOptions = {
encoding: options.encoding,
localFile: undefined,
localFile: options.file,
transferType: CoreUtils.getBinaryTransferModeOrDefault(options.binary),
};
const fileOrStreamSpecified = options.file != null || options.stream != null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class FtpUssApi extends AbstractFtpApi implements MainframeInteraction.IU
const result = this.getDefaultResponse();
const transferOptions = {
transferType: CoreUtils.getBinaryTransferModeOrDefault(options.binary),
localFile: undefined,
localFile: options.file,
size: 1,
};
const fileOrStreamSpecified = options.file != null || options.stream != null;
Expand Down
13 changes: 11 additions & 2 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

## TBD Release

### New features and enhancements

### Bug fixes

- Fixed an issue where opening sequential data sets within favorited searches resulted in an error. [#3163](https://github.com/zowe/zowe-explorer-vscode/pull/3163)
- Fixed an issue where automatic file extension detection identified file types incorrectly. [#3181](https://github.com/zowe/zowe-explorer-vscode/pull/3181)
- Fixed an issue where Zowe Explorer displayed a "No Zowe client configurations" prompt when a project user configuration existed but no global configuration was present. [#3168](https://github.com/zowe/zowe-explorer-vscode/issues/3168)
- Fixed an issue where the `ProfilesUtils.getProfileInfo` function returned a new `ProfileInfo` instance that ignored the `ZOWE_CLI_HOME` environment variable and workspace paths. [#3168](https://github.com/zowe/zowe-explorer-vscode/issues/3168)
- Fixed an issue where the location prompt for the `Create Directory` and `Create File` USS features would appear even when a path is already set for the profile or parent folder. [#3183](https://github.com/zowe/zowe-explorer-vscode/pull/3183)
- Fixed an issue where the `Create Directory` and `Create File` features would continue processing when the first prompt was dismissed, causing an incorrect URI to be generated. [#3183](https://github.com/zowe/zowe-explorer-vscode/pull/3183)
- Fixed an issue where the `Create Directory` and `Create File` features would incorrectly handle user-specified locations with trailing slashes. [#3183](https://github.com/zowe/zowe-explorer-vscode/pull/3183)
- Fixed an issue where a 401 error could occur when opening PDS members after updating credentials within the same user session. [#3150](https://github.com/zowe/zowe-explorer-vscode/issues/3150)
- Fixed issue where switching from token-based authentication to user/password would cause an error for nested profiles. [#3142](https://github.com/zowe/zowe-explorer-vscode/issues/3142)
- Fixed the "Edit Profile" operation to open the correct files when both global and project team configs are present. [#3125](https://github.com/zowe/zowe-explorer-vscode/issues/3125)

## `3.0.0`

### New features and enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import * as os from "os";
import * as path from "path";
const log4js = require("log4js");

export class EventProcessor {
public emitZoweEvent(eventName: string): void {}
}

export enum ProfLocType {
OLD_PROFILE = 0, // an old-school profile
TEAM_CONFIG = 1, // a team configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export function createJobInfoNode(session: any, profile: imperative.IProfileLoad
collapsibleState: vscode.TreeItemCollapsibleState.None,
parentNode: session.getSessionNode(),
profile,
contextOverride: Constants.INFORMATION_CONTEXT,
});
jobNode.contextValue = Constants.INFORMATION_CONTEXT;
return jobNode;
}

Expand Down
Loading
Loading