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

Match @types/node to TS version for each run of npm test:types #655

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

bdaily-stripe
Copy link
Contributor

@bdaily-stripe bdaily-stripe commented Oct 1, 2024

Summary & motivation

When running tests, we test against a variety of TS versions, including next. Recently, our check against next began to fail due to some transitive copies of @types/node and their incompatibility with newer versions of TS. I tried making @types/node an explicit dependency, which fixed next but broke older versions of the TS check starting with 4.7.

The Definitively Typed project only supports TS versions 2 years in the past, so we were bound to get wedged like this at some point. This PR attempts to address this issue by installing a tagged version of @types/node for each run of the types check, pinning @types/node to the TS version we are testing. (e.g., for TS 4.7.4, we install @types/node@ts4.7.

I've also removed TS 3 checks in this PR as TS 3.9 is now over 4 years old and it doesn't seem like we need to support that far in the past. Let me know if you disagree, happy to bring it back!

Testing & documentation

Not user facing, only internal types tests are impact.

@@ -4,6 +4,7 @@ import fs from 'fs';
import 'zx/globals';

const VERSIONS = [
'next',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding this back, it was removed yesterday to unblock master merges

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