From 3bf4e248aa92a5d347dcfe0950d548755e63194d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:33:56 +0000 Subject: [PATCH 1/2] Bump chai and @types/chai Bumps [chai](https://github.com/chaijs/chai) and [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai). These dependencies needed to be updated together. Updates `chai` from 4.4.1 to 4.5.0 - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/v4.4.1...v4.5.0) Updates `@types/chai` from 4.3.11 to 4.3.17 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) --- updated-dependencies: - dependency-name: chai dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: "@types/chai" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++++++++++++------------- package.json | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb5c36bdc..1cc041503 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6508,9 +6508,9 @@ } }, "@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", + "version": "4.3.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.17.tgz", + "integrity": "sha512-zmZ21EWzR71B4Sscphjief5djsLre50M6lI622OSySTmn9DB3j+C3kWroHfBQWXbOBwbgg/M8CG/hUxDLIloow==", "dev": true }, "@types/chai-as-promised": { @@ -10959,9 +10959,9 @@ "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==" }, "chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -10970,7 +10970,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "dependencies": { "check-error": { @@ -11678,9 +11678,9 @@ } }, "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -21326,9 +21326,9 @@ } }, "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, "type-fest": { diff --git a/package.json b/package.json index 2c50d3125..b8a26b645 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "@testing-library/react": "^14.3.1", - "@types/chai": "^4.3.11", + "@types/chai": "^4.3.17", "@types/chai-as-promised": "^7.1.8", "@types/dompurify": "^3.0.5", "@types/element-resize-detector": "^1.1.6", @@ -107,7 +107,7 @@ "@typescript-eslint/utils": "^5.62.0", "babel-plugin-add-react-displayname": "0.0.5", "babel-plugin-styled-components": "^2.1.4", - "chai": "^4.4.1", + "chai": "^4.5.0", "chai-as-promised": "^8.0.0", "eslint": "^8.57.0", "eslint-config-airbnb": "^19.0.4", From ce204ce8dcba39ab84d1ea1713c1ba1c432738ed Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Fri, 2 Aug 2024 10:27:25 -0700 Subject: [PATCH 2/2] Drop unnecessary non-null assertions --- tests/acceptance/profiles.tsx | 2 +- tests/unit/imports/server/MigrationRegistry.ts | 8 ++++---- tests/unit/imports/server/Model.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/profiles.tsx b/tests/acceptance/profiles.tsx index d97cafd0a..0156f886b 100644 --- a/tests/acceptance/profiles.tsx +++ b/tests/acceptance/profiles.tsx @@ -248,7 +248,7 @@ if (Meteor.isClient) { let u2 = await MeteorUsers.findOneAsync(sameHuntUserId); assert.isDefined(u2, "Should show users in the same hunt"); assert.sameMembers( - u2!.hunts!, + u2.hunts!, [huntId], "Should not show membership in other hunts even if user is visible", ); diff --git a/tests/unit/imports/server/MigrationRegistry.ts b/tests/unit/imports/server/MigrationRegistry.ts index 9bd9e7d69..1891e75b2 100644 --- a/tests/unit/imports/server/MigrationRegistry.ts +++ b/tests/unit/imports/server/MigrationRegistry.ts @@ -108,10 +108,10 @@ describe("MigrationRegistry", function () { // Expect that the database is still locked. const control = await testCollection.findOneAsync("control"); assert.isDefined(control); - const { locked, lockedAt } = control!; + const { locked, lockedAt } = control; assert.equal(locked, true); assert.isDefined(lockedAt); - assert.isAtLeast(lockedAt!.getTime(), start); + assert.isAtLeast(lockedAt.getTime(), start); // Expect that the first migration ran, once. assert.equal(runCount, 1); @@ -164,10 +164,10 @@ describe("MigrationRegistry", function () { // Expect that the database is still locked. const control = await testCollection.findOneAsync("control"); assert.isDefined(control); - const { locked, lockedAt } = control!; + const { locked, lockedAt } = control; assert.equal(locked, true); assert.isDefined(lockedAt); - assert.isAtLeast(lockedAt!.getTime(), start); + assert.isAtLeast(lockedAt.getTime(), start); // Expect that the first migration ran, once. assert.equal(runCount, 1); diff --git a/tests/unit/imports/server/Model.ts b/tests/unit/imports/server/Model.ts index 024ce925c..ef500b3ce 100644 --- a/tests/unit/imports/server/Model.ts +++ b/tests/unit/imports/server/Model.ts @@ -60,7 +60,7 @@ describe("Model", function () { const record = await model.findOneAsync(result); assert.isOk(record); - assert.isUndefined(record!.string); + assert.isUndefined(record.string); }); it("works on update", async function () { @@ -88,7 +88,7 @@ describe("Model", function () { const record = await model.findOneAsync(id); assert.isOk(record); - assert.isUndefined(record!.string); + assert.isUndefined(record.string); }); });