Skip to content

chore: same version for @types/node - #18904

Closed
Jolg42 wants to merge 2 commits into
mainfrom
joel/same-version-types-node
Closed

Jolg42 wants to merge 2 commits into
mainfrom
joel/same-version-types-node

Conversation

@Jolg42

@Jolg42 Jolg42 commented Apr 24, 2023 •

Copy link
Copy Markdown
Contributor

@microsoft/api-extractor patch version was bumped to avoid: ✕ unmet peer @types/node@^14.18.36: found 18.16.0

Triggered by

// @ts-ignore: `rm` exists since Node.js 14.14.0, but doesn't seem to appear in all @types/node packages used by Prisma

From #18848 (review)

We can use the latest version everywhere and clean up, it's not perfect but better than now

@microsoft/api-extractor patch version was bumped to avoid:
✕ unmet peer @types/node@^14.18.36: found 18.16.0
@Jolg42 Jolg42 added this to the 4.14.0 milestone Apr 24, 2023
@Jolg42
Jolg42 requested a review from a team April 24, 2023 16:41
@Jolg42
Jolg42 requested a review from jkomyno as a code owner April 24, 2023 16:41
@Jolg42
Jolg42 requested review from SevInf and removed request for a team April 24, 2023 16:41
@socket-security

Copy link
Copy Markdown

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
@types/node@18.16.0 12.20.55...18.16.0, 14.14.21...18.16.0, 16.18.11...18.16.0, 17.0.21...18.16.0 None +0/-0 types

@Jolg42
Jolg42 marked this pull request as draft April 24, 2023 16:44
@Jolg42

Jolg42 commented Apr 24, 2023 •

Copy link
Copy Markdown
Contributor Author

Currently, errors with

packages/get-platform build: src/isNodeAPISupported.ts(9,32): error TS2367: This comparison appears to be unintentional because the types 'Architecture' and '"x32"' have no overlap.

Because x32 was removed in v17! (see here)
Found in
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md?plain=1#L416'

Only used in https://github.com/prisma/prisma/blob/main/packages/get-platform/src/isNodeAPISupported.ts

@jkomyno jkomyno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, let's not upgrade @types/node to 18.*, which is very misleading, as our minimum supported Node.js version is 14.17.*. This implies that we cannot trust the types exported by such a recent @types/node version.

In #18899, I had already stabilised the @types/node versions across the public @prisma/* packages to 14.18.42, i.e., the version already in use that is the closest to 14.17.*.

With the context provided in this comment, I think this PR can be closed.

@Jolg42

Jolg42 commented Apr 25, 2023

Copy link
Copy Markdown
Contributor Author

@jkomyno I don't think that using v14 types everywhere is a great solution either, there is no perfect solution here unfortunately 😢

@codspeed

codspeed Bot commented Apr 25, 2023

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #18904 joel/same-version-types-node (f7f1ff5) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 3 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@jkomyno

jkomyno commented Apr 28, 2023

Copy link
Copy Markdown
Contributor

Note: #18899 was approved and merged, and likely conflicts with this PR.

@Jolg42 Jolg42 closed this Apr 28, 2023
@Jolg42
Jolg42 deleted the joel/same-version-types-node branch April 28, 2023 09:18
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