Skip to content

Commit

Permalink
[pub_semver] Remove dependency on package:meta (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Mar 7, 2025
1 parent 04667d7 commit d67cd00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion pkgs/pub_semver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 2.1.6
## 2.2.0

- Remove dependency on `package:meta`.
- Mark `Version` class as `final` instead of with `@sealed`.
- Clarify that the lists returned by
the `preRelease` and `build` properties of `Version` and
the `ranges` property of `VersionUnion` should not be modified.
Expand Down
4 changes: 1 addition & 3 deletions pkgs/pub_semver/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import 'dart:math' as math;

import 'package:collection/collection.dart';
import 'package:meta/meta.dart' show sealed;

import 'patterns.dart';
import 'version_constraint.dart';
Expand All @@ -15,8 +14,7 @@ import 'version_range.dart';
const _equality = IterableEquality<Object>();

/// A parsed semantic version number.
@sealed
class Version implements VersionConstraint, VersionRange {
final class Version implements VersionConstraint, VersionRange {
/// No released version: i.e. "0.0.0".
static Version get none => Version(0, 0, 0);

Expand Down
3 changes: 1 addition & 2 deletions pkgs/pub_semver/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pub_semver
version: 2.1.6
version: 2.2.0
description: >-
Versions and version constraints implementing pub's versioning policy. This
is very similar to vanilla semver, with a few corner cases.
Expand All @@ -15,7 +15,6 @@ environment:

dependencies:
collection: ^1.15.0
meta: ^1.3.0

dev_dependencies:
dart_flutter_team_lints: ^3.0.0
Expand Down

0 comments on commit d67cd00

Please sign in to comment.