Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-2v3
Browse files Browse the repository at this point in the history
Signed-off-by: Billie Simmons <BillieJean.Simmons@ibm.com>
  • Loading branch information
JillieBeanSim authored Sep 24, 2024
2 parents db2ba98 + 8cd0e19 commit 027c45b
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 121 deletions.
8 changes: 4 additions & 4 deletions .github/release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ module.exports = {
level: "minor"
},
{
name: "release/2.*",
name: "v2-lts",
channel: "zowe-v2-lts",
level: "patch"
},
{
name: "release/3.*",
channel: "latest",
name: "v1-lts",
channel: "zowe-v1-lts",
level: "patch"
},
{
name: "next",
name: "release/3.*",
prerelease: true,
}
],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ packages/zowe-explorer/__tests__/__integration__/ci
!packages/zowe-explorer/__tests__/__integration__/ci/zowe.config.json
package.nls.*.json
bundle.l10n.*.json
bundle.l10n.json.template
zedc/target
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Join our [Slack channel](https://slack.openmainframeproject.org/) to connect wit
Client-side prerequisites for development:

- Install [Node.js](https://nodejs.org/en/download/) v16.0 or later.
- Install [PNPM](https://pnpm.io/installation).
- Install [PNPM 8](https://pnpm.io/installation).

Host-side prerequisites for connection:

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"webpack-cli": "^5.1.4"
},
"pnpm": {
"overrides": {}
"overrides": {
"ws": "^8.17.1"
}
},
"scripts": {
"clean": "pnpm -r clean",
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 @@ -8,6 +8,7 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

- Update Zowe SDKs to `8.0.0` for technical currency.
- Update z/OS FTP Plug-in for Zowe CLI dependency to `3.0.0`.
- Removed popup notification of successful registration with Zowe Explorer and log the success instead. [#2862](https://github.com/zowe/zowe-explorer-vscode/issues/2862)

## `3.0.0-next.202409132122`

Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer-ftp-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function registerFtpApis(): Promise<boolean> {
await zoweExplorerApi.getExplorerExtenderApi().initForZowe(pType, schema);
await zoweExplorerApi.getExplorerExtenderApi().reloadProfiles(pType);

await Gui.showMessage("Zowe Explorer was modified for FTP support.", { logger: globals.LOGGER });
globals.LOGGER.logImperativeMessage("Zowe Explorer was modified for FTP support.", MessageSeverity.INFO);

return true;
}
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Fix issue with extender profiles not being included in fresh team configuration file. [#3122](https://github.com/zowe/zowe-explorer-vscode/issues/3122)
- Fixed issue where file extensions were removed from data sets, causing language detection to sometimes fail for Zowe Explorer extenders. [#3121](https://github.com/zowe/zowe-explorer-vscode/issues/3121)
- Fixed an issue where copying and pasting a file/folder in the USS tree would fail abruptly, displaying an error. [#3128](https://github.com/zowe/zowe-explorer-vscode/issues/3128)
- Removal of broken VSC command to `Zowe Explorer: Refresh Zowe Explorer`, use VS Code's `Extensions: Refresh` command instead. [#3100](https://github.com/zowe/zowe-explorer-vscode/issues/3100)
- Update Zowe SDKs to `8.0.0` for technical currency.

## `3.0.0-next.202409132122`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ async function createGlobalMocks() {
"zowe.compareWithSelectedReadOnly",
"zowe.compareFileStarted",
"zowe.placeholderCommand",
"zowe.extRefresh",
],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Constants } from "../../../../src/configuration/Constants";
import { Profiles } from "../../../../src/configuration/Profiles";
import { SharedActions } from "../../../../src/trees/shared/SharedActions";
import { LocalFileManagement } from "../../../../src/management/LocalFileManagement";
import { ZoweLogger } from "../../../../src/tools/ZoweLogger";
import { ZoweExplorerApiRegister } from "../../../../src/extending/ZoweExplorerApiRegister";
import { SharedInit } from "../../../../src/trees/shared/SharedInit";
import { TsoCommandHandler } from "../../../../src/commands/TsoCommandHandler";
Expand Down Expand Up @@ -319,44 +318,6 @@ describe("Test src/shared/extension", () => {

processSubscriptions(commands, test);
});
describe("registerRefreshCommand", () => {
const context: any = { subscriptions: [] };
const activate = jest.fn();
const deactivate = jest.fn();
const dispose = jest.fn();
let extRefreshCallback;
const spyExecuteCommand = jest.fn();

beforeAll(() => {
Object.defineProperty(vscode.commands, "registerCommand", {
value: (_: string, fun: () => void) => {
extRefreshCallback = fun;
return { dispose };
},
});
Object.defineProperty(vscode.commands, "executeCommand", { value: spyExecuteCommand });
SharedInit.registerRefreshCommand(context, activate, deactivate);
});

beforeEach(() => {
jest.clearAllMocks();
});

afterAll(() => {
jest.restoreAllMocks();
});

it("Test assuming we are unable to dispose of the subscription", async () => {
const testError = new Error("test");
dispose.mockRejectedValue(testError);
await extRefreshCallback();
expect(spyExecuteCommand).not.toHaveBeenCalled();
expect(deactivate).toHaveBeenCalled();
expect(ZoweLogger.error).toHaveBeenCalledWith(testError);
expect(dispose).toHaveBeenCalled();
expect(activate).toHaveBeenCalled();
});
});

describe("watchConfigProfile", () => {
let context: any;
Expand Down
3 changes: 0 additions & 3 deletions packages/zowe-explorer/l10n/poeditor.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"zowe.profileManagement": {
"Manage Profile": ""
},
"zowe.extRefresh": {
"Refresh Zowe Explorer": ""
},
"zowe.editHistory": {
"Edit History": ""
},
Expand Down
17 changes: 2 additions & 15 deletions packages/zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@
"key": "delete",
"when": "focusedView == zowe.uss.explorer"
},
{
"command": "zowe.extRefresh",
"key": "ctrl+alt+z",
"mac": "cmd+alt+z"
},
{
"command": "zowe.editHistory",
"key": "ctrl+alt+y",
Expand Down Expand Up @@ -168,15 +163,6 @@
"title": "%zowe.profileManagement%",
"category": "Zowe Explorer"
},
{
"command": "zowe.extRefresh",
"title": "%zowe.extRefresh%",
"category": "Zowe Explorer",
"icon": {
"light": "./resources/light/refresh.svg",
"dark": "./resources/dark/refresh.svg"
}
},
{
"command": "zowe.editHistory",
"title": "%zowe.editHistory%",
Expand Down Expand Up @@ -1810,7 +1796,8 @@
"createTestProfileData": "tsx ./scripts/createTestProfileData.ts",
"createDemoNodes": "tsx ./scripts/createDemoNodes.ts",
"generateLocalization": "pnpm dlx @vscode/l10n-dev export --o ./l10n ./src && node ./scripts/generatePoeditorJson.js",
"copy-secrets": "tsx ./scripts/getSecretsPrebuilds.ts"
"copy-secrets": "tsx ./scripts/getSecretsPrebuilds.ts",
"strip-l10n": "node ./scripts/stripL10nComments.js"
},
"engines": {
"vscode": "^1.79.0"
Expand Down
1 change: 0 additions & 1 deletion packages/zowe-explorer/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"zowe.placeholderCommand": "Placeholder",
"zowe.promptCredentials": "Update Credentials",
"zowe.profileManagement": "Manage Profile",
"zowe.extRefresh": "Refresh Zowe Explorer",
"zowe.editHistory": "Edit History",
"zowe.ds.explorer": "Data Sets",
"zowe.uss.explorer": "Unix System Services (USS)",
Expand Down
29 changes: 12 additions & 17 deletions packages/zowe-explorer/scripts/generatePoeditorJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,22 @@

const fs = require("fs");
const langId = process.argv[2];
const fileSuffix = langId ? `${langId}.json` : "json";
const poeditorJson = {};
const packageNls = require(__dirname + "/../package.nls.json");
if (!langId) {
for (const [k, v] of Object.entries(packageNls)) {
const packageNls = require(__dirname + "/../package.nls." + fileSuffix);
for (const [k, v] of Object.entries(packageNls)) {
if (!langId) {
poeditorJson[k] = { [v]: "" };
}
} else {
const packageNls2 = require(__dirname + "/../package.nls." + langId + ".json");
for (const [k, v] of Object.entries(packageNls)) {
poeditorJson[k] = packageNls2[k] ? { [v]: packageNls2[k] } : undefined;
} else {
poeditorJson[k] = packageNls[k] ? { [v]: packageNls[k] } : undefined;
}
}
const l10nBundle = require(__dirname + "/../l10n/bundle.l10n.json");
if (!langId) {
for (const [k, v] of Object.entries(l10nBundle)) {
const l10nBundle = require(__dirname + "/../l10n/bundle.l10n." + fileSuffix);
for (const [k, v] of Object.entries(l10nBundle)) {
if (!langId) {
poeditorJson[typeof v === "string" ? k : v.message] = "";
}
} else {
const l10nBundle2 = require(__dirname + "/../l10n/bundle.l10n." + langId + ".json");
for (const [k, v] of Object.entries(l10nBundle)) {
poeditorJson[typeof v === "string" ? k : v.message] = l10nBundle2[k]?.message || l10nBundle2[k];
} else {
poeditorJson[typeof v === "string" ? k : v.message] = l10nBundle[k]?.message || l10nBundle[k];
}
}
fs.writeFileSync(__dirname + "/../l10n/poeditor." + (langId ? `${langId}.json` : "json"), JSON.stringify(poeditorJson, null, 2) + "\n");
fs.writeFileSync(__dirname + "/../l10n/poeditor." + fileSuffix, JSON.stringify(poeditorJson, null, 2) + "\n");
11 changes: 11 additions & 0 deletions packages/zowe-explorer/scripts/stripL10nComments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Strip comments out of bundle.l10n.json and sort properties by key
const fs = require("fs");
const jsonFilePath = process.argv[2] || (__dirname + "/../l10n/bundle.l10n.json");
let l10nBundle = JSON.parse(fs.readFileSync(jsonFilePath, "utf-8"));
for (const [k, v] of Object.entries(l10nBundle)) {
if (typeof v === "object") {
l10nBundle[k] = l10nBundle[k].message;
}
}
l10nBundle = Object.fromEntries(Object.entries(l10nBundle).sort(([a], [b]) => a.localeCompare(b)));
fs.writeFileSync(jsonFilePath + ".template", JSON.stringify(l10nBundle, null, 2) + "\n");
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/configuration/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { Profiles } from "./Profiles";

export class Constants {
public static CONFIG_PATH: string;
public static readonly COMMAND_COUNT = 100;
public static readonly COMMAND_COUNT = 99;
public static readonly MAX_SEARCH_HISTORY = 5;
public static readonly MAX_FILE_HISTORY = 10;
public static readonly MS_PER_SEC = 1000;
Expand Down
1 change: 0 additions & 1 deletion packages/zowe-explorer/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<ZoweEx
);
SharedInit.registerCommonCommands(context, providers);
SharedInit.registerZosConsoleView(context);
SharedInit.registerRefreshCommand(context, activate, deactivate);
ZoweExplorerExtender.createInstance(providers.ds, providers.uss, providers.job);

SharedInit.watchConfigProfile(context);
Expand Down
22 changes: 0 additions & 22 deletions packages/zowe-explorer/src/trees/shared/SharedInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ import { CertificateWizard } from "../../utils/CertificateWizard";
import { ZosConsoleViewProvider } from "../../zosconsole/ZosConsolePanel";

export class SharedInit {
public static registerRefreshCommand(
context: vscode.ExtensionContext,
activate: (_context: vscode.ExtensionContext) => Promise<ZoweExplorerApiRegister>,
deactivate: () => Promise<void>
): void {
ZoweLogger.trace("shared.init.registerRefreshCommand called.");
// set a command to silently reload extension
context.subscriptions.push(
vscode.commands.registerCommand("zowe.extRefresh", async () => {
await deactivate();
for (const sub of context.subscriptions) {
try {
await sub.dispose();
} catch (e) {
ZoweLogger.error(e);
}
}
await activate(context);
})
);
}

public static registerCommonCommands(context: vscode.ExtensionContext, providers: Definitions.IZoweProviders): void {
ZoweLogger.trace("shared.init.registerCommonCommands called.");

Expand Down
18 changes: 4 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 027c45b

Please sign in to comment.