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

feat!: Require Node >=18 as minimum supported version #14749

Merged
merged 23 commits into from
Dec 18, 2024
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 17, 2024

We decided to require node 18+ in v9. This is to align with the upcoming changes in OpenTelemetry. We also believe it is a reasonable version requirement - Node 16 is EOL for some time now. This will also allow us to update a bunch of dev tooling (vitest, ...) properly and streamline some processes.

For users requiring Node 14/16, they can remain on v8 (which will be continued to be supported with bug fixes for some time).

ref #14257

@mydea mydea self-assigned this Dec 17, 2024
@@ -35,6 +35,7 @@
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"@types/node": "^14.8.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 build fails without this, also with v16 of @types/node :( cc @Lms24

Copy link
Member

Choose a reason for hiding this comment

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

Can we just leave it at 14 then?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I added this here and it seems fine, just wanted to call it out. if we revisit this/bump angular, we can maybe drop this (??), let's see!

Copy link
Member

Choose a reason for hiding this comment

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

Ah sorry, I missed that this had to be added explicitly. But yeah, I think it's reasonable for us to use 14 as long as we stay with Angular 14 as the min version (Angular 14 still used Node 14 as its minimal version). We can and should reevaluate once we need to drop Angular 14 support. To get up to 18.19.1 as the min supported version we'd however need to drop everything below Angular 18, which is a pretty big jump

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, it's not a big deal to leave this in I'd say, for now!

@@ -89,7 +89,7 @@ export function parseProxyResponse(socket: Readable): Promise<{ connect: Connect
return;
}

const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n');
const headerParts = buffered.subarray(0, endOfHeaders).toString('ascii').split('\r\n');
Copy link
Member Author

Choose a reason for hiding this comment

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

buffer.slice is deprecated since Node 16.

@@ -52,7 +52,7 @@ export class AsyncLocalStorageContextManager extends AbstractAsyncHooksContextMa
getStore() {
return undefined;
},
run(_store, callback, ...args) {
run(_store: unknown, callback: () => Context, ...args: unknown[]) {
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure why this is not inferred anymore, but this was missing now.

@mydea mydea added this to the 9.0.0 milestone Dec 17, 2024
@timfish
Copy link
Collaborator

timfish commented Dec 17, 2024

It's worth noting that this would take our minimum supported Electron version from v15 to v29

@mydea mydea changed the title feat!: Require Node >=18.19.1 as minimum supported version feat!: Require Node >=18 as minimum supported version Dec 17, 2024
@mydea
Copy link
Member Author

mydea commented Dec 17, 2024

It's worth noting that this would take our minimum supported Electron version from v15 to v29

I adjusted this to be 18+ instead, which should broaden this a bit more?

@timfish
Copy link
Collaborator

timfish commented Dec 17, 2024

Yep, that would take the minimum supported Electron version from v15 to v23

@mydea mydea marked this pull request as ready for review December 17, 2024 16:54
@mydea mydea requested review from a team as code owners December 17, 2024 16:54
Copy link
Collaborator

@timfish timfish left a comment

Choose a reason for hiding this comment

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

Nice!

Can't wait to move away from Jest 😂

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

We need to update https://github.com/getsentry/sentry-javascript/blob/develop/packages/profiling-node/README.md#prebuilt-binaries to start at v18 now

Feels good that we can progress further with #11084 now

scripts/ci-unit-tests.ts Outdated Show resolved Hide resolved
@@ -58,6 +58,7 @@ describe('GCPFunction', () => {
headers = { ...headers, ...trace_headers };
}
return new Promise((resolve, _reject) => {
// eslint-disable-next-line deprecation/deprecation
const d = domain.create();
Copy link
Member

Choose a reason for hiding this comment

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

l: Can we just rewrite this to not use domains? We can create a GH issue to follow up on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

#14769 👍

Copy link

codecov bot commented Dec 18, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
689 1 688 298
View the top 1 failed tests by shortest run time
client-app-routing-instrumentation.test.ts Creates a navigation transaction for app router routes
Stack Traces | 30s run time
client-app-routing-instrumentation.test.ts:19:5 Creates a navigation transaction for app router routes

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@mydea mydea merged commit 2853845 into develop Dec 18, 2024
171 checks passed
@mydea mydea deleted the fn/bump-node-18 branch December 18, 2024 10:13
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.

4 participants