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

[pub_semver] Remove dependency on package:meta #2021

Merged
merged 2 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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