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

+23
-25
lines changed

doc/api/cli.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,14 +1061,6 @@ added:
10611061

10621062
Use this flag to enable [ShadowRealm][] support.
10631063

1064-
### `--experimental-sqlite`
1065-
1066-
<!-- YAML
1067-
added: v22.5.0
1068-
-->
1069-
1070-
Enable the experimental [`node:sqlite`][] module.
1071-
10721064
### `--experimental-strip-types`
10731065

10741066
<!-- YAML
@@ -1688,6 +1680,18 @@ Disable support for loading a synchronous ES module graph in `require()`.
16881680

16891681
See [Loading ECMAScript modules using `require()`][].
16901682

1683+
### `--no-experimental-sqlite`
1684+
1685+
<!-- YAML
1686+
added: v22.5.0
1687+
changes:
1688+
- version: REPLACEME
1689+
pr-url: https://github.com/nodejs/node/pull/55890
1690+
description: SQLite is unflagged but still experimental.
1691+
-->
1692+
1693+
Disable the experimental [`node:sqlite`][] module.
1694+
16911695
### `--no-experimental-websocket`
16921696

16931697
<!-- YAML
@@ -3073,7 +3077,6 @@ one is included in the list below.
30733077
* `--experimental-require-module`
30743078
* `--experimental-shadow-realm`
30753079
* `--experimental-specifier-resolution`
3076-
* `--experimental-sqlite`
30773080
* `--experimental-strip-types`
30783081
* `--experimental-top-level-await`
30793082
* `--experimental-transform-types`
@@ -3112,6 +3115,7 @@ one is included in the list below.
31123115
* `--no-experimental-global-navigator`
31133116
* `--no-experimental-global-webcrypto`
31143117
* `--no-experimental-repl-await`
3118+
* `--no-experimental-sqlite`
31153119
* `--no-experimental-websocket`
31163120
* `--no-extra-info-on-fatal-exception`
31173121
* `--no-force-async-hooks-checks`

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
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');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy