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

chore: remove release-it.d.ts, upgrade release-it.d.ts version #363

Conversation

markEHVN
Copy link
Contributor

@markEHVN markEHVN commented Dec 8, 2024

PR Checklist

Overview

Upgrade release-it version, new version has type information.

@markEHVN
Copy link
Contributor Author

markEHVN commented Dec 8, 2024

Just curious, why do we need release-it.d.ts file? I do not see we use it in project 🤔

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.50%. Comparing base (91e7d0b) to head (8e8bddf).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   91.14%   95.50%   +4.36%     
==========================================
  Files          12       11       -1     
  Lines         350      334      -16     
  Branches       42       42              
==========================================
  Hits          319      319              
+ Misses         31       15      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoshuaKGoldberg
Copy link
Owner

Just curious, why do we need release-it.d.ts file? I do not see we use it in project 🤔

When I first wrote the file many months ago, the release-it project hadn't yet added its own types. You can see this with:

git checkout ed7fbb2
pnpm install
pnpm run tsc
> [email protected] tsc /Users/josh/repos/release-it-action
> tsc

src/index.ts:4:23 - error TS7016: Could not find a declaration file for module 'release-it'. '/Users/josh/repos/release-it-action/node_modules/.pnpm/[email protected][email protected]/node_modules/release-it/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/release-it` if it exists or add a new declaration (.d.ts) file containing `declare module 'release-it';`

4 import releaseIt from "release-it";
                        ~~~~~~~~~~~~


Found 1 error in src/index.ts:4

 ELIFECYCLE  Command failed with exit code 2.

But, once the release-it dependency was automatically updated by the Renovate bot to a version with types, the .d.ts was no longer necessary. Looks like that was probably #300 or so.

Copy link
Owner

@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.

Nice! I'd missed that the release-it had added their own types. This is great. Thanks! 🙌

@JoshuaKGoldberg JoshuaKGoldberg merged commit 7051abb into JoshuaKGoldberg:main Dec 8, 2024
14 checks passed
@JoshuaKGoldberg
Copy link
Owner

@all-contributors please add @markEHVN for code.

🤖 Beep boop! This comment was added automatically by all-contributors-auto-action.
Not all contributions can be detected from Git & GitHub alone. Please comment any missing contribution types this bot missed.
...and of course, thank you for contributing! 💙

@markEHVN markEHVN deleted the ft/remove-release-it.d.ts-file-locally branch December 8, 2024 07:45
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.

🛠 Tooling: Move release-it.d.ts to release-it or DefinitelyTyped
2 participants