doc,lib,src,test: unflag sqlite module · nodejs/node@55239a4 · GitHub
Skip to content

Commit 55239a4

Browse files
cjihrigruyadorno
authored andcommitted
doc,lib,src,test: unflag sqlite module
This commit allows the node:sqlite module to be used without starting Node with a CLI flag. The module is still experimental. Fixes: #55854 PR-URL: #55890 Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent ccc9b10 commit 55239a4

12 files changed

Lines changed: 23 additions & 25 deletions

doc/api/cli.md

Lines changed: 13 additions & 9 deletions

doc/api/sqlite.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
added: v22.5.0
77
-->
88

9-
> Stability: 1.1 - Active development. Enable this API with the
10-
> [`--experimental-sqlite`][] CLI flag.
9+
> Stability: 1.1 - Active development.
1110
1211
<!-- source_link=lib/sqlite.js -->
1312

@@ -432,7 +431,6 @@ The following constants are meant for use with [`database.applyChangeset()`](#da
432431

433432
[Changesets and Patchsets]: https://www.sqlite.org/sessionintro.html#changesets_and_patchsets
434433
[SQL injection]: https://en.wikipedia.org/wiki/SQL_injection
435-
[`--experimental-sqlite`]: cli.md#--experimental-sqlite
436434
[`ATTACH DATABASE`]: https://www.sqlite.org/lang_attach.html
437435
[`PRAGMA foreign_keys`]: https://www.sqlite.org/pragma.html#pragma_foreign_keys
438436
[`sqlite3_changes64()`]: https://www.sqlite.org/c3ref/changes.html

doc/node.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ Enable the experimental permission model.
182182
.It Fl -experimental-shadow-realm
183183
Use this flag to enable ShadowRealm support.
184184
.
185-
.It Fl -experimental-sqlite
186-
Enable the experimental node:sqlite module.
187-
.
188185
.It Fl -experimental-test-coverage
189186
Enable code coverage in the test runner.
190187
.
@@ -224,6 +221,9 @@ Disable exposition of the Web Crypto API on the global scope.
224221
.It Fl -no-experimental-repl-await
225222
Disable top-level await keyword support in REPL.
226223
.
224+
.It Fl -no-experimental-sqlite
225+
Disable the experimental node:sqlite module.
226+
.
227227
.It Fl -experimental-vm-modules
228228
Enable experimental ES module support in VM module.
229229
.

lib/internal/process/pre_execution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ function setupWebCrypto() {
382382
}
383383

384384
function setupSQLite() {
385-
if (!getOptionValue('--experimental-sqlite')) {
385+
if (getOptionValue('--no-experimental-sqlite')) {
386386
return;
387387
}
388388

src/node_options.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
430430
AddOption("--experimental-sqlite",
431431
"experimental node:sqlite module",
432432
&EnvironmentOptions::experimental_sqlite,
433-
kAllowedInEnvvar);
433+
kAllowedInEnvvar,
434+
true);
434435
AddOption("--experimental-webstorage",
435436
"experimental Web Storage API",
436437
&EnvironmentOptions::experimental_webstorage,

src/node_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class EnvironmentOptions : public Options {
123123
bool experimental_eventsource = false;
124124
bool experimental_fetch = true;
125125
bool experimental_websocket = true;
126-
bool experimental_sqlite = false;
126+
bool experimental_sqlite = true;
127127
bool experimental_webstorage = false;
128128
std::string localstorage_file;
129129
bool experimental_global_customevent = true;

test/parallel/test-sqlite-data-types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-sqlite
21
'use strict';
32
require('../common');
43
const tmpdir = require('../common/tmpdir');

test/parallel/test-sqlite-database-sync.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-sqlite
21
'use strict';
32
require('../common');
43
const tmpdir = require('../common/tmpdir');

test/parallel/test-sqlite-named-parameters.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-sqlite
21
'use strict';
32
require('../common');
43
const tmpdir = require('../common/tmpdir');

test/parallel/test-sqlite-statement-sync.js

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)