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

Merge package:pub_semver #1260

Merged
merged 123 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
340c972
Initial commit!
munificent Sep 25, 2014
56cc24e
Harvest from pub. Mostly a straight copy, except:
munificent Sep 26, 2014
5dd3864
Add Version.nextBreaking and "^" operator
seaneagan Oct 23, 2014
81b8e22
Add VersionConstraint.compatibleWith constructor
seaneagan Oct 23, 2014
9a49be9
Remove trailing whitespace
seaneagan Oct 23, 2014
95d0a3c
compatibleWith(): implement toString() and use to parse ^
seaneagan Oct 28, 2014
a23657d
parse 'any' as VersionConstraint.any
seaneagan Oct 28, 2014
97b3ab2
Move matchCompatibleWith() out of while loop
seaneagan Oct 28, 2014
02f1b5b
Don't use regex to parse ^
seaneagan Oct 28, 2014
b541708
Don't special case 0.0.x for ^
seaneagan Oct 28, 2014
0a91933
Update the pubspec and changelog.
nex3 Oct 29, 2014
774f03d
Merge branch 'caret_operator'
nex3 Oct 29, 2014
3fa75ba
Add VersionRange.hashCode.
nex3 Oct 29, 2014
a2de959
Fix Typo in Version
azenla Dec 24, 2014
a2565ea
Bump version to 1.1.1-dev
azenla Dec 31, 2014
7deb180
Merge pull request dart-lang/pub_semver#5 from kaendfinger/fix-t
munificent Dec 31, 2014
a9328a6
remove analyzer warnings
kevmoo Apr 28, 2015
37e5770
Use the new test runner.
nex3 May 5, 2015
92e6f47
Add more set-like version constraint operations.
nex3 May 6, 2015
45c6965
Mention that Version implements VersionConstraint in the changelog.
nex3 May 6, 2015
d56ecf2
Change the pre-release range semantics.
nex3 May 20, 2015
f57d158
Update the pubspec for 1.2.1.
nex3 May 21, 2015
5cedf8e
fix param types on methods in _EmptyVersion
devoncarew Sep 20, 2015
3387a8e
Merge pull request dart-lang/pub_semver#9 from dart-lang/param_type
nex3 Sep 21, 2015
245e70c
Fix three strong mode analysis issues.
devoncarew Oct 30, 2015
1507367
Get rid of all the library tags.
nex3 Jan 13, 2016
cc6ce78
Fix all strong mode warnings.
nex3 Apr 1, 2016
351e57c
Make the VersionUnion class public.
nex3 Jun 2, 2016
7038acc
Make VersionRange implement Comparable.
nex3 Jun 6, 2016
bf1cbd9
Add VersionConstraint.difference().
nex3 Jun 8, 2016
049f312
Use the test runner on the test bots for this package
whesse Jul 7, 2016
a9d721a
Fix a new strong mode error. (dart-lang/pub_semver#13)
nex3 Nov 16, 2016
a0429ed
Fix a checked mode bug. (dart-lang/pub_semver#14)
nex3 Nov 21, 2016
11c2f1c
Fix strong mode error in test (dart-lang/pub_semver#15)
srawlins Jan 26, 2017
c8859a5
Add Travis CI support
kevmoo Aug 30, 2017
24ee102
Rename analysis_options
kevmoo Aug 30, 2017
9a0299e
Sort directives
kevmoo Aug 30, 2017
3779e27
dartfmt
kevmoo Aug 30, 2017
9db2586
Fix a crashing bug (dart-lang/pub_semver#19)
nex3 Mar 30, 2018
7186e3f
Implement strictlyHigher() in terms of strictlyLower()
nex3 Apr 3, 2018
4f7ae41
Implement VersionRange.allowsAll() in terms of allowsLower/Higher()
nex3 Apr 3, 2018
087550f
Fix a pre-release-exclusion bug
nex3 Apr 3, 2018
b93f645
Merge pull request dart-lang/pub_semver#21 from dart-lang/fix-pre-rel…
nex3 Apr 3, 2018
a4536c2
Release 1.3.4 (dart-lang/pub_semver#22)
nex3 Apr 3, 2018
fcf5ca8
Fix another pre-release version bug (dart-lang/pub_semver#24)
nex3 Apr 5, 2018
93ec025
Fix a bug where we'd parse pre-release constraints as empty (dart-lan…
nex3 Apr 10, 2018
9612e2c
Fix more pre-release constraint bugs (dart-lang/pub_semver#26)
nex3 Apr 13, 2018
1595c81
Remove an unused import (dart-lang/pub_semver#27)
nex3 Apr 23, 2018
5ae16b9
Handle pre-release semantics by adjusting the max version of ranges (…
nex3 May 2, 2018
ab3e3dd
Fix a bug with build identifiers (dart-lang/pub_semver#29)
nex3 May 2, 2018
98f3200
Increase the pubspec version (dart-lang/pub_semver#30)
nex3 May 2, 2018
27c6f12
Update .gitignore to new `dart_tool` pub cache (dart-lang/pub_semver#31)
bcko May 24, 2018
7340a95
chore: set max SDK version to <3.0.0 (dart-lang/pub_semver#32)
chalin Jul 19, 2018
1585cde
Don't test under 1.21.1 (dart-lang/pub_semver#33)
chalin Jul 25, 2018
7d1503a
Enable and fix a number of lints, test on oldest supported SDK (dart-…
kevmoo May 6, 2019
547690e
Reference https://semver.org/spec/v2.0.0-rc.1.html
jonasfj Jul 22, 2019
287c8d9
Merge pull request dart-lang/pub_semver#38 from jonasfj/reference-sem…
munificent Jul 23, 2019
a51b526
Delete codereview.settings
kevmoo Aug 1, 2019
fe4d2e4
Fix new pedantic lints, disallow implicit casts (dart-lang/pub_semver…
kevmoo Dec 19, 2019
ace073c
Replace use of int.parse with int.tryParse (dart-lang/pub_semver#43)
shyndman Feb 6, 2020
1c3193e
pubspec: remove author, update homepage URL
kevmoo Feb 11, 2020
c3c9fdd
Add example, prepare for 1.4.3 ship
kevmoo Feb 11, 2020
4af6bbb
Fix union of version ranges
sigurdm Mar 13, 2020
3449b07
Bump version
sigurdm Mar 16, 2020
8dc9489
Merge pull request dart-lang/pub_semver#45 from sigurdm/fix_version_r…
sigurdm Mar 16, 2020
76343bf
Remove lints duplicated by pkg:pedantic
kevmoo Mar 16, 2020
cbb00b9
Delete .test_config
kevmoo Jul 29, 2020
5d1d313
Add tests and improve docs for Version.primary (dart-lang/pub_semver#47)
kevmoo Jul 30, 2020
e2b4a8c
Migrate to null safety (dart-lang/pub_semver#52)
kevmoo Nov 20, 2020
0adf2fb
Migrate GitHub Actions (dart-lang/pub_semver#53)
athomas Jan 28, 2021
2d3b5e2
stable null safety release (dart-lang/pub_semver#54)
jakemac53 Feb 5, 2021
93dc303
Update LICENSE (dart-lang/pub_semver#55)
franklinyow Mar 31, 2021
b885a1e
Fix newly enforced lint (dart-lang/pub_semver#57)
kevmoo Apr 27, 2021
19d8ed4
Update CI (dart-lang/pub_semver#58)
kevmoo Apr 27, 2021
c27d9ed
Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE (dart-lang/pub_…
scheglov Sep 3, 2021
96dee58
Annotate `Version` with `@sealed`. (dart-lang/pub_semver#49)
jonasfj Sep 10, 2021
1637105
Add `Version.canonicalizedVersion` to help scrub leading zeros. (dart…
jonasfj Sep 10, 2021
de5de03
Move to pkg:lints, small tweak to dependency constraints in pubspec (…
kevmoo Oct 3, 2021
3856eb9
Fix RegExp for version pattern (dart-lang/pub_semver#63)
gspencergoog Nov 10, 2021
d3190c6
Update pubspec.yaml (dart-lang/pub_semver#64)
devoncarew Mar 1, 2022
719d6ab
Update README.md (dart-lang/pub_semver#65)
devoncarew Mar 8, 2022
6eab75d
Drop invariant_booleans (dart-lang/pub_semver#67)
kevmoo Aug 1, 2022
b2f885f
update the CI; update readme (dart-lang/pub_semver#69)
devoncarew Oct 4, 2022
3e69e5a
Bump actions/checkout from 3.0.2 to 3.1.0 (dart-lang/pub_semver#70)
dependabot[bot] Oct 4, 2022
30eceda
Refactor away from deprecated error (dart-lang/pub_semver#72)
mit-mit Oct 6, 2022
d3770d8
prep for publishing (dart-lang/pub_semver#73)
devoncarew Oct 14, 2022
e994957
update and fix lints, bump min SDK (dart-lang/pub_semver#74)
kevmoo Nov 7, 2022
9c7bb20
rev to 2.1.3 in preparation for release (dart-lang/pub_semver#75)
devoncarew Nov 12, 2022
e642079
Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/pub_semver#76)
dependabot[bot] Jan 3, 2023
8e570ca
Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/pub_semver#79)
dependabot[bot] Feb 1, 2023
1fd7a31
Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/pub_semver#78)
dependabot[bot] Feb 1, 2023
10e2a10
Fix new type error, use dart_flutter_team_lints (dart-lang/pub_semver…
kevmoo Feb 13, 2023
6c18c52
Update CHANGELOG.md (dart-lang/pub_semver#81)
devoncarew Feb 13, 2023
e658a40
Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/pub_semver#83)
dependabot[bot] Apr 3, 2023
b6822a1
Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/pub_semver#82)
dependabot[bot] Apr 3, 2023
269838e
Prepare release with topics (dart-lang/pub_semver#86)
jonasfj May 4, 2023
dde204e
Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/pub_semver#85)
dependabot[bot] May 8, 2023
c88be35
blast_repo fixes (dart-lang/pub_semver#87)
devoncarew May 22, 2023
6257e94
Bump lints, require Dart 3.0 (dart-lang/pub_semver#89)
kevmoo May 31, 2023
b2fcb7e
Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/pub_semver#90)
dependabot[bot] Jul 1, 2023
ac53d45
Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/pub_semver#91)
dependabot[bot] Sep 1, 2023
fd5db62
Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/pub_semver#92)
dependabot[bot] Oct 1, 2023
10ed16c
Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/pub_semver#93)
dependabot[bot] Oct 2, 2023
393f663
Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/pub_semver#94)
dependabot[bot] Nov 1, 2023
edc6bb3
Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/pub_semver#95)
dependabot[bot] Nov 1, 2023
6a6f22d
drop outdated lints (dart-lang/pub_semver#96)
kevmoo Dec 4, 2023
7dd0625
Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/pub_semver#98)
dependabot[bot] Feb 1, 2024
c935922
Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/pub_semver#99)
dependabot[bot] Apr 1, 2024
024cb7f
Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/pub_semver#100)
dependabot[bot] May 1, 2024
08beee0
Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/pub_semver#101)
dependabot[bot] May 1, 2024
926b830
blast_repo fixes (dart-lang/pub_semver#102)
devoncarew May 9, 2024
fcd421b
Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group…
dependabot[bot] May 9, 2024
b79ef03
Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group…
dependabot[bot] Jun 1, 2024
2655d2a
bump lints and SDK dep, test wasm (dart-lang/pub_semver#105)
kevmoo Jun 20, 2024
e10cad5
Bump the github-actions group with 2 updates (dart-lang/pub_semver#106)
dependabot[bot] Jul 1, 2024
dd0c084
Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group…
dependabot[bot] Oct 1, 2024
f49575e
blast_repo fixes (dart-lang/pub_semver#108)
kevmoo Oct 29, 2024
170c76f
Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group…
dependabot[bot] Nov 1, 2024
7cb7ee0
Bump dart-lang/setup-dart in the github-actions group (dart-lang/pub_…
dependabot[bot] Dec 1, 2024
8e698ea
Merge package:pub_semver into the tools monorepo
mosuem Dec 10, 2024
6536814
Add issue template and other fixes
mosuem Dec 10, 2024
5a6d593
merge fixes
mosuem Dec 10, 2024
8934289
Merge branch 'main' into merge-pub_semver-package
mosuem Dec 11, 2024
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
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/pub_semver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:pub_semver"
about: "Create a bug or file a feature request against package:pub_semver."
labels: "package:pub_semver"
---
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
- changed-files:
- any-glob-to-any-file: 'pkgs/pool/**'

'package:pub_semver':
- changed-files:
- any-glob-to-any-file: 'pkgs/pub_semver/**'

'package:source_map_stack_trace':
- changed-files:
- any-glob-to-any-file: 'pkgs/source_map_stack_trace/**'
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/pub_semver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: package:pub_semver

on:
# Run on PRs and pushes to the default branch.
push:
branches: [ main ]
paths:
- '.github/workflows/pub_semver.yaml'
- 'pkgs/pub_semver/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/pub_semver.yaml'
- 'pkgs/pub_semver/**'
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github


defaults:
run:
working-directory: pkgs/pub_semver/

jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'

# Run tests on a matrix consisting of two dimensions:
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
# 2. release channel: dev
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
sdk: [3.4, dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Run VM tests
run: dart test --platform vm
if: always() && steps.install.outcome == 'success'
- name: Run Chrome tests
run: dart test --platform chrome --compiler dart2js,dart2wasm
if: always() && steps.install.outcome == 'success'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ don't naturally belong to other topic monorepos (like
| [oauth2](pkgs/oauth2/) | A client library for authenticating with a remote service via OAuth2 on behalf of a user, and making authorized HTTP requests with the user's OAuth2 credentials. | [![package issues](https://img.shields.io/badge/package:oauth2-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aoauth2) | [![pub package](https://img.shields.io/pub/v/oauth2.svg)](https://pub.dev/packages/oauth2) |
| [package_config](pkgs/package_config/) | Support for reading and writing Dart Package Configuration files. | [![package issues](https://img.shields.io/badge/package:package_config-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Apackage_config) | [![pub package](https://img.shields.io/pub/v/package_config.svg)](https://pub.dev/packages/package_config) |
| [pool](pkgs/pool/) | Manage a finite pool of resources. Useful for controlling concurrent file system or network requests. | [![package issues](https://img.shields.io/badge/package:pool-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Apool) | [![pub package](https://img.shields.io/pub/v/pool.svg)](https://pub.dev/packages/pool) |
| [pub_semver](pkgs/pub_semver/) | Versions and version constraints implementing pub's versioning policy. This is very similar to vanilla semver, with a few corner cases. | [![package issues](https://img.shields.io/badge/package:pub_semver-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Apub_semver) | [![pub package](https://img.shields.io/pub/v/pub_semver.svg)](https://pub.dev/packages/pub_semver) |
| [source_map_stack_trace](pkgs/source_map_stack_trace/) | A package for applying source maps to stack traces. | [![package issues](https://img.shields.io/badge/package:source_map_stack_trace-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_map_stack_trace) | [![pub package](https://img.shields.io/pub/v/source_map_stack_trace.svg)](https://pub.dev/packages/source_map_stack_trace) |
| [unified_analytics](pkgs/unified_analytics/) | A package for logging analytics for all Dart and Flutter related tooling to Google Analytics. | [![package issues](https://img.shields.io/badge/package:unified_analytics-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics) | [![pub package](https://img.shields.io/pub/v/unified_analytics.svg)](https://pub.dev/packages/unified_analytics) |

Expand Down
3 changes: 3 additions & 0 deletions pkgs/pub_semver/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.dart_tool/
.packages
pubspec.lock
177 changes: 177 additions & 0 deletions pkgs/pub_semver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
## 2.1.5

- Require Dart `3.4.0`.
- Move to `dart-lang/tools` monorepo.

## 2.1.4

- Added topics to `pubspec.yaml`.

## 2.1.3

- Add type parameters to the signatures of the `Version.preRelease` and
`Version.build` fields (`List` ==> `List<Object>`).
[#74](https://github.com/dart-lang/pub_semver/pull/74).
- Require Dart 2.17.

## 2.1.2

- Add markdown badges to the readme.

## 2.1.1

- Fixed the version parsing pattern to only accept dots between version
components.

## 2.1.0

- Added `Version.canonicalizedVersion` to help scrub leading zeros and highlight
that `Version.toString()` preserves leading zeros.
- Annotated `Version` with `@sealed` to discourage users from implementing the
interface.

## 2.0.0

- Stable null safety release.
- `Version.primary` now throws `StateError` if the `versions` argument is empty.

## 1.4.4

- Fix a bug of `VersionRange.union` where ranges bounded at infinity would get
combined wrongly.

# 1.4.3

- Update Dart SDK constraint to `>=2.0.0 <3.0.0`.
- Update `package:collection` constraint to `^1.0.0`.

## 1.4.2

* Set max SDK version to `<3.0.0`.

## 1.4.1

* Fix a bug where there upper bound of a version range with a build identifier
could accidentally be rewritten.

## 1.4.0

* Add a `Version.firstPreRelease` getter that returns the first possible
pre-release of a version.

* Add a `Version.isFirstPreRelease` getter that returns whether a version is the
first possible pre-release.

* `new VersionRange()` with an exclusive maximum now replaces the maximum with
its first pre-release version. This matches the existing semantics, where an
exclusive maximum would exclude pre-release versions of that maximum.

Explicitly representing this by changing the maximum version ensures that all
operations behave correctly with respect to the special pre-release semantics.
In particular, it fixes bugs where, for example,
`(>=1.0.0 <2.0.0-dev).union(>=2.0.0-dev <2.0.0)` and
`(>=1.0.0 <3.0.0).difference(^1.0.0)` wouldn't include `2.0.0-dev`.

* Add an `alwaysIncludeMaxPreRelease` parameter to `new VersionRange()`, which
disables the replacement described above and allows users to create ranges
that do include the pre-release versions of an exclusive max version.

## 1.3.7

* Fix more bugs with `VersionRange.intersect()`, `VersionRange.difference()`,
and `VersionRange.union()` involving version ranges with pre-release maximums.

## 1.3.6

* Fix a bug where constraints that only allowed pre-release versions would be
parsed as empty constraints.

## 1.3.5

* Fix a bug where `VersionRange.intersect()` would return incorrect results for
pre-release versions with the same base version number as release versions.

## 1.3.4

* Fix a bug where `VersionRange.allowsAll()`, `VersionRange.allowsAny()`, and
`VersionRange.difference()` would return incorrect results for pre-release
versions with the same base version number as release versions.

## 1.3.3

* Fix a bug where `VersionRange.difference()` with a union constraint that
covered the entire range would crash.

## 1.3.2

* Fix a checked-mode error in `VersionRange.difference()`.

## 1.3.1

* Fix a new strong mode error.

## 1.3.0

* Make the `VersionUnion` class public. This was previously used internally to
implement `new VersionConstraint.unionOf()` and `VersionConstraint.union()`.
Now it's public so you can use it too.

* Added `VersionConstraint.difference()`. This returns a constraint matching all
versions matched by one constraint but not another.

* Make `VersionRange` implement `Comparable<VersionRange>`. Ranges are ordered
first by lower bound, then by upper bound.

## 1.2.4

* Fix all remaining strong mode warnings.

## 1.2.3

* Addressed three strong mode warnings.

## 1.2.2

* Make the package analyze under strong mode and compile with the DDC (Dart Dev
Compiler). Fix two issues with a private subclass of `VersionConstraint`
having different types for overridden methods.

## 1.2.1

* Allow version ranges like `>=1.2.3-dev.1 <1.2.3` to match pre-release versions
of `1.2.3`. Previously, these didn't match, since the pre-release versions had
the same major, minor, and patch numbers as the max; now an exception has been
added if they also have the same major, minor, and patch numbers as the min
*and* the min is also a pre-release version.

## 1.2.0

* Add a `VersionConstraint.union()` method and a `new
VersionConstraint.unionOf()` constructor. These each return a constraint that
matches multiple existing constraints.

* Add a `VersionConstraint.allowsAll()` method, which returns whether one
constraint is a superset of another.

* Add a `VersionConstraint.allowsAny()` method, which returns whether one
constraint overlaps another.

* `Version` now implements `VersionRange`.

## 1.1.0

* Add support for the `^` operator for compatible versions according to pub's
notion of compatibility. `^1.2.3` is equivalent to `>=1.2.3 <2.0.0`; `^0.1.2`
is equivalent to `>=0.1.2 <0.2.0`.

* Add `Version.nextBreaking`, which returns the next version that introduces
breaking changes after a given version.

* Add `new VersionConstraint.compatibleWith()`, which returns a range covering
all versions compatible with a given version.

* Add a custom `VersionRange.hashCode` to make it properly hashable.

## 1.0.0

* Initial release.
27 changes: 27 additions & 0 deletions pkgs/pub_semver/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright 2014, the Dart project authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading
Loading