Open
Conversation
🦋 Changeset detectedLatest commit: 22fb153 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
13b0849 to
1af81e7
Compare
Updated sqlite-level version from patch to major due to the removal of CommonJS support and migration to ESM.
1af81e7 to
b47374c
Compare
* _clear was broken — only handled gte via a LIKE prefix match. Rewrote to support all range options (gt, gte, lt, lte) and clear-all with no options, matching the abstract-level contract. * limit: 0 was falsy — if (options.limit) skipped limit: 0, returning everything instead of nothing. Fixed to options.limit != null && options.limit >= 0. * gt/gte/lt/lte falsy checks — empty string or 0 values were silently skipped. Changed to != null checks. Also refactored condition building to use a conditions[] array. * stmt.iterate(params) — changed to stmt.iterate(...params) for explicit spread rather than relying on better-sqlite3 implicit array handling. * async _close — removed misleading async keyword from iterator _close methods since they're synchronous callback-based. * _clear missing readOnly guard — added the same LEVEL_READ_ONLY check that _put, _del, and _batch have. * Dead main/types fields in package.json — removed; redundant with the exports map now that CJS is dropped. Added test coverage Went from 55 → 66 tests. Added: - 7 _clear tests (clear-all, gt, gte, lt, lte, two range combos) - _clear readOnly test - limit: 0 test - Key iterator _close via break - Value iterator _close via break - Updated SQL injection clear tests to match new range semantics Accepted / left as-is UNIQUE constraint migration — major version bump covers it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a
majorversion changeDescription:
Migrate from cjs to esm, replace Jest with Vitest, fix SQL injection vulnerabilities, improve type safety, and add comprehensive test coverage.
What was Added/Changed:
Package.json
src/index.ts
Tests