Skip to content

Commit 9c37a66

Browse files
committed
Also add to v22 changelog
1 parent bac497d commit 9c37a66

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

doc/changelogs/CHANGELOG_V22.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
### Notable Changes
6363

64-
### require(esm) is now enabled by default
64+
#### require(esm) is now enabled by default
6565

6666
Support for loading native ES modules using require() had been available on v20.x and v22.x under the command line flag --experimental-require-module, and available by default on v23.x. In this release, it is now no longer behind a flag on v22.x.
6767

@@ -103,7 +103,33 @@ Certificates added:
103103

104104
Contributed by Richard Lau in [#55681](https://github.com/nodejs/node/pull/55681)
105105

106-
### Other Notable Changes
106+
#### SQLite Session Extension
107+
108+
Basic support for the [SQLite Session Extension](https://www.sqlite.org/sessionintro.html) got added to the experimental `node:sqlite` module.
109+
110+
```js
111+
const sourceDb = new DatabaseSync(':memory:');
112+
const targetDb = new DatabaseSync(':memory:');
113+
114+
sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
115+
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
116+
117+
const session = sourceDb.createSession();
118+
119+
const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
120+
insert.run(1, 'hello');
121+
insert.run(2, 'world');
122+
123+
const changeset = session.changeset();
124+
targetDb.applyChangeset(changeset);
125+
// Now that the changeset has been applied, targetDb contains the same data as sourceDb.
126+
```
127+
128+
Of note to distributors when dynamically linking with SQLite (using the `--shared-sqlite` flag): compiling SQLite with `SQLITE_ENABLE_SESSION` and `SQLITE_ENABLE_PREUPDATE_HOOK` defines is now required.
129+
130+
Contributed by Bart Louwers in [#54181](https://github.com/nodejs/node/pull/54181).
131+
132+
#### Other Notable Changes
107133

108134
* \[[`4920869935`](https://github.com/nodejs/node/commit/4920869935)] - **(SEMVER-MINOR)** **assert**: make assertion\_error use Myers diff algorithm (Giovanni Bucci) [#54862](https://github.com/nodejs/node/pull/54862)
109135
* \[[`ccffd3b819`](https://github.com/nodejs/node/commit/ccffd3b819)] - **doc**: enforce strict policy to semver-major releases (Rafael Gonzaga) [#55732](https://github.com/nodejs/node/pull/55732)

0 commit comments

Comments
 (0)