Test keytar-forked

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2025-02-28 10:59:16 +00:00
parent a46985d91e
commit 6ae09710c6
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
5 changed files with 7 additions and 7 deletions

View File

@ -1 +1 @@
v22.13.1 v22.14.0

View File

@ -5,7 +5,7 @@ export default {
project: ["**/*.{js,ts}"], project: ["**/*.{js,ts}"],
ignoreDependencies: [ ignoreDependencies: [
// Brought in via hak scripts // Brought in via hak scripts
"keytar", "keytar-forked",
"matrix-seshat", "matrix-seshat",
// Required for `action-validator` // Required for `action-validator`
"@action-validator/*", "@action-validator/*",

View File

@ -15,7 +15,7 @@
"type": "module", "type": "module",
"files": [], "files": [],
"engines": { "engines": {
"node": ">=18.0.0 <=22.13.1 || >22" "node": ">=18.0.0"
}, },
"scripts": { "scripts": {
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint", "i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
@ -112,7 +112,7 @@
}, },
"hakDependencies": { "hakDependencies": {
"matrix-seshat": "^4.0.1", "matrix-seshat": "^4.0.1",
"keytar": "^7.9.0" "keytar-forked": "^7.9.0"
}, },
"resolutions": { "resolutions": {
"@types/node": "18.19.76", "@types/node": "18.19.76",

View File

@ -2,7 +2,7 @@
// Definitions by: Milan Burda <https://github.com/miniak>, Brendan Forster <https://github.com/shiftkey>, Hari Juturu <https://github.com/juturu> // Definitions by: Milan Burda <https://github.com/miniak>, Brendan Forster <https://github.com/shiftkey>, Hari Juturu <https://github.com/juturu>
// Adapted from DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/keytar/index.d.ts // Adapted from DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/keytar/index.d.ts
declare module "keytar" { declare module "keytar-forked" {
/** /**
* Get the stored password for the service and account. * Get the stored password for the service and account.
* *

View File

@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import type * as Keytar from "keytar"; // Hak dependency type import type * as Keytar from "keytar-forked"; // Hak dependency type
let keytar: typeof Keytar | undefined; let keytar: typeof Keytar | undefined;
try { try {
({ default: keytar } = await import("keytar")); ({ default: keytar } = await import("keytar-forked"));
} catch (e) { } catch (e) {
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") { if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
console.log("Keytar isn't installed; secure key storage is disabled."); console.log("Keytar isn't installed; secure key storage is disabled.");