diff --git a/.eslintrc b/.eslintrc index 85ab771b..44a8d5ac 100644 --- a/.eslintrc +++ b/.eslintrc @@ -28,6 +28,17 @@ "no-constant-condition": 0, "no-useless-escape": 0, "no-console": "error", + "no-restricted-globals": [ + "error", + { + "name": "global", + "message": "Use `globalThis` instead" + }, + { + "name": "window", + "message": "Use `globalThis` instead" + } + ], "require-yield": 0, "eqeqeq": ["error", "smart"], "spaced-comment": [ @@ -39,7 +50,8 @@ }, "block": { "exceptions": ["*"] - } + }, + "markers": ["/"] } ], "capitalized-comments": [ @@ -80,7 +92,8 @@ ], "pathGroupsExcludedImportTypes": [ "type" - ] + ], + "newlines-between": "never" } ], "@typescript-eslint/no-namespace": 0, @@ -102,7 +115,7 @@ "@typescript-eslint/consistent-type-imports": ["error"], "@typescript-eslint/consistent-type-exports": ["error"], "no-throw-literal": "off", - "@typescript-eslint/no-throw-literal": ["error"], + "@typescript-eslint/no-throw-literal": "off", "@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true, "ignoreIIFE": true diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml index 63c68485..80f58e63 100644 --- a/.github/workflows/codesee-arch-diagram.yml +++ b/.github/workflows/codesee-arch-diagram.yml @@ -1,7 +1,9 @@ +# This workflow was added by CodeSee. Learn more at https://codesee.io/ +# This is v2.0 of this workflow file on: push: branches: - - master + - staging pull_request_target: types: [opened, synchronize, reopened] @@ -18,3 +20,4 @@ jobs: - uses: Codesee-io/codesee-action@v2 with: codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + codesee-url: https://app.codesee.io diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38c5a36..3f96e07f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -184,7 +184,7 @@ build:windows: - ./scripts/choco-install.ps1 - refreshenv - npm install --ignore-scripts - - $env:Path = "$(npm bin);" + $env:Path + - $env:Path = "$(npm root)\.bin;" + $env:Path - npm run prebuild --verbose - npm test -- --ci --coverage - npm run bench @@ -221,7 +221,7 @@ build:macos: - ./scripts/brew-install.sh - hash -r - npm install --ignore-scripts - - export PATH="$(npm bin):$PATH" + - export PATH="$(npm root)/.bin:$PATH" - npm run prebuild --verbose - npm test -- --ci --coverage - npm run bench diff --git a/benches/results/db_1KiB.chart.html b/benches/results/db_1KiB.chart.html index 003f2201..c29540ff 100644 --- a/benches/results/db_1KiB.chart.html +++ b/benches/results/db_1KiB.chart.html @@ -28,7 +28,7 @@
References to transactions
-Batches operations together atomically
-Clear all key values for a specific level +
Readonly
[initProtected
_dbProtected
_iteratorReferences to iterators
+Protected
_lockProtected
Optional
_locksProtected
_transactionReferences to transactions
+Protected
Optional
cryptoReadonly
dbProtected
fsProtected
loggerProtected
Optional
workerProtected
canaryClear all key values for a specific level This is not atomic, it will iterate over a snapshot of the DB
-Deletes a key from the DB
-Dump from DB +
Dump from DB
This will show entries from all levels
It is intended for diagnostics
Use console.dir
instead of console.log
to debug the result
Set root
to true
if you want to dump from root levels
Gets a value from the DB +
Optional
levelPath: readonly (string | Buffer)[]Optional
raw: falseOptional
root: booleanOptional
root: booleanPublic iterator that works from the data level +
Optional
raw: falsePublic iterator that works from the data level If keys and values are both false, this iterator will not run at all You must have at least one of them being true or undefined
-Put a key and value into the DB +
Optional
levelPath: readonly (string | Buffer)[]Optional
options: DBIteratorOptions<RocksDBSnapshot>Generated using TypeDoc
Optional
raw: falseOptional
sync: booleanOptional
sync: booleanProtected
setupProtected
setupStatic
createDBGenerated using TypeDoc
References to iterators
-