| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -192,7 +192,7 @@ jobs: | |||
| 192 | 192 | --arg ccache '(import <nixpkgs> {}).sccache' \ | |
| 193 | 193 | --arg devTools '[]' \ | |
| 194 | 194 | --arg benchmarkTools '[]' \ | |
| 195 | - ${{ endsWith(matrix.system, '-darwin') && '--arg extraConfigFlags ''["--without-amaro" "--without-inspector" "--without-node-options"]'' \' || '\' }} | ||
| 195 | + ${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withSQLite false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }} | ||
| 196 | 196 | --run ' | |
| 197 | 197 | make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS" | |
| 198 | 198 | ' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -933,7 +933,6 @@ | |||
| 933 | 933 | 'sources': [ | |
| 934 | 934 | '<@(node_sqlite_sources)', | |
| 935 | 935 | ], | |
| 936 | - 'defines': [ 'HAVE_SQLITE=1' ], | ||
| 937 | 936 | }], | |
| 938 | 937 | [ 'node_shared=="true" and node_module_version!="" and OS!="win"', { | |
| 939 | 938 | 'product_extension': '<(shlib_suffix)', | |
@@ -982,7 +981,6 @@ | |||
| 982 | 981 | 'sources': [ | |
| 983 | 982 | '<@(node_sqlite_sources)', | |
| 984 | 983 | ], | |
| 985 | - 'defines': [ 'HAVE_SQLITE=1' ], | ||
| 986 | 984 | }], | |
| 987 | 985 | [ 'OS in "linux freebsd mac solaris openharmony" and ' | |
| 988 | 986 | 'target_arch=="x64" and ' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -436,5 +436,10 @@ | |||
| 436 | 436 | }, { | |
| 437 | 437 | 'defines': [ 'HAVE_AMARO=0' ] | |
| 438 | 438 | }], | |
| 439 | + [ 'node_use_sqlite=="true"', { | ||
| 440 | + 'defines': [ 'HAVE_SQLITE=1' ], | ||
| 441 | + }, { | ||
| 442 | + 'defines': [ 'HAVE_SQLITE=0' ] | ||
| 443 | + }], | ||
| 439 | 444 | ], | |
| 440 | 445 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -577,7 +577,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
| 577 | 577 | "experimental Web Storage API", | |
| 578 | 578 | &EnvironmentOptions::webstorage, | |
| 579 | 579 | kAllowedInEnvvar, | |
| 580 | - true); | ||
| 580 | + HAVE_SQLITE); | ||
| 581 | 581 | AddAlias("--webstorage", "--experimental-webstorage"); | |
| 582 | 582 | AddOption("--localstorage-file", | |
| 583 | 583 | "file used to persist localStorage data", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,7 +127,7 @@ class EnvironmentOptions : public Options { | |||
| 127 | 127 | bool experimental_fetch = true; | |
| 128 | 128 | bool experimental_websocket = true; | |
| 129 | 129 | bool experimental_sqlite = true; | |
| 130 | - bool webstorage = true; | ||
| 130 | + bool webstorage = HAVE_SQLITE; | ||
| 131 | 131 | #ifndef OPENSSL_NO_QUIC | |
| 132 | 132 | bool experimental_quic = false; | |
| 133 | 133 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -362,8 +362,6 @@ const knownGlobals = new Set([ | |||
| 362 | 362 | 'CompressionStream', | |
| 363 | 363 | 'DecompressionStream', | |
| 364 | 364 | 'Storage', | |
| 365 | - 'localStorage', | ||
| 366 | - 'sessionStorage', | ||
| 367 | 365 | ].forEach((i) => { | |
| 368 | 366 | if (globalThis[i] !== undefined) { | |
| 369 | 367 | knownGlobals.add(globalThis[i]); | |
@@ -377,6 +375,11 @@ if (hasCrypto) { | |||
| 377 | 375 | knownGlobals.add(globalThis.SubtleCrypto); | |
| 378 | 376 | } | |
| 379 | 377 | ||
| 378 | + if (hasSQLite) { | ||
| 379 | + knownGlobals.add(globalThis.localStorage); | ||
| 380 | + knownGlobals.add(globalThis.sessionStorage); | ||
| 381 | + } | ||
| 382 | + | ||
| 380 | 383 | const { Worker } = require('node:worker_threads'); | |
| 381 | 384 | knownGlobals.add(Worker); | |
| 382 | 385 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,11 +12,14 @@ const { registerHooks } = require('module'); | |||
| 12 | 12 | ||
| 13 | 13 | const schemelessBlockList = new Set([ | |
| 14 | 14 | 'sea', | |
| 15 | - 'sqlite', | ||
| 16 | 15 | 'test', | |
| 17 | 16 | 'test/reporters', | |
| 18 | 17 | ]); | |
| 19 | 18 | ||
| 19 | + if (common.hasSQLite) { | ||
| 20 | + schemelessBlockList.add('sqlite'); | ||
| 21 | + } | ||
| 22 | + | ||
| 20 | 23 | const testModules = []; | |
| 21 | 24 | for (const mod of schemelessBlockList) { | |
| 22 | 25 | testModules.push(`node:${mod}`); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,11 +36,14 @@ hook.deregister(); | |||
| 36 | 36 | // stripped for internal lookups should not get passed into the hooks. | |
| 37 | 37 | const schemelessBlockList = new Set([ | |
| 38 | 38 | 'sea', | |
| 39 | - 'sqlite', | ||
| 40 | 39 | 'test', | |
| 41 | 40 | 'test/reporters', | |
| 42 | 41 | ]); | |
| 43 | 42 | ||
| 43 | + if (common.hasSQLite) { | ||
| 44 | + schemelessBlockList.add('sqlite'); | ||
| 45 | + } | ||
| 46 | + | ||
| 44 | 47 | const testModules = []; | |
| 45 | 48 | for (const mod of schemelessBlockList) { | |
| 46 | 49 | testModules.push(`node:${mod}`); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,9 +59,10 @@ for (const moduleName of builtinModules) { | |||
| 59 | 59 | 'fetch', | |
| 60 | 60 | 'crypto', | |
| 61 | 61 | 'navigator', | |
| 62 | - 'localStorage', | ||
| 63 | - 'sessionStorage', | ||
| 64 | 62 | ]; | |
| 63 | + if (common.hasSQLite) { | ||
| 64 | + expected.push('localStorage', 'sessionStorage'); | ||
| 65 | + } | ||
| 65 | 66 | assert.deepStrictEqual(new Set(Object.keys(globalThis)), new Set(expected)); | |
| 66 | 67 | expected.forEach((value) => { | |
| 67 | 68 | const desc = Object.getOwnPropertyDescriptor(globalThis, value); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,8 +2,8 @@ | |||
| 2 | 2 | const { skipIfSQLiteMissing } = require('../common/index.mjs'); | |
| 3 | 3 | const { test } = require('node:test'); | |
| 4 | 4 | const assert = require('node:assert'); | |
| 5 | - const { DatabaseSync } = require('node:sqlite'); | ||
| 6 | 5 | skipIfSQLiteMissing(); | |
| 6 | + const { DatabaseSync } = require('node:sqlite'); | ||
| 7 | 7 | ||
| 8 | 8 | function checkDefensiveMode(db) { | |
| 9 | 9 | function journalMode() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments