Skip to content

chore: Bump dependencies #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 6, 2025
Merged

chore: Bump dependencies #287

merged 13 commits into from
Mar 6, 2025

Conversation

jimmycallin
Copy link
Contributor

@jimmycallin jimmycallin commented Mar 4, 2025

  • I have added automatic tests where applicable
  • The PR title is suitable as a release note
  • The PR contains a description of what has been changed
  • The description contains manual test instructions

Changes

This bumps all dependencies to latest.

  • eslint-react-app along with its eslint-config is deprecated, replaced with recommended eslint and typescript-eslint instead. this caused some need for fixes

i diffed the build output and no major differences

Test

@jimmycallin jimmycallin requested a review from a team as a code owner March 4, 2025 13:52
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

husky deprecated having to include this

@@ -545,7 +545,7 @@ export class Session<
const mergedEntity = identityMap[identifier];

for (const key in entity) {
if (entity.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(entity, key)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint - avoid calling hasOwnProperty on the object directly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Object.hasOwn() instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

@@ -1,5 +1,4 @@
import { fetch } from "cross-fetch";
import { server } from "./test/server";
import { server } from "./test/server.js";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't need cross-fetch anymore

@@ -922,49 +929,3 @@ describe("Prepared template tests", () => {
);
});
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests where just copypaste of the previous ones. eslint started to complain about duplicate describes which is how i caught it

import SimpleSocketIOClient, { PACKET_TYPES } from "../source/simple_socketio";
import SimpleSocketIOClient, {
PACKET_TYPES,
} from "../source/simple_socketio.js";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with nodenext you need to use .js, what i don't understand is how this wasn't erroring.

@@ -67,6 +69,9 @@ describe("Tests using SimpleSocketIOClient", () => {
credentials.apiKey,
);

await instance1.initializing;
await instance2.initializing;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixes unhandled network requests once a test has finished, which it complained about

it("Should support uploading multi-part files", () =>
new Promise((done) => {
useMultiPartUpload();
const uploader = new Uploader(session, file, {
//@ts-ignore
//@ts-expect-error - filesize is not defined
fileSize: MULTI_PART_TEST_FILE_SIZE,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how this test is meant to work, but didn't want to spend time on it now

onComplete.mockImplementation(() => {
expect(onComplete).toHaveBeenCalledOnce();
resolve();
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint started complaining about that tests need to include an assertion (expect), so redid this test a bit to include it

@@ -28,7 +27,7 @@ class MockXmlHttpRequest extends EventTarget {
}

beforeAll(() => {
server.listen({ onUnhandledRequest: "error" });
server.listen({ onUnhandledRequest: "bypass" });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msw started to catch websocket requests, causing tests to fail. ideally we should catch these websocket requests but couldn't figure out how to do it

@gismya gismya self-requested a review March 4, 2025 14:53
Copy link
Contributor

@gismya gismya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor changes

@@ -545,7 +545,7 @@ export class Session<
const mergedEntity = identityMap[identifier];

for (const key in entity) {
if (entity.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(entity, key)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Object.hasOwn() instead.

@jimmycallin jimmycallin merged commit 0fe43e5 into main Mar 6, 2025
3 checks passed
@jimmycallin jimmycallin deleted the bump-dependencies branch March 6, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants