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}"],
ignoreDependencies: [
// Brought in via hak scripts
"keytar",
"keytar-forked",
"matrix-seshat",
// Required for `action-validator`
"@action-validator/*",

View File

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

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.
*/
import type * as Keytar from "keytar"; // Hak dependency type
import type * as Keytar from "keytar-forked"; // Hak dependency type
let keytar: typeof Keytar | undefined;
try {
({ default: keytar } = await import("keytar"));
({ default: keytar } = await import("keytar-forked"));
} catch (e) {
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
console.log("Keytar isn't installed; secure key storage is disabled.");