@napi-rs/keyring
2.1.2 · 19 Oct 2026MIT8.9M / weekRepositoryHomepagenpmAtom feed
19 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 2.x · latest line
2.1.2
19 Oct 2026Only updates dependencies, nothing else changes.
2.1.1
10 Oct 2026Type async getPassword/getSecret as null for missing entries
What's Changed
Type async getPassword/getSecret as null for missing entries
2.1.0
13 Sep 2026Allow selecting the Linux credential store explicitly
What's Changed
Allow selecting the Linux credential store explicitly
2.0.0
31 Aug 2026Preserve non-missing password read errors
Propagate credential store errors instead of erasing them into false/absent
Breaking Changes
This release changes how credential store errors are reported. Success and "not found" results are unchanged, but provider failures that were previously silenced now throw (sync API) or reject (async API).
1. Reads:
getPassword()/getSecret()Previously, any failure reading the credential store — a locked keychain, denied access, an OS error — was swallowed and returned as
null/undefined, indistinguishable from "no credential stored".Now only a genuinely missing credential (
NoEntry) returns the absent result. Every other error throws or rejects:Scenario v1.x v2.0.0 Credential exists value value (unchanged) Credential missing null/undefinednull/undefined(unchanged)Store locked / inaccessible / OS error null/undefined⚠️throws / rejects 2. Deletes:
deleteCredential()/deletePassword()Previously, any delete failure returned
false, so a failed delete looked identical to "credential was already gone" — leaving callers unable to tell whether the secret was actually removed.Now
falseonly means the credential did not exist (NoEntry). A failed delete throws or rejects:Scenario v1.x v2.0.0 Credential deleted truetrue(unchanged)No credential to delete falsefalse(unchanged)Delete failed (locked store, OS error) false⚠️throws / rejects A
falseresult now guarantees the credential is absent from the store.3. TypeScript: async
deletePassword()return typeThe async
deletePassword()alias is now correctly declared asPromise<boolean>instead ofPromise<unknown>. This is a narrowing and is source-compatible for typical usage, but code that treated the result asunknownmay need a small type adjustment.These changes apply to both
Entry(sync) andAsyncEntry(async), including thedeletePassword()aliases.Migration Guide
If you only check for absent credentials — no change needed
// Still works exactly as before: null means "not stored" const password = await entry.getPassword() if (password === null) { // no credential stored }If you call reads/deletes without error handling — add it
Code that previously "worked" against a locked or inaccessible store will now surface the error. This is the main thing to audit when upgrading:
// v1.x: silently got null on a locked keychain // v2.0.0: must handle the rejection try { const secret = await entry.getSecret() if (secret === null) { // credential not stored } } catch (err) { // store is locked, access denied, or OS-level failure // previously this path returned null — decide how to handle it }// Deletes: distinguish "was absent" from "failed to delete" try { const deleted = await entry.deleteCredential() // deleted === true → credential was removed // deleted === false → credential did not exist (guaranteed absent) } catch (err) { // deletion failed — the credential may still be stored }Sync API
The same applies to the sync
Entrymethods, which now throw on provider errors instead of returningnull/false:try { const password = entry.getPassword() // null only if not stored } catch (err) { // store error }Why this change
The new behavior matches the documented node-keytar compatibility contract: missing credentials resolve as
null, while native failures reject. Previously.ok()/.is_ok()conversions at the N-API boundary erased that distinction, so a locked keychain looked like an empty one. See #136 and #138 for details.What's Changed
Preserve non-missing password read errors
Propagate credential store errors instead of erasing them into false/absent
- 1.x
1.3.0
30 Apr 2026Only updates dependencies, nothing else changes.
1.2.0
2 Sep 2025Implement setSecret and getSecret methods on all platforms
1.1.10
29 Aug 2025Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
1.1.9
24 Jul 2025Upgrade to NAPI-RS 3.0 stable
What's Changed
Upgrade to NAPI-RS 3.0 stable
1.1.8
20 May 2025Add back deletePassword method
What's Changed
Add back deletePassword method
1.1.7
4 May 2025- Breaking
Bump keyring-rs
Update system deps
What's Changed
- Breaking
Bump keyring-rs
Update system deps
1.1.6
17 Apr 2024Add missing platforms in ci
What's Changed
Add missing platforms in ci
1.1.5
9 Apr 20241.1.4
18 Mar 2024Upgrade all toolchain
What's Changed
Upgrade all toolchain
1.1.3
17 Jul 2023with_target args order
1.1.2
17 Jul 2023Fall back to keyutils if secret-service not available in Linux
What's Changed
Fall back to keyutils if secret-service not available in Linux
1.1.1
8 Mar 2023Missing
keytar.d.tsfiles in published package @Brooooooklyn 4729f11
1.1.0
7 Mar 2023Implement find_credentials
1.0.0
6 Mar 2023- 0.0.x
0.0.1
25 Feb 2023
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.