[PR #191] [MERGED] Empty keys pre-check #157

Closed
opened 2026-05-23 08:32:09 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/appy-one/acebase/pull/191
Author: @appy-one
Created: 12/19/2022
Status: Merged
Merged: 12/19/2022
Merged by: @appy-one

Base: masterHead: fix/empty-keys-check


📝 Commits (2)

  • e4ab033 pre-check if empty keys are written
  • 1626749 add empty keys unit tests

📊 Changes

2 files changed (+21 additions, -2 deletions)

View changed files

📝 src/storage/binary/index.ts (+1 -2)
📝 src/test/keys.spec.ts (+20 -0)

📄 Description

Adds a pre-check to prevent empty '' keys to be used in update and set objects. This has already been fixed in acebase-core by https://github.com/appy-one/acebase-core/pull/24, added here to keep checks the same. Another option would be to to remove the key checks here and completely delegate it to acebase-core's PathInfo class. This should be considered.

Also adds unit tests

ref: #172


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/appy-one/acebase/pull/191 **Author:** [@appy-one](https://github.com/appy-one) **Created:** 12/19/2022 **Status:** ✅ Merged **Merged:** 12/19/2022 **Merged by:** [@appy-one](https://github.com/appy-one) **Base:** `master` ← **Head:** `fix/empty-keys-check` --- ### 📝 Commits (2) - [`e4ab033`](https://github.com/appy-one/acebase/commit/e4ab033456ce3ded0c5a318ff7a02eb689cc7e33) pre-check if empty keys are written - [`1626749`](https://github.com/appy-one/acebase/commit/162674954bb0ba5a5cc8f3cdba5453733f52c1b6) add empty keys unit tests ### 📊 Changes **2 files changed** (+21 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/storage/binary/index.ts` (+1 -2) 📝 `src/test/keys.spec.ts` (+20 -0) </details> ### 📄 Description Adds a pre-check to prevent empty `''` keys to be used in `update` and `set` objects. This has already been fixed in `acebase-core` by https://github.com/appy-one/acebase-core/pull/24, added here to keep checks the same. Another option would be to to remove the key checks here and completely delegate it to `acebase-core`'s `PathInfo` class. This should be considered. Also adds unit tests ref: #172 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-23 08:32:09 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#157
No description provided.