Skip to content

Commit a4bcddf

Browse files
authored
Merge pull request #14 from gms1/feature/bump_sqlite_3.51.3_3.53.0
Feature/bump sqlite 3.51.3 3.53.0
2 parents c2ffc5b + e1c895a commit a4bcddf

10 files changed

Lines changed: 844 additions & 22 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Asynchronous, non-blocking [SQLite3](https://sqlite.org/) bindings for [Node.js]
2020
- [Extension support](https://github.com/gms1/node-sqlite3/wiki/API#databaseloadextensionpath-callback), including bundled support for the [json1 extension](https://www.sqlite.org/json1.html)
2121
- Big test suite
2222
- Written in modern C++ and tested for memory leaks
23-
- Bundles SQLite v3.51.3, or you can build using a local SQLite
23+
- Bundles SQLite v3.53.0, or you can build using a local SQLite
2424

2525
# Installing
2626

deps/common-sqlite.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'variables': {
3-
'sqlite_version%':'3510300',
3+
'sqlite_version%':'3530000',
44
"toolset%":'',
55
},
66
'target_defaults': {
-3.06 MB
Binary file not shown.
3.12 MB
Binary file not shown.

memory-bank/activeContext.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,14 @@
22

33
## Current Status
44

5-
**Last Updated**: 2026-03-29
5+
**Last Updated**: 2026-04-17
66

77
## Current Work
88

9-
### Security Hardening Documentation
10-
11-
**Status**: ✅ COMPLETE
12-
13-
Documented the security hardening implementation in [`binding.gyp`](../binding.gyp):
14-
15-
- Added comprehensive "Security Hardening" section to [`build-system.md`](build-system.md)
16-
- Documented platform-specific hardening flags:
17-
- **Linux**: `-fstack-protector-strong`, `-fPIC`, RELRO, `_FORTIFY_SOURCE=2`, CET
18-
- **Windows**: BufferSecurityCheck, ControlFlowGuard, ASLR, DEP, /sdl
19-
- **macOS**: `-fstack-protector-strong`, libc++
20-
- Added hardening decision entry to [`decisionLog.md`](decisionLog.md)
21-
- Updated [`progress.md`](progress.md) with completed work
22-
239
## Pending Tasks
2410

2511
No active tasks currently assigned.
2612

27-
## Recent Changes
28-
29-
- Security hardening documentation added to memory bank
30-
- Memory-bank structure updated with hardening details
31-
3213
## Open Questions
3314

3415
None currently.

memory-bank/decisionLog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
## Technical Decisions
44

5+
### 2026-04-17: SQLite Version Bump Script Design
6+
7+
**Decision**: Create `tools/bin/bump-sqlite.sh` as a standalone bash script in `tools/bin/` (not a per-script subdirectory)
8+
9+
**Rationale**:
10+
- `tools/bin/` is the designated directory for all utility scripts — avoids creating a sub-directory per script
11+
- Bash script chosen over Node.js: simpler for git operations, no dependency installation needed
12+
- 17-step workflow: parse args → clean tree → checkout main → fetch → check newer → cooldown → pull → create branch → download/replace → update gypi → update readme → check other changes → build → lint → test → commit → push
13+
- `FROM_VERSION` global variable set in step 5 (before any file modifications) and reused in steps 8, 9, 10, 16 — avoids re-reading the gypi file after it has been updated
14+
- Auto-detection of latest SQLite version from sqlite.org download page (optional `<new-version>` argument)
15+
- Cooldown period (default 7 days) to let new SQLite releases settle before adoption
16+
17+
**Files Created**:
18+
- `tools/bin/bump-sqlite.sh` — Main script
19+
20+
---
21+
522
### 2026-04-10: Queue Processing Deadlock Fix
623

724
**Decision**: Track `pending` counter to detect synchronous operations in `Database::Process()`

memory-bank/development.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ Uses ESLint with configuration in `.eslintrc.js`.
198198
- Follow existing naming conventions
199199
- Add JSDoc comments for public APIs
200200

201+
## Tools
202+
203+
### SQLite Version Bump
204+
205+
The `tools/bin/bump-sqlite.sh` script automates upgrading the bundled SQLite version:
206+
207+
```bash
208+
# Auto-detect latest version
209+
tools/bin/bump-sqlite.sh --usage
210+
211+
```
212+
201213
## Benchmarks
202214

203215
### Driver Comparison Benchmarks

memory-bank/progress.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Progress Log
22

3+
## 2026-04-17:
4+
5+
### SQLite Version Bump Script
6+
- Created [`tools/bin/bump-sqlite.sh`](../tools/bin/bump-sqlite.sh) — automated 17-step script for upgrading bundled SQLite
7+
- Features: auto-detect latest version from sqlite.org, cooldown period check, checksum verification, dry-run mode
8+
- Bugs fixed during real-world testing:
9+
- `git rm` instead of `rm` for old tarball (stages deletion for commit)
10+
- `${tmp_dir:-}` in EXIT trap to avoid unbound variable error
11+
- `FROM_VERSION` global variable to preserve original version for commit message (gypi file already updated by step 10)
12+
313
## 2026-04-10:
414

515
### v6.3.0

memory-bank/project-overview.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ node-sqlite3/
3737
│ ├── common-sqlite.gypi # Common build config
3838
│ └── sqlite-autoconf-*.tar.gz # SQLite source
3939
├── test/ # Test suite (mocha)
40+
├── tools/ # Development tools
41+
│ ├── bin/ # Utility scripts
42+
│ │ └── bump-sqlite.sh # SQLite version bump automation
43+
│ ├── benchmark-drivers/ # Driver comparison benchmarks
44+
│ └── benchmark-internal/ # Internal performance benchmarks
4045
└── binding.gyp # node-gyp build configuration
4146
```
4247

0 commit comments

Comments
 (0)