Skip to content

Conversation

tommy-mitchell
Copy link
Collaborator

@tommy-mitchell tommy-mitchell commented Apr 5, 2023

Closes #88. Currently just a scaffold for a new prerequisite task. Related: sindresorhus/read-pkg#28

Some questions:

  • What happens if the old version defined a Node version, but the new one doesn't?
  • The error message is currently The Node version has increased, but this release is not a major version., but that's not the best. Any ideas for improvements?

Related to the first question, it just struck me - what happens with #681 on the first release? I don't think I took that case into account.

@sindresorhus
Copy link
Owner

What happens if the old version defined a Node version, but the new one doesn't?

We just ignore it. That's an extreme edge-case anyway.

The error message is currently The Node version has increased, but this release is not a major version., but that's not the best. Any ideas for improvements?

"Targeting a major Node.js version is a breaking change and requires a major version bump"?

what happens with #681 on the first release? I don't think I took that case into account.

It shouldn't do anything if there are no previous version to compare to.

},
},
{
title: 'Check for Node version bump',
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
title: 'Check for Node version bump',
title: 'Check for Node.js version bump',

@tommy-mitchell
Copy link
Collaborator Author

It shouldn't do anything if there are no previous version to compare to.

I agree, I meant more “what does the code do since it doesn’t check for that case”.

"Targeting a major Node.js version is a breaking change and requires a major version bump"?

Are we only erroring on major Node changes, or any change? And for the target field in tsconfig.json mentioned in the issue, should increasing that be an error without a major version?

@sindresorhus
Copy link
Owner

Are we only erroring on major Node changes, or any change?

Any change. Any change to the target Node.js version is a potentially breaking change.

@tommy-mitchell tommy-mitchell changed the title Ensure that Node version bumps are done in major releases Ensure that Node.js version bumps are done in major releases Apr 9, 2023
@sindresorhus
Copy link
Owner

Bump :)

@tommy-mitchell
Copy link
Collaborator Author

I’m waiting until #689 is finished before completing this, as it has a better test suite. I’m close to being done with it.

@sindresorhus
Copy link
Owner

Bump :)

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.

Prevent accidentally dropping support for older Node.js versions in a non-major version bump

2 participants