-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: drop incorrect types for webtorrent org packages #70064
Conversation
@ThaUnknown Thank you for submitting this PR! This is a live comment that I will keep updated. This PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this? 4 packages in this PR (and infra files)
Code ReviewsBecause this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 31 days — it is considered abandoned, and therefore closed! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 70064,
"author": "ThaUnknown",
"headCommitOid": "138483507c2f200b2d849c6a5fdfd767a79c6f2c",
"mergeBaseOid": "b4ae44884a5a4a56d6059d81f1567d3f6983dbe8",
"lastPushDate": "2024-07-16T08:30:58.000Z",
"lastActivityDate": "2024-11-20T03:44:11.000Z",
"hasMergeConflict": true,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": null,
"kind": "edit",
"files": [
{
"path": "notNeededPackages.json",
"kind": "infrastructure"
}
],
"owners": [],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical",
"isSafeInfrastructureEdit": false
},
{
"name": "bittorrent-protocol",
"kind": "delete",
"files": [
{
"path": "types/bittorrent-protocol/.eslintrc.json",
"kind": "package-meta",
"suspect": "edited"
},
{
"path": "types/bittorrent-protocol/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/bittorrent-protocol/bittorrent-protocol-tests.ts",
"kind": "test"
},
{
"path": "types/bittorrent-protocol/index.d.ts",
"kind": "definition"
},
{
"path": "types/bittorrent-protocol/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/bittorrent-protocol/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"feross",
"tlaziuk",
"h1b9b"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "create-torrent",
"kind": "delete",
"files": [
{
"path": "types/create-torrent/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/create-torrent/create-torrent-tests.ts",
"kind": "test"
},
{
"path": "types/create-torrent/index.d.ts",
"kind": "definition"
},
{
"path": "types/create-torrent/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/create-torrent/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"jesec"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "parse-torrent",
"kind": "delete",
"files": [
{
"path": "types/parse-torrent/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/parse-torrent/index.d.ts",
"kind": "definition"
},
{
"path": "types/parse-torrent/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/parse-torrent/parse-torrent-tests.ts",
"kind": "test"
},
{
"path": "types/parse-torrent/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"niieani",
"tlaziuk"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "webtorrent",
"kind": "delete",
"files": [
{
"path": "types/webtorrent/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/webtorrent/index.d.ts",
"kind": "definition"
},
{
"path": "types/webtorrent/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/webtorrent/tsconfig.json",
"kind": "package-meta-ok"
},
{
"path": "types/webtorrent/webtorrent-tests.ts",
"kind": "test"
}
],
"owners": [
"niieani",
"tlaziuk",
"gjuchault",
"cheeseandcereal"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "changereq",
"reviewer": "jesec",
"date": "2024-10-20T08:55:04.000Z"
},
{
"type": "changereq",
"reviewer": "jakebailey",
"date": "2024-07-16T16:02:48.000Z"
}
],
"mainBotCommentID": 2230325063,
"ciResult": "pass"
} |
🔔 @feross @tlaziuk @h1b9b @jesec @niieani @gjuchault @cheeseandcereal — please review this PR in the next few days. Be sure to explicitly select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These packages do not contain types; this is definitely not the right fix: #69947 (comment)
@ThaUnknown One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
@jakebailey what is the correct way of proceeding then, that doesn't require me to waste weeks of my free time?
I'd preferably want to not have types from DT apply after specific versions: since thats roughly where the old types are still accurate enough, and simply let the already defined jsdoc in the package and type inference take over, but I don't know if typescript even allows that |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Aug 15th (in a week) if the issues aren't addressed. |
bump |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Sep 7th (in a week) if the issues aren't addressed. |
bump |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Oct 1st (in a week) if the issues aren't addressed. |
bump |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Oct 24th (in a week) if the issues aren't addressed. |
bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reject.
The same set of changes has been reverted in #70059.
Also +1 on #69947 (comment) , #69947 (comment) .
Please reply to those comments and avoid spamming new pull requests and trying to force it through without additional merit.
lord this is by far the most annoying repository i've ever experienced, package provides jsdoc where it's applicable, and all these people whining that there are no types, aren't fixing the types, WHICH ARE COMPLETLY INCORRECT, I do NOT understand how some1 can merge broken and incorrect types, and then the repository maintainers can't remove them, even tho they are malicious, anyways since i'm the package maintainer so since this repo is so against me being able to remove the incorrect types, i'll just force resolve it to |
also @jesec those comments were replied to, so idk what you're saying |
I'm really not sure what to do here at this point. It's just a fact that for TypeScript users to use a library, that library needs You don't seem to want to maintain types in your packages, so for TS users to use your packages, the types must be here. But you don't want the types that are here because they're out of date. Deleting them will break all TS users, but sort of improve things for JS users because tsserver does a limited analysis of JS code in "Removing" can only be one of two things:
There are no other options. Packages cannot be unpublished. Which one of these is the right option? Maybe the solution really is just for DT to wipe our hands of these packages and you just declare everything as I see you sent webtorrent/webtorrent#2876, if this is the direction you want to take, then that's totally up to you. You can just do this to all of your packages, publish them with a d.ts files, and we'll merge this PR with updated version numbers. |
yes, that PR was created because DT tied my hands, it wouldn't exist if I could simply control the types over the packages I maintain, the fact that package maintainers don't have permissions to their own types is a bit wild to me to me marking the packages as not needed is the best way to do it, but DT clearly doesn't agree until I have my own types, which is why that PR exists, I'd rather not merge it, because it then also breaks JS on top of breaking TS, which is even worse, but its better than having completely incorrect and absurd types |
What you you mean? You can totally be an owner on the DT packages and send PRs to DT. |
clearly not, because I cannot remove these incorrect types, instead i need to jump 14 hoops, while being spammed by issues of "hey this function isnt working according to the outdated type documentation" |
Removing the types and breaking all TS users is a totally different scenario to just updating the types so that they're correct. Adding/removing packages from DT is something that has to be monitored. There are a non-zero number of packages which are on DT and have types updated by their maintainers or community members; if you sent a PR that updated the types here, it would absolutely be reviewed and accepted. DT is supposed to be wikipedia for types, but even wikipedia doesn't just let anyone delete pages. |
yes, but wikipedia moderates incorrect entries, this doesnt, maybe by breaking it for users which auto-update all packages instead of locking versions, some1 will spent the month or so of their life creating these types |
The options here are:
Which of these do you want to do to resolve the problem? I do not see any other option. We simply cannot merge this PR as-is without other |
@ThaUnknown Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Nov 20th (in a week) if the issues aren't addressed. |
I'll re-up this one more time; I'm really wanting to get this handled, but we really need to know which of the previously noted options will work best. |
@ThaUnknown I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Dec 20th (in a week) if the issues aren't addressed. |
@ThaUnknown To keep things tidy, we have to close PRs that aren't mergeable and don't have activity in the last month. No worries, though — please open a new PR if you'd like to continue with this change. Thank you! |
Please fill in this template.
pnpm test <package to test>
.Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.If changing an existing definition:
package.json
.If removing a declaration:
notNeededPackages.json
.These types for webtorrent's packages have been outdated for ages, and for the most part aren't needed because we use JSDoc where it's important.
These types are causing an insane amt of issues for us, both for development, and for maintaining, since VSCode incorrectly inherits DT's types, and people keep making issues complaining that a function works incorrectly, because these types are wrong and are telling them incorrect things.
#69947