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

Set RangeError.start and .end for color range checks #1215

Merged
merged 1 commit into from
Jan 27, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.32.6

### Dart API

* All range checks for `SassColor` constructors now throw `RangeError`s with
`start` and `end` set.

## 1.32.5

* **Potentially breaking bug fix:** When using `@for` with numbers that have
Expand Down
3 changes: 2 additions & 1 deletion lib/src/util/number.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ num fuzzyCheckRange(num number, num min, num max) {
num fuzzyAssertRange(num number, num min, num max, [String name]) {
var result = fuzzyCheckRange(number, min, max);
if (result != null) return result;
throw RangeError.value(number, name, "must be between $min and $max.");
throw RangeError.range(
number, min, max, name, "must be between $min and $max");
nex3 marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.32.5
version: 1.32.6-dev
description: A Sass implementation in Dart.
author: Sass Team
homepage: https://github.com/sass/dart-sass
Expand Down