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

Update types #1695

Merged
merged 6 commits into from
Sep 30, 2024
Merged

Update types #1695

merged 6 commits into from
Sep 30, 2024

Conversation

mootari
Copy link
Member

@mootari mootari commented Sep 29, 2024

A typo in an outdated markdown-it type made me notice that several of our types don't match their library versions.

This PR

  • updates DT types to the latest available versions (and downgrades in the case of he),
  • removes @types/prompts,
  • adds a mocha test to verify that the version constraints match.

Some notes:

  • We may want to downgrade @types/node to match the engine version.
  • I had to skip checks for most of the packages, but using this.skip() allowed me to at least keep them in view.
  • I'm not really sure that mocha is the best place to handle this.
  • I considered querying the latest versions for skipped packages but it seemed to offer little benefit given the overhead.
  • Ideally yarn.lock would be the source of truth but that seems more complicated than what I'd want to deal with.

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

I think the test is overkill here, especially given the number of exceptions we already need to allow. How about dropping the test but keeping the rest of the changes?

@mootari
Copy link
Member Author

mootari commented Sep 30, 2024

How about dropping the test but keeping the rest of the changes?

Sure, it didn't feel quite right anyway. 🙂

I also updated the Node types to match the minimum engine version.

@mootari mootari changed the title Update types, add test for version constraint parity Update types Sep 30, 2024
@mootari mootari merged commit 0723b2a into main Sep 30, 2024
4 checks passed
@mootari mootari deleted the mootari/240929/update-types branch September 30, 2024 15:28
@mbostock
Copy link
Member

Did this PR introduce this warning? We should fix…

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.6.0

YOUR TYPESCRIPT VERSION: 5.6.2

Please only submit bug reports when using the officially supported version.

=============

@mootari
Copy link
Member Author

mootari commented Sep 30, 2024

@mbostock No, by #957 as far as I can tell. We may need to update eslint I think?

@mbostock
Copy link
Member

Thanks for tracking that down @mootari!

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