node-firebird 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +75 -33
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,29 +6,25 @@
6
6
 
7
7
  [![NPM](https://nodei.co/npm/node-firebird.png?downloads=true&downloadRank=true)](https://nodei.co/npm/node-firebird/)
8
8
 
9
- [Firebird forum](https://groups.google.com/forum/#!forum/node-firebird) on Google Groups.
10
-
11
- ## Firebird database on social networks
12
-
13
- - [Firebird on Twitter](https://twitter.com/firebirdsql/)
14
- - [Firebird on Facebook](https://www.facebook.com/FirebirdSQL)
15
-
16
- ## Changelog for version v0.2.x
17
-
18
- - added auto-reconnect
19
- - added [sequentially selects](https://github.com/hgourvest/node-firebird/wiki/What-is-sequentially-selects)
20
- - events for connection (attach, detach, row, result, transaction, commit, rollback, error, etc.)
21
- - performance improvements
22
- - supports inserting/updating buffers and streams
23
- - reading blobs (sequentially)
24
- - pooling
25
- - `database.detach()` waits for last command
26
- - better unit-test
27
-
28
- ---
29
-
30
- - [Firebird documentation](https://firebirdsql.org/en/documentation/)
31
- - [Firebird limits and data types](https://firebirdsql.org/en/firebird-technical-specifications/)
9
+ ## Table of contents
10
+
11
+ - [Installation](#installation)
12
+ - [Usage](#usage) — including [developing the driver](#developing-the-driver)
13
+ - [Connection types](#connection-types) — connection options, classic connections, pooling
14
+ - [Database object (db)](#database-object-db) — database, transaction and statement methods/options
15
+ - [Examples](#examples) — parametrized queries, BLOBs, streaming big data, transactions, driver events, database events (POST_EVENT), service manager, charsets/encoding, Firebird 3.0–6.0 features
16
+ - [Extensive Examples](#extensive-examples) DECFLOAT/INT128, statement timeouts, scrollable cursors, RETURNING multiple rows, SKIP LOCKED, advanced pooling
17
+ - [Using node-firebird with Express.js](#using-node-firebird-with-expressjs)
18
+ - [FAQ](#faq)
19
+ - [Contributing](#contributing) · [Contributors](#contributors)
20
+
21
+ ## Community & resources
22
+
23
+ - [Firebird forum](https://groups.google.com/forum/#!forum/node-firebird) on Google Groups — questions and discussion
24
+ - [GitHub issues](https://github.com/hgourvest/node-firebird/issues) — bug reports and feature requests
25
+ - [ROADMAP](ROADMAP.md) planned work and protocol implementation status
26
+ - Driver internals: [SRP authentication protocol](docs/SRP_PROTOCOL.md) · [database encryption key callback](docs/ENCRYPTION_CALLBACK.md)
27
+ - Firebird itself: [documentation](https://firebirdsql.org/en/documentation/) · [limits and data types](https://firebirdsql.org/en/firebird-technical-specifications/) · [Twitter/X](https://twitter.com/firebirdsql/) · [Facebook](https://www.facebook.com/FirebirdSQL)
32
28
 
33
29
  ## Installation
34
30
 
@@ -36,6 +32,10 @@
36
32
  npm install node-firebird
37
33
  ```
38
34
 
35
+ The driver is pure JavaScript at runtime — no native addons and no runtime
36
+ dependencies. Node.js 20 or newer is supported (CI runs on Node 20, 22, 24
37
+ and 26 against Firebird 3, 4, 5 and 6).
38
+
39
39
  ## Usage
40
40
 
41
41
  ```js
@@ -50,21 +50,47 @@ import * as Firebird from 'node-firebird';
50
50
  import type { Options, Database } from 'node-firebird';
51
51
  ```
52
52
 
53
- ### Development
53
+ ### Developing the driver
54
+
55
+ Since v2.4.0 the driver is written in TypeScript and compiled with the native
56
+ TypeScript 7 compiler (`tsc`). The published package ships both the compiled
57
+ output and the sources.
58
+
59
+ **Requirements**
54
60
 
55
- The sources live in `src/` (TypeScript) and are compiled to `lib/` (CommonJS +
56
- `.d.ts`) by the native TypeScript 7 compiler:
61
+ - Node.js >= 20 (CI matrix: 20, 22, 24, 26)
62
+ - npm (TypeScript 7 and all tooling are installed as devDependencies — no
63
+ global installs needed)
64
+ - a Firebird server on `127.0.0.1:3050` with `SYSDBA`/`masterkey` for the
65
+ integration tests (CI tests against Firebird 3, 4, 5 and 6-snapshot); the
66
+ unit tests under `test/unit/` run without a server
67
+
68
+ The quickest way to get a test server is Docker:
69
+
70
+ ```bash
71
+ docker run -d --name firebird -p 3050:3050 \
72
+ -e FIREBIRD_ROOT_PASSWORD=masterkey \
73
+ firebirdsql/firebird:5
74
+ ```
75
+
76
+ **Layout**
77
+
78
+ - `src/` — the TypeScript sources; this is what you edit
79
+ - `lib/` — compiled CommonJS + generated `.d.ts` declarations; build output,
80
+ gitignored — never edit it by hand
81
+ - `test/` — vitest suite (integration tests at the top level, server-free
82
+ tests in `test/unit/`)
83
+
84
+ **Workflow**
57
85
 
58
86
  ```bash
59
87
  npm install # installs deps and builds lib/ via the prepare script
60
88
  npm run build # compile src/ -> lib/
61
- npm run typecheck # type-check sources and unit tests without emitting
89
+ npm run typecheck # type-check sources and tests without emitting
90
+ npm run lint # oxlint
62
91
  npm test # build + run the vitest suite (unit + integration)
63
92
  ```
64
93
 
65
- The integration tests expect a Firebird server on `127.0.0.1:3050`
66
- (SYSDBA/masterkey); the unit tests under `test/unit/` run without a server.
67
-
68
94
  ### Methods
69
95
 
70
96
  - `Firebird.escape(value) -> return {String}` - prevent for SQL Injections
@@ -1506,11 +1532,27 @@ db.query('SELECT * FROM ACTORS WHERE NAME LIKE ?', ['James Wick%'], function (er
1506
1532
  });
1507
1533
  ```
1508
1534
 
1535
+ ## Contributing
1536
+
1537
+ Contributions are welcome — code, documentation, and bug reports alike.
1538
+
1539
+ - **Found a bug or have a question?** Open a [GitHub issue](https://github.com/hgourvest/node-firebird/issues). Please include your Node.js version, your Firebird server version, and a minimal reproduction (SQL plus code).
1540
+ - **Want to write code?** See [Developing the driver](#developing-the-driver) for the build and test setup, and the [ROADMAP](ROADMAP.md) for ideas on what to pick up. Pull requests against `master` should come with tests and pass `npm test`, `npm run typecheck` and `npm run lint`.
1541
+ - **Improving the documentation** is just as valuable — clearer examples and FAQ entries help everyone.
1542
+
1509
1543
  ## Contributors
1510
1544
 
1511
- - Henri Gourvest, <https://github.com/hgourvest>
1512
- - Popa Marius Adrian, <https://github.com/mariuz>
1513
- - Peter Širka, <https://github.com/petersirka>
1545
+ `node-firebird` was created by **Henri Gourvest** and is maintained by **Popa Marius Adrian**, with major early contributions from **Peter Širka** (pooling, sequential selects, driver events).
1546
+
1547
+ - Henri Gourvest — author, <https://github.com/hgourvest>
1548
+ - Popa Marius Adrian — maintainer, <https://github.com/mariuz>
1549
+ - Peter Širka — <https://github.com/petersirka>
1550
+
1551
+ …and many more — see the full [list of contributors](https://github.com/hgourvest/node-firebird/graphs/contributors).
1552
+
1553
+ <a href="https://github.com/hgourvest/node-firebird/graphs/contributors">
1554
+ <img src="https://contrib.rocks/image?repo=hgourvest/node-firebird" alt="Contributors" />
1555
+ </a>
1514
1556
 
1515
1557
  [license-image]: http://img.shields.io/badge/license-MOZILLA-blue.svg?style=flat
1516
1558
  [license-url]: LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-firebird",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Pure JavaScript and Asynchronous Firebird client for Node.js.",
5
5
  "keywords": [
6
6
  "firebird",