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

fix(rule-tester): fix a phantom dependency on the "semver" package #8260

Merged
merged 5 commits into from
Feb 3, 2024

Conversation

octogonz
Copy link
Contributor

@octogonz octogonz commented Jan 16, 2024

PR Checklist

Overview

The obvious fix would be to declare @types/semver as a dependency or peer dependency of @typescript-eslint/rule-tester.

However the relied upon interface is tiny, so we can simply inline in the DependencyConstraint.ts source file.

Validation

I confirmed that with this change, my project compiles successfully.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @octogonz!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Jan 16, 2024

👷 Deploy Preview for typescript-eslint processing.

Name Link
🔨 Latest commit 5d5c61b
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/65beb8245778640008108b02

@octogonz octogonz changed the title fix(rule-tester): Fix a phantom dependency on the "semver" package fix(rule-tester): fix a phantom dependency on the "semver" package Jan 16, 2024
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changes Feb 1, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the issue & fix! I agree that two properties is a reasonably small enough size to just inline an interface like this.

Just the one style suggestion, then I think we're good to merge. WDYT?

packages/rule-tester/src/types/DependencyConstraint.ts Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Feb 1, 2024
octogonz and others added 2 commits February 1, 2024 11:25
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

src/types/DependencyConstraint.ts(3,39): error TS2304: Cannot find name "Options".

@JoshuaKGoldberg
Copy link
Member

I had some spare time today and was going through the PR backlog. Please forgive me for jumping in and applying the fix 😄. I was excited to get our open PRs number down...

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🚢

Copy link

nx-cloud bot commented Feb 3, 2024

Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8de6ee2) 87.70% compared to head (5d5c61b) 87.80%.
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8260      +/-   ##
==========================================
+ Coverage   87.70%   87.80%   +0.09%     
==========================================
  Files         397      398       +1     
  Lines       13950    14052     +102     
  Branches     4055     4090      +35     
==========================================
+ Hits        12235    12338     +103     
  Misses       1403     1403              
+ Partials      312      311       -1     
Flag Coverage Δ
unittest 87.80% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...eslint-plugin/src/rules/consistent-type-imports.ts 95.28% <ø> (ø)
...slint-plugin/src/rules/no-unnecessary-condition.ts 98.56% <100.00%> (+0.09%) ⬆️

... and 4 files with indirect coverage changes

@JoshuaKGoldberg JoshuaKGoldberg merged commit 47d25f4 into typescript-eslint:main Feb 3, 2024
61 of 63 checks passed
danvk pushed a commit to danvk/typescript-eslint that referenced this pull request Feb 4, 2024
…ypescript-eslint#8260)

* fix(rule-tester): Fix a phantom dependency on the "semver" package in DependencyConstraint.d.ts

* Update packages/rule-tester/src/types/DependencyConstraint.ts

Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>

* Remove 'extends Options'

---------

Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: DependencyConstraint.d.ts fails to compile due to phantom dependency on "semver"
3 participants