|
| 1 | +## 1.10.1 |
| 2 | + |
| 3 | +* Require Dart 3.1 |
| 4 | +* Move to `dart-lang/tools` monorepo. |
| 5 | + |
| 6 | +## 1.10.0 |
| 7 | + |
| 8 | +* Add a `SourceFile.codeUnits` property. |
| 9 | +* Require Dart 2.18 |
| 10 | +* Add an API usage example in `example/`. |
| 11 | + |
| 12 | +## 1.9.1 |
| 13 | + |
| 14 | +* Properly handle multi-line labels for multi-span highlights. |
| 15 | + |
| 16 | +* Populate the pubspec `repository` field. |
| 17 | + |
| 18 | +## 1.9.0 |
| 19 | + |
| 20 | +* Add `SourceSpanWithContextExtension.subspan` that returns a |
| 21 | + `SourceSpanWithContext` rather than a plain `SourceSpan`. |
| 22 | + |
| 23 | +## 1.8.2 |
| 24 | + |
| 25 | +* Fix a bug where highlighting multiple spans with `null` URLs could cause an |
| 26 | + assertion error. Now when multiple spans are passed with `null` URLs, they're |
| 27 | + highlighted as though they all come from different source files. |
| 28 | + |
| 29 | +## 1.8.1 |
| 30 | + |
| 31 | +* Fix a bug where the URL header for the highlights with multiple files would |
| 32 | + get omitted only one span has a non-null URI. |
| 33 | + |
| 34 | +## 1.8.0 |
| 35 | + |
| 36 | +* Stable release for null safety. |
| 37 | + |
| 38 | +## 1.7.0 |
| 39 | + |
| 40 | +* Add a `SourceSpan.subspan()` extension method which returns a slice of an |
| 41 | + existing source span. |
| 42 | + |
| 43 | +## 1.6.0 |
| 44 | + |
| 45 | +* Add support for highlighting multiple source spans at once, providing more |
| 46 | + context for span-based messages. This is exposed through the new APIs |
| 47 | + `SourceSpan.highlightMultiple()` and `SourceSpan.messageMultiple()` (both |
| 48 | + extension methods), `MultiSourceSpanException`, and |
| 49 | + `MultiSourceSpanFormatException`. |
| 50 | + |
| 51 | +## 1.5.6 |
| 52 | + |
| 53 | +* Fix padding around line numbers that are powers of 10 in |
| 54 | + `FileSpan.highlight()`. |
| 55 | + |
| 56 | +## 1.5.5 |
| 57 | + |
| 58 | +* Fix a bug where `FileSpan.highlight()` would crash for spans that covered a |
| 59 | + trailing newline and a single additional empty line. |
| 60 | + |
| 61 | +## 1.5.4 |
| 62 | + |
| 63 | +* `FileSpan.highlight()` now properly highlights point spans at the beginning of |
| 64 | + lines. |
| 65 | + |
| 66 | +## 1.5.3 |
| 67 | + |
| 68 | +* Fix an edge case where `FileSpan.highlight()` would put the highlight |
| 69 | + indicator in the wrong position when highlighting a point span after the end |
| 70 | + of a file. |
| 71 | + |
| 72 | +## 1.5.2 |
| 73 | + |
| 74 | +* `SourceFile.span()` now goes to the end of the file by default, rather than |
| 75 | + ending one character before the end of the file. This matches the documented |
| 76 | + behavior. |
| 77 | + |
| 78 | +* `FileSpan.context` now includes the full line on which the span appears for |
| 79 | + empty spans at the beginning and end of lines. |
| 80 | + |
| 81 | +* Fix an edge case where `FileSpan.highlight()` could crash when highlighting a |
| 82 | + span that ended with an empty line. |
| 83 | + |
| 84 | +## 1.5.1 |
| 85 | + |
| 86 | +* Produce better source span highlights for multi-line spans that cover the |
| 87 | + entire last line of the span, including the newline. |
| 88 | + |
| 89 | +* Produce better source span highlights for spans that contain Windows-style |
| 90 | + newlines. |
| 91 | + |
| 92 | +## 1.5.0 |
| 93 | + |
| 94 | +* Improve the output of `SourceSpan.highlight()` and `SourceSpan.message()`: |
| 95 | + |
| 96 | + * They now include line numbers. |
| 97 | + * They will now print every line of a multiline span. |
| 98 | + * They will now use Unicode box-drawing characters by default (this can be |
| 99 | + controlled using [`term_glyph.ascii`][]). |
| 100 | + |
| 101 | +[`term_glyph.ascii`]: https://pub.dartlang.org/documentation/term_glyph/latest/term_glyph/ascii.html |
| 102 | + |
| 103 | +## 1.4.1 |
| 104 | + |
| 105 | +* Set max SDK version to `<3.0.0`, and adjust other dependencies. |
| 106 | + |
| 107 | +## 1.4.0 |
| 108 | + |
| 109 | +* The `new SourceFile()` constructor is deprecated. This constructed a source |
| 110 | + file from a string's runes, rather than its code units, which runs counter to |
| 111 | + the way Dart handles strings otherwise. The `new StringFile.fromString()` |
| 112 | + constructor (see below) should be used instead. |
| 113 | + |
| 114 | +* The `new SourceFile.fromString()` constructor was added. This works like `new |
| 115 | + SourceFile()`, except it uses code units rather than runes. |
| 116 | + |
| 117 | +* The current behavior when characters larger than `0xFFFF` are passed to `new |
| 118 | + SourceFile.decoded()` is now considered deprecated. |
| 119 | + |
| 120 | +## 1.3.1 |
| 121 | + |
| 122 | +* Properly highlight spans for lines that include tabs with |
| 123 | + `SourceSpan.highlight()` and `SourceSpan.message()`. |
| 124 | + |
| 125 | +## 1.3.0 |
| 126 | + |
| 127 | +* Add `SourceSpan.highlight()`, which returns just the highlighted text that |
| 128 | + would be included in `SourceSpan.message()`. |
| 129 | + |
| 130 | +## 1.2.4 |
| 131 | + |
| 132 | +* Fix a new strong mode error. |
| 133 | + |
| 134 | +## 1.2.3 |
| 135 | + |
| 136 | +* Fix a bug where a point span at the end of a file without a trailing newline |
| 137 | + would be printed incorrectly. |
| 138 | + |
| 139 | +## 1.2.2 |
| 140 | + |
| 141 | +* Allow `SourceSpanException.message`, `SourceSpanFormatException.source`, and |
| 142 | + `SourceSpanWithContext.context` to be overridden in strong mode. |
| 143 | + |
| 144 | +## 1.2.1 |
| 145 | + |
| 146 | +* Fix the declared type of `FileSpan.start` and `FileSpan.end`. In 1.2.0 these |
| 147 | + were mistakenly changed from `FileLocation` to `SourceLocation`. |
| 148 | + |
| 149 | +## 1.2.0 |
| 150 | + |
| 151 | +* **Deprecated:** Extending `SourceLocation` directly is deprecated. Instead, |
| 152 | + extend the new `SourceLocationBase` class or mix in the new |
| 153 | + `SourceLocationMixin` mixin. |
| 154 | + |
| 155 | +* Dramatically improve the performance of `FileLocation`. |
| 156 | + |
| 157 | +## 1.1.6 |
| 158 | + |
| 159 | +* Optimize `getLine()` in `SourceFile` when repeatedly called. |
| 160 | + |
| 161 | +## 1.1.5 |
| 162 | + |
| 163 | +* Fixed another case in which `FileSpan.union` could throw an exception for |
| 164 | + external implementations of `FileSpan`. |
| 165 | + |
| 166 | +## 1.1.4 |
| 167 | + |
| 168 | +* Eliminated dart2js warning about overriding `==`, but not `hashCode`. |
| 169 | + |
| 170 | +## 1.1.3 |
| 171 | + |
| 172 | +* `FileSpan.compareTo`, `FileSpan.==`, `FileSpan.union`, and `FileSpan.expand` |
| 173 | + no longer throw exceptions for external implementations of `FileSpan`. |
| 174 | + |
| 175 | +* `FileSpan.hashCode` now fully agrees with `FileSpan.==`. |
| 176 | + |
| 177 | +## 1.1.2 |
| 178 | + |
| 179 | +* Fixed validation in `SourceSpanWithContext` to allow multiple occurrences of |
| 180 | + `text` within `context`. |
| 181 | + |
| 182 | +## 1.1.1 |
| 183 | + |
| 184 | +* Fixed `FileSpan`'s context to include the full span text, not just the first |
| 185 | + line of it. |
| 186 | + |
| 187 | +## 1.1.0 |
| 188 | + |
| 189 | +* Added `SourceSpanWithContext`: a span that also includes the full line of text |
| 190 | + that contains the span. |
| 191 | + |
| 192 | +## 1.0.3 |
| 193 | + |
| 194 | +* Cleanup equality operator to accept any Object rather than just a |
| 195 | + `SourceLocation`. |
| 196 | + |
| 197 | +## 1.0.2 |
| 198 | + |
| 199 | +* Avoid unintentionally allocating extra objects for internal `FileSpan` |
| 200 | + operations. |
| 201 | + |
| 202 | +* Ensure that `SourceSpan.operator==` works on arbitrary `Object`s. |
| 203 | + |
| 204 | +## 1.0.1 |
| 205 | + |
| 206 | +* Use a more compact internal representation for `FileSpan`. |
| 207 | + |
| 208 | +## 1.0.0 |
| 209 | + |
| 210 | +This package was extracted from the |
| 211 | +[`source_maps`](https://pub.dev/packages/source_maps) package, but the |
| 212 | +API has many differences. Among them: |
| 213 | + |
| 214 | +* `Span` has been renamed to `SourceSpan` and `Location` has been renamed to |
| 215 | + `SourceLocation` to clarify their purpose and maintain consistency with the |
| 216 | + package name. Likewise, `SpanException` is now `SourceSpanException` and |
| 217 | + `SpanFormatException` is not `SourceSpanFormatException`. |
| 218 | + |
| 219 | +* `FixedSpan` and `FixedLocation` have been rolled into the `Span` and |
| 220 | + `Location` classes, respectively. |
| 221 | + |
| 222 | +* `SourceFile` is more aggressive about validating its arguments. Out-of-bounds |
| 223 | + lines, columns, and offsets will now throw errors rather than be silently |
| 224 | + clamped. |
| 225 | + |
| 226 | +* `SourceSpan.sourceUrl`, `SourceLocation.sourceUrl`, and `SourceFile.url` now |
| 227 | + return `Uri` objects rather than `String`s. The constructors allow either |
| 228 | + `String`s or `Uri`s. |
| 229 | + |
| 230 | +* `Span.getLocationMessage` and `SourceFile.getLocationMessage` are now |
| 231 | + `SourceSpan.message` and `SourceFile.message`, respectively. Rather than |
| 232 | + taking both a `useColor` and a `color` parameter, they now take a single |
| 233 | + `color` parameter that controls both whether and which color is used. |
| 234 | + |
| 235 | +* `Span.isIdentifier` has been removed. This property doesn't make sense outside |
| 236 | + of a source map context. |
| 237 | + |
| 238 | +* `SourceFileSegment` has been removed. This class wasn't widely used and was |
| 239 | + inconsistent in its choice of which parameters were considered relative and |
| 240 | + which absolute. |
0 commit comments