jogboms/time.dart

Please increment the package major version for breaking changes

natebosch opened this issue · 1 comments

In #8 there was a breaking change. In 0300e03 it was documented as a breaking change with a feature version bump.

See https://dart.dev/tools/pub/versioning#semantic-versions and https://semver.org/ for info on semantic versioning. By incrementing the major version to 2.0.0, downstream consumers of your package can avoid getting broken by changes like this.

It can be smoother to also have a migration period where things are not broken, but you can update to the new name in advance. In this case the getter could have been forwarded with a new name and the old one marked @deprecated.

  /// Adds the Duration to the current DateTime and returns a DateTime in the future
  DateTime get fromNow => DateTime.now() + this;

  @Deprecated('Use fromNow instead. Will be removed in 2.0.0')
  DateTime get later => fromNow;

It would be a good idea to add back this definition of later and publish as version 1.1.1 - a bug fix release to undo the breaking change.

Thanks @natebosch

Still don't know how this skipped my mind. It would be smother from here on out. Scout's honour!