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

Relax not-needed version condition #448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jablko
Copy link
Contributor

@jablko jablko commented May 4, 2022

Can we relax this condition (not-need version must be newer than the @types/package version)? It prevents the removal of types that are newer than their target package, and doesn't make a difference to the stub's version, which anyway will be the max of the not-needed version and the max @types/package version + 1. e.g.

@jablko jablko force-pushed the patch-43 branch 3 times, most recently from 90f8632 to 4071a8b Compare May 4, 2022 19:36
@@ -161,7 +161,7 @@ async function checkNpm(
log(" yarn not-needed " + yarnargs.join(" "));
log(` git add --all && git commit -m "${name}: Provides its own types" && git push -u origin not-needed-${name}`);
log(` And comment PR: This will deprecate \`@types/${name}\` in favor of just \`${name}\`. CC ${contributorUrls}`);
if (semver.gt(`${major}.${minor}.0`, firstTypedVersion)) {
if (semver.gte(`${major}.${minor}.0`, firstTypedVersion)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make the condition slightly more correct, same as

semver.gt(unneeded.version, latestTypings),
and
if (semver.lte(notNeeded, latest)) {
.

jablko added a commit to jablko/DefinitelyTyped that referenced this pull request May 4, 2022
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.

None yet

1 participant