From 28a50dc926d400524379a65f76ec3fc79eb3088b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Wed, 21 Jun 2023 16:13:42 +0200 Subject: [PATCH] Enable recommended `eslint-plugin-jsdoc` rules (#5779) * Upgraded jsdoc and typescript eslint deps * Enabling recommended jsdoc in the SDK * Updated @throws to ensure "freetext" mode is recognized. * Fixing a lot of lint warnings * Ran 'lint --fix' * Fixing a lot of lint issues * Ran lint --fix in @realm/react --- package-lock.json | 1208 +++-------------- package.json | 13 +- packages/realm-react/.eslintrc.json | 13 +- packages/realm-react/package.json | 4 - packages/realm-react/src/AppProvider.tsx | 1 - packages/realm-react/src/RealmProvider.tsx | 4 - packages/realm-react/src/index.tsx | 16 - packages/realm-react/src/useAuth.tsx | 2 - .../realm-react/src/useEmailPasswordAuth.tsx | 10 - packages/realm-react/src/useObject.tsx | 1 - packages/realm-react/src/useQuery.tsx | 1 - packages/realm-react/src/useRealm.tsx | 1 - packages/realm/.eslintignore | 3 +- packages/realm/.eslintrc.json | 11 +- packages/realm/scripts/submit-analytics.mjs | 16 +- packages/realm/src/Collection.ts | 7 +- packages/realm/src/Configuration.ts | 3 +- packages/realm/src/Dictionary.ts | 12 +- packages/realm/src/InsertionModel.ts | 15 +- packages/realm/src/List.ts | 29 +- packages/realm/src/Object.ts | 30 +- packages/realm/src/OrderedCollection.ts | 34 +- packages/realm/src/Realm.ts | 53 +- packages/realm/src/Results.ts | 10 +- packages/realm/src/Set.ts | 6 +- packages/realm/src/TypeHelpers.ts | 1 + packages/realm/src/Types.ts | 1 + packages/realm/src/app-services/ApiKeyAuth.ts | 5 - packages/realm/src/app-services/App.ts | 8 +- .../src/app-services/BaseSubscriptionSet.ts | 7 +- .../realm/src/app-services/Credentials.ts | 19 +- .../src/app-services/EmailPasswordAuth.ts | 20 +- .../src/app-services/MongoDBCollection.ts | 28 +- .../app-services/MutableSubscriptionSet.ts | 22 +- packages/realm/src/app-services/PushClient.ts | 1 - .../realm/src/app-services/Subscription.ts | 3 +- .../realm/src/app-services/SubscriptionSet.ts | 4 - packages/realm/src/app-services/Sync.ts | 1 + .../src/app-services/SyncConfiguration.ts | 3 +- .../realm/src/app-services/SyncSession.ts | 1 - packages/realm/src/app-services/User.ts | 9 +- packages/realm/src/assert.ts | 2 +- packages/realm/src/bson.ts | 1 - packages/realm/src/decorators.ts | 8 +- packages/realm/src/errors.ts | 10 +- packages/realm/src/index.ts | 10 +- packages/realm/src/runtime.d.ts | 2 +- packages/realm/src/schema/from-binding.ts | 10 +- packages/realm/src/schema/types.ts | 14 +- packages/realm/src/schema/validate.ts | 7 +- packages/realm/type-tests/type-tests.ts | 2 + 51 files changed, 414 insertions(+), 1288 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4bb6accce..1dcc0ab8fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,18 +30,19 @@ ], "dependencies": { "@react-native-community/eslint-config": "^3.1.0", - "@typescript-eslint/eslint-plugin": "^5.42.0", - "@typescript-eslint/parser": "^5.42.0", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", "clang-format": "^1.8.0", "command-line-args": "^5.2.1", - "eslint": "^8.26.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.43.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-header": "^3.1.1", "eslint-plugin-jasmine": "^4.1.3", - "eslint-plugin-jsdoc": "^39.5.0", + "eslint-plugin-jsdoc": "^46.2.6", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.31.10", + "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", "node-addon-api": "^6.0.0", "react-native": "0.71.7", @@ -3168,16 +3169,16 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", - "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", + "version": "0.39.4", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", + "integrity": "sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==", "dependencies": { "comment-parser": "1.3.1", - "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~3.1.0" + "esquery": "^1.5.0", + "jsdoc-type-pratt-parser": "~4.0.0" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": ">=16" } }, "node_modules/@esbuild-kit/cjs-loader": { @@ -3639,13 +3640,13 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -3728,9 +3729,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -3749,9 +3750,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -4385,59 +4386,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@microsoft/tsdoc": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", - "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", - "dev": true - }, - "node_modules/@microsoft/tsdoc-config": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz", - "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==", - "dev": true, - "dependencies": { - "@microsoft/tsdoc": "0.14.2", - "ajv": "~6.12.6", - "jju": "~1.4.0", - "resolve": "~1.19.0" - } - }, - "node_modules/@microsoft/tsdoc-config/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@microsoft/tsdoc-config/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "dependencies": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", @@ -6534,14 +6482,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -6597,13 +6545,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "dependencies": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" }, "engines": { @@ -6623,12 +6571,12 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6639,12 +6587,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -6665,9 +6613,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -6677,12 +6625,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6714,9 +6662,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -6733,16 +6681,16 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -6788,11 +6736,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "dependencies": { - "@typescript-eslint/types": "5.59.2", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6804,9 +6752,9 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -7614,6 +7562,14 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "engines": { + "node": ">=14" + } + }, "node_modules/are-we-there-yet": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz", @@ -7959,6 +7915,7 @@ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, + "optional": true, "engines": { "node": ">=8" } @@ -8907,7 +8864,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, "engines": { "node": ">=6" }, @@ -11493,18 +11449,6 @@ "node": ">=10.13.0" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -12159,15 +12103,15 @@ } }, "node_modules/eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", - "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -12177,8 +12121,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -12186,13 +12130,12 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -12325,20 +12268,22 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "39.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", - "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", + "version": "46.2.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.2.6.tgz", + "integrity": "sha512-zIaK3zbSrKuH12bP+SPybPgcHSM6MFzh3HFeaODzmsF1N8C1l8dzJ22cW1aq4g0+nayU1VMjmNf7hg0dpShLrA==", "dependencies": { - "@es-joy/jsdoccomment": "~0.36.1", + "@es-joy/jsdoccomment": "~0.39.4", + "are-docs-informative": "^0.0.2", "comment-parser": "1.3.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", - "esquery": "^1.4.0", - "semver": "^7.3.8", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.1", "spdx-expression-parse": "^3.0.1" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": ">=16" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" @@ -12356,9 +12301,9 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -12488,16 +12433,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-tsdoc": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz", - "integrity": "sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==", - "dev": true, - "dependencies": { - "@microsoft/tsdoc": "0.14.2", - "@microsoft/tsdoc-config": "0.16.2" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -12518,30 +12453,6 @@ "node": ">=4.0" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", @@ -12581,9 +12492,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -12655,13 +12566,13 @@ } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -12671,9 +12582,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -13858,12 +13769,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -14238,6 +14143,11 @@ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -15186,7 +15096,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, "dependencies": { "builtin-modules": "^3.3.0" }, @@ -17269,12 +17178,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", - "dev": true - }, "node_modules/joi": { "version": "17.9.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz", @@ -17292,15 +17195,6 @@ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -17544,9 +17438,9 @@ } }, "node_modules/jsdoc-type-pratt-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", - "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", "engines": { "node": ">=12.0.0" } @@ -18206,12 +18100,6 @@ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -23081,18 +22969,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regexpu-core": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", @@ -24969,22 +24845,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -25015,23 +24875,6 @@ "node": ">=8" } }, - "node_modules/table/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -27590,12 +27433,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -30417,7 +30254,7 @@ }, "packages/realm-react": { "name": "@realm/react", - "version": "0.5.0", + "version": "0.5.1", "license": "Apache-2.0", "dependencies": { "lodash": "^4.17.21" @@ -30437,10 +30274,6 @@ "@types/react": "^18.0.21", "babel-jest": "^29.4.3", "babel-plugin-module-resolver": "^4.1.0", - "eslint": "^7.30.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-tsdoc": "^0.2.14", "fb-watchman": "^2.0.1", "jest": "^29.1.1", "metro-react-native-babel-preset": "0.73.9", @@ -30461,49 +30294,6 @@ "realm": "^12.0.0-browser || ^12.0.0 || ^12.0.0-rc || ^11.0.0-rc || ^11.0.0" } }, - "packages/realm-react/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "packages/realm-react/node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "packages/realm-react/node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, "packages/realm-react/node_modules/@jest/types": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", @@ -30539,43 +30329,6 @@ "@types/yargs-parser": "*" } }, - "packages/realm-react/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "packages/realm-react/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "packages/realm-react/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "packages/realm-react/node_modules/diff-sequences": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", @@ -30585,110 +30338,6 @@ "node": ">= 10.14.2" } }, - "packages/realm-react/node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/realm-react/node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "packages/realm-react/node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "packages/realm-react/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/realm-react/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "packages/realm-react/node_modules/jest-diff": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", @@ -30713,37 +30362,6 @@ "node": ">= 10.14.2" } }, - "packages/realm-react/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "packages/realm-react/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "packages/realm-react/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "packages/realm-react/node_modules/metro-react-native-babel-preset": { "version": "0.73.9", "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.73.9.tgz", @@ -30814,45 +30432,6 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, - "packages/realm-react/node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "packages/realm-react/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "packages/realm-react/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/realm-react/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "packages/realm-tools": { "name": "@realm/tools", "version": "0.0.1", @@ -33071,13 +32650,13 @@ } }, "@es-joy/jsdoccomment": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", - "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", + "version": "0.39.4", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", + "integrity": "sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==", "requires": { "comment-parser": "1.3.1", - "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~3.1.0" + "esquery": "^1.5.0", + "jsdoc-type-pratt-parser": "~4.0.0" } }, "@esbuild-kit/cjs-loader": { @@ -33305,13 +32884,13 @@ "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==" }, "@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -33368,9 +32947,9 @@ } }, "@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==" + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==" }, "@hapi/hoek": { "version": "9.3.0", @@ -33386,9 +32965,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -33882,54 +33461,6 @@ "tmp-promise": "^3.0.2" } }, - "@microsoft/tsdoc": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", - "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", - "dev": true - }, - "@microsoft/tsdoc-config": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz", - "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==", - "dev": true, - "requires": { - "@microsoft/tsdoc": "0.14.2", - "ajv": "~6.12.6", - "jju": "~1.4.0", - "resolve": "~1.19.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "dev": true, - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - } - } - }, "@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", @@ -36836,10 +36367,6 @@ "@types/react": "^18.0.21", "babel-jest": "^29.4.3", "babel-plugin-module-resolver": "^4.1.0", - "eslint": "^7.30.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-tsdoc": "^0.2.14", "fb-watchman": "^2.0.1", "jest": "^29.1.1", "lodash": "^4.17.21", @@ -36853,43 +36380,6 @@ "ts-jest": "^29.0.5" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, "@jest/types": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", @@ -36922,121 +36412,12 @@ "@types/yargs-parser": "*" } }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "diff-sequences": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "jest-diff": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", @@ -37055,31 +36436,6 @@ "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", "dev": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "metro-react-native-babel-preset": { "version": "0.73.9", "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.73.9.tgz", @@ -37143,33 +36499,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true - }, - "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -38084,14 +37413,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -38124,48 +37453,48 @@ } }, "@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "requires": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" } }, "@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "requires": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==" + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==" }, "@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -38182,9 +37511,9 @@ } }, "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "requires": { "lru-cache": "^6.0.0" } @@ -38197,16 +37526,16 @@ } }, "@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -38235,18 +37564,18 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "requires": { - "@typescript-eslint/types": "5.59.2", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" } } }, @@ -38901,6 +38230,11 @@ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, + "are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==" + }, "are-we-there-yet": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz", @@ -39181,7 +38515,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true + "dev": true, + "optional": true }, "async": { "version": "3.2.4", @@ -39939,8 +39274,7 @@ "builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==" }, "bytes": { "version": "3.1.2", @@ -41986,15 +41320,6 @@ "tapable": "^2.2.0" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -42397,15 +41722,15 @@ } }, "eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", - "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -42415,8 +41740,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -42424,13 +41749,12 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -42464,9 +41788,9 @@ } }, "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" }, "glob-parent": { "version": "6.0.2", @@ -42572,16 +41896,18 @@ } }, "eslint-plugin-jsdoc": { - "version": "39.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", - "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", + "version": "46.2.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.2.6.tgz", + "integrity": "sha512-zIaK3zbSrKuH12bP+SPybPgcHSM6MFzh3HFeaODzmsF1N8C1l8dzJ22cW1aq4g0+nayU1VMjmNf7hg0dpShLrA==", "requires": { - "@es-joy/jsdoccomment": "~0.36.1", + "@es-joy/jsdoccomment": "~0.39.4", + "are-docs-informative": "^0.0.2", "comment-parser": "1.3.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", - "esquery": "^1.4.0", - "semver": "^7.3.8", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.1", "spdx-expression-parse": "^3.0.1" }, "dependencies": { @@ -42594,9 +41920,9 @@ } }, "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "requires": { "lru-cache": "^6.0.0" } @@ -42686,16 +42012,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-react-native-globals/-/eslint-plugin-react-native-globals-0.1.2.tgz", "integrity": "sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g==" }, - "eslint-plugin-tsdoc": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz", - "integrity": "sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==", - "dev": true, - "requires": { - "@microsoft/tsdoc": "0.14.2", - "@microsoft/tsdoc-config": "0.16.2" - } - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -42712,42 +42028,25 @@ } } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, "eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" }, "espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" } } }, @@ -43644,12 +42943,6 @@ "functions-have-names": "^1.2.2" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -43940,6 +43233,11 @@ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -44656,7 +43954,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, "requires": { "builtin-modules": "^3.3.0" } @@ -46260,12 +45557,6 @@ "supports-color": "^8.0.0" } }, - "jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", - "dev": true - }, "joi": { "version": "17.9.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz", @@ -46283,11 +45574,6 @@ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" }, - "js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==" - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -46488,9 +45774,9 @@ } }, "jsdoc-type-pratt-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", - "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==" }, "jsdom": { "version": "16.7.0", @@ -47044,12 +46330,6 @@ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -51376,12 +50656,6 @@ "functions-have-names": "^1.2.3" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "regexpu-core": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", @@ -52822,32 +52096,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - } - } - }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -54823,12 +54071,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", diff --git a/package.json b/package.json index 821a296062..64015ef1e7 100644 --- a/package.json +++ b/package.json @@ -68,19 +68,20 @@ ], "dependencies": { "@react-native-community/eslint-config": "^3.1.0", - "@typescript-eslint/eslint-plugin": "^5.42.0", - "@typescript-eslint/parser": "^5.42.0", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", "clang-format": "^1.8.0", "command-line-args": "^5.2.1", - "eslint": "^8.26.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.43.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-header": "^3.1.1", "eslint-plugin-jasmine": "^4.1.3", - "eslint-plugin-jsdoc": "^39.5.0", + "eslint-plugin-jsdoc": "^46.2.6", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.31.10", + "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", + "eslint-plugin-react": "^7.32.2", "node-addon-api": "^6.0.0", "react-native": "0.71.7", "rollup": "^3.15.0", diff --git a/packages/realm-react/.eslintrc.json b/packages/realm-react/.eslintrc.json index 7a2055da1f..e4ad48b12e 100644 --- a/packages/realm-react/.eslintrc.json +++ b/packages/realm-react/.eslintrc.json @@ -1,16 +1,19 @@ { - "plugins": [ - "eslint-plugin-tsdoc" - ], "parser": "@typescript-eslint/parser", "extends": [ "plugin:@typescript-eslint/recommended", - "plugin:react-hooks/recommended" + "plugin:react-hooks/recommended", + "plugin:jsdoc/recommended-typescript" ], "rules": { "@typescript-eslint/explicit-function-return-type": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", - "tsdoc/syntax": "warn" + "jsdoc/check-tag-names": "off", + "jsdoc/require-jsdoc": "off", + "jsdoc/require-returns": "off", + "jsdoc/require-yields": "off", + "jsdoc/require-param": "off", + "jsdoc/no-undefined-types": "warn" } } diff --git a/packages/realm-react/package.json b/packages/realm-react/package.json index 3f8283090a..c2df65d2bd 100644 --- a/packages/realm-react/package.json +++ b/packages/realm-react/package.json @@ -62,10 +62,6 @@ "@types/react": "^18.0.21", "babel-jest": "^29.4.3", "babel-plugin-module-resolver": "^4.1.0", - "eslint": "^7.30.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-tsdoc": "^0.2.14", "fb-watchman": "^2.0.1", "jest": "^29.1.1", "metro-react-native-babel-preset": "0.73.9", diff --git a/packages/realm-react/src/AppProvider.tsx b/packages/realm-react/src/AppProvider.tsx index 8439c3a249..f6abb95fc1 100644 --- a/packages/realm-react/src/AppProvider.tsx +++ b/packages/realm-react/src/AppProvider.tsx @@ -93,7 +93,6 @@ export const AppProvider: React.FC = ({ children, appRef, ...a /** * Hook to access the current {@link Realm.App} from the {@link AppProvider} context. - * * @throws if an AppProvider does not exist in the component’s ancestors */ export const useApp = < diff --git a/packages/realm-react/src/RealmProvider.tsx b/packages/realm-react/src/RealmProvider.tsx index 5c03bb12c5..48b6637cdd 100644 --- a/packages/realm-react/src/RealmProvider.tsx +++ b/packages/realm-react/src/RealmProvider.tsx @@ -33,7 +33,6 @@ type ProviderProps = PartialRealmConfiguration & { /** * Generates a `RealmProvider` given a {@link Realm.Configuration} and {@link React.Context}. - * * @param realmConfig - The configuration of the Realm to be instantiated * @param RealmContext - The context that will contain the Realm instance * @returns a RealmProvider component that provides context to all context hooks @@ -45,7 +44,6 @@ export function createRealmProvider( /** * Returns a Context Provider component that is required to wrap any component using * the Realm hooks. - * * @example * ``` * const AppRoot = () => { @@ -151,7 +149,6 @@ export function createRealmProvider( /** * Merge two configurations, creating a configuration using `configA` as the default, * merged with `configB`, with properties in `configB` overriding `configA`. - * * @param configA - The default config object * @param configB - Config overrides object * @returns Merged config object @@ -176,7 +173,6 @@ export function mergeRealmConfiguration( /** * Utility function that does a deep comparison (key: value) of object a with object b - * * @param a - Object to compare * @param b - Object to compare * @returns True if the objects are identical diff --git a/packages/realm-react/src/index.tsx b/packages/realm-react/src/index.tsx index ed49bb60b6..7f09423dfb 100644 --- a/packages/realm-react/src/index.tsx +++ b/packages/realm-react/src/index.tsx @@ -27,7 +27,6 @@ type RealmContext = { /** * The Provider component that is required to wrap any component using * the Realm hooks. - * * @example * ``` * const AppRoot = () => { @@ -53,12 +52,10 @@ type RealmContext = { RealmProvider: ReturnType; /** * Returns the instance of the {@link Realm} opened by the `RealmProvider`. - * * @example * ``` * const realm = useRealm(); * ``` - * * @returns a realm instance */ useRealm: ReturnType; @@ -70,7 +67,6 @@ type RealmContext = { * The result of this can be consumed directly by the `data` argument of any React Native * VirtualizedList or FlatList. If the component used for the list's `renderItem` prop is {@link React.Memo}ized, * then only the modified object will re-render. - * * @example * ```tsx * // Return all collection items @@ -79,7 +75,6 @@ type RealmContext = { * // Return all collection items sorted by name and filtered by category * const filteredAndSorted = useQuery(Object, (collection) => collection.filtered('category == $0',category).sorted('name'), [category]); * ``` - * * @param type - The object type, depicted by a string or a class extending Realm.Object * @param query - A function that takes a {@link Realm.Collection} and returns a {@link Realm.Collection} of the same type. * This allows for filtering and sorting of the collection, before it is returned. @@ -91,12 +86,10 @@ type RealmContext = { * Returns a {@link Realm.Object} from a given type and value of primary key. * The hook will update on any changes to the properties on the returned object * and return null if it either doesn't exists or has been deleted. - * * @example * ``` * const object = useObject(ObjectClass, objectId); * ``` - * * @param type - The object type, depicted by a string or a class extending {@link Realm.Object} * @param primaryKey - The primary key of the desired object which will be retrieved using {@link Realm.objectForPrimaryKey} * @returns either the desired {@link Realm.Object} or `null` in the case of it being deleted or not existing. @@ -106,7 +99,6 @@ type RealmContext = { /** * Creates Realm React hooks and Provider component for a given Realm configuration - * * @example * ``` *class Task extends Realm.Object { @@ -123,7 +115,6 @@ type RealmContext = { * *const {useRealm, useQuery, useObject, RealmProvider} = createRealmContext({schema: [Task]}); * ``` - * * @param realmConfig - {@link Realm.Configuration} used to open the Realm * @returns An object containing a `RealmProvider` component, and `useRealm`, `useQuery` and `useObject` hooks */ @@ -150,7 +141,6 @@ const defaultContext = createRealmContext(); /** * The Provider component that is required to wrap any component using * the Realm hooks. - * * @example * ``` * const AppRoot = () => { @@ -173,12 +163,10 @@ export const RealmProvider = defaultContext.RealmProvider; /** * Returns the instance of the {@link Realm} opened by the `RealmProvider`. - * * @example * ``` * const realm = useRealm(); * ``` - * * @returns a realm instance */ export const useRealm = defaultContext.useRealm; @@ -191,7 +179,6 @@ export const useRealm = defaultContext.useRealm; * The result of this can be consumed directly by the `data` argument of any React Native * VirtualizedList or FlatList. If the component used for the list's `renderItem` prop is {@link React.Memo}ized, * then only the modified object will re-render. - * * @example * ```tsx * // Return all collection items @@ -200,7 +187,6 @@ export const useRealm = defaultContext.useRealm; * // Return all collection items sorted by name and filtered by category * const filteredAndSorted = useQuery(Object, (collection) => collection.filtered('category == $0',category).sorted('name'), [category]); * ``` - * * @param type - The object type, depicted by a string or a class extending Realm.Object * @param query - A function that takes a {@link Realm.Collection} and returns a {@link Realm.Collection} of the same type. * This allows for filtering and sorting of the collection, before it is returned. @@ -213,12 +199,10 @@ export const useQuery = defaultContext.useQuery; * Returns a {@link Realm.Object} from a given type and value of primary key. * The hook will update on any changes to the properties on the returned object * and return null if it either doesn't exists or has been deleted. - * * @example * ``` * const object = useObject(ObjectClass, objectId); * ``` - * * @param type - The object type, depicted by a string or a class extending {@link Realm.Object} * @param primaryKey - The primary key of the desired object which will be retrieved using {@link Realm.objectForPrimaryKey} * @returns either the desired {@link Realm.Object} or `null` in the case of it being deleted or not existing. diff --git a/packages/realm-react/src/useAuth.tsx b/packages/realm-react/src/useAuth.tsx index 36ec7322d3..a702af3d9e 100644 --- a/packages/realm-react/src/useAuth.tsx +++ b/packages/realm-react/src/useAuth.tsx @@ -32,7 +32,6 @@ interface UseAuth { /** * Log in with the Anonymous authentication provider. - * * @returns A `Realm.User` instance for the logged in user. * @see https://www.mongodb.com/docs/atlas/app-services/authentication/anonymous/ */ @@ -106,7 +105,6 @@ interface UseAuth { * `loginResult.pending` to render a spinner when login is in progress, without * needing to pass that state around or store it somewhere global in their app * code. - * * @returns An object containing operations and state for authenticating with an Atlas App. */ export function useAuth(): UseAuth { diff --git a/packages/realm-react/src/useEmailPasswordAuth.tsx b/packages/realm-react/src/useEmailPasswordAuth.tsx index 2cf66e7831..702fc41036 100644 --- a/packages/realm-react/src/useEmailPasswordAuth.tsx +++ b/packages/realm-react/src/useEmailPasswordAuth.tsx @@ -26,49 +26,42 @@ interface UseEmailPasswordAuth { /** * Convenience function to log in a user with an email and password - users * could also call `logIn(Realm.Credentials.emailPassword(email, password))`. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#add-appprovider-to-work-with-email-password-users */ logIn(credentials: { email: string; password: string }): void; /** * Register a new user. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#register-a-new-user-account */ register(args: { email: string; password: string }): void; /** * Confirm a user's account by providing the `token` and `tokenId` received. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#confirm-a-new-user-s-email-address */ confirm(args: { token: string; tokenId: string }): void; /** * Resend a user's confirmation email. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#resend-a-confirmation-email */ resendConfirmationEmail(args: { email: string }): void; /** * Retry the custom confirmation function for a given user. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#retry-a-user-confirmation-function */ retryCustomConfirmation(args: { email: string }): void; /** * Send a password reset email for a given user. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#send-a-password-reset-email */ sendResetPasswordEmail(args: { email: string }): void; /** * Complete resetting a user's password. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#send-a-password-reset-email */ resetPassword(args: { token: string; tokenId: string; password: string }): void; @@ -76,7 +69,6 @@ interface UseEmailPasswordAuth { /** * Call the configured password reset function, passing in any additional * arguments to the function. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/manage-email-password-users/#call-a-password-reset-function */ callResetPasswordFunction( @@ -89,7 +81,6 @@ interface UseEmailPasswordAuth { /** * Log out the current user. - * * @see https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/authenticate-users/#log-a-user-out */ logOut(): void; @@ -113,7 +104,6 @@ interface UseEmailPasswordAuth { * `result.pending` to render a spinner when login is in progress, without * needing to pass that state around or store it somewhere global in their app * code. - * * @returns An object containing operations and state related to Email/Password authentication. */ export function useEmailPasswordAuth(): UseEmailPasswordAuth { diff --git a/packages/realm-react/src/useObject.tsx b/packages/realm-react/src/useObject.tsx index 15d4fe6b06..3d438b1010 100644 --- a/packages/realm-react/src/useObject.tsx +++ b/packages/realm-react/src/useObject.tsx @@ -22,7 +22,6 @@ import { CollectionCallback, getObjectForPrimaryKey, getObjects } from "./helper /** * Generates the `useObject` hook from a given `useRealm` hook. - * * @param useRealm - Hook that returns an open Realm instance * @returns useObject - Hook that is used to gain access to a single Realm object from a primary key */ diff --git a/packages/realm-react/src/useQuery.tsx b/packages/realm-react/src/useQuery.tsx index 87ef4aabf3..14a6422e1a 100644 --- a/packages/realm-react/src/useQuery.tsx +++ b/packages/realm-react/src/useQuery.tsx @@ -27,7 +27,6 @@ type DependencyList = ReadonlyArray; /** * Generates the `useQuery` hook from a given `useRealm` hook. - * * @param useRealm - Hook that returns an open Realm instance * @returns useObject - Hook that is used to gain access to a {@link Realm.Collection} */ diff --git a/packages/realm-react/src/useRealm.tsx b/packages/realm-react/src/useRealm.tsx index 1103ec39e7..43741f4106 100644 --- a/packages/realm-react/src/useRealm.tsx +++ b/packages/realm-react/src/useRealm.tsx @@ -21,7 +21,6 @@ import { useContext } from "react"; /** * Generates a `useRealm` hook given a RealmContext. This allows access to the {@link Realm} * instance anywhere within the RealmProvider. - * * @param RealmContext - The context containing the {@link Realm} instance * @returns useRealm - Hook that is used to gain access to the {@link Realm} instance */ diff --git a/packages/realm/.eslintignore b/packages/realm/.eslintignore index c079bd6621..add41ffd43 100644 --- a/packages/realm/.eslintignore +++ b/packages/realm/.eslintignore @@ -1,3 +1,4 @@ dist/ -generated/types/ +docs/ bindgen/vendor/realm-core/ +src/tests/realms/ diff --git a/packages/realm/.eslintrc.json b/packages/realm/.eslintrc.json index e49db3bcc1..39e185d2ec 100644 --- a/packages/realm/.eslintrc.json +++ b/packages/realm/.eslintrc.json @@ -1,11 +1,18 @@ { "parser": "@typescript-eslint/parser", "extends": [ - "plugin:@typescript-eslint/recommended" + "plugin:@typescript-eslint/recommended", + "plugin:jsdoc/recommended-typescript" ], "rules": { "@typescript-eslint/explicit-function-return-type": "off", "no-console": "error", - "sort-imports": ["warn", { "ignoreDeclarationSort": true }] + "sort-imports": ["warn", { "ignoreDeclarationSort": true }], + "jsdoc/check-tag-names": "off", + "jsdoc/require-jsdoc": "off", + "jsdoc/require-returns": "off", + "jsdoc/require-yields": "off", + "jsdoc/require-param": "off", + "jsdoc/no-undefined-types": "warn" } } \ No newline at end of file diff --git a/packages/realm/scripts/submit-analytics.mjs b/packages/realm/scripts/submit-analytics.mjs index d3853f7aec..1f95d7b128 100644 --- a/packages/realm/scripts/submit-analytics.mjs +++ b/packages/realm/scripts/submit-analytics.mjs @@ -70,16 +70,14 @@ const ANALYTICS_BASE_URL = "https://data.mongodb-api.com/app/realmsdkmetrics-zmh /** * Constructs the full URL that will submit analytics to the webhook. - * @param {Object} payload Information that will be submitted through the webhook. - * @returns {string} Complete analytics submission URL + * @param payload Information that will be submitted through the webhook. + * @returns Complete analytics submission URL */ const getAnalyticsRequestUrl = (payload) => ANALYTICS_BASE_URL + "?data=" + Buffer.from(JSON.stringify(payload.webHook), "utf8").toString("base64"); /** - * Generate a hash value of data using salt - * - * @param {string} data + * Generate a hash value of data using salt. * @returns base64 encoded SHA256 of data */ function sha256(data) { @@ -89,7 +87,6 @@ function sha256(data) { /** * Finds the root directory of the project. - * * @returns the root of the project */ function getProjectRoot() { @@ -104,7 +101,6 @@ function getProjectRoot() { /** * Finds and read package.json - * * @returns package.json as a JavaScript object */ function getPackageJson(packagePath) { @@ -114,7 +110,6 @@ function getPackageJson(packagePath) { /** * Heuristics to decide if analytics should be disabled. - * * @returns true if analytics is disabled */ function isAnalyticsDisabled() { @@ -140,7 +135,6 @@ function getRealmVersion() { /** * Reads and parses `dependencies.list`. * Each line has be form "KEY=VALUE", and we to find "REALM_CORE_VERSION" - * * @returns the Realm Core version as a string */ function getRealmCoreVersion() { @@ -155,7 +149,6 @@ function getRealmCoreVersion() { /** * Determines if `npm` or `yarn` is used. - * * @returns An array with two elements: method and version */ function getInstallationMethod() { @@ -165,8 +158,7 @@ function getInstallationMethod() { /** * Collect analytics data from the runtime system - * @param {Object} packageJson The app's package.json parsed as an object - * @returns {Object} Analytics payload + * @returns Analytics payload */ async function collectPlatformData(packagePath = getProjectRoot()) { // node-machine-id returns the ID SHA-256 hashed, if we cannot get the ID we send hostname instead diff --git a/packages/realm/src/Collection.ts b/packages/realm/src/Collection.ts index cf9e980c45..08ded723e0 100644 --- a/packages/realm/src/Collection.ts +++ b/packages/realm/src/Collection.ts @@ -16,7 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// -import { CallbackAdder, IllegalConstructorError, Listeners, assert, binding } from "./internal"; +import { CallbackAdder, IllegalConstructorError, Listeners, TypeAssertionError, assert, binding } from "./internal"; /** * Abstract base class containing methods shared by Realm **List**, **Dictionary**, and **Results**. @@ -30,7 +30,6 @@ import { CallbackAdder, IllegalConstructorError, Listeners, assert, binding } fr * when using `for...in` or `for...of` enumeration, which will always enumerate over the * objects which matched the query when the enumeration is begun, even if some of them are * deleted or modified to be excluded by the filter during the enumeration. - * * @since 0.11.0 */ export abstract class Collection< @@ -112,7 +111,7 @@ export abstract class Collection< * inserted, updated or deleted respectively. `deletions` and `oldModifications` are * indices into the collection before the change happened, while `insertions` and * `newModifications` are indices into the new version of the collection. - * @throws {@link TypeAssertionError} If `callback` is not a function. + * @throws a {@link TypeAssertionError} If `callback` is not a function. * @example * wines.addListener((collection, changes) => { * // collection === wines @@ -134,7 +133,7 @@ export abstract class Collection< * Remove the listener `callback` from the collection instance. * @param callback Callback function that was previously * added as a listener through the **addListener** method. - * @throws {@link TypeAssertionError} If `callback` is not a function. + * @throws a {@link TypeAssertionError} If `callback` is not a function. */ removeListener(callback: ChangeCallbackType): void { assert.function(callback, "callback"); diff --git a/packages/realm/src/Configuration.ts b/packages/realm/src/Configuration.ts index a944212d2b..91dd94c57d 100644 --- a/packages/realm/src/Configuration.ts +++ b/packages/realm/src/Configuration.ts @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////////////// import { + AnyRealmObject, ObjectSchema, Realm, RealmObjectConstructor, @@ -34,7 +35,7 @@ export type MigrationCallback = (oldRealm: Realm, newRealm: Realm) => void; export type BaseConfiguration = { path?: string; - schema?: (RealmObjectConstructor | ObjectSchema)[]; + schema?: (RealmObjectConstructor | ObjectSchema)[]; schemaVersion?: number; inMemory?: boolean; readOnly?: boolean; diff --git a/packages/realm/src/Dictionary.ts b/packages/realm/src/Dictionary.ts index 4545b265b9..9f4b5cb508 100644 --- a/packages/realm/src/Dictionary.ts +++ b/packages/realm/src/Dictionary.ts @@ -16,6 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// import { + AssertionError, Collection, DefaultObject, IllegalConstructorError, @@ -27,6 +28,8 @@ import { binding, } from "./internal"; +/* eslint-disable jsdoc/multiline-blocks -- We need this to have @ts-expect-error located correctly in the .d.ts bundle */ + const REALM = Symbol("Dictionary#realm"); const INTERNAL = Symbol("Dictionary#internal"); const HELPERS = Symbol("Dictionary#helpers"); @@ -107,7 +110,6 @@ export class Dictionary extends Collection extends Collection extends Collection extends Collection extends Collection; -type AnyDictionary = Dictionary; -type AnyList = List; +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- We define these once to avoid using "any" through the code */ +export type AnyCollection = Collection; +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- We define these once to avoid using "any" through the code */ +export type AnyDictionary = Dictionary; +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- We define these once to avoid using "any" through the code */ +export type AnyList = List; type ExtractPropertyNamesOfType = { [K in keyof T]: T[K] extends PropType ? K : never; }[keyof T]; /** - * Exchanges properties defined as {@link List} with an optional {@link Array>}. + * Exchanges properties defined as {@link List} with an optional {@link Array}. */ type RealmListsRemappedModelPart = { [K in ExtractPropertyNamesOfType]?: T[K] extends List @@ -37,7 +40,7 @@ type RealmListsRemappedModelPart = { }; /** - * Exchanges properties defined as {@link Dictionary} with an optional key to mixed value object. + * Exchanges properties defined as {@link Dictionary} with an optional key to mixed value object. */ type RealmDictionaryRemappedModelPart = { [K in ExtractPropertyNamesOfType]?: T[K] extends Dictionary diff --git a/packages/realm/src/List.ts b/packages/realm/src/List.ts index f1f454f6d9..35022379b5 100644 --- a/packages/realm/src/List.ts +++ b/packages/realm/src/List.ts @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////////////// import { + AssertionError, IllegalConstructorError, ObjectSchema, OrderedCollection, @@ -103,7 +104,7 @@ export class List extends OrderedCollection implements Partially /** * Remove the **last** value from the list and return it. - * @throws {@link AssertionError} If not inside a write transaction. + * @throws an {@link AssertionError} If not inside a write transaction. * @returns The last value or undefined if the list is empty. */ pop(): T | undefined { @@ -122,12 +123,10 @@ export class List extends OrderedCollection implements Partially /** * Add one or more values to the _end_ of the list. - * * @param items Values to add to the list. * @throws {TypeError} If a `value` is not of a type which can be stored in * the list, or if an object being added to the list does not match the {@link ObjectSchema} for the list. - * - * @throws {@link AssertionError} If not inside a write transaction. + * @throws an {@link AssertionError} If not inside a write transaction. * @returns A number equal to the new length of * the list after adding the values. */ @@ -153,7 +152,7 @@ export class List extends OrderedCollection implements Partially /** * Remove the **first** value from the list and return it. - * @throws {@link AssertionError} If not inside a write transaction. + * @throws an {@link AssertionError} If not inside a write transaction. * @returns The first value or undefined if the list is empty. */ shift(): T | undefined { @@ -171,11 +170,10 @@ export class List extends OrderedCollection implements Partially /** * Add one or more values to the _beginning_ of the list. - * * @param items Values to add to the list. * @throws {TypeError} If a `value` is not of a type which can be stored in - * the list, or if an object being added to the list does not match the {@link Realm.ObjectSchema} for the list. - * @throws {@link AssertionError} If not inside a write transaction. + * the list, or if an object being added to the list does not match the {@link ObjectSchema} for the list. + * @throws an {@link AssertionError} If not inside a write transaction. * @returns The new {@link length} of the list after adding the values. */ unshift(...items: T[]): number { @@ -196,9 +194,9 @@ export class List extends OrderedCollection implements Partially return internal.size; } - /** TODO + /** + * TODO * Changes the contents of the list by removing value and/or inserting new value. - * * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice Array.prototype.splice} * @param start The start index. If greater than the length of the list, * the start index will be set to the length instead. If negative, then the start index @@ -212,7 +210,6 @@ export class List extends OrderedCollection implements Partially splice(start: number, deleteCount?: number): T[]; /** * Changes the contents of the list by removing value and/or inserting new value. - * * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice Array.prototype.splice} * @param start The start index. If greater than the length of the list, * the start index will be set to the length instead. If negative, then the start index @@ -227,7 +224,6 @@ export class List extends OrderedCollection implements Partially splice(start: number, deleteCount: number, ...items: T[]): T[]; /** * Changes the contents of the list by removing value and/or inserting new value. - * * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice Array.prototype.splice} * @param start The start index. If greater than the length of the list, * the start index will be set to the length instead. If negative, then the start index @@ -284,9 +280,8 @@ export class List extends OrderedCollection implements Partially /** * Removes the element of the list at the specified index. - * * @param index The index of the element to remove. - * @throws {@link AssertionError} If not inside a write transaction or the input index is less than 0 + * @throws an {@link AssertionError} If not inside a write transaction or the input index is less than 0 * or greater than the size of the list. */ remove(index: number) { @@ -301,10 +296,9 @@ export class List extends OrderedCollection implements Partially /** * Moves one element of the list from one index to another. - * * @param from The index of the element to move. * @param to The destination index of the element. - * @throws {@link AssertionError} If not inside a write transaction or if any of the input indexes + * @throws an {@link AssertionError} If not inside a write transaction or if any of the input indexes * is less than 0 or greater than the size of the list. */ move(from: number, to: number) { @@ -321,10 +315,9 @@ export class List extends OrderedCollection implements Partially /** * Swaps the positions of the elements of the list at two indexes. - * * @param index1 The index of the first element. * @param index2 The index of the second element. - * @throws {@link AssertionError} If not inside a write transaction or if any of the input indexes + * @throws an {@link AssertionError} If not inside a write transaction or if any of the input indexes * is less than 0 or greater than the size of the list. */ swap(index1: number, index2: number) { diff --git a/packages/realm/src/Object.ts b/packages/realm/src/Object.ts index 18cc0f3274..887c196c28 100644 --- a/packages/realm/src/Object.ts +++ b/packages/realm/src/Object.ts @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////////////// import { + AssertionError, BSON, CanonicalObjectSchema, ClassHelpers, @@ -31,6 +32,7 @@ import { RealmInsertionModel, RealmObjectConstructor, Results, + TypeAssertionError, assert, binding, flags, @@ -86,16 +88,16 @@ const PROXY_HANDLER: ProxyHandler> = { export class RealmObject { /** - * @internal * This property is stored on the per class prototype when transforming the schema. + * @internal */ public static [INTERNAL_HELPERS]: ClassHelpers; public static allowValuesArrays = false; /** - * @internal * Create an object in the database and set values on it + * @internal */ public static create( realm: Realm, @@ -165,8 +167,8 @@ export class RealmObject { } /** - * @internal * Create an object in the database and populate its primary key value, if required + * @internal */ public static createObj( realm: Realm, @@ -214,8 +216,8 @@ export class RealmObject { } /** - * @internal * Create a wrapper for accessing an object from the database + * @internal */ public static createWrapper( realm: Realm, @@ -242,33 +244,33 @@ export class RealmObject { } /** - * @internal * The Realm managing the object. * Note: this is on the injected prototype from ClassMap.defineProperties(). + * @internal */ public declare readonly [REALM]: Realm; /** - * @internal * The object's representation in the binding. + * @internal */ public declare readonly [INTERNAL]: binding.Obj; /** - * @internal * Lazily created wrapper for the object notifier. + * @internal */ private declare [INTERNAL_LISTENERS]: ObjectListeners | null; /** - * @internal * Note: this is on the injected prototype from ClassMap.defineProperties() + * @internal */ private declare readonly [KEY_ARRAY]: ReadonlyArray; /** - * @internal * Note: this is on the injected prototype from ClassMap.defineProperties() + * @internal */ private declare readonly [KEY_SET]: ReadonlySet; @@ -286,7 +288,7 @@ export class RealmObject { * Use circular JSON serialization libraries such as [@ungap/structured-clone](https://www.npmjs.com/package/@ungap/structured-clone) * and [flatted](https://www.npmjs.com/package/flatted) to stringify Realm entities that have circular structures. * @returns A plain object. - **/ + */ toJSON(_?: string, cache?: unknown): DefaultObject; /** @internal */ toJSON(_?: string, cache = new JSONCacheMap()): DefaultObject { @@ -338,7 +340,7 @@ export class RealmObject { * Returns all the objects that link to this object in the specified relationship. * @param objectType The type of the objects that link to this object's type. * @param propertyName The name of the property that references objects of this object's type. - * @throws {@link AssertionError} If the relationship is not valid. + * @throws an {@link AssertionError} If the relationship is not valid. * @returns The objects that link to this object. * @since 1.9.0 */ @@ -394,7 +396,7 @@ export class RealmObject { * - `changes`: a dictionary with keys `deleted`, and `changedProperties`. `deleted` is true * if the object has been deleted. `changesProperties` is an array of properties that have changed * their value. - * @throws {@link TypeAssertionError} If `callback` is not a function. + * @throws a {@link TypeAssertionError} If `callback` is not a function. * @example * wine.addListener((obj, changes) => { * // obj === wine @@ -418,7 +420,7 @@ export class RealmObject { /** * Remove the listener `callback` - * @throws {@link TypeAssertionError} If `callback` is not a function. + * @throws a {@link TypeAssertionError} If `callback` is not a function. * @param callback A function previously added as listener * @since 2.23.0 */ @@ -440,7 +442,7 @@ export class RealmObject { /** * Get underlying type of a property value. * @param propertyName The name of the property to retrieve the type of. - * @throws {@link Error} If property does not exist. + * @throws an {@link Error} If property does not exist. * @returns Underlying type of the property value. * @since 10.8.0 */ diff --git a/packages/realm/src/OrderedCollection.ts b/packages/realm/src/OrderedCollection.ts index 158a184c84..8909343f15 100644 --- a/packages/realm/src/OrderedCollection.ts +++ b/packages/realm/src/OrderedCollection.ts @@ -199,7 +199,7 @@ export abstract class OrderedCollection; /** * @internal @@ -261,6 +261,8 @@ export abstract class OrderedCollection { return this.values(); } @@ -376,6 +380,7 @@ export abstract class OrderedCollection; @@ -564,7 +565,7 @@ export abstract class OrderedCollection; @@ -583,7 +584,7 @@ export abstract class OrderedCollection; @@ -628,7 +629,6 @@ export abstract class OrderedCollection { diff --git a/packages/realm/src/Realm.ts b/packages/realm/src/Realm.ts index 8ecaf1d655..024c9af217 100644 --- a/packages/realm/src/Realm.ts +++ b/packages/realm/src/Realm.ts @@ -285,7 +285,7 @@ export class Realm { /** * Clears the state by closing and deleting any Realm in the default directory and logout all users. - * @private Not a part of the public API: It's primarily used from the library's tests. + * @private */ public static clearTestState(): void { assert(flags.ALLOW_CLEAR_TEST_STATE, "Set the flags.ALLOW_CLEAR_TEST_STATE = true before calling this."); @@ -309,7 +309,7 @@ export class Realm { /** * Delete the Realm file for the given configuration. * @param config The configuration for the Realm - * @throws {@link Error} If anything in the provided {@link config} is invalid. + * @throws an {@link Error} If anything in the provided {@link config} is invalid. */ public static deleteFile(config: Configuration): void { validateConfiguration(config); @@ -324,7 +324,7 @@ export class Realm { /** * Checks if the Realm already exists on disk. * @param arg The configuration for the Realm or the path to it. - * @throws {@link Error} If anything in the provided {@link config} is invalid. + * @throws an {@link Error} If anything in the provided {@link config} is invalid. * @returns `true` if the Realm exists on the device, `false` if not. */ public static exists(arg: Configuration | string = {}): boolean { @@ -341,7 +341,7 @@ export class Realm { * thrown if {@link Configuration.scheme | config.schema} is not defined. * @param arg The configuration for the Realm or the path to it. * @returns A promise that will be resolved with the Realm instance when it's available. - * @throws {@link Error} If anything in the provided {@link arg} is invalid. + * @throws an {@link Error} If anything in the provided {@link arg} is invalid. */ public static open(arg: Configuration | string = {}): ProgressRealmPromise { const config = typeof arg === "string" ? { path: arg } : arg; @@ -354,7 +354,7 @@ export class Realm { * Realm database is stored. * @param encryptionKey Required only when * accessing encrypted Realms. - * @throws {@link Error} If passing an invalid or non-matching encryption key. + * @throws an {@link Error} If passing an invalid or non-matching encryption key. * @returns Version of the schema, or `-1` if no Realm exists at {@link path}. */ public static schemaVersion(path: string, encryptionKey?: ArrayBuffer | ArrayBufferView): number { @@ -372,7 +372,6 @@ export class Realm { * and all required fields have the default value for the given data type, either the value * set by the default property in the schema or the default value for the datatype if the schema * doesn't specify one, i.e. 0, false and "". - * * @param objectSchema Schema describing the object that should be created. */ public static createTemplateObject>(objectSchema: ObjectSchema): T { @@ -436,14 +435,13 @@ export class Realm { * Realm.copyBundledRealmFiles(); * * const realm = await Realm.open({ - * // This will open example.realm from the documents directory, with the bundled data in. - * path: "example.realm" + * // This will open example.realm from the documents directory, with the bundled data in. + * path: "example.realm" * }); * ``` * * This is only implemented for React Native. - * - * @throws {@link Error} If an I/O error occurred or method is not implemented. + * @throws an {@link Error} If an I/O error occurred or method is not implemented. */ public static copyBundledRealmFiles() { fs.copyBundledRealmFiles(); @@ -595,19 +593,19 @@ export class Realm { /** * Create a new {@link Realm} instance, at the default path. - * @throws {@link Error} When an incompatible synced Realm is opened. + * @throws an {@link Error} When an incompatible synced Realm is opened. */ constructor(); /** * Create a new {@link Realm} instance at the provided {@link path}. * @param path Required when first creating the Realm. - * @throws {@link Error} If the Realm cannot be opened at the provided {@link path}. - * @throws {@link Error} When an incompatible synced Realm is opened. + * @throws an {@link Error} If the Realm cannot be opened at the provided {@link path}. + * @throws an {@link Error} When an incompatible synced Realm is opened. */ constructor(path: string); /** * Create a new {@link Realm} instance using the provided {@link config}. If a Realm does not yet exist - * at {@link Configuration.path | config.path} (or {@link defaultPath} if not provided), then this constructor + * at {@link Configuration.path | config.path} (or {@link Realm.defaultPath} if not provided), then this constructor * will create it with the provided {@link Configuration.schema | config.schema} (which is _required_ in this case). * Otherwise, the instance will access the existing Realm from the file at that path. * In this case, {@link Configuration.schema | config.schema} is _optional_ or not have changed, unless @@ -616,8 +614,8 @@ export class Realm { * In the case of query-based sync, {@link Configuration.schema | config.schema} is required. An exception will be * thrown if {@link Configuration.schema | config.schema} is not defined. * @param config Required when first creating the Realm. - * @throws {@link Error} If anything in the provided {@link config} is invalid. - * @throws {@link Error} When an incompatible synced Realm is opened. + * @throws an {@link Error} If anything in the provided {@link config} is invalid. + * @throws an {@link Error} When an incompatible synced Realm is opened. */ constructor(config: Configuration); /** @internal */ @@ -771,7 +769,7 @@ export class Realm { /** * The latest set of flexible sync subscriptions. - * @throws {@link Error} If flexible sync is not enabled for this app. + * @throws an {@link Error} If flexible sync is not enabled for this app. */ get subscriptions(): SubscriptionSet { const { syncConfig } = this.internal.config; @@ -923,7 +921,7 @@ export class Realm { * Searches for a Realm object by its primary key. * @param type The type of Realm object to search for. * @param primaryKey The primary key value of the object to search for. - * @throws {@link Error} If type passed into this method is invalid, or if the object type did + * @throws an {@link Error} If type passed into this method is invalid, or if the object type did * not have a {@link primaryKey} specified in the schema, or if it was marked asymmetric. * @returns A {@link RealmObject} or `null` if no object is found. * @since 0.14.0 @@ -963,7 +961,7 @@ export class Realm { * Returns all objects of the given {@link type} in the Realm. * @param type The type of Realm object to search for. * @param objectKey The object key of the Realm object to search for. - * @throws {@link Error} If type passed into this method is invalid or if the type is marked embedded or asymmetric. + * @throws an {@link Error} If type passed into this method is invalid or if the type is marked embedded or asymmetric. * @returns A {@link RealmObject} or `undefined` if the object key is not found. * @internal */ @@ -997,7 +995,7 @@ export class Realm { /** * Returns all objects of the given {@link type} in the Realm. * @param type The type of Realm objects to retrieve. - * @throws {@link Error} If type passed into this method is invalid or if the type is marked embedded or asymmetric. + * @throws an {@link Error} If type passed into this method is invalid or if the type is marked embedded or asymmetric. * @returns Results that will live-update as objects are created, modified, and destroyed. */ objects(type: string): Results & T>; @@ -1030,7 +1028,7 @@ export class Realm { * @param callback Function to be called when a change event occurs. * Each callback will only be called once per event, regardless of the number of times * it was added. - * @throws {@link Error} If an invalid event {@link eventName} is supplied, if Realm is closed or if {@link callback} is not a function. + * @throws an {@link Error} If an invalid event {@link eventName} is supplied, if Realm is closed or if {@link callback} is not a function. */ addListener(eventName: RealmEventName, callback: RealmListenerCallback): void { assert.open(this); @@ -1050,7 +1048,7 @@ export class Realm { * Remove the listener {@link callback} for the specified event {@link eventName}. * @param eventName The event name. * @param callback Function that was previously added as a listener for this event through the {@link addListener} method. - * @throws {@link Error} If an invalid event {@link eventName} is supplied, if Realm is closed or if {@link callback} is not a function. + * @throws an {@link Error} If an invalid event {@link eventName} is supplied, if Realm is closed or if {@link callback} is not a function. */ removeListener(eventName: RealmEventName, callback: RealmListenerCallback): void { assert.open(this); @@ -1070,7 +1068,7 @@ export class Realm { /** * Remove all event listeners (restricted to the event {@link eventName}, if provided). * @param eventName The name of the event whose listeners should be removed. - * @throws {@link Error} When invalid event {@link eventName} is supplied + * @throws an {@link Error} When invalid event {@link eventName} is supplied */ removeAllListeners(eventName?: RealmEventName): void { assert.open(this); @@ -1122,8 +1120,7 @@ export class Realm { * When doing a transaction, it is highly recommended to do error handling. * If you don't handle errors, your data might become inconsistent. Error handling * will often involve canceling the transaction. - * - * @throws {@link Error} If already in write transaction + * @throws an {@link Error} If already in write transaction * @see {@link cancelTransaction} * @see {@link commitTransaction} * @example @@ -1143,7 +1140,6 @@ export class Realm { /** * Commit a write transaction. - * * @see {@link beginTransaction} */ commitTransaction(): void { @@ -1152,7 +1148,6 @@ export class Realm { /** * Cancel a write transaction. - * * @see {@link beginTransaction} */ cancelTransaction(): void { @@ -1200,9 +1195,8 @@ export class Realm { /** * Update the schema of the Realm. - * * @param schema The schema which the Realm should be updated to use. - * @internal Consider passing a {@link schema} when constructing the {@link Realm} instead. + * @internal */ _updateSchema(schema: ObjectSchema[]): void { validateRealmSchema(schema); @@ -1232,7 +1226,6 @@ export class Realm { /** * Update subscriptions with the initial subscriptions if needed. - * * @param initialSubscriptions The initial subscriptions. * @param realmExists Whether the realm already exists. */ diff --git a/packages/realm/src/Results.ts b/packages/realm/src/Results.ts index 304a9b63c4..598824a281 100644 --- a/packages/realm/src/Results.ts +++ b/packages/realm/src/Results.ts @@ -49,9 +49,6 @@ export class Results extends OrderedCollection { /** * Create a `Results` wrapping a set of query `Results` from the binding. * @internal - * @param internal The internal representation of the results. - * @param internalRealm The internal representation of the Realm managing these results. - * @param internalTable The internal representation of the table. */ constructor(realm: Realm, internal: binding.Results, helpers: OrderedCollectionHelpers) { if (arguments.length === 0 || !(internal instanceof binding.Results)) { @@ -93,7 +90,7 @@ export class Results extends OrderedCollection { * Bulk update objects in the collection. * @param propertyName The name of the property. * @param value The updated property value. - * @throws {@link Error} If no property with the name exists. + * @throws an {@link Error} If no property with the name exists. * @since 2.0.0-rc20 */ update(propertyName: keyof RealmInsertionModel, value: RealmInsertionModel[typeof propertyName]): void { @@ -117,7 +114,6 @@ export class Results extends OrderedCollection { /** * Add this query result to the set of active subscriptions. The query will be joined * via an `OR` operator with any existing queries for the same type. - * * @param options Options to use when adding this subscription (e.g. a name or wait behavior). * @returns A promise that resolves to this {@link Results} instance. * @experimental This API is experimental and may change or be removed. @@ -148,7 +144,6 @@ export class Results extends OrderedCollection { * * If the subscription is unnamed, the subscription matching the query will * be removed. - * * @experimental This API is experimental and may change or be removed. */ unsubscribe(): void { @@ -169,3 +164,6 @@ export class Results extends OrderedCollection { return this.internal.size() === 0; } } + +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- Useful for APIs taking any `Results` */ +export type AnyResults = Results; diff --git a/packages/realm/src/Set.ts b/packages/realm/src/Set.ts index 4b7025e641..91c4772c3d 100644 --- a/packages/realm/src/Set.ts +++ b/packages/realm/src/Set.ts @@ -73,7 +73,7 @@ export class RealmSet extends OrderedCollection { /** * Delete a value from the Set * @param value Value to delete from the Set - * @throws {@link Error} If not inside a write transaction. + * @throws an {@link Error} If not inside a write transaction. * @returns `true` if the value existed in the Set prior to deletion, `false` if not. */ delete(value: T): boolean { @@ -87,7 +87,7 @@ export class RealmSet extends OrderedCollection { * @param value Value to add to the Set * @throws {TypeError} If a `value` is not of a type which can be stored in * the Set, or if an object being added to the Set does not match the for the Set. - * @throws {@link Error} If not inside a write transaction. + * @throws an {@link Error} If not inside a write transaction. * @returns The Set itself, after adding the new value */ add(value: T): this { @@ -98,7 +98,7 @@ export class RealmSet extends OrderedCollection { /** * Remove all values from the Set - * @throws {@link Error} If not inside a write transaction. + * @throws an {@link Error} If not inside a write transaction. */ clear(): void { assert.inTransaction(this.realm); diff --git a/packages/realm/src/TypeHelpers.ts b/packages/realm/src/TypeHelpers.ts index 93e1f150bb..18fb883220 100644 --- a/packages/realm/src/TypeHelpers.ts +++ b/packages/realm/src/TypeHelpers.ts @@ -121,6 +121,7 @@ function defaultFromBinding(value: unknown) { /** * Adds a branch to a function, which checks for the argument to be null, in which case it returns early. */ +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- Using `unknown` here breaks type inference in `binding.PropertyType.Object` `toBinding` from for some reason */ function nullPassthrough unknown>( this: T, fn: F, diff --git a/packages/realm/src/Types.ts b/packages/realm/src/Types.ts index d11cd93bce..aa05103d04 100644 --- a/packages/realm/src/Types.ts +++ b/packages/realm/src/Types.ts @@ -59,6 +59,7 @@ export namespace Types { export type Dictionary = RealmDictionary; export const Dictionary: typeof RealmDictionary = RealmDictionary; export type Mixed = unknown; + /* eslint-disable-next-line @typescript-eslint/no-unused-vars -- We don't use the `LinkingPropertyName` at runtime */ export type LinkingObjects = RealmResults; export const LinkingObjects: typeof RealmResults = RealmResults; } diff --git a/packages/realm/src/app-services/ApiKeyAuth.ts b/packages/realm/src/app-services/ApiKeyAuth.ts index d4340efb25..cad2c23bf8 100644 --- a/packages/realm/src/app-services/ApiKeyAuth.ts +++ b/packages/realm/src/app-services/ApiKeyAuth.ts @@ -65,7 +65,6 @@ export class ApiKeyAuth { /** * Creates an API key that can be used to authenticate as the current user. - * * @param keyName the name of the API key to be created. */ async create(keyName: string): Promise { @@ -76,7 +75,6 @@ export class ApiKeyAuth { /** * Fetches an API key associated with the current user. - * * @param keyId the id of the API key to fetch. */ async fetch(keyId: string): Promise { @@ -94,7 +92,6 @@ export class ApiKeyAuth { /** * Deletes an API key associated with the current user. - * * @param keyId the id of the API key to delete */ async delete(keyId: string) { @@ -103,7 +100,6 @@ export class ApiKeyAuth { /** * Enables an API key associated with the current user. - * * @param keyId the id of the API key to enable */ async enable(keyId: string) { @@ -112,7 +108,6 @@ export class ApiKeyAuth { /** * Disable an API key associated with the current user. - * * @param keyId the id of the API key to disable */ async disable(keyId: string) { diff --git a/packages/realm/src/app-services/App.ts b/packages/realm/src/app-services/App.ts index 6d890eddf4..d2c938ccfb 100644 --- a/packages/realm/src/app-services/App.ts +++ b/packages/realm/src/app-services/App.ts @@ -96,7 +96,6 @@ export class App 10")`. * @returns The subscription with the specified query, or `null` if the subscription is not found. @@ -197,7 +196,7 @@ export abstract class BaseSubscriptionSet { } /** @internal */ - exists(query: Results): boolean { + exists(query: AnyResults): boolean { if (query.subscriptionName === undefined) { return !!this.internal.findByQuery(query.internal.query); } @@ -206,7 +205,6 @@ export abstract class BaseSubscriptionSet { /** * Makes the subscription set iterable. - * * @returns Iterable of each value in the set. * @example * for (const subscription of subscriptions) { @@ -221,7 +219,6 @@ export abstract class BaseSubscriptionSet { /** * Get an iterator that contains each index in the subscription set. - * * @internal */ *keys() { diff --git a/packages/realm/src/app-services/Credentials.ts b/packages/realm/src/app-services/Credentials.ts index 282624ba56..0e978756e0 100644 --- a/packages/realm/src/app-services/Credentials.ts +++ b/packages/realm/src/app-services/Credentials.ts @@ -16,12 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// -import { - // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Used by TS docs - App, - assert, - binding, -} from "../internal"; +import { App, assert, binding } from "../internal"; /** * Types of an authentication provider. @@ -55,7 +50,7 @@ export class Credentials { * time will result in a different user being logged in. If you need to get a user that has already logged * in with the Anonymous credentials, use {@link App.currentUser} or {@link App.allUsers}. * @param reuse Reuse any existing anonymous user already logged in. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static anonymous(reuse = true): Credentials { return new Credentials(binding.AppCredentials.anonymous(reuse)); @@ -81,7 +76,7 @@ export class Credentials { /** * Creates credentials from an API key. * @param key A string identifying the API key. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static apiKey(key: string): Credentials { return new Credentials(binding.AppCredentials.apiKey(key)); @@ -90,7 +85,7 @@ export class Credentials { /** * Creates credentials based on an Apple login. * @param token An Apple authentication token, obtained by logging into Apple. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static apple(token: string): Credentials { return new Credentials(binding.AppCredentials.apple(token)); @@ -99,7 +94,7 @@ export class Credentials { /** * Creates credentials based on a Facebook login. * @param token A Facebook authentication token, obtained by logging into Facebook. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static facebook(token: string): Credentials { return new Credentials(binding.AppCredentials.facebook(token)); @@ -126,7 +121,7 @@ export class Credentials { /** * Creates credentials with a JSON Web Token (JWT) provider and user identifier. * @param token A string identifying the user. Usually an identity token or a username. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static jwt(token: string): Credentials { return new Credentials(binding.AppCredentials.custom(token)); @@ -135,7 +130,7 @@ export class Credentials { /** * Creates credentials with an Atlas App Services function and user identifier. * @param payload An object identifying the user. Usually an identity token or a username. - * @return {Credentials} An instance of `Credentials` that can be used in {@link App.logIn}. + * @return An instance of `Credentials` that can be used in {@link App.logIn}. */ static function(payload: object): Credentials { return new Credentials(binding.AppCredentials.function(payload as Record)); diff --git a/packages/realm/src/app-services/EmailPasswordAuth.ts b/packages/realm/src/app-services/EmailPasswordAuth.ts index b7ef7db6a3..277c761f1f 100644 --- a/packages/realm/src/app-services/EmailPasswordAuth.ts +++ b/packages/realm/src/app-services/EmailPasswordAuth.ts @@ -30,11 +30,9 @@ export class EmailPasswordAuth { /** * Registers a new email identity with the email/password provider, * and sends a confirmation email to the provided address. - * * @param details The new user's email and password details * @param details.email - The email address of the user to register. * @param details.password - The password that the user created for the new username/password identity. - * @returns {Promise} * @since v10.10.0 */ public async registerUser(details: { email: string; password: string }) { @@ -43,11 +41,9 @@ export class EmailPasswordAuth { /** * Confirms an email identity with the email/password provider. - * * @param details The received token and ID details * @param details.token - The confirmation token that was emailed to the user. * @param details.tokenId - The confirmation token id that was emailed to the user. - * @returns {Promise} * @since v10.10.0 */ public async confirmUser(details: { token: string; tokenId: string }) { @@ -57,23 +53,19 @@ export class EmailPasswordAuth { /** * Re-sends a confirmation email to a user that has registered but * not yet confirmed their email address. - * * @param details The associated email details * @param details.email - The email address of the user to re-send a confirmation for. - * @returns {Promise} * @since v10.10.0 */ - public async resendConfirmationEmail(detail: { email: string }) { - await this.internal.resendConfirmationEmail(detail.email); + public async resendConfirmationEmail(details: { email: string }) { + await this.internal.resendConfirmationEmail(details.email); } /** * Re-run the custom confirmation function for user that has registered but * not yet confirmed their email address. - * * @param details The associated email details * @param details.email - The email address of the user to re-run the confirmation for. - * @returns {Promise} * @since v10.10.0 */ public async retryCustomConfirmation(details: { email: string }) { @@ -82,12 +74,10 @@ export class EmailPasswordAuth { /** * Resets the password of an email identity using the password reset token emailed to a user. - * * @param details The token and password details for the reset * @param details.password - The desired new password. * @param details.token - The password reset token that was emailed to the user. * @param details.tokenId - The password reset token id that was emailed to the user. - * @returns {Promise} * @since v10.10.0 */ public async resetPassword(details: { password: string; token: string; tokenId: string }) { @@ -96,10 +86,8 @@ export class EmailPasswordAuth { /** * Sends an email to the user for resetting the password. - * - * @param details The email details to send the reset to - * @param details.email - The email address of the user to re-send a confirmation for. - * @returns {Promise} + * @param credential The email details to send the reset to + * @param credential.email - The email address of the user to re-send a confirmation for. * @since v10.10.0 */ public async sendResetPasswordEmail(credential: { email: string }) { diff --git a/packages/realm/src/app-services/MongoDBCollection.ts b/packages/realm/src/app-services/MongoDBCollection.ts index 41056c408b..bc73c9c85c 100644 --- a/packages/realm/src/app-services/MongoDBCollection.ts +++ b/packages/realm/src/app-services/MongoDBCollection.ts @@ -120,7 +120,7 @@ export type UpdateOptions = { /** * A document from a MongoDB collection */ -export type Document = { +export type Document = { /** * The id of the document. */ @@ -251,7 +251,7 @@ export type DocumentNamespace = { */ export type UpdateDescription = { /** Names of fields that got updated. */ - updatedFields: Record; + updatedFields: Record; /** Names of fields that got removed. */ removedFields: string[]; }; @@ -259,7 +259,7 @@ export type UpdateDescription = { /** * Acts as the `resumeToken` for the `resumeAfter` parameter when resuming a change stream. */ -export type ChangeEventId = any; +export type ChangeEventId = unknown; /** * A document that contains the _id of the document created or modified by the insert, replace, @@ -269,7 +269,7 @@ export type ChangeEventId = any; export type DocumentKey = { /** The id of the document. */ _id: IdType; -} & Record; +} & Record; /** * A base change event containing the properties which apply across operation types. @@ -377,7 +377,6 @@ export type InvalidateEvent = BaseChangeEvent<"invalidate">; /** * A change event communicated via a MongoDB change stream. - * * @see https://docs.mongodb.com/manual/reference/change-events/ */ export type ChangeEvent = @@ -415,7 +414,6 @@ export class MongoDBCollection { /** * Finds the documents which match the provided query. - * * @param filter An optional filter applied to narrow down the results. * @param options Additional options to apply. * @returns The documents. @@ -433,7 +431,6 @@ export class MongoDBCollection { /** * Finds a document which matches the provided filter. - * * @param filter A filter applied to narrow down the result. * @param options Additional options to apply. * @returns The document. @@ -450,7 +447,6 @@ export class MongoDBCollection { /** * Finds a document which matches the provided query and performs the desired update to individual fields. - * * @param filter A filter applied to narrow down the result. * @param update The new values for the document. * @param options Additional options to apply. @@ -471,7 +467,6 @@ export class MongoDBCollection { /** * Finds a document which matches the provided filter and replaces it with a new document. - * * @param filter A filter applied to narrow down the result. * @param replacement The new replacing document. * @param options Additional options to apply. @@ -492,7 +487,6 @@ export class MongoDBCollection { /** * Finds a document which matches the provided filter and deletes it - * * @param filter A filter applied to narrow down the result. * @param options Additional options to apply. * @returns The document found before deleting it. @@ -509,7 +503,6 @@ export class MongoDBCollection { /** * Runs an aggregation framework pipeline against this collection. - * * @param pipeline An array of aggregation pipeline stages. * @returns The result. */ @@ -527,9 +520,9 @@ export class MongoDBCollection { * Note: When calling this without a filter, you may receive inaccurate document counts * as it returns results based on the collection's metadata, which may result in an * approximate count. In particular: - * * On a sharded cluster, the resulting count will not correctly filter out + * - On a sharded cluster, the resulting count will not correctly filter out * {@link https://www.mongodb.com/docs/manual/reference/glossary/#std-term-orphaned-document orphaned documents}. - * * After an unclean shutdown or file copy based initial sync, the count may be incorrect. + * - After an unclean shutdown or file copy based initial sync, the count may be incorrect. */ count(filter: Filter = {}, options: CountOptions = {}): Promise { return this.functions.count({ @@ -543,7 +536,6 @@ export class MongoDBCollection { /** * Inserts a single document into the collection. * Note: If the document is missing an _id, one will be generated for it by the server. - * * @param document The document. * @returns The result. */ @@ -558,8 +550,7 @@ export class MongoDBCollection { /** * Inserts an array of documents into the collection. * If any values are missing identifiers, they will be generated by the server. - * - * @param document The array of documents. + * @param documents The array of documents. * @returns The result. */ insertMany(documents: NewDocument[]): Promise> { @@ -572,7 +563,6 @@ export class MongoDBCollection { /** * Deletes a single matching document from the collection. - * * @param filter A filter applied to narrow down the result. * @returns The result. */ @@ -586,7 +576,6 @@ export class MongoDBCollection { /** * Deletes multiple documents. - * * @param filter A filter applied to narrow down the result. If omitted, it defaults * to `{}` which deletes all documents in the collection. * @returns The result. @@ -601,7 +590,6 @@ export class MongoDBCollection { /** * Updates a single document matching the provided filter in this collection. - * * @param filter A filter applied to narrow down the result. * @param update The new values for the document. * @param options Additional options to apply. @@ -620,7 +608,6 @@ export class MongoDBCollection { /** * Updates multiple documents matching the provided filter in this collection. - * * @param filter A filter applied to narrow down the result. * @param update The new values for the documents. * @param options Additional options to apply. @@ -647,7 +634,6 @@ export class MongoDBCollection { * * 1. Polyfills for `fetch` and `ReadableStream`: https://www.npmjs.com/package/react-native-polyfill-globals * 2. Babel plugin enabling async generator syntax: https://npmjs.com/package/@babel/plugin-proposal-async-generator-functions - * * @param options.filter A filter for which change events you want to watch. * @param options.ids A list of document ids for which change events you want to watch. * @see https://docs.mongodb.com/manual/reference/change-events/ diff --git a/packages/realm/src/app-services/MutableSubscriptionSet.ts b/packages/realm/src/app-services/MutableSubscriptionSet.ts index c3c8665bf4..0e996bfbf2 100644 --- a/packages/realm/src/app-services/MutableSubscriptionSet.ts +++ b/packages/realm/src/app-services/MutableSubscriptionSet.ts @@ -16,7 +16,16 @@ // //////////////////////////////////////////////////////////////////////////// -import { BaseSubscriptionSet, Realm, Results, Subscription, SubscriptionSet, assert, binding } from "../internal"; +import { + AnyResults, + BaseSubscriptionSet, + Realm, + Results, + Subscription, + SubscriptionSet, + assert, + binding, +} from "../internal"; /** * Behavior when waiting for subscribed objects to be synchronized/downloaded. @@ -92,13 +101,12 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { * * A query is represented by a {@link Results} instance returned from {@link Realm.objects}, * for example: `mutableSubs.add(realm.objects("Cat").filtered("age > 10"));`. - * * @param query A {@link Results} instance representing the query to subscribe to. * @param options An optional {@link SubscriptionOptions} object containing options to * use when adding this subscription (e.g. to give the subscription a name). * @returns A `Subscription` instance for the new subscription. */ - add(query: Results, options?: SubscriptionOptions): Subscription { + add(query: AnyResults, options?: SubscriptionOptions): Subscription { assert.instanceOf(query, Results, "query"); if (options) { validateSubscriptionOptions(options); @@ -134,11 +142,10 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove a subscription with the given query from the SubscriptionSet. - * * @param query A {@link Results} instance representing the query to remove a subscription to. * @returns `true` if the subscription was removed, `false` if it was not found. */ - remove(query: Results): boolean { + remove(query: AnyResults): boolean { assert.instanceOf(query, Results, "query"); return this.internal.eraseByQuery(query.internal.query); @@ -146,7 +153,6 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove a subscription with the given name from the SubscriptionSet. - * * @param name The name of the subscription to remove. * @returns `true` if the subscription was removed, `false` if it was not found. */ @@ -158,7 +164,6 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove the specified subscription from the SubscriptionSet. - * * @param subscription The {@link Subscription} instance to remove. * @returns `true` if the subscription was removed, `false` if it was not found. */ @@ -170,7 +175,6 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove all subscriptions for the specified object type from the SubscriptionSet. - * * @param objectType The string name of the object type to remove all subscriptions for. * @returns The number of subscriptions removed. */ @@ -182,7 +186,6 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove all subscriptions from the SubscriptionSet. - * * @returns The number of subscriptions removed. */ removeAll(): number { @@ -194,7 +197,6 @@ export class MutableSubscriptionSet extends BaseSubscriptionSet { /** * Remove all unnamed/anonymous subscriptions from the SubscriptionSet. - * * @returns The number of subscriptions removed. */ removeUnnamed(): number { diff --git a/packages/realm/src/app-services/PushClient.ts b/packages/realm/src/app-services/PushClient.ts index f8fca39727..18b269ec65 100644 --- a/packages/realm/src/app-services/PushClient.ts +++ b/packages/realm/src/app-services/PushClient.ts @@ -34,7 +34,6 @@ export class PushClient { /** * Register this device with the user. - * * @param token A Firebase Cloud Messaging (FCM) token, retrieved via the firebase SDK. */ async register(token: string) { diff --git a/packages/realm/src/app-services/Subscription.ts b/packages/realm/src/app-services/Subscription.ts index fb0b44e06d..101f2934f0 100644 --- a/packages/realm/src/app-services/Subscription.ts +++ b/packages/realm/src/app-services/Subscription.ts @@ -16,8 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// -import { BSON } from "../bson"; -import { binding } from "../internal"; +import { BSON, SubscriptionSet, binding } from "../internal"; /** * Class representing a single query subscription in a set of flexible sync diff --git a/packages/realm/src/app-services/SubscriptionSet.ts b/packages/realm/src/app-services/SubscriptionSet.ts index 42009b1afb..1fa8ad8fcb 100644 --- a/packages/realm/src/app-services/SubscriptionSet.ts +++ b/packages/realm/src/app-services/SubscriptionSet.ts @@ -54,7 +54,6 @@ export class SubscriptionSet extends BaseSubscriptionSet { * If `state` is {@link SubscriptionSetState.Complete}, the promise will be resolved immediately. * * If `state` is {@link SubscriptionSetState.Error}, the promise will be rejected immediately. - * * @returns A promise which is resolved when synchronization is complete, or is * rejected if there is an error during synchronization. */ @@ -81,16 +80,13 @@ export class SubscriptionSet extends BaseSubscriptionSet { * All changes done by the callback will be batched and sent to the server. You can either * `await` the call to `update`, or call {@link SubscriptionSet.waitForSynchronization} * to wait for the new data to be available. - * * @param callback A callback function which receives a {@link MutableSubscriptionSet} * instance as the first argument, which can be used to add or remove subscriptions * from the set, and the {@link Realm} associated with the SubscriptionSet as the * second argument (mainly useful when working with `initialSubscriptions` in * {@link FlexibleSyncConfiguration}). - * * @returns A promise which resolves when the SubscriptionSet is synchronized, or is rejected * if there was an error during synchronization (see {@link SubscriptionSet.waitForSynchronization}) - * * @example * await realm.subscriptions.update(mutableSubscriptions => { * mutableSubscriptions.add(realm.objects("Cat").filtered("age > 10")); diff --git a/packages/realm/src/app-services/Sync.ts b/packages/realm/src/app-services/Sync.ts index eceb1b5538..558f2d36c2 100644 --- a/packages/realm/src/app-services/Sync.ts +++ b/packages/realm/src/app-services/Sync.ts @@ -27,6 +27,7 @@ import { OpenRealmBehaviorType, OpenRealmTimeOutBehavior, PartitionValue, + Realm, Subscription, SubscriptionSet, SubscriptionSetState, diff --git a/packages/realm/src/app-services/SyncConfiguration.ts b/packages/realm/src/app-services/SyncConfiguration.ts index 55668d546d..529d67c228 100644 --- a/packages/realm/src/app-services/SyncConfiguration.ts +++ b/packages/realm/src/app-services/SyncConfiguration.ts @@ -187,12 +187,11 @@ export type BaseSyncConfiguration = { export type InitialSubscriptions = { /** * A callback to make changes to a SubscriptionSet. - * * @see {@link SubscriptionSet.update} for more information. */ update: (mutableSubscriptions: MutableSubscriptionSet, realm: Realm) => void; /** - * If `true`, the {@link update} callback will be rerun every time the Realm is + * If `true`, the {@link InitialSubscriptions.update} callback will be rerun every time the Realm is * opened (e.g. every time a user opens your app), otherwise (by default) it * will only be run if the Realm does not yet exist. */ diff --git a/packages/realm/src/app-services/SyncSession.ts b/packages/realm/src/app-services/SyncSession.ts index 0121bca195..2aa56d0026 100644 --- a/packages/realm/src/app-services/SyncSession.ts +++ b/packages/realm/src/app-services/SyncSession.ts @@ -34,7 +34,6 @@ import { User, assert, binding, - flags, fromBindingSyncError, } from "../internal"; diff --git a/packages/realm/src/app-services/User.ts b/packages/realm/src/app-services/User.ts index 343e2b2541..0d2eac3f0e 100644 --- a/packages/realm/src/app-services/User.ts +++ b/packages/realm/src/app-services/User.ts @@ -46,7 +46,7 @@ export type UserChangeCallback = () => void; export enum UserState { /** * Authenticated and available to communicate with services. - * @deprecated Will be removed in v13. Please use {@link LoggedIn} + * @deprecated Will be removed in v13. Please use {@link UserState.LoggedIn} */ Active = "active", /** Authenticated and available to communicate with services. */ @@ -238,7 +238,6 @@ export class User< /** * Log out the user. - * * @returns A promise that resolves once the user has been logged out of the app. */ async logOut(): Promise { @@ -247,7 +246,6 @@ export class User< /** * Link the user with an identity represented by another set of credentials. - * * @param credentials The credentials to use when linking. */ async linkCredentials(credentials: Credentials) { @@ -257,11 +255,9 @@ export class User< /** * Call a remote Atlas App Services Function by its name. * Note: Consider using `functions[name]()` instead of calling this method. - * * @param name Name of the App Services Function. * @param args Arguments passed to the Function. * @returns A promise that resolves to the value returned by the Function. - * * @example * // These are all equivalent: * await user.callFunction("doThing", a1, a2, a3); @@ -305,7 +301,6 @@ export class User< /** * Refresh the access token and derive custom data from it. - * * @returns The newly fetched custom data. */ async refreshCustomData(): Promise { @@ -315,7 +310,6 @@ export class User< /** * Use the Push service to enable sending push messages to this user via Firebase Cloud Messaging (FCM). - * * @deprecated https://www.mongodb.com/docs/atlas/app-services/reference/push-notifications/ * @returns An service client with methods to register and deregister the device on the user. */ @@ -327,7 +321,6 @@ export class User< /** * @param serviceName The name of the MongoDB service to connect to. * @returns A connection to the MongoDB service. - * * @example * let blueWidgets = user.mongoClient("myService") * .db("myDb") diff --git a/packages/realm/src/assert.ts b/packages/realm/src/assert.ts index b2bffef453..adda06f73b 100644 --- a/packages/realm/src/assert.ts +++ b/packages/realm/src/assert.ts @@ -20,7 +20,7 @@ import { AssertionError, BSON, DefaultObject, PrimaryKey, Realm, TypeAssertionEr /** * Expects the condition to be truthy - * @throws {@link Error} If the condition is not truthy. Throws either the {@link err} given as param if it's an {@link Error}, + * @throws an {@link Error} If the condition is not truthy. Throws either the {@link err} given as param if it's an {@link Error}, * an {@link AssertionError} wrapping {@link err} if it's a string or undefined, or uses the result of invoking {@link err} if it's a function. * @param condition The condition that must be truthy to avoid throwing. * @param err Optional message or error to throw. diff --git a/packages/realm/src/bson.ts b/packages/realm/src/bson.ts index 874d0abf60..0e5f055300 100644 --- a/packages/realm/src/bson.ts +++ b/packages/realm/src/bson.ts @@ -20,7 +20,6 @@ import * as bson from "bson"; /** * A re-export of the "bson" package, enabling access to the BSON types without requiring an explicit dependency on the "bson" package. - * * @see {@link https://www.npmjs.com/package/bson#documentation|the BSON documentation} for more information. */ // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/packages/realm/src/decorators.ts b/packages/realm/src/decorators.ts index 775197f2bf..3fd380d36e 100644 --- a/packages/realm/src/decorators.ts +++ b/packages/realm/src/decorators.ts @@ -40,14 +40,14 @@ export const index: IndexDecorator = () => { throw new DecoratorError("index"); }; -export type MapToDecorator = (realmPropertyName: string) => (target: unknown, memberName: string) => void; +export type MapToDecorator = (propertyName: string) => (target: unknown, memberName: string) => void; /** * Specify that the decorated field should be remapped to a different property name in the Realm database. * See: [documentation](https://www.mongodb.com/docs/realm/sdk/react-native/examples/define-a-realm-object-model/#remap-a-property) - * - * @param realmPropertyName The name of the property in the Realm database + * @param propertyName The name of the property in the Realm database */ -export const mapTo = () => { +/* eslint-disable-next-line @typescript-eslint/no-unused-vars -- We don't read this at runtime */ +export const mapTo: MapToDecorator = (propertyName: string) => { throw new DecoratorError("mapTo"); }; diff --git a/packages/realm/src/errors.ts b/packages/realm/src/errors.ts index 77f9ae79f8..90f68335bc 100644 --- a/packages/realm/src/errors.ts +++ b/packages/realm/src/errors.ts @@ -16,14 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// -import { - // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Used by TS docs - ClientResetMode, - Configuration, - PrimaryKey, - assert, - binding, -} from "./internal"; +import { ClientResetMode, Configuration, PrimaryKey, assert, binding } from "./internal"; export class AssertionError extends Error { /** @internal */ @@ -61,7 +54,6 @@ export class TypeAssertionError extends AssertionError { * Get an error message for when the target's value is of * the wrong type. Single quotes are added around the target * string if it does not already contain one. - * * @internal */ private static message(expected: string, value: unknown, target?: string) { diff --git a/packages/realm/src/index.ts b/packages/realm/src/index.ts index 0c7bfcdddd..25048c2699 100644 --- a/packages/realm/src/index.ts +++ b/packages/realm/src/index.ts @@ -16,6 +16,14 @@ // //////////////////////////////////////////////////////////////////////////// +import { + CanonicalPropertySchema, + ClientResetRecoverUnsyncedChangesConfiguration, + Realm, + RealmObjectConstructor, + SyncSession, +} from "./internal"; + export { AggregatePipelineStage, ApiKey, @@ -170,8 +178,6 @@ export { WaitForSync, } from "./internal"; -import { Realm, RealmObjectConstructor } from "./internal"; - export type Mixed = unknown; export type ObjectType = string | RealmObjectConstructor; diff --git a/packages/realm/src/runtime.d.ts b/packages/realm/src/runtime.d.ts index fa64d31c34..00ce204f9c 100644 --- a/packages/realm/src/runtime.d.ts +++ b/packages/realm/src/runtime.d.ts @@ -43,7 +43,7 @@ declare module "buffer" { } /** @deprecated React Native doesn't provide this, use our `binding.WeakRef` polyfill instead. */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface +// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars declare interface WeakRef {} /** @deprecated React Native doesn't provide this */ // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/packages/realm/src/schema/from-binding.ts b/packages/realm/src/schema/from-binding.ts index a8b16a59e8..f2eb81064d 100644 --- a/packages/realm/src/schema/from-binding.ts +++ b/packages/realm/src/schema/from-binding.ts @@ -79,8 +79,6 @@ const COLLECTION_TYPES = [PropertyType.Array, PropertyType.Set, PropertyType.Dic /** * Implements https://github.com/realm/realm-js/blob/v11/src/js_schema.hpp#L433-L478 - * @param objectSchema The object schema, as represented by the binding. - * @returns The object schema, as represented by the SDK. * @internal */ export function fromBindingObjectSchema({ @@ -109,8 +107,6 @@ export function fromBindingObjectSchema({ /** * Implements https://github.com/realm/realm-js/blob/v11/src/js_schema.hpp#L480-L530 - * @param propertySchema The property schema, as represented by the binding. - * @returns The property schema, as represented by the SDK. * @internal */ export function fromBindingPropertySchema(propertySchema: BindingProperty): CanonicalPropertySchema { @@ -127,11 +123,7 @@ export function fromBindingPropertySchema(propertySchema: BindingProperty): Cano return result; } -/** - * Used to - * @param propertySchema The property schema, as represented by the binding. - * @returns A partial property schema, as represented by the SDK. - */ +/** @internal */ function fromBindingPropertyTypeName( propertySchema: BindingProperty, ): Pick { diff --git a/packages/realm/src/schema/types.ts b/packages/realm/src/schema/types.ts index 9505b328c0..bffd329356 100644 --- a/packages/realm/src/schema/types.ts +++ b/packages/realm/src/schema/types.ts @@ -16,16 +16,13 @@ // //////////////////////////////////////////////////////////////////////////// -import { - BSON, - // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Used by TS docs - Realm, - RealmObject, -} from "../internal"; +import { BSON, Realm, RealmObject } from "../internal"; export type DefaultObject = Record; +/* eslint-disable-next-line @typescript-eslint/no-explicit-any -- Using `any` instead of `unknown` here to make it easier to pass */ export type Constructor = { new (...args: any): T }; export type RealmObjectConstructor = { + /* eslint-disable-next-line @typescript-eslint/no-explicit-any -- Using `any` instead of `unknown` here to make it easier to pass */ new (...args: any): T; // We need to declare schema as optional to support the babel plugin. // Otherwise it will produce a type error. @@ -183,13 +180,11 @@ export type CanonicalPropertiesTypes"` (set) * - The markers to declare a collection type. Can only be used when declaring * property types using this shorthand string notation. - * * @example * "int" * "int?" * "int[]" * "int?[]" - * * @see {@link PropertySchema} for using the object representation of a property schema. */ export type PropertySchemaShorthand = string; @@ -211,10 +206,8 @@ export type ObjectSchemaProperty = PropertySchema; * set to `null` and cannot be made non-optional. * - Properties declared as the primary key in {@link ObjectSchema.primaryKey} are always * indexed. In such cases, they cannot be made non-indexed. - * * @see {@link PropertySchemaShorthand} for a shorthand representation of a property * schema. - * * @see {@link PropertySchemaStrict} for a precise type definition of the requirements * with the allowed combinations. This type is less strict in order to provide a more * user-friendly option due to misleading TypeScript error messages when working with @@ -281,7 +274,6 @@ export type PropertySchemaCommon = { * requirements and their allowed combinations; however, TypeScript error messages tend * to be more misleading. {@link PropertySchema} is recommended for that reason, but the * strict type is provided as guidance. - * * @see {@link PropertySchema} for a textual explanation of the requirements defined here, * as well as documentation for each property. */ diff --git a/packages/realm/src/schema/validate.ts b/packages/realm/src/schema/validate.ts index 2d8ab257ab..1e17e5df34 100644 --- a/packages/realm/src/schema/validate.ts +++ b/packages/realm/src/schema/validate.ts @@ -123,13 +123,12 @@ export function validateObjectSchema( } } } - } catch (err: any) { + } catch (err) { // Rethrow as SchemaParseError(s) rather than a mix of Error, TypeError, // TypeAssertionError, or AssertionError. if (err instanceof PropertySchemaParseError) { throw err; - } - if (err instanceof Error) { + } else if (err instanceof Error) { // This first line is a workaround to satisfy TS. Runtime check needs to be // `const objectName = objectSchema?.name || ""` where either `objectSchema` // or `objectSchema.name` can be undefined or an incorrect type. @@ -178,7 +177,7 @@ export function validatePropertySchema( "', '", )}'.`, ); - } catch (err: any) { + } catch (err) { if (err instanceof Error) { throw new PropertySchemaParseError(err.message, { objectName, propertyName }); } diff --git a/packages/realm/type-tests/type-tests.ts b/packages/realm/type-tests/type-tests.ts index 354e6143b6..c60439e27c 100644 --- a/packages/realm/type-tests/type-tests.ts +++ b/packages/realm/type-tests/type-tests.ts @@ -16,6 +16,8 @@ // //////////////////////////////////////////////////////////////////////////// +/* eslint-disable @typescript-eslint/no-unused-vars -- We're just testing types */ + import { Realm as Realm2 } from "../src/index"; const realm = new Realm();