Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1004 from zowe/feat/keytar-rs
Browse files Browse the repository at this point in the history
feat: Use `keyring` module in `@zowe/secrets-for-zowe-sdk` as replacement for `node-keytar`
  • Loading branch information
zFernand0 authored Aug 3, 2023
2 parents 53efab4 + fff54a3 commit 6f0bdcd
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 430 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Imperative package will be documented in this file.

## Recent Changes

- Enhancement: Replaced use of `node-keytar` with the new `keyring` module from `@zowe/secrets-for-zowe-sdk`. [zowe-cli#1622](https://github.com/zowe/zowe-cli/issues/1622)

## `5.17.0`

- Enhancement: Added `inSchema` property for ProfileInfo to indicate if argument is a known schema argument [#899](https://github.com/zowe/imperative/issues/899)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { runCliScript } from "../../../../../../src/TestUtil";
import { ITestEnvironment } from "../../../../../../__src__/environment/doc/response/ITestEnvironment";
import { SetupTestEnvironment } from "../../../../../../__src__/environment/SetupTestEnvironment";
import * as fs from "fs";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";

// Test Environment populated in the beforeAll();
let TEST_ENVIRONMENT: ITestEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { runCliScript } from "../../../../../../src/TestUtil";
import { ITestEnvironment } from "../../../../../../__src__/environment/doc/response/ITestEnvironment";
import { SetupTestEnvironment } from "../../../../../../__src__/environment/SetupTestEnvironment";
import * as fs from "fs";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";

// Test Environment populated in the beforeAll();
let TEST_ENVIRONMENT: ITestEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import * as fs from "fs";
import * as glob from "glob";
import * as jsonfile from "jsonfile";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";
import { IConfig } from "../../../../../../../../packages";
import { IConfigSecureProperties } from "../../../../../../../../packages/config/src/doc/IConfigSecure";
import { runCliScript } from "../../../../../../../src/TestUtil";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import * as fs from "fs";
import * as fsExtra from "fs-extra";
import * as path from "path";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";
import { ITestEnvironment } from "../../../../../../../__src__/environment/doc/response/ITestEnvironment";
import { SetupTestEnvironment } from "../../../../../../../__src__/environment/SetupTestEnvironment";
import { runCliScript } from "../../../../../../../src/TestUtil";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SetupTestEnvironment } from "../../../../../../../__src__/environment/S
import { runCliScript } from "../../../../../../../src/TestUtil";
import { expectedConfigObject, expectedUserConfigObject } from "../__resources__/expectedObjects";
import * as fs from "fs";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";
import * as path from "path";
import * as lodash from "lodash";
import { IConfigProfile } from "../../../../../../../../packages";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { runCliScript } from "../../../../../../../src/TestUtil";
import { expectedConfigObject, expectedUserConfigObject } from "../__resources__/expectedObjects";
import * as fs from "fs";
import * as path from "path";
import * as keytar from "keytar";
import { keyring as keytar } from "@zowe/secrets-for-zowe-sdk";
import * as lodash from "lodash";

// Test Environment populated in the beforeAll();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__integration__/imperative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@zowe/imperative": "../../..",
"keytar": "^7.1.0"
"@zowe/secrets-for-zowe-sdk": "7.18.0-next.4"
},
"engines": {
"node": ">=8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ describe("Cli Profile Manager", () => {

describe("Missing keytar installation", () => {
const profileName = "missing-keytar";
const keyTarDir = path.join(__dirname, "../../../../../node_modules/keytar");
const renamedKeyTarDir = path.join(__dirname, "../../../../../node_modules/keytar-renamed");
const keyTarDir = path.join(__dirname, "../../../../../node_modules/@zowe/secrets-for-zowe-sdk");
const renamedKeyTarDir = path.join(__dirname, "../../../../../node_modules/@zowe/zowe-for-secrets-sdk");

const renameKeyTar = () => {
if (fs.existsSync(keyTarDir)) {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/src/packages/profiles/test_cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-cli-for-profiles",
"dependencies": {
"keytar": "rock-out-with-a-keytar"
"@zowe/secrets-for-zowe-sdk": "plaintext"
}
}
Loading

0 comments on commit 6f0bdcd

Please sign in to comment.