hide-a-bed 7.0.0-beta.2 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.prettierrc → .oxfmtrc.json} +4 -3
- package/.oxlintrc.json +31 -0
- package/impl/bindConfig.mts +2 -5
- package/impl/bulkGet.mts +1 -1
- package/impl/retry.mts +1 -1
- package/impl/sugar/watch.mts +1 -1
- package/impl/utils/parseRows.mts +1 -1
- package/impl/utils/queryBuilder.mts +1 -1
- package/impl/utils/trackedEmitter.mts +1 -1
- package/package.json +26 -29
- package/types/output/impl/bindConfig.d.mts.map +1 -1
- package/eslint.config.js +0 -20
- package/types/output/eslint.config.d.ts +0 -3
- package/types/output/eslint.config.d.ts.map +0 -1
package/.oxlintrc.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript"],
|
|
4
|
+
"ignorePatterns": ["dist/", "node_modules/", "docs/", "types/"],
|
|
5
|
+
"rules": {
|
|
6
|
+
"@typescript-eslint/ban-ts-comment": [
|
|
7
|
+
"error",
|
|
8
|
+
{
|
|
9
|
+
"ts-expect-error": "allow-with-description",
|
|
10
|
+
"ts-ignore": "allow-with-description",
|
|
11
|
+
"ts-nocheck": "allow-with-description",
|
|
12
|
+
"ts-check": false
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
16
|
+
"no-unused-vars": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"ignoreRestSiblings": true
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"overrides": [
|
|
24
|
+
{
|
|
25
|
+
"files": ["**/*.test.{js,ts,mjs,mts}"],
|
|
26
|
+
"rules": {
|
|
27
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
package/impl/bindConfig.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// oxlint-disable typescript/no-explicit-any
|
|
1
2
|
import type z from 'zod'
|
|
2
3
|
import { CouchConfig, type CouchConfigInput } from '../schema/config.mts'
|
|
3
4
|
import { withRetry } from './retry.mts'
|
|
@@ -81,11 +82,7 @@ export const bindConfig = (config: CouchConfigInput): BoundInstance => {
|
|
|
81
82
|
* @param config The CouchDB configuration
|
|
82
83
|
* @returns The bound function, possibly wrapped with retry logic
|
|
83
84
|
*/
|
|
84
|
-
export function getBoundWithRetry<
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
|
-
TBound extends (...args: any[]) => Promise<any>
|
|
87
|
-
>(
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
|
+
export function getBoundWithRetry<TBound extends (...args: any[]) => Promise<any>>(
|
|
89
86
|
func: (config: CouchConfig, ...args: any[]) => Promise<any>,
|
|
90
87
|
config: CouchConfig
|
|
91
88
|
) {
|
package/impl/bulkGet.mts
CHANGED
|
@@ -257,7 +257,7 @@ export async function bulkGetDictionary<DocSchema extends StandardSchemaV1 = typ
|
|
|
257
257
|
|
|
258
258
|
const doc = row.doc
|
|
259
259
|
const docId =
|
|
260
|
-
//
|
|
260
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
261
261
|
typeof (doc as any)?._id === 'string' ? (doc as any)._id : row.id
|
|
262
262
|
|
|
263
263
|
if (!docId) {
|
package/impl/retry.mts
CHANGED
|
@@ -36,7 +36,7 @@ type MaybePromise<T> = PromiseLike<T> | T
|
|
|
36
36
|
* @param options Retry tuning parameters.
|
|
37
37
|
* @returns A function mirroring `fn` that automatically retries on {@link RetryableError}.
|
|
38
38
|
*/
|
|
39
|
-
//
|
|
39
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
40
40
|
export function withRetry<Fn extends (...args: any[]) => MaybePromise<any>>(
|
|
41
41
|
fn: Fn,
|
|
42
42
|
options: RetryOptions = {}
|
package/impl/sugar/watch.mts
CHANGED
|
@@ -31,7 +31,7 @@ export type WatchHandle = {
|
|
|
31
31
|
export function watchDocs(
|
|
32
32
|
configInput: CouchConfigInput,
|
|
33
33
|
docIds: string | string[],
|
|
34
|
-
//
|
|
34
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
35
|
onChange: (change: any) => void,
|
|
36
36
|
optionsInput: WatchOptionsInput = {}
|
|
37
37
|
): WatchHandle {
|
package/impl/utils/parseRows.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { ViewRow } from '../../schema/couch/couch.output.schema.ts'
|
|
3
3
|
import type { StandardSchemaV1 } from '../../types/standard-schema.ts'
|
|
4
4
|
import { z } from 'zod'
|
|
@@ -167,7 +167,7 @@ export class QueryBuilder {
|
|
|
167
167
|
|
|
168
168
|
type AssertViewOptionsCovered =
|
|
169
169
|
Exclude<keyof ViewOptions, keyof QueryBuilder> extends never ? true : never
|
|
170
|
-
//
|
|
170
|
+
// oxlint-disable-next-line @typescript-eslint/no-unused-vars
|
|
171
171
|
const _assertViewOptionsCovered: AssertViewOptionsCovered = true
|
|
172
172
|
|
|
173
173
|
export const createQuery = (): QueryBuilder => new QueryBuilder()
|
package/package.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hide-a-bed",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "An abstraction over couchdb calls that includes easy mock/stubs with pouchdb",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"couchdb",
|
|
7
|
+
"test"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/ryanramage/hide-a-bed#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/ryanramage/hide-a-bed/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"author": "ryan ramage",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/ryanramage/hide-a-bed.git"
|
|
18
|
+
},
|
|
5
19
|
"type": "module",
|
|
6
20
|
"main": "./dist/cjs/index.cjs",
|
|
7
21
|
"module": "./dist/esm/index.mjs",
|
|
@@ -18,6 +32,9 @@
|
|
|
18
32
|
"default": "./dist/esm/index.mjs"
|
|
19
33
|
}
|
|
20
34
|
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"registry": "https://registry.npmjs.org/"
|
|
37
|
+
},
|
|
21
38
|
"scripts": {
|
|
22
39
|
"clean": "rm -rf types/output && rm -rf dist && (find . -name \"log.txt\" -type f -delete || true)",
|
|
23
40
|
"build": "npm run clean && tsc && tsdown",
|
|
@@ -25,30 +42,16 @@
|
|
|
25
42
|
"dev": "typedoc --watch ./index.mts & npx -y serve ./docs",
|
|
26
43
|
"test": "node --test --test-global-setup ./test/setup.mts",
|
|
27
44
|
"test:watch": "node --test --watch --test-global-setup ./test/setup.mts",
|
|
28
|
-
"lint": "
|
|
29
|
-
"lint:fix": "
|
|
30
|
-
"format": "
|
|
31
|
-
"format:check": "
|
|
45
|
+
"lint": "oxlint .",
|
|
46
|
+
"lint:fix": "oxlint --fix .",
|
|
47
|
+
"format": "oxfmt --write .",
|
|
48
|
+
"format:check": "oxfmt --check .",
|
|
32
49
|
"typecheck": "tsc --noEmit",
|
|
33
50
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
34
51
|
"prepublishOnly": "npm run build",
|
|
35
|
-
"validate": "npm run format && npm run lint && npm run typecheck",
|
|
52
|
+
"validate": "npm run format:check && npm run lint && npm run typecheck",
|
|
36
53
|
"full": "npm run lint:fix && npm run build && npm run clean"
|
|
37
54
|
},
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/ryanramage/hide-a-bed.git"
|
|
41
|
-
},
|
|
42
|
-
"keywords": [
|
|
43
|
-
"couchdb",
|
|
44
|
-
"test"
|
|
45
|
-
],
|
|
46
|
-
"author": "ryan ramage",
|
|
47
|
-
"license": "ISC",
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/ryanramage/hide-a-bed/issues"
|
|
50
|
-
},
|
|
51
|
-
"homepage": "https://github.com/ryanramage/hide-a-bed#readme",
|
|
52
55
|
"dependencies": {
|
|
53
56
|
"stream-chain": "3.4.0",
|
|
54
57
|
"stream-json": "1.9.1",
|
|
@@ -56,20 +59,14 @@
|
|
|
56
59
|
"zod": "4.2.1"
|
|
57
60
|
},
|
|
58
61
|
"devDependencies": {
|
|
59
|
-
"@eslint/js": "9.39.2",
|
|
60
62
|
"@types/node": "24.12.0",
|
|
61
63
|
"@types/stream-json": "1.7.8",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
+
"oxfmt": "0.41.0",
|
|
65
|
+
"oxlint": "1.56.0",
|
|
64
66
|
"pouchdb-server": "4.2.0",
|
|
65
|
-
"prettier": "3.7.4",
|
|
66
67
|
"tsdown": "0.18.1",
|
|
67
68
|
"typedoc": "0.28.15",
|
|
68
|
-
"typescript": "5.9.3"
|
|
69
|
-
"typescript-eslint": "8.50.1"
|
|
70
|
-
},
|
|
71
|
-
"publishConfig": {
|
|
72
|
-
"registry": "https://registry.npmjs.org/"
|
|
69
|
+
"typescript": "5.9.3"
|
|
73
70
|
},
|
|
74
71
|
"volta": {
|
|
75
72
|
"node": "24.12.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindConfig.d.mts","sourceRoot":"","sources":["../../../impl/bindConfig.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bindConfig.d.mts","sourceRoot":"","sources":["../../../impl/bindConfig.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EA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
|
package/eslint.config.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import globals from 'globals'
|
|
3
|
-
import tseslint from 'typescript-eslint'
|
|
4
|
-
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
5
|
-
|
|
6
|
-
export default defineConfig([
|
|
7
|
-
globalIgnores(['dist/', 'node_modules/', 'docs/', 'types/']),
|
|
8
|
-
{
|
|
9
|
-
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
|
|
10
|
-
plugins: { js },
|
|
11
|
-
extends: ['js/recommended'],
|
|
12
|
-
languageOptions: { globals: globals.browser }
|
|
13
|
-
},
|
|
14
|
-
tseslint.configs.recommended,
|
|
15
|
-
{
|
|
16
|
-
rules: {
|
|
17
|
-
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../../eslint.config.js"],"names":[],"mappings":""}
|