Skip to content
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

chore: upgrade node version #291

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

huyenltnguyen
Copy link
Member

Checklist:

Upgrade Node version to 18 as v14 is no longer supported.

Ref: https://endoflife.date/nodejs

@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
eventsourcemock 2.0.0 None +0 183 kB gcedo

"node": ">= 14.0.0",
"npm": "6.14.18"
"node": ">= 18.0.0",
"npm": ">= 9.0.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

The latest npm version is 10, but it's quite new so I would rather wait until other dependencies are fairly up-to-date.

I'm using Node 18 and npm 9 on my machine, and things are working properly.

Copy link
Member Author

Choose a reason for hiding this comment

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

The change in this file is large because npm needed to update the metadata:

Screenshot 2023-10-12 at 00 44 27

Comment on lines +1 to +6
import EventSource from 'eventsourcemock';
import '@testing-library/jest-dom';

Object.defineProperty(window, 'EventSource', {
value: EventSource
});
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a failing test in the repo:

Screenshot 2023-10-12 at 00 50 34

I was able to fix it following this guide: https://stackoverflow.com/a/75390265 (required adding eventsourcemock as a dev dependency).

@huyenltnguyen
Copy link
Member Author

Sigh.

There is a conflict in the React version we use and sentry-javascript uses. The older npm versions only display a warning, but the newer versions error out.

I'll raise a PR to upgrade sentry-javascript first since it's also quite outdated (we are 2 major versions behind).

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.

None yet

1 participant