From 4df2eb1aae2bff2114e2403ab7850f512e279152 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 4 Jan 2017 14:47:49 -0800 Subject: [PATCH 01/61] Template files. --- pkgs/term_glyph/.gitignore | 9 +++++++++ pkgs/term_glyph/AUTHORS | 6 ++++++ pkgs/term_glyph/CHANGELOG.md | 3 +++ pkgs/term_glyph/CONTRIBUTING.md | 33 +++++++++++++++++++++++++++++++++ pkgs/term_glyph/LICENSE | 26 ++++++++++++++++++++++++++ pkgs/term_glyph/README.md | 3 +++ pkgs/term_glyph/pubspec.yaml | 8 ++++++++ 7 files changed, 88 insertions(+) create mode 100644 pkgs/term_glyph/.gitignore create mode 100644 pkgs/term_glyph/AUTHORS create mode 100644 pkgs/term_glyph/CHANGELOG.md create mode 100644 pkgs/term_glyph/CONTRIBUTING.md create mode 100644 pkgs/term_glyph/LICENSE create mode 100644 pkgs/term_glyph/README.md create mode 100644 pkgs/term_glyph/pubspec.yaml diff --git a/pkgs/term_glyph/.gitignore b/pkgs/term_glyph/.gitignore new file mode 100644 index 000000000..25a1df332 --- /dev/null +++ b/pkgs/term_glyph/.gitignore @@ -0,0 +1,9 @@ +.buildlog +.DS_Store +.idea +.pub/ +.settings/ +build/ +packages +.packages +pubspec.lock diff --git a/pkgs/term_glyph/AUTHORS b/pkgs/term_glyph/AUTHORS new file mode 100644 index 000000000..e8063a8cd --- /dev/null +++ b/pkgs/term_glyph/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md new file mode 100644 index 000000000..5b26ad30f --- /dev/null +++ b/pkgs/term_glyph/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +* Initial version. diff --git a/pkgs/term_glyph/CONTRIBUTING.md b/pkgs/term_glyph/CONTRIBUTING.md new file mode 100644 index 000000000..6f5e0ea67 --- /dev/null +++ b/pkgs/term_glyph/CONTRIBUTING.md @@ -0,0 +1,33 @@ +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. + +### File headers +All files in the project must start with the following header. + + // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + +### The small print +Contributions made by corporations are covered by a different agreement than the +one above, the +[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/term_glyph/LICENSE b/pkgs/term_glyph/LICENSE new file mode 100644 index 000000000..389ce9856 --- /dev/null +++ b/pkgs/term_glyph/LICENSE @@ -0,0 +1,26 @@ +Copyright 2017, the Dart project authors. All rights reserved. +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 Inc. 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. diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md new file mode 100644 index 000000000..44458b06b --- /dev/null +++ b/pkgs/term_glyph/README.md @@ -0,0 +1,3 @@ +This library contains getters for useful semantic symbols. Because `cmd.exe` on +Windows can't display Unicode, it also provides a mode where the symbols are +replaced with plain-ASCII equivalents. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml new file mode 100644 index 000000000..275c2bfd8 --- /dev/null +++ b/pkgs/term_glyph/pubspec.yaml @@ -0,0 +1,8 @@ +name: symbol +version: 1.0.0-dev +description: Useful symbols and Windows-safe equivalents. +author: Dart Team +homepage: https://github.com/dart-lang/symbol + +environment: + sdk: '>=1.8.0 <2.0.0' From b38ee12b1689837dd72fbf867529dae06c865e07 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 5 Jan 2017 16:31:50 -0800 Subject: [PATCH 02/61] Add the package's contents. (dart-lang/term_glyph#1) --- pkgs/term_glyph/README.md | 45 +- pkgs/term_glyph/data.csv | 85 ++++ pkgs/term_glyph/lib/src/generated.dart | 564 +++++++++++++++++++++++++ pkgs/term_glyph/lib/term_glyph.dart | 12 + pkgs/term_glyph/pubspec.yaml | 13 +- pkgs/term_glyph/test/symbol_test.dart | 41 ++ pkgs/term_glyph/tool/generate.dart | 67 +++ 7 files changed, 820 insertions(+), 7 deletions(-) create mode 100644 pkgs/term_glyph/data.csv create mode 100644 pkgs/term_glyph/lib/src/generated.dart create mode 100644 pkgs/term_glyph/lib/term_glyph.dart create mode 100644 pkgs/term_glyph/test/symbol_test.dart create mode 100644 pkgs/term_glyph/tool/generate.dart diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md index 44458b06b..5459994ad 100644 --- a/pkgs/term_glyph/README.md +++ b/pkgs/term_glyph/README.md @@ -1,3 +1,42 @@ -This library contains getters for useful semantic symbols. Because `cmd.exe` on -Windows can't display Unicode, it also provides a mode where the symbols are -replaced with plain-ASCII equivalents. +This library contains getters for useful Unicode glyphs as well as plain ASCII +alternatives. It's intended to be used in command-line applications that may run +on Windows and libraries that may be used by those applications. + +We recommend that you import this library with the prefix "glyph". For example: + +```dart +import 'package:term_glyph/term_glyph.dart' as glyph; + +/// Formats [items] into a bulleted list, with one item per line. +String bulletedList(List items) => + items.map((item) => "${glyph.bullet} $item").join("\n"); +``` + +## ASCII Mode + +The default Windows `cmd.exe` shell is unable to display Unicode characters, so +this package is able to transparently switch its glyphs to ASCII alternatives by +setting [the `ascii` attribute][ascii]. When this attribute is `true`, all +glyphs use ASCII characters instead. It currently defaults to `false`, although +in the future it may default to `true` for applications running on the Dart VM +on Windows. For example: + +[ascii]: https://www.dartdocs.org/documentation/term_glyph/latest/term_glyph/ascii.html + +```dart +import 'dart:io'; + +import 'package:term_glyph/term_glyph.dart' as glyph; + +void main() { + glyph.ascii = Platform.isWindows; + + // Prints "Unicode => ASCII" on Windows, "Unicode ━▶ ASCII" everywhere else. + print("Unicode ${glyph.rightArrow} ASCII"); +} +``` + +All ASCII glyphs are guaranteed to be the same number of characters as the +corresponding Unicode glyphs, so that they line up properly when printed on a +terminal. The specific ASCII text for a given Unicode glyph may change over +time; this is not considered a breaking change. diff --git a/pkgs/term_glyph/data.csv b/pkgs/term_glyph/data.csv new file mode 100644 index 000000000..92a72f7bc --- /dev/null +++ b/pkgs/term_glyph/data.csv @@ -0,0 +1,85 @@ +# Miscellaneous +bullet,•,*,A bullet point. + +# Arrows +leftArrow,←,<,"A left-pointing arrow. + +Note that the Unicode arrow glyphs may overlap with adjacent characters in some +terminal fonts, and should generally be surrounding by spaces." +rightArrow,→,>,"A right-pointing arrow. + +Note that the Unicode arrow glyphs may overlap with adjacent characters in some +terminal fonts, and should generally be surrounding by spaces." +upArrow,↑,^,An upwards-pointing arrow. +downArrow,↓,v,A downwards-pointing arrow. +longLeftArrow,◀━,<=,A two-character left-pointing arrow. +longRightArrow,━▶,=>,A two-character right-pointing arrow. + +# Box drawing characters + +## Normal +horizontalLine,─,-,A horizontal line that can be used to draw a box. +verticalLine,│,|,A vertical line that can be used to draw a box. +topLeftCorner,┌,",",The upper left-hand corner of a box. +topRightCorner,┐,",",The upper right-hand corner of a box. +bottomLeftCorner,└,',The lower left-hand corner of a box. +bottomRightCorner,┘,',The lower right-hand corner of a box. +cross,┼,+,An intersection of vertical and horizontal box lines. +teeUp,┴,+,A horizontal box line with a vertical line going up from the middle. +teeDown,┬,+,A horizontal box line with a vertical line going down from the middle. +teeLeft,┤,+,A vertical box line with a horizontal line going left from the middle. +teeRight,├,+,A vertical box line with a horizontal line going right from the middle. +upEnd,╵,',The top half of a vertical box line. +downEnd,╷,",",The bottom half of a vertical box line. +leftEnd,╴,-,The left half of a horizontal box line. +rightEnd,╶,-,The right half of a horizontal box line. + +## Bold +horizontalLineBold,━,=,A bold horizontal line that can be used to draw a box. +verticalLineBold,┃,|,A bold vertical line that can be used to draw a box. +topLeftCornerBold,┏,",",The bold upper left-hand corner of a box. +topRightCornerBold,┓,",",The bold upper right-hand corner of a box. +bottomLeftCornerBold,┗,',The bold lower left-hand corner of a box. +bottomRightCornerBold,┛,',The bold lower right-hand corner of a box. +crossBold,╋,+,An intersection of bold vertical and horizontal box lines. +teeUpBold,┻,+,A bold horizontal box line with a vertical line going up from the middle. +teeDownBold,┳,+,A bold horizontal box line with a vertical line going down from the middle. +teeLeftBold,┫,+,A bold vertical box line with a horizontal line going left from the middle. +teeRightBold,┣,+,A bold vertical box line with a horizontal line going right from the middle. +upEndBold,╹,',The top half of a bold vertical box line. +downEndBold,╻,",",The bottom half of a bold vertical box line. +leftEndBold,╸,-,The left half of a bold horizontal box line. +rightEndBold,╺,-,The right half of a bold horizontal box line. + +## Double +horizontalLineDouble,═,=,A double horizontal line that can be used to draw a box. +verticalLineDouble,║,|,A double vertical line that can be used to draw a box. +topLeftCornerDouble,╔,",",The double upper left-hand corner of a box. +topRightCornerDouble,╗,",",The double upper right-hand corner of a box. +bottomLeftCornerDouble,╚,"""",The double lower left-hand corner of a box. +bottomRightCornerDouble,╝,"""",The double lower right-hand corner of a box. +crossDouble,╬,+,An intersection of double vertical and horizontal box lines. +teeUpDouble,╩,+,A double horizontal box line with a vertical line going up from the middle. +teeDownDouble,╦,+,A double horizontal box line with a vertical line going down from the middle. +teeLeftDouble,╣,+,A double vertical box line with a horizontal line going left from the middle. +teeRightDouble,╠,+,A double vertical box line with a horizontal line going right from the middle. + +## Dashed + +### Double +horizontalLineDoubleDash,╌,-,A dashed horizontal line that can be used to draw a box. +horizontalLineDoubleDashBold,╍,-,A bold dashed horizontal line that can be used to draw a box. +verticalLineDoubleDash,╎,|,A dashed vertical line that can be used to draw a box. +verticalLineDoubleDashBold,╏,|,A bold dashed vertical line that can be used to draw a box. + +### Triple +horizontalLineTripleDash,┄,-,A dashed horizontal line that can be used to draw a box. +horizontalLineTripleDashBold,┅,-,A bold dashed horizontal line that can be used to draw a box. +verticalLineTripleDash,┆,|,A dashed vertical line that can be used to draw a box. +verticalLineTripleDashBold,┇,|,A bold dashed vertical line that can be used to draw a box. + +### Quadruple +horizontalLineQuadrupleDash,┈,-,A dashed horizontal line that can be used to draw a box. +horizontalLineQuadrupleDashBold,┉,-,A bold dashed horizontal line that can be used to draw a box. +verticalLineQuadrupleDash,┊,|,A dashed vertical line that can be used to draw a box. +verticalLineQuadrupleDashBold,┋,|,A bold dashed vertical line that can be used to draw a box. diff --git a/pkgs/term_glyph/lib/src/generated.dart b/pkgs/term_glyph/lib/src/generated.dart new file mode 100644 index 000000000..e1b83d196 --- /dev/null +++ b/pkgs/term_glyph/lib/src/generated.dart @@ -0,0 +1,564 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Don't modify this file by hand! It's generated by tool/generate.dart. + +/// Whether the glyph getters return plain ASCII, as opposed to Unicode +/// characters or sequences. +/// +/// Defaults to `false`. +bool get ascii => _ascii; +var _ascii = false; +set ascii(bool value) { + _ascii = value; + if (value) { + _bullet = "*"; + _leftArrow = "<"; + _rightArrow = ">"; + _upArrow = "^"; + _downArrow = "v"; + _longLeftArrow = "<="; + _longRightArrow = "=>"; + _horizontalLine = "-"; + _verticalLine = "|"; + _topLeftCorner = ","; + _topRightCorner = ","; + _bottomLeftCorner = "'"; + _bottomRightCorner = "'"; + _cross = "+"; + _teeUp = "+"; + _teeDown = "+"; + _teeLeft = "+"; + _teeRight = "+"; + _upEnd = "'"; + _downEnd = ","; + _leftEnd = "-"; + _rightEnd = "-"; + _horizontalLineBold = "="; + _verticalLineBold = "|"; + _topLeftCornerBold = ","; + _topRightCornerBold = ","; + _bottomLeftCornerBold = "'"; + _bottomRightCornerBold = "'"; + _crossBold = "+"; + _teeUpBold = "+"; + _teeDownBold = "+"; + _teeLeftBold = "+"; + _teeRightBold = "+"; + _upEndBold = "'"; + _downEndBold = ","; + _leftEndBold = "-"; + _rightEndBold = "-"; + _horizontalLineDouble = "="; + _verticalLineDouble = "|"; + _topLeftCornerDouble = ","; + _topRightCornerDouble = ","; + _bottomLeftCornerDouble = '"'; + _bottomRightCornerDouble = '"'; + _crossDouble = "+"; + _teeUpDouble = "+"; + _teeDownDouble = "+"; + _teeLeftDouble = "+"; + _teeRightDouble = "+"; + _horizontalLineDoubleDash = "-"; + _horizontalLineDoubleDashBold = "-"; + _verticalLineDoubleDash = "|"; + _verticalLineDoubleDashBold = "|"; + _horizontalLineTripleDash = "-"; + _horizontalLineTripleDashBold = "-"; + _verticalLineTripleDash = "|"; + _verticalLineTripleDashBold = "|"; + _horizontalLineQuadrupleDash = "-"; + _horizontalLineQuadrupleDashBold = "-"; + _verticalLineQuadrupleDash = "|"; + _verticalLineQuadrupleDashBold = "|"; + } else { + _bullet = "•"; + _leftArrow = "←"; + _rightArrow = "→"; + _upArrow = "↑"; + _downArrow = "↓"; + _longLeftArrow = "◀━"; + _longRightArrow = "━▶"; + _horizontalLine = "─"; + _verticalLine = "│"; + _topLeftCorner = "┌"; + _topRightCorner = "┐"; + _bottomLeftCorner = "└"; + _bottomRightCorner = "┘"; + _cross = "┼"; + _teeUp = "┴"; + _teeDown = "┬"; + _teeLeft = "┤"; + _teeRight = "├"; + _upEnd = "╵"; + _downEnd = "╷"; + _leftEnd = "╴"; + _rightEnd = "╶"; + _horizontalLineBold = "━"; + _verticalLineBold = "┃"; + _topLeftCornerBold = "┏"; + _topRightCornerBold = "┓"; + _bottomLeftCornerBold = "┗"; + _bottomRightCornerBold = "┛"; + _crossBold = "╋"; + _teeUpBold = "┻"; + _teeDownBold = "┳"; + _teeLeftBold = "┫"; + _teeRightBold = "┣"; + _upEndBold = "╹"; + _downEndBold = "╻"; + _leftEndBold = "╸"; + _rightEndBold = "╺"; + _horizontalLineDouble = "═"; + _verticalLineDouble = "║"; + _topLeftCornerDouble = "╔"; + _topRightCornerDouble = "╗"; + _bottomLeftCornerDouble = "╚"; + _bottomRightCornerDouble = "╝"; + _crossDouble = "╬"; + _teeUpDouble = "╩"; + _teeDownDouble = "╦"; + _teeLeftDouble = "╣"; + _teeRightDouble = "╠"; + _horizontalLineDoubleDash = "╌"; + _horizontalLineDoubleDashBold = "╍"; + _verticalLineDoubleDash = "╎"; + _verticalLineDoubleDashBold = "╏"; + _horizontalLineTripleDash = "┄"; + _horizontalLineTripleDashBold = "┅"; + _verticalLineTripleDash = "┆"; + _verticalLineTripleDashBold = "┇"; + _horizontalLineQuadrupleDash = "┈"; + _horizontalLineQuadrupleDashBold = "┉"; + _verticalLineQuadrupleDash = "┊"; + _verticalLineQuadrupleDashBold = "┋"; + } +} + +/// A bullet point. +/// +/// If [ascii] is `false`, this is "•". If it's `true`, this is +/// "*" instead. +String get bullet => _bullet; +var _bullet = "•"; + +/// A left-pointing arrow. +/// +/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some +/// terminal fonts, and should generally be surrounding by spaces. +/// +/// If [ascii] is `false`, this is "←". If it's `true`, this is +/// "<" instead. +String get leftArrow => _leftArrow; +var _leftArrow = "←"; + +/// A right-pointing arrow. +/// +/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some +/// terminal fonts, and should generally be surrounding by spaces. +/// +/// If [ascii] is `false`, this is "→". If it's `true`, this is +/// ">" instead. +String get rightArrow => _rightArrow; +var _rightArrow = "→"; + +/// An upwards-pointing arrow. +/// +/// If [ascii] is `false`, this is "↑". If it's `true`, this is +/// "^" instead. +String get upArrow => _upArrow; +var _upArrow = "↑"; + +/// A downwards-pointing arrow. +/// +/// If [ascii] is `false`, this is "↓". If it's `true`, this is +/// "v" instead. +String get downArrow => _downArrow; +var _downArrow = "↓"; + +/// A two-character left-pointing arrow. +/// +/// If [ascii] is `false`, this is "◀━". If it's `true`, this is +/// "<=" instead. +String get longLeftArrow => _longLeftArrow; +var _longLeftArrow = "◀━"; + +/// A two-character right-pointing arrow. +/// +/// If [ascii] is `false`, this is "━▶". If it's `true`, this is +/// "=>" instead. +String get longRightArrow => _longRightArrow; +var _longRightArrow = "━▶"; + +/// A horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "─". If it's `true`, this is +/// "-" instead. +String get horizontalLine => _horizontalLine; +var _horizontalLine = "─"; + +/// A vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "│". If it's `true`, this is +/// "|" instead. +String get verticalLine => _verticalLine; +var _verticalLine = "│"; + +/// The upper left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┌". If it's `true`, this is +/// "," instead. +String get topLeftCorner => _topLeftCorner; +var _topLeftCorner = "┌"; + +/// The upper right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┐". If it's `true`, this is +/// "," instead. +String get topRightCorner => _topRightCorner; +var _topRightCorner = "┐"; + +/// The lower left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "└". If it's `true`, this is +/// "'" instead. +String get bottomLeftCorner => _bottomLeftCorner; +var _bottomLeftCorner = "└"; + +/// The lower right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┘". If it's `true`, this is +/// "'" instead. +String get bottomRightCorner => _bottomRightCorner; +var _bottomRightCorner = "┘"; + +/// An intersection of vertical and horizontal box lines. +/// +/// If [ascii] is `false`, this is "┼". If it's `true`, this is +/// "+" instead. +String get cross => _cross; +var _cross = "┼"; + +/// A horizontal box line with a vertical line going up from the middle. +/// +/// If [ascii] is `false`, this is "┴". If it's `true`, this is +/// "+" instead. +String get teeUp => _teeUp; +var _teeUp = "┴"; + +/// A horizontal box line with a vertical line going down from the middle. +/// +/// If [ascii] is `false`, this is "┬". If it's `true`, this is +/// "+" instead. +String get teeDown => _teeDown; +var _teeDown = "┬"; + +/// A vertical box line with a horizontal line going left from the middle. +/// +/// If [ascii] is `false`, this is "┤". If it's `true`, this is +/// "+" instead. +String get teeLeft => _teeLeft; +var _teeLeft = "┤"; + +/// A vertical box line with a horizontal line going right from the middle. +/// +/// If [ascii] is `false`, this is "├". If it's `true`, this is +/// "+" instead. +String get teeRight => _teeRight; +var _teeRight = "├"; + +/// The top half of a vertical box line. +/// +/// If [ascii] is `false`, this is "╵". If it's `true`, this is +/// "'" instead. +String get upEnd => _upEnd; +var _upEnd = "╵"; + +/// The bottom half of a vertical box line. +/// +/// If [ascii] is `false`, this is "╷". If it's `true`, this is +/// "," instead. +String get downEnd => _downEnd; +var _downEnd = "╷"; + +/// The left half of a horizontal box line. +/// +/// If [ascii] is `false`, this is "╴". If it's `true`, this is +/// "-" instead. +String get leftEnd => _leftEnd; +var _leftEnd = "╴"; + +/// The right half of a horizontal box line. +/// +/// If [ascii] is `false`, this is "╶". If it's `true`, this is +/// "-" instead. +String get rightEnd => _rightEnd; +var _rightEnd = "╶"; + +/// A bold horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "━". If it's `true`, this is +/// "=" instead. +String get horizontalLineBold => _horizontalLineBold; +var _horizontalLineBold = "━"; + +/// A bold vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┃". If it's `true`, this is +/// "|" instead. +String get verticalLineBold => _verticalLineBold; +var _verticalLineBold = "┃"; + +/// The bold upper left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┏". If it's `true`, this is +/// "," instead. +String get topLeftCornerBold => _topLeftCornerBold; +var _topLeftCornerBold = "┏"; + +/// The bold upper right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┓". If it's `true`, this is +/// "," instead. +String get topRightCornerBold => _topRightCornerBold; +var _topRightCornerBold = "┓"; + +/// The bold lower left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┗". If it's `true`, this is +/// "'" instead. +String get bottomLeftCornerBold => _bottomLeftCornerBold; +var _bottomLeftCornerBold = "┗"; + +/// The bold lower right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "┛". If it's `true`, this is +/// "'" instead. +String get bottomRightCornerBold => _bottomRightCornerBold; +var _bottomRightCornerBold = "┛"; + +/// An intersection of bold vertical and horizontal box lines. +/// +/// If [ascii] is `false`, this is "╋". If it's `true`, this is +/// "+" instead. +String get crossBold => _crossBold; +var _crossBold = "╋"; + +/// A bold horizontal box line with a vertical line going up from the middle. +/// +/// If [ascii] is `false`, this is "┻". If it's `true`, this is +/// "+" instead. +String get teeUpBold => _teeUpBold; +var _teeUpBold = "┻"; + +/// A bold horizontal box line with a vertical line going down from the middle. +/// +/// If [ascii] is `false`, this is "┳". If it's `true`, this is +/// "+" instead. +String get teeDownBold => _teeDownBold; +var _teeDownBold = "┳"; + +/// A bold vertical box line with a horizontal line going left from the middle. +/// +/// If [ascii] is `false`, this is "┫". If it's `true`, this is +/// "+" instead. +String get teeLeftBold => _teeLeftBold; +var _teeLeftBold = "┫"; + +/// A bold vertical box line with a horizontal line going right from the middle. +/// +/// If [ascii] is `false`, this is "┣". If it's `true`, this is +/// "+" instead. +String get teeRightBold => _teeRightBold; +var _teeRightBold = "┣"; + +/// The top half of a bold vertical box line. +/// +/// If [ascii] is `false`, this is "╹". If it's `true`, this is +/// "'" instead. +String get upEndBold => _upEndBold; +var _upEndBold = "╹"; + +/// The bottom half of a bold vertical box line. +/// +/// If [ascii] is `false`, this is "╻". If it's `true`, this is +/// "," instead. +String get downEndBold => _downEndBold; +var _downEndBold = "╻"; + +/// The left half of a bold horizontal box line. +/// +/// If [ascii] is `false`, this is "╸". If it's `true`, this is +/// "-" instead. +String get leftEndBold => _leftEndBold; +var _leftEndBold = "╸"; + +/// The right half of a bold horizontal box line. +/// +/// If [ascii] is `false`, this is "╺". If it's `true`, this is +/// "-" instead. +String get rightEndBold => _rightEndBold; +var _rightEndBold = "╺"; + +/// A double horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "═". If it's `true`, this is +/// "=" instead. +String get horizontalLineDouble => _horizontalLineDouble; +var _horizontalLineDouble = "═"; + +/// A double vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "║". If it's `true`, this is +/// "|" instead. +String get verticalLineDouble => _verticalLineDouble; +var _verticalLineDouble = "║"; + +/// The double upper left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "╔". If it's `true`, this is +/// "," instead. +String get topLeftCornerDouble => _topLeftCornerDouble; +var _topLeftCornerDouble = "╔"; + +/// The double upper right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "╗". If it's `true`, this is +/// "," instead. +String get topRightCornerDouble => _topRightCornerDouble; +var _topRightCornerDouble = "╗"; + +/// The double lower left-hand corner of a box. +/// +/// If [ascii] is `false`, this is "╚". If it's `true`, this is +/// """ instead. +String get bottomLeftCornerDouble => _bottomLeftCornerDouble; +var _bottomLeftCornerDouble = "╚"; + +/// The double lower right-hand corner of a box. +/// +/// If [ascii] is `false`, this is "╝". If it's `true`, this is +/// """ instead. +String get bottomRightCornerDouble => _bottomRightCornerDouble; +var _bottomRightCornerDouble = "╝"; + +/// An intersection of double vertical and horizontal box lines. +/// +/// If [ascii] is `false`, this is "╬". If it's `true`, this is +/// "+" instead. +String get crossDouble => _crossDouble; +var _crossDouble = "╬"; + +/// A double horizontal box line with a vertical line going up from the middle. +/// +/// If [ascii] is `false`, this is "╩". If it's `true`, this is +/// "+" instead. +String get teeUpDouble => _teeUpDouble; +var _teeUpDouble = "╩"; + +/// A double horizontal box line with a vertical line going down from the middle. +/// +/// If [ascii] is `false`, this is "╦". If it's `true`, this is +/// "+" instead. +String get teeDownDouble => _teeDownDouble; +var _teeDownDouble = "╦"; + +/// A double vertical box line with a horizontal line going left from the middle. +/// +/// If [ascii] is `false`, this is "╣". If it's `true`, this is +/// "+" instead. +String get teeLeftDouble => _teeLeftDouble; +var _teeLeftDouble = "╣"; + +/// A double vertical box line with a horizontal line going right from the middle. +/// +/// If [ascii] is `false`, this is "╠". If it's `true`, this is +/// "+" instead. +String get teeRightDouble => _teeRightDouble; +var _teeRightDouble = "╠"; + +/// A dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "╌". If it's `true`, this is +/// "-" instead. +String get horizontalLineDoubleDash => _horizontalLineDoubleDash; +var _horizontalLineDoubleDash = "╌"; + +/// A bold dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "╍". If it's `true`, this is +/// "-" instead. +String get horizontalLineDoubleDashBold => _horizontalLineDoubleDashBold; +var _horizontalLineDoubleDashBold = "╍"; + +/// A dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "╎". If it's `true`, this is +/// "|" instead. +String get verticalLineDoubleDash => _verticalLineDoubleDash; +var _verticalLineDoubleDash = "╎"; + +/// A bold dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "╏". If it's `true`, this is +/// "|" instead. +String get verticalLineDoubleDashBold => _verticalLineDoubleDashBold; +var _verticalLineDoubleDashBold = "╏"; + +/// A dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┄". If it's `true`, this is +/// "-" instead. +String get horizontalLineTripleDash => _horizontalLineTripleDash; +var _horizontalLineTripleDash = "┄"; + +/// A bold dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┅". If it's `true`, this is +/// "-" instead. +String get horizontalLineTripleDashBold => _horizontalLineTripleDashBold; +var _horizontalLineTripleDashBold = "┅"; + +/// A dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┆". If it's `true`, this is +/// "|" instead. +String get verticalLineTripleDash => _verticalLineTripleDash; +var _verticalLineTripleDash = "┆"; + +/// A bold dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┇". If it's `true`, this is +/// "|" instead. +String get verticalLineTripleDashBold => _verticalLineTripleDashBold; +var _verticalLineTripleDashBold = "┇"; + +/// A dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┈". If it's `true`, this is +/// "-" instead. +String get horizontalLineQuadrupleDash => _horizontalLineQuadrupleDash; +var _horizontalLineQuadrupleDash = "┈"; + +/// A bold dashed horizontal line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┉". If it's `true`, this is +/// "-" instead. +String get horizontalLineQuadrupleDashBold => _horizontalLineQuadrupleDashBold; +var _horizontalLineQuadrupleDashBold = "┉"; + +/// A dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┊". If it's `true`, this is +/// "|" instead. +String get verticalLineQuadrupleDash => _verticalLineQuadrupleDash; +var _verticalLineQuadrupleDash = "┊"; + +/// A bold dashed vertical line that can be used to draw a box. +/// +/// If [ascii] is `false`, this is "┋". If it's `true`, this is +/// "|" instead. +String get verticalLineQuadrupleDashBold => _verticalLineQuadrupleDashBold; +var _verticalLineQuadrupleDashBold = "┋"; diff --git a/pkgs/term_glyph/lib/term_glyph.dart b/pkgs/term_glyph/lib/term_glyph.dart new file mode 100644 index 000000000..8582175ed --- /dev/null +++ b/pkgs/term_glyph/lib/term_glyph.dart @@ -0,0 +1,12 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/generated.dart'; + +import 'src/generated.dart'; + +/// Returns [glyph] if Unicode glyph are allowed, and [alternative] if they +/// aren't. +String glyphOrAscii(String glyph, String alternative) => + ascii ? alternative : glyph; diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 275c2bfd8..4ba1efbe6 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,8 +1,13 @@ -name: symbol -version: 1.0.0-dev -description: Useful symbols and Windows-safe equivalents. +name: term_glyph +version: 1.0.0 +description: Useful glyphs and Windows-safe equivalents. author: Dart Team -homepage: https://github.com/dart-lang/symbol +homepage: https://github.com/dart-lang/term_glyph environment: sdk: '>=1.8.0 <2.0.0' + +dev_dependencies: + csv: '^3.0.0' + dart_style: '^0.2.0' + test: '^0.12.0' diff --git a/pkgs/term_glyph/test/symbol_test.dart b/pkgs/term_glyph/test/symbol_test.dart new file mode 100644 index 000000000..e3f94e575 --- /dev/null +++ b/pkgs/term_glyph/test/symbol_test.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:test/test.dart'; + +import 'package:term_glyph/term_glyph.dart' as glyph; + +void main() { + group("with ascii = false", () { + setUpAll(() { + glyph.ascii = false; + }); + + test("glyphs return Unicode versions", () { + expect(glyph.topLeftCorner, equals("┌")); + expect(glyph.teeUpBold, equals("┻")); + expect(glyph.longLeftArrow, equals("◀━")); + }); + + test("glyphOrAscii returns the first argument", () { + expect(glyph.glyphOrAscii("A", "B"), equals("A")); + }); + }); + + group("with ascii = true", () { + setUpAll(() { + glyph.ascii = true; + }); + + test("glyphs return ASCII versions", () { + expect(glyph.topLeftCorner, equals(",")); + expect(glyph.teeUpBold, equals("+")); + expect(glyph.longLeftArrow, equals("<=")); + }); + + test("glyphOrAscii returns the second argument", () { + expect(glyph.glyphOrAscii("A", "B"), equals("B")); + }); + }); +} diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart new file mode 100644 index 000000000..2e94b4ca1 --- /dev/null +++ b/pkgs/term_glyph/tool/generate.dart @@ -0,0 +1,67 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +import 'package:csv/csv.dart'; + +void main() { + var csv = new CsvCodec(eol: "\n"); + var data = csv.decode(new File("data.csv").readAsStringSync()); + + // Remove comments and empty lines. + data.removeWhere((row) => row.length < 3); + + var file = new File("lib/src/generated.dart").openSync(mode: FileMode.WRITE); + file.writeStringSync(""" + // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Don't modify this file by hand! It's generated by tool/generate.dart. + + /// Whether the glyph getters return plain ASCII, as opposed to Unicode + /// characters or sequences. + /// + /// Defaults to `false`. + bool get ascii => _ascii; + var _ascii = false; + set ascii(bool value) { + _ascii = value; + if (value) { + """); + + for (var glyph in data) { + file.writeStringSync("_${glyph[0]} = ${_quote(glyph[2])};"); + } + + file.writeStringSync("} else {"); + + for (var glyph in data) { + file.writeStringSync("_${glyph[0]} = ${_quote(glyph[1])};"); + } + + file.writeStringSync("}}"); + + for (var glyph in data) { + for (var line in glyph[3].split("\n")) { + file.writeStringSync("/// $line\n"); + } + + file.writeStringSync(""" + /// + /// If [ascii] is `false`, this is "${glyph[1]}". If it's `true`, this is + /// "${glyph[2]}" instead. + String get ${glyph[0]} => _${glyph[0]}; + var _${glyph[0]} = ${_quote(glyph[1])}; + """); + } + + var result = Process.runSync( + "pub", ["run", "dart_style:format", "-w", "lib/src/generated.dart"]); + print(result.stderr); + exit(result.exitCode); +} + +String _quote(String input) => input.contains('"') ? "'$input'" : '"$input"'; From 09090b486dc09bacdba507a04931e8d1e43db6ba Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 12 Mar 2018 17:13:49 -0700 Subject: [PATCH 03/61] Enable Travis, add analysis_options, update .gitignore (dart-lang/term_glyph#3) --- pkgs/term_glyph/.gitignore | 7 +------ pkgs/term_glyph/.travis.yml | 24 ++++++++++++++++++++++++ pkgs/term_glyph/analysis_options.yaml | 2 ++ 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 pkgs/term_glyph/.travis.yml create mode 100644 pkgs/term_glyph/analysis_options.yaml diff --git a/pkgs/term_glyph/.gitignore b/pkgs/term_glyph/.gitignore index 25a1df332..01d42c084 100644 --- a/pkgs/term_glyph/.gitignore +++ b/pkgs/term_glyph/.gitignore @@ -1,9 +1,4 @@ -.buildlog -.DS_Store -.idea +.dart_tool/ .pub/ -.settings/ -build/ -packages .packages pubspec.lock diff --git a/pkgs/term_glyph/.travis.yml b/pkgs/term_glyph/.travis.yml new file mode 100644 index 000000000..31cbd43ad --- /dev/null +++ b/pkgs/term_glyph/.travis.yml @@ -0,0 +1,24 @@ +language: dart + +dart: + - dev + - stable + +dart_task: + - test + +matrix: + include: + # Only validate formatting,analyzer using the dev release + - dart: dev + dart_task: dartfmt + - dart: dev + dart_task: dartanalyzer + +# Only building master means that we don't run two builds for each pull request. +branches: + only: [master] + +cache: + directories: + - $HOME/.pub-cache diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/pkgs/term_glyph/analysis_options.yaml @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true From 7ab24840647d244b1b9db2a68eb2ade9b5a26809 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 26 Jun 2018 10:08:21 -0700 Subject: [PATCH 04/61] misc: update dev_dependencies to support latest SDK (dart-lang/term_glyph#4) --- pkgs/term_glyph/pubspec.yaml | 6 +++--- pkgs/term_glyph/tool/generate.dart | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 4ba1efbe6..02a5b2aa9 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.0.0 +version: 1.0.1-dev description: Useful glyphs and Windows-safe equivalents. author: Dart Team homepage: https://github.com/dart-lang/term_glyph @@ -9,5 +9,5 @@ environment: dev_dependencies: csv: '^3.0.0' - dart_style: '^0.2.0' - test: '^0.12.0' + dart_style: '>=0.2.0 <2.0.0' + test: '>=0.12.0 <2.0.0' diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 2e94b4ca1..aa05c13fa 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -8,12 +8,12 @@ import 'package:csv/csv.dart'; void main() { var csv = new CsvCodec(eol: "\n"); - var data = csv.decode(new File("data.csv").readAsStringSync()); + var data = csv.decoder.convert(new File("data.csv").readAsStringSync()); // Remove comments and empty lines. data.removeWhere((row) => row.length < 3); - var file = new File("lib/src/generated.dart").openSync(mode: FileMode.WRITE); + var file = new File("lib/src/generated.dart").openSync(mode: FileMode.write); file.writeStringSync(""" // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a From 033623f8c30b57c25f6176e62ee829de75951529 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 16 Jul 2018 22:08:17 -0400 Subject: [PATCH 05/61] chore: set max SDK version to <3.0.0 (dart-lang/term_glyph#5) --- pkgs/term_glyph/CHANGELOG.md | 4 ++++ pkgs/term_glyph/analysis_options.yaml | 2 -- pkgs/term_glyph/pubspec.yaml | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 pkgs/term_glyph/analysis_options.yaml diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 5b26ad30f..6ee5e6f34 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Set max SDK version to `<3.0.0`. + ## 1.0.0 * Initial version. diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml deleted file mode 100644 index a10d4c5a0..000000000 --- a/pkgs/term_glyph/analysis_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -analyzer: - strong-mode: true diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 02a5b2aa9..6ef0c7c62 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,13 +1,14 @@ name: term_glyph -version: 1.0.1-dev +version: 1.0.1 + description: Useful glyphs and Windows-safe equivalents. author: Dart Team homepage: https://github.com/dart-lang/term_glyph environment: - sdk: '>=1.8.0 <2.0.0' + sdk: '>=1.8.0 <3.0.0' dev_dependencies: - csv: '^3.0.0' + csv: ^3.0.0 dart_style: '>=0.2.0 <2.0.0' test: '>=0.12.0 <2.0.0' From c868e11f58f4ba5f157e66bea036ba41c284628d Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 19 Nov 2018 14:54:40 -0800 Subject: [PATCH 06/61] Support latest version of pkg:csv (dart-lang/term_glyph#6) --- pkgs/term_glyph/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 6ef0c7c62..4cbaeb4be 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.0.1 +version: 1.0.2-dev description: Useful glyphs and Windows-safe equivalents. author: Dart Team @@ -9,6 +9,6 @@ environment: sdk: '>=1.8.0 <3.0.0' dev_dependencies: - csv: ^3.0.0 + csv: '>=3.0.0 <5.0.0' dart_style: '>=0.2.0 <2.0.0' test: '>=0.12.0 <2.0.0' From 54aacc45e91f6940b35a7d0724d7ab30962ea29e Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 9 Jan 2019 20:27:22 -0500 Subject: [PATCH 07/61] Add a GlyphSet class (dart-lang/term_glyph#7) This makes it easier for a class or function to control whether it individually uses ASCII or Unicode glyphs. --- pkgs/term_glyph/CHANGELOG.md | 8 + pkgs/term_glyph/README.md | 15 +- .../lib/src/generated/ascii_glyph_set.dart | 322 ++++++++++++++++++ .../lib/src/generated/glyph_set.dart | 220 ++++++++++++ .../top_level.dart} | 322 ++++-------------- .../lib/src/generated/unicode_glyph_set.dart | 322 ++++++++++++++++++ pkgs/term_glyph/lib/term_glyph.dart | 31 +- pkgs/term_glyph/pubspec.yaml | 5 +- pkgs/term_glyph/test/symbol_test.dart | 22 +- pkgs/term_glyph/tool/generate.dart | 133 ++++++-- 10 files changed, 1113 insertions(+), 287 deletions(-) create mode 100644 pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart create mode 100644 pkgs/term_glyph/lib/src/generated/glyph_set.dart rename pkgs/term_glyph/lib/src/{generated.dart => generated/top_level.dart} (51%) create mode 100644 pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 6ee5e6f34..7b73fc851 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.1.0 + +* Add a `GlyphSet` class that can be used to easily choose which set of glyphs + to use for a particular chunk of code. + +* Add `asciiGlyphs`, `unicodeGlyphs`, and `glyphs` getters that provide access + to `GlyphSet`s. + ## 1.0.1 * Set max SDK version to `<3.0.0`. diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md index 5459994ad..0d5b78c79 100644 --- a/pkgs/term_glyph/README.md +++ b/pkgs/term_glyph/README.md @@ -1,6 +1,7 @@ This library contains getters for useful Unicode glyphs as well as plain ASCII alternatives. It's intended to be used in command-line applications that may run -on Windows and libraries that may be used by those applications. +in places where Unicode isn't well-supported and libraries that may be used by +those applications. We recommend that you import this library with the prefix "glyph". For example: @@ -14,12 +15,12 @@ String bulletedList(List items) => ## ASCII Mode -The default Windows `cmd.exe` shell is unable to display Unicode characters, so -this package is able to transparently switch its glyphs to ASCII alternatives by -setting [the `ascii` attribute][ascii]. When this attribute is `true`, all -glyphs use ASCII characters instead. It currently defaults to `false`, although -in the future it may default to `true` for applications running on the Dart VM -on Windows. For example: +Some shells are unable to display Unicode characters, so this package is able to +transparently switch its glyphs to ASCII alternatives by setting [the `ascii` +attribute][ascii]. When this attribute is `true`, all glyphs use ASCII +characters instead. It currently defaults to `false`, although in the future it +may default to `true` for applications running on the Dart VM on Windows. For +example: [ascii]: https://www.dartdocs.org/documentation/term_glyph/latest/term_glyph/ascii.html diff --git a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart new file mode 100644 index 000000000..f470fe4a0 --- /dev/null +++ b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart @@ -0,0 +1,322 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Don't modify this file by hand! It's generated by tool/generate.dart. + +import 'glyph_set.dart'; + +/// A [GlyphSet] that includes only ASCII glyphs. +class AsciiGlyphSet implements GlyphSet { + const AsciiGlyphSet(); + + /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// otherwise. + String glyphOrAscii(String glyph, String alternative) => alternative; + + /// A bullet point. + /// + /// Always "*" for [this]. + String get bullet => "*"; + + /// A left-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + /// + /// Always "<" for [this]. + String get leftArrow => "<"; + + /// A right-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + /// + /// Always ">" for [this]. + String get rightArrow => ">"; + + /// An upwards-pointing arrow. + /// + /// Always "^" for [this]. + String get upArrow => "^"; + + /// A downwards-pointing arrow. + /// + /// Always "v" for [this]. + String get downArrow => "v"; + + /// A two-character left-pointing arrow. + /// + /// Always "<=" for [this]. + String get longLeftArrow => "<="; + + /// A two-character right-pointing arrow. + /// + /// Always "=>" for [this]. + String get longRightArrow => "=>"; + + /// A horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLine => "-"; + + /// A vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLine => "|"; + + /// The upper left-hand corner of a box. + /// + /// Always "," for [this]. + String get topLeftCorner => ","; + + /// The upper right-hand corner of a box. + /// + /// Always "," for [this]. + String get topRightCorner => ","; + + /// The lower left-hand corner of a box. + /// + /// Always "'" for [this]. + String get bottomLeftCorner => "'"; + + /// The lower right-hand corner of a box. + /// + /// Always "'" for [this]. + String get bottomRightCorner => "'"; + + /// An intersection of vertical and horizontal box lines. + /// + /// Always "+" for [this]. + String get cross => "+"; + + /// A horizontal box line with a vertical line going up from the middle. + /// + /// Always "+" for [this]. + String get teeUp => "+"; + + /// A horizontal box line with a vertical line going down from the middle. + /// + /// Always "+" for [this]. + String get teeDown => "+"; + + /// A vertical box line with a horizontal line going left from the middle. + /// + /// Always "+" for [this]. + String get teeLeft => "+"; + + /// A vertical box line with a horizontal line going right from the middle. + /// + /// Always "+" for [this]. + String get teeRight => "+"; + + /// The top half of a vertical box line. + /// + /// Always "'" for [this]. + String get upEnd => "'"; + + /// The bottom half of a vertical box line. + /// + /// Always "," for [this]. + String get downEnd => ","; + + /// The left half of a horizontal box line. + /// + /// Always "-" for [this]. + String get leftEnd => "-"; + + /// The right half of a horizontal box line. + /// + /// Always "-" for [this]. + String get rightEnd => "-"; + + /// A bold horizontal line that can be used to draw a box. + /// + /// Always "=" for [this]. + String get horizontalLineBold => "="; + + /// A bold vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineBold => "|"; + + /// The bold upper left-hand corner of a box. + /// + /// Always "," for [this]. + String get topLeftCornerBold => ","; + + /// The bold upper right-hand corner of a box. + /// + /// Always "," for [this]. + String get topRightCornerBold => ","; + + /// The bold lower left-hand corner of a box. + /// + /// Always "'" for [this]. + String get bottomLeftCornerBold => "'"; + + /// The bold lower right-hand corner of a box. + /// + /// Always "'" for [this]. + String get bottomRightCornerBold => "'"; + + /// An intersection of bold vertical and horizontal box lines. + /// + /// Always "+" for [this]. + String get crossBold => "+"; + + /// A bold horizontal box line with a vertical line going up from the middle. + /// + /// Always "+" for [this]. + String get teeUpBold => "+"; + + /// A bold horizontal box line with a vertical line going down from the middle. + /// + /// Always "+" for [this]. + String get teeDownBold => "+"; + + /// A bold vertical box line with a horizontal line going left from the middle. + /// + /// Always "+" for [this]. + String get teeLeftBold => "+"; + + /// A bold vertical box line with a horizontal line going right from the middle. + /// + /// Always "+" for [this]. + String get teeRightBold => "+"; + + /// The top half of a bold vertical box line. + /// + /// Always "'" for [this]. + String get upEndBold => "'"; + + /// The bottom half of a bold vertical box line. + /// + /// Always "," for [this]. + String get downEndBold => ","; + + /// The left half of a bold horizontal box line. + /// + /// Always "-" for [this]. + String get leftEndBold => "-"; + + /// The right half of a bold horizontal box line. + /// + /// Always "-" for [this]. + String get rightEndBold => "-"; + + /// A double horizontal line that can be used to draw a box. + /// + /// Always "=" for [this]. + String get horizontalLineDouble => "="; + + /// A double vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineDouble => "|"; + + /// The double upper left-hand corner of a box. + /// + /// Always "," for [this]. + String get topLeftCornerDouble => ","; + + /// The double upper right-hand corner of a box. + /// + /// Always "," for [this]. + String get topRightCornerDouble => ","; + + /// The double lower left-hand corner of a box. + /// + /// Always '"' for [this]. + String get bottomLeftCornerDouble => '"'; + + /// The double lower right-hand corner of a box. + /// + /// Always '"' for [this]. + String get bottomRightCornerDouble => '"'; + + /// An intersection of double vertical and horizontal box lines. + /// + /// Always "+" for [this]. + String get crossDouble => "+"; + + /// A double horizontal box line with a vertical line going up from the middle. + /// + /// Always "+" for [this]. + String get teeUpDouble => "+"; + + /// A double horizontal box line with a vertical line going down from the middle. + /// + /// Always "+" for [this]. + String get teeDownDouble => "+"; + + /// A double vertical box line with a horizontal line going left from the middle. + /// + /// Always "+" for [this]. + String get teeLeftDouble => "+"; + + /// A double vertical box line with a horizontal line going right from the middle. + /// + /// Always "+" for [this]. + String get teeRightDouble => "+"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineDoubleDash => "-"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineDoubleDashBold => "-"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineDoubleDash => "|"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineDoubleDashBold => "|"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineTripleDash => "-"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineTripleDashBold => "-"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineTripleDash => "|"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineTripleDashBold => "|"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineQuadrupleDash => "-"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "-" for [this]. + String get horizontalLineQuadrupleDashBold => "-"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineQuadrupleDash => "|"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "|" for [this]. + String get verticalLineQuadrupleDashBold => "|"; +} diff --git a/pkgs/term_glyph/lib/src/generated/glyph_set.dart b/pkgs/term_glyph/lib/src/generated/glyph_set.dart new file mode 100644 index 000000000..93676db9a --- /dev/null +++ b/pkgs/term_glyph/lib/src/generated/glyph_set.dart @@ -0,0 +1,220 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Don't modify this file by hand! It's generated by tool/generate.dart. + +/// A class that provides access to every configurable glyph. +/// +/// This is provided as a class so that individual chunks of code can choose +/// between [ascii] and [unicode] glyphs. For example: +/// +/// ```dart +/// import 'package:term_glyph/term_glyph.dart' as glyph; +/// +/// /// Adds a vertical line to the left of [text]. +/// /// +/// /// If [ascii] is `true`, this uses plain ASCII for the line. If it's +/// /// `false`, this uses Unicode characters. If it's `null`, it defaults +/// /// to [glyph.ascii]. +/// void addVerticalLine(String text, {bool ascii}) { +/// var glyphs = +/// (ascii ?? glyph.ascii) ? glyph.asciiGlyphs : glyph.unicodeGlyphs; +/// +/// return text +/// .split("\n") +/// .map((line) => "${glyphs.verticalLine} $line") +/// .join("\n"); +/// } +/// ``` +abstract class GlyphSet { + /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// otherwise. + String glyphOrAscii(String glyph, String alternative); + + /// A bullet point. + String get bullet; + + /// A left-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + String get leftArrow; + + /// A right-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + String get rightArrow; + + /// An upwards-pointing arrow. + String get upArrow; + + /// A downwards-pointing arrow. + String get downArrow; + + /// A two-character left-pointing arrow. + String get longLeftArrow; + + /// A two-character right-pointing arrow. + String get longRightArrow; + + /// A horizontal line that can be used to draw a box. + String get horizontalLine; + + /// A vertical line that can be used to draw a box. + String get verticalLine; + + /// The upper left-hand corner of a box. + String get topLeftCorner; + + /// The upper right-hand corner of a box. + String get topRightCorner; + + /// The lower left-hand corner of a box. + String get bottomLeftCorner; + + /// The lower right-hand corner of a box. + String get bottomRightCorner; + + /// An intersection of vertical and horizontal box lines. + String get cross; + + /// A horizontal box line with a vertical line going up from the middle. + String get teeUp; + + /// A horizontal box line with a vertical line going down from the middle. + String get teeDown; + + /// A vertical box line with a horizontal line going left from the middle. + String get teeLeft; + + /// A vertical box line with a horizontal line going right from the middle. + String get teeRight; + + /// The top half of a vertical box line. + String get upEnd; + + /// The bottom half of a vertical box line. + String get downEnd; + + /// The left half of a horizontal box line. + String get leftEnd; + + /// The right half of a horizontal box line. + String get rightEnd; + + /// A bold horizontal line that can be used to draw a box. + String get horizontalLineBold; + + /// A bold vertical line that can be used to draw a box. + String get verticalLineBold; + + /// The bold upper left-hand corner of a box. + String get topLeftCornerBold; + + /// The bold upper right-hand corner of a box. + String get topRightCornerBold; + + /// The bold lower left-hand corner of a box. + String get bottomLeftCornerBold; + + /// The bold lower right-hand corner of a box. + String get bottomRightCornerBold; + + /// An intersection of bold vertical and horizontal box lines. + String get crossBold; + + /// A bold horizontal box line with a vertical line going up from the middle. + String get teeUpBold; + + /// A bold horizontal box line with a vertical line going down from the middle. + String get teeDownBold; + + /// A bold vertical box line with a horizontal line going left from the middle. + String get teeLeftBold; + + /// A bold vertical box line with a horizontal line going right from the middle. + String get teeRightBold; + + /// The top half of a bold vertical box line. + String get upEndBold; + + /// The bottom half of a bold vertical box line. + String get downEndBold; + + /// The left half of a bold horizontal box line. + String get leftEndBold; + + /// The right half of a bold horizontal box line. + String get rightEndBold; + + /// A double horizontal line that can be used to draw a box. + String get horizontalLineDouble; + + /// A double vertical line that can be used to draw a box. + String get verticalLineDouble; + + /// The double upper left-hand corner of a box. + String get topLeftCornerDouble; + + /// The double upper right-hand corner of a box. + String get topRightCornerDouble; + + /// The double lower left-hand corner of a box. + String get bottomLeftCornerDouble; + + /// The double lower right-hand corner of a box. + String get bottomRightCornerDouble; + + /// An intersection of double vertical and horizontal box lines. + String get crossDouble; + + /// A double horizontal box line with a vertical line going up from the middle. + String get teeUpDouble; + + /// A double horizontal box line with a vertical line going down from the middle. + String get teeDownDouble; + + /// A double vertical box line with a horizontal line going left from the middle. + String get teeLeftDouble; + + /// A double vertical box line with a horizontal line going right from the middle. + String get teeRightDouble; + + /// A dashed horizontal line that can be used to draw a box. + String get horizontalLineDoubleDash; + + /// A bold dashed horizontal line that can be used to draw a box. + String get horizontalLineDoubleDashBold; + + /// A dashed vertical line that can be used to draw a box. + String get verticalLineDoubleDash; + + /// A bold dashed vertical line that can be used to draw a box. + String get verticalLineDoubleDashBold; + + /// A dashed horizontal line that can be used to draw a box. + String get horizontalLineTripleDash; + + /// A bold dashed horizontal line that can be used to draw a box. + String get horizontalLineTripleDashBold; + + /// A dashed vertical line that can be used to draw a box. + String get verticalLineTripleDash; + + /// A bold dashed vertical line that can be used to draw a box. + String get verticalLineTripleDashBold; + + /// A dashed horizontal line that can be used to draw a box. + String get horizontalLineQuadrupleDash; + + /// A bold dashed horizontal line that can be used to draw a box. + String get horizontalLineQuadrupleDashBold; + + /// A dashed vertical line that can be used to draw a box. + String get verticalLineQuadrupleDash; + + /// A bold dashed vertical line that can be used to draw a box. + String get verticalLineQuadrupleDashBold; +} diff --git a/pkgs/term_glyph/lib/src/generated.dart b/pkgs/term_glyph/lib/src/generated/top_level.dart similarity index 51% rename from pkgs/term_glyph/lib/src/generated.dart rename to pkgs/term_glyph/lib/src/generated/top_level.dart index e1b83d196..9475953ce 100644 --- a/pkgs/term_glyph/lib/src/generated.dart +++ b/pkgs/term_glyph/lib/src/generated/top_level.dart @@ -1,148 +1,16 @@ -// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // Don't modify this file by hand! It's generated by tool/generate.dart. -/// Whether the glyph getters return plain ASCII, as opposed to Unicode -/// characters or sequences. -/// -/// Defaults to `false`. -bool get ascii => _ascii; -var _ascii = false; -set ascii(bool value) { - _ascii = value; - if (value) { - _bullet = "*"; - _leftArrow = "<"; - _rightArrow = ">"; - _upArrow = "^"; - _downArrow = "v"; - _longLeftArrow = "<="; - _longRightArrow = "=>"; - _horizontalLine = "-"; - _verticalLine = "|"; - _topLeftCorner = ","; - _topRightCorner = ","; - _bottomLeftCorner = "'"; - _bottomRightCorner = "'"; - _cross = "+"; - _teeUp = "+"; - _teeDown = "+"; - _teeLeft = "+"; - _teeRight = "+"; - _upEnd = "'"; - _downEnd = ","; - _leftEnd = "-"; - _rightEnd = "-"; - _horizontalLineBold = "="; - _verticalLineBold = "|"; - _topLeftCornerBold = ","; - _topRightCornerBold = ","; - _bottomLeftCornerBold = "'"; - _bottomRightCornerBold = "'"; - _crossBold = "+"; - _teeUpBold = "+"; - _teeDownBold = "+"; - _teeLeftBold = "+"; - _teeRightBold = "+"; - _upEndBold = "'"; - _downEndBold = ","; - _leftEndBold = "-"; - _rightEndBold = "-"; - _horizontalLineDouble = "="; - _verticalLineDouble = "|"; - _topLeftCornerDouble = ","; - _topRightCornerDouble = ","; - _bottomLeftCornerDouble = '"'; - _bottomRightCornerDouble = '"'; - _crossDouble = "+"; - _teeUpDouble = "+"; - _teeDownDouble = "+"; - _teeLeftDouble = "+"; - _teeRightDouble = "+"; - _horizontalLineDoubleDash = "-"; - _horizontalLineDoubleDashBold = "-"; - _verticalLineDoubleDash = "|"; - _verticalLineDoubleDashBold = "|"; - _horizontalLineTripleDash = "-"; - _horizontalLineTripleDashBold = "-"; - _verticalLineTripleDash = "|"; - _verticalLineTripleDashBold = "|"; - _horizontalLineQuadrupleDash = "-"; - _horizontalLineQuadrupleDashBold = "-"; - _verticalLineQuadrupleDash = "|"; - _verticalLineQuadrupleDashBold = "|"; - } else { - _bullet = "•"; - _leftArrow = "←"; - _rightArrow = "→"; - _upArrow = "↑"; - _downArrow = "↓"; - _longLeftArrow = "◀━"; - _longRightArrow = "━▶"; - _horizontalLine = "─"; - _verticalLine = "│"; - _topLeftCorner = "┌"; - _topRightCorner = "┐"; - _bottomLeftCorner = "└"; - _bottomRightCorner = "┘"; - _cross = "┼"; - _teeUp = "┴"; - _teeDown = "┬"; - _teeLeft = "┤"; - _teeRight = "├"; - _upEnd = "╵"; - _downEnd = "╷"; - _leftEnd = "╴"; - _rightEnd = "╶"; - _horizontalLineBold = "━"; - _verticalLineBold = "┃"; - _topLeftCornerBold = "┏"; - _topRightCornerBold = "┓"; - _bottomLeftCornerBold = "┗"; - _bottomRightCornerBold = "┛"; - _crossBold = "╋"; - _teeUpBold = "┻"; - _teeDownBold = "┳"; - _teeLeftBold = "┫"; - _teeRightBold = "┣"; - _upEndBold = "╹"; - _downEndBold = "╻"; - _leftEndBold = "╸"; - _rightEndBold = "╺"; - _horizontalLineDouble = "═"; - _verticalLineDouble = "║"; - _topLeftCornerDouble = "╔"; - _topRightCornerDouble = "╗"; - _bottomLeftCornerDouble = "╚"; - _bottomRightCornerDouble = "╝"; - _crossDouble = "╬"; - _teeUpDouble = "╩"; - _teeDownDouble = "╦"; - _teeLeftDouble = "╣"; - _teeRightDouble = "╠"; - _horizontalLineDoubleDash = "╌"; - _horizontalLineDoubleDashBold = "╍"; - _verticalLineDoubleDash = "╎"; - _verticalLineDoubleDashBold = "╏"; - _horizontalLineTripleDash = "┄"; - _horizontalLineTripleDashBold = "┅"; - _verticalLineTripleDash = "┆"; - _verticalLineTripleDashBold = "┇"; - _horizontalLineQuadrupleDash = "┈"; - _horizontalLineQuadrupleDashBold = "┉"; - _verticalLineQuadrupleDash = "┊"; - _verticalLineQuadrupleDashBold = "┋"; - } -} +import '../../term_glyph.dart' as glyph; /// A bullet point. /// /// If [ascii] is `false`, this is "•". If it's `true`, this is /// "*" instead. -String get bullet => _bullet; -var _bullet = "•"; +String get bullet => glyph.glyphs.bullet; /// A left-pointing arrow. /// @@ -151,8 +19,7 @@ var _bullet = "•"; /// /// If [ascii] is `false`, this is "←". If it's `true`, this is /// "<" instead. -String get leftArrow => _leftArrow; -var _leftArrow = "←"; +String get leftArrow => glyph.glyphs.leftArrow; /// A right-pointing arrow. /// @@ -161,404 +28,353 @@ var _leftArrow = "←"; /// /// If [ascii] is `false`, this is "→". If it's `true`, this is /// ">" instead. -String get rightArrow => _rightArrow; -var _rightArrow = "→"; +String get rightArrow => glyph.glyphs.rightArrow; /// An upwards-pointing arrow. /// /// If [ascii] is `false`, this is "↑". If it's `true`, this is /// "^" instead. -String get upArrow => _upArrow; -var _upArrow = "↑"; +String get upArrow => glyph.glyphs.upArrow; /// A downwards-pointing arrow. /// /// If [ascii] is `false`, this is "↓". If it's `true`, this is /// "v" instead. -String get downArrow => _downArrow; -var _downArrow = "↓"; +String get downArrow => glyph.glyphs.downArrow; /// A two-character left-pointing arrow. /// /// If [ascii] is `false`, this is "◀━". If it's `true`, this is /// "<=" instead. -String get longLeftArrow => _longLeftArrow; -var _longLeftArrow = "◀━"; +String get longLeftArrow => glyph.glyphs.longLeftArrow; /// A two-character right-pointing arrow. /// /// If [ascii] is `false`, this is "━▶". If it's `true`, this is /// "=>" instead. -String get longRightArrow => _longRightArrow; -var _longRightArrow = "━▶"; +String get longRightArrow => glyph.glyphs.longRightArrow; /// A horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "─". If it's `true`, this is /// "-" instead. -String get horizontalLine => _horizontalLine; -var _horizontalLine = "─"; +String get horizontalLine => glyph.glyphs.horizontalLine; /// A vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "│". If it's `true`, this is /// "|" instead. -String get verticalLine => _verticalLine; -var _verticalLine = "│"; +String get verticalLine => glyph.glyphs.verticalLine; /// The upper left-hand corner of a box. /// /// If [ascii] is `false`, this is "┌". If it's `true`, this is /// "," instead. -String get topLeftCorner => _topLeftCorner; -var _topLeftCorner = "┌"; +String get topLeftCorner => glyph.glyphs.topLeftCorner; /// The upper right-hand corner of a box. /// /// If [ascii] is `false`, this is "┐". If it's `true`, this is /// "," instead. -String get topRightCorner => _topRightCorner; -var _topRightCorner = "┐"; +String get topRightCorner => glyph.glyphs.topRightCorner; /// The lower left-hand corner of a box. /// /// If [ascii] is `false`, this is "└". If it's `true`, this is /// "'" instead. -String get bottomLeftCorner => _bottomLeftCorner; -var _bottomLeftCorner = "└"; +String get bottomLeftCorner => glyph.glyphs.bottomLeftCorner; /// The lower right-hand corner of a box. /// /// If [ascii] is `false`, this is "┘". If it's `true`, this is /// "'" instead. -String get bottomRightCorner => _bottomRightCorner; -var _bottomRightCorner = "┘"; +String get bottomRightCorner => glyph.glyphs.bottomRightCorner; /// An intersection of vertical and horizontal box lines. /// /// If [ascii] is `false`, this is "┼". If it's `true`, this is /// "+" instead. -String get cross => _cross; -var _cross = "┼"; +String get cross => glyph.glyphs.cross; /// A horizontal box line with a vertical line going up from the middle. /// /// If [ascii] is `false`, this is "┴". If it's `true`, this is /// "+" instead. -String get teeUp => _teeUp; -var _teeUp = "┴"; +String get teeUp => glyph.glyphs.teeUp; /// A horizontal box line with a vertical line going down from the middle. /// /// If [ascii] is `false`, this is "┬". If it's `true`, this is /// "+" instead. -String get teeDown => _teeDown; -var _teeDown = "┬"; +String get teeDown => glyph.glyphs.teeDown; /// A vertical box line with a horizontal line going left from the middle. /// /// If [ascii] is `false`, this is "┤". If it's `true`, this is /// "+" instead. -String get teeLeft => _teeLeft; -var _teeLeft = "┤"; +String get teeLeft => glyph.glyphs.teeLeft; /// A vertical box line with a horizontal line going right from the middle. /// /// If [ascii] is `false`, this is "├". If it's `true`, this is /// "+" instead. -String get teeRight => _teeRight; -var _teeRight = "├"; +String get teeRight => glyph.glyphs.teeRight; /// The top half of a vertical box line. /// /// If [ascii] is `false`, this is "╵". If it's `true`, this is /// "'" instead. -String get upEnd => _upEnd; -var _upEnd = "╵"; +String get upEnd => glyph.glyphs.upEnd; /// The bottom half of a vertical box line. /// /// If [ascii] is `false`, this is "╷". If it's `true`, this is /// "," instead. -String get downEnd => _downEnd; -var _downEnd = "╷"; +String get downEnd => glyph.glyphs.downEnd; /// The left half of a horizontal box line. /// /// If [ascii] is `false`, this is "╴". If it's `true`, this is /// "-" instead. -String get leftEnd => _leftEnd; -var _leftEnd = "╴"; +String get leftEnd => glyph.glyphs.leftEnd; /// The right half of a horizontal box line. /// /// If [ascii] is `false`, this is "╶". If it's `true`, this is /// "-" instead. -String get rightEnd => _rightEnd; -var _rightEnd = "╶"; +String get rightEnd => glyph.glyphs.rightEnd; /// A bold horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "━". If it's `true`, this is /// "=" instead. -String get horizontalLineBold => _horizontalLineBold; -var _horizontalLineBold = "━"; +String get horizontalLineBold => glyph.glyphs.horizontalLineBold; /// A bold vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┃". If it's `true`, this is /// "|" instead. -String get verticalLineBold => _verticalLineBold; -var _verticalLineBold = "┃"; +String get verticalLineBold => glyph.glyphs.verticalLineBold; /// The bold upper left-hand corner of a box. /// /// If [ascii] is `false`, this is "┏". If it's `true`, this is /// "," instead. -String get topLeftCornerBold => _topLeftCornerBold; -var _topLeftCornerBold = "┏"; +String get topLeftCornerBold => glyph.glyphs.topLeftCornerBold; /// The bold upper right-hand corner of a box. /// /// If [ascii] is `false`, this is "┓". If it's `true`, this is /// "," instead. -String get topRightCornerBold => _topRightCornerBold; -var _topRightCornerBold = "┓"; +String get topRightCornerBold => glyph.glyphs.topRightCornerBold; /// The bold lower left-hand corner of a box. /// /// If [ascii] is `false`, this is "┗". If it's `true`, this is /// "'" instead. -String get bottomLeftCornerBold => _bottomLeftCornerBold; -var _bottomLeftCornerBold = "┗"; +String get bottomLeftCornerBold => glyph.glyphs.bottomLeftCornerBold; /// The bold lower right-hand corner of a box. /// /// If [ascii] is `false`, this is "┛". If it's `true`, this is /// "'" instead. -String get bottomRightCornerBold => _bottomRightCornerBold; -var _bottomRightCornerBold = "┛"; +String get bottomRightCornerBold => glyph.glyphs.bottomRightCornerBold; /// An intersection of bold vertical and horizontal box lines. /// /// If [ascii] is `false`, this is "╋". If it's `true`, this is /// "+" instead. -String get crossBold => _crossBold; -var _crossBold = "╋"; +String get crossBold => glyph.glyphs.crossBold; /// A bold horizontal box line with a vertical line going up from the middle. /// /// If [ascii] is `false`, this is "┻". If it's `true`, this is /// "+" instead. -String get teeUpBold => _teeUpBold; -var _teeUpBold = "┻"; +String get teeUpBold => glyph.glyphs.teeUpBold; /// A bold horizontal box line with a vertical line going down from the middle. /// /// If [ascii] is `false`, this is "┳". If it's `true`, this is /// "+" instead. -String get teeDownBold => _teeDownBold; -var _teeDownBold = "┳"; +String get teeDownBold => glyph.glyphs.teeDownBold; /// A bold vertical box line with a horizontal line going left from the middle. /// /// If [ascii] is `false`, this is "┫". If it's `true`, this is /// "+" instead. -String get teeLeftBold => _teeLeftBold; -var _teeLeftBold = "┫"; +String get teeLeftBold => glyph.glyphs.teeLeftBold; /// A bold vertical box line with a horizontal line going right from the middle. /// /// If [ascii] is `false`, this is "┣". If it's `true`, this is /// "+" instead. -String get teeRightBold => _teeRightBold; -var _teeRightBold = "┣"; +String get teeRightBold => glyph.glyphs.teeRightBold; /// The top half of a bold vertical box line. /// /// If [ascii] is `false`, this is "╹". If it's `true`, this is /// "'" instead. -String get upEndBold => _upEndBold; -var _upEndBold = "╹"; +String get upEndBold => glyph.glyphs.upEndBold; /// The bottom half of a bold vertical box line. /// /// If [ascii] is `false`, this is "╻". If it's `true`, this is /// "," instead. -String get downEndBold => _downEndBold; -var _downEndBold = "╻"; +String get downEndBold => glyph.glyphs.downEndBold; /// The left half of a bold horizontal box line. /// /// If [ascii] is `false`, this is "╸". If it's `true`, this is /// "-" instead. -String get leftEndBold => _leftEndBold; -var _leftEndBold = "╸"; +String get leftEndBold => glyph.glyphs.leftEndBold; /// The right half of a bold horizontal box line. /// /// If [ascii] is `false`, this is "╺". If it's `true`, this is /// "-" instead. -String get rightEndBold => _rightEndBold; -var _rightEndBold = "╺"; +String get rightEndBold => glyph.glyphs.rightEndBold; /// A double horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "═". If it's `true`, this is /// "=" instead. -String get horizontalLineDouble => _horizontalLineDouble; -var _horizontalLineDouble = "═"; +String get horizontalLineDouble => glyph.glyphs.horizontalLineDouble; /// A double vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "║". If it's `true`, this is /// "|" instead. -String get verticalLineDouble => _verticalLineDouble; -var _verticalLineDouble = "║"; +String get verticalLineDouble => glyph.glyphs.verticalLineDouble; /// The double upper left-hand corner of a box. /// /// If [ascii] is `false`, this is "╔". If it's `true`, this is /// "," instead. -String get topLeftCornerDouble => _topLeftCornerDouble; -var _topLeftCornerDouble = "╔"; +String get topLeftCornerDouble => glyph.glyphs.topLeftCornerDouble; /// The double upper right-hand corner of a box. /// /// If [ascii] is `false`, this is "╗". If it's `true`, this is /// "," instead. -String get topRightCornerDouble => _topRightCornerDouble; -var _topRightCornerDouble = "╗"; +String get topRightCornerDouble => glyph.glyphs.topRightCornerDouble; /// The double lower left-hand corner of a box. /// /// If [ascii] is `false`, this is "╚". If it's `true`, this is /// """ instead. -String get bottomLeftCornerDouble => _bottomLeftCornerDouble; -var _bottomLeftCornerDouble = "╚"; +String get bottomLeftCornerDouble => glyph.glyphs.bottomLeftCornerDouble; /// The double lower right-hand corner of a box. /// /// If [ascii] is `false`, this is "╝". If it's `true`, this is /// """ instead. -String get bottomRightCornerDouble => _bottomRightCornerDouble; -var _bottomRightCornerDouble = "╝"; +String get bottomRightCornerDouble => glyph.glyphs.bottomRightCornerDouble; /// An intersection of double vertical and horizontal box lines. /// /// If [ascii] is `false`, this is "╬". If it's `true`, this is /// "+" instead. -String get crossDouble => _crossDouble; -var _crossDouble = "╬"; +String get crossDouble => glyph.glyphs.crossDouble; /// A double horizontal box line with a vertical line going up from the middle. /// /// If [ascii] is `false`, this is "╩". If it's `true`, this is /// "+" instead. -String get teeUpDouble => _teeUpDouble; -var _teeUpDouble = "╩"; +String get teeUpDouble => glyph.glyphs.teeUpDouble; /// A double horizontal box line with a vertical line going down from the middle. /// /// If [ascii] is `false`, this is "╦". If it's `true`, this is /// "+" instead. -String get teeDownDouble => _teeDownDouble; -var _teeDownDouble = "╦"; +String get teeDownDouble => glyph.glyphs.teeDownDouble; /// A double vertical box line with a horizontal line going left from the middle. /// /// If [ascii] is `false`, this is "╣". If it's `true`, this is /// "+" instead. -String get teeLeftDouble => _teeLeftDouble; -var _teeLeftDouble = "╣"; +String get teeLeftDouble => glyph.glyphs.teeLeftDouble; /// A double vertical box line with a horizontal line going right from the middle. /// /// If [ascii] is `false`, this is "╠". If it's `true`, this is /// "+" instead. -String get teeRightDouble => _teeRightDouble; -var _teeRightDouble = "╠"; +String get teeRightDouble => glyph.glyphs.teeRightDouble; /// A dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "╌". If it's `true`, this is /// "-" instead. -String get horizontalLineDoubleDash => _horizontalLineDoubleDash; -var _horizontalLineDoubleDash = "╌"; +String get horizontalLineDoubleDash => glyph.glyphs.horizontalLineDoubleDash; /// A bold dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "╍". If it's `true`, this is /// "-" instead. -String get horizontalLineDoubleDashBold => _horizontalLineDoubleDashBold; -var _horizontalLineDoubleDashBold = "╍"; +String get horizontalLineDoubleDashBold => + glyph.glyphs.horizontalLineDoubleDashBold; /// A dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "╎". If it's `true`, this is /// "|" instead. -String get verticalLineDoubleDash => _verticalLineDoubleDash; -var _verticalLineDoubleDash = "╎"; +String get verticalLineDoubleDash => glyph.glyphs.verticalLineDoubleDash; /// A bold dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "╏". If it's `true`, this is /// "|" instead. -String get verticalLineDoubleDashBold => _verticalLineDoubleDashBold; -var _verticalLineDoubleDashBold = "╏"; +String get verticalLineDoubleDashBold => + glyph.glyphs.verticalLineDoubleDashBold; /// A dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┄". If it's `true`, this is /// "-" instead. -String get horizontalLineTripleDash => _horizontalLineTripleDash; -var _horizontalLineTripleDash = "┄"; +String get horizontalLineTripleDash => glyph.glyphs.horizontalLineTripleDash; /// A bold dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┅". If it's `true`, this is /// "-" instead. -String get horizontalLineTripleDashBold => _horizontalLineTripleDashBold; -var _horizontalLineTripleDashBold = "┅"; +String get horizontalLineTripleDashBold => + glyph.glyphs.horizontalLineTripleDashBold; /// A dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┆". If it's `true`, this is /// "|" instead. -String get verticalLineTripleDash => _verticalLineTripleDash; -var _verticalLineTripleDash = "┆"; +String get verticalLineTripleDash => glyph.glyphs.verticalLineTripleDash; /// A bold dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┇". If it's `true`, this is /// "|" instead. -String get verticalLineTripleDashBold => _verticalLineTripleDashBold; -var _verticalLineTripleDashBold = "┇"; +String get verticalLineTripleDashBold => + glyph.glyphs.verticalLineTripleDashBold; /// A dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┈". If it's `true`, this is /// "-" instead. -String get horizontalLineQuadrupleDash => _horizontalLineQuadrupleDash; -var _horizontalLineQuadrupleDash = "┈"; +String get horizontalLineQuadrupleDash => + glyph.glyphs.horizontalLineQuadrupleDash; /// A bold dashed horizontal line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┉". If it's `true`, this is /// "-" instead. -String get horizontalLineQuadrupleDashBold => _horizontalLineQuadrupleDashBold; -var _horizontalLineQuadrupleDashBold = "┉"; +String get horizontalLineQuadrupleDashBold => + glyph.glyphs.horizontalLineQuadrupleDashBold; /// A dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┊". If it's `true`, this is /// "|" instead. -String get verticalLineQuadrupleDash => _verticalLineQuadrupleDash; -var _verticalLineQuadrupleDash = "┊"; +String get verticalLineQuadrupleDash => glyph.glyphs.verticalLineQuadrupleDash; /// A bold dashed vertical line that can be used to draw a box. /// /// If [ascii] is `false`, this is "┋". If it's `true`, this is /// "|" instead. -String get verticalLineQuadrupleDashBold => _verticalLineQuadrupleDashBold; -var _verticalLineQuadrupleDashBold = "┋"; +String get verticalLineQuadrupleDashBold => + glyph.glyphs.verticalLineQuadrupleDashBold; diff --git a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart new file mode 100644 index 000000000..4e54068ac --- /dev/null +++ b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart @@ -0,0 +1,322 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Don't modify this file by hand! It's generated by tool/generate.dart. + +import 'glyph_set.dart'; + +/// A [GlyphSet] that includes only Unicode glyphs. +class UnicodeGlyphSet implements GlyphSet { + const UnicodeGlyphSet(); + + /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// otherwise. + String glyphOrAscii(String glyph, String alternative) => glyph; + + /// A bullet point. + /// + /// Always "•" for [this]. + String get bullet => "•"; + + /// A left-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + /// + /// Always "←" for [this]. + String get leftArrow => "←"; + + /// A right-pointing arrow. + /// + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some + /// terminal fonts, and should generally be surrounding by spaces. + /// + /// Always "→" for [this]. + String get rightArrow => "→"; + + /// An upwards-pointing arrow. + /// + /// Always "↑" for [this]. + String get upArrow => "↑"; + + /// A downwards-pointing arrow. + /// + /// Always "↓" for [this]. + String get downArrow => "↓"; + + /// A two-character left-pointing arrow. + /// + /// Always "◀━" for [this]. + String get longLeftArrow => "◀━"; + + /// A two-character right-pointing arrow. + /// + /// Always "━▶" for [this]. + String get longRightArrow => "━▶"; + + /// A horizontal line that can be used to draw a box. + /// + /// Always "─" for [this]. + String get horizontalLine => "─"; + + /// A vertical line that can be used to draw a box. + /// + /// Always "│" for [this]. + String get verticalLine => "│"; + + /// The upper left-hand corner of a box. + /// + /// Always "┌" for [this]. + String get topLeftCorner => "┌"; + + /// The upper right-hand corner of a box. + /// + /// Always "┐" for [this]. + String get topRightCorner => "┐"; + + /// The lower left-hand corner of a box. + /// + /// Always "└" for [this]. + String get bottomLeftCorner => "└"; + + /// The lower right-hand corner of a box. + /// + /// Always "┘" for [this]. + String get bottomRightCorner => "┘"; + + /// An intersection of vertical and horizontal box lines. + /// + /// Always "┼" for [this]. + String get cross => "┼"; + + /// A horizontal box line with a vertical line going up from the middle. + /// + /// Always "┴" for [this]. + String get teeUp => "┴"; + + /// A horizontal box line with a vertical line going down from the middle. + /// + /// Always "┬" for [this]. + String get teeDown => "┬"; + + /// A vertical box line with a horizontal line going left from the middle. + /// + /// Always "┤" for [this]. + String get teeLeft => "┤"; + + /// A vertical box line with a horizontal line going right from the middle. + /// + /// Always "├" for [this]. + String get teeRight => "├"; + + /// The top half of a vertical box line. + /// + /// Always "╵" for [this]. + String get upEnd => "╵"; + + /// The bottom half of a vertical box line. + /// + /// Always "╷" for [this]. + String get downEnd => "╷"; + + /// The left half of a horizontal box line. + /// + /// Always "╴" for [this]. + String get leftEnd => "╴"; + + /// The right half of a horizontal box line. + /// + /// Always "╶" for [this]. + String get rightEnd => "╶"; + + /// A bold horizontal line that can be used to draw a box. + /// + /// Always "━" for [this]. + String get horizontalLineBold => "━"; + + /// A bold vertical line that can be used to draw a box. + /// + /// Always "┃" for [this]. + String get verticalLineBold => "┃"; + + /// The bold upper left-hand corner of a box. + /// + /// Always "┏" for [this]. + String get topLeftCornerBold => "┏"; + + /// The bold upper right-hand corner of a box. + /// + /// Always "┓" for [this]. + String get topRightCornerBold => "┓"; + + /// The bold lower left-hand corner of a box. + /// + /// Always "┗" for [this]. + String get bottomLeftCornerBold => "┗"; + + /// The bold lower right-hand corner of a box. + /// + /// Always "┛" for [this]. + String get bottomRightCornerBold => "┛"; + + /// An intersection of bold vertical and horizontal box lines. + /// + /// Always "╋" for [this]. + String get crossBold => "╋"; + + /// A bold horizontal box line with a vertical line going up from the middle. + /// + /// Always "┻" for [this]. + String get teeUpBold => "┻"; + + /// A bold horizontal box line with a vertical line going down from the middle. + /// + /// Always "┳" for [this]. + String get teeDownBold => "┳"; + + /// A bold vertical box line with a horizontal line going left from the middle. + /// + /// Always "┫" for [this]. + String get teeLeftBold => "┫"; + + /// A bold vertical box line with a horizontal line going right from the middle. + /// + /// Always "┣" for [this]. + String get teeRightBold => "┣"; + + /// The top half of a bold vertical box line. + /// + /// Always "╹" for [this]. + String get upEndBold => "╹"; + + /// The bottom half of a bold vertical box line. + /// + /// Always "╻" for [this]. + String get downEndBold => "╻"; + + /// The left half of a bold horizontal box line. + /// + /// Always "╸" for [this]. + String get leftEndBold => "╸"; + + /// The right half of a bold horizontal box line. + /// + /// Always "╺" for [this]. + String get rightEndBold => "╺"; + + /// A double horizontal line that can be used to draw a box. + /// + /// Always "═" for [this]. + String get horizontalLineDouble => "═"; + + /// A double vertical line that can be used to draw a box. + /// + /// Always "║" for [this]. + String get verticalLineDouble => "║"; + + /// The double upper left-hand corner of a box. + /// + /// Always "╔" for [this]. + String get topLeftCornerDouble => "╔"; + + /// The double upper right-hand corner of a box. + /// + /// Always "╗" for [this]. + String get topRightCornerDouble => "╗"; + + /// The double lower left-hand corner of a box. + /// + /// Always "╚" for [this]. + String get bottomLeftCornerDouble => "╚"; + + /// The double lower right-hand corner of a box. + /// + /// Always "╝" for [this]. + String get bottomRightCornerDouble => "╝"; + + /// An intersection of double vertical and horizontal box lines. + /// + /// Always "╬" for [this]. + String get crossDouble => "╬"; + + /// A double horizontal box line with a vertical line going up from the middle. + /// + /// Always "╩" for [this]. + String get teeUpDouble => "╩"; + + /// A double horizontal box line with a vertical line going down from the middle. + /// + /// Always "╦" for [this]. + String get teeDownDouble => "╦"; + + /// A double vertical box line with a horizontal line going left from the middle. + /// + /// Always "╣" for [this]. + String get teeLeftDouble => "╣"; + + /// A double vertical box line with a horizontal line going right from the middle. + /// + /// Always "╠" for [this]. + String get teeRightDouble => "╠"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "╌" for [this]. + String get horizontalLineDoubleDash => "╌"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "╍" for [this]. + String get horizontalLineDoubleDashBold => "╍"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "╎" for [this]. + String get verticalLineDoubleDash => "╎"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "╏" for [this]. + String get verticalLineDoubleDashBold => "╏"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "┄" for [this]. + String get horizontalLineTripleDash => "┄"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "┅" for [this]. + String get horizontalLineTripleDashBold => "┅"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "┆" for [this]. + String get verticalLineTripleDash => "┆"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "┇" for [this]. + String get verticalLineTripleDashBold => "┇"; + + /// A dashed horizontal line that can be used to draw a box. + /// + /// Always "┈" for [this]. + String get horizontalLineQuadrupleDash => "┈"; + + /// A bold dashed horizontal line that can be used to draw a box. + /// + /// Always "┉" for [this]. + String get horizontalLineQuadrupleDashBold => "┉"; + + /// A dashed vertical line that can be used to draw a box. + /// + /// Always "┊" for [this]. + String get verticalLineQuadrupleDash => "┊"; + + /// A bold dashed vertical line that can be used to draw a box. + /// + /// Always "┋" for [this]. + String get verticalLineQuadrupleDashBold => "┋"; +} diff --git a/pkgs/term_glyph/lib/term_glyph.dart b/pkgs/term_glyph/lib/term_glyph.dart index 8582175ed..57c762e55 100644 --- a/pkgs/term_glyph/lib/term_glyph.dart +++ b/pkgs/term_glyph/lib/term_glyph.dart @@ -2,11 +2,36 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -export 'src/generated.dart'; +export 'src/generated/glyph_set.dart'; +export 'src/generated/top_level.dart'; -import 'src/generated.dart'; +import 'src/generated/ascii_glyph_set.dart'; +import 'src/generated/glyph_set.dart'; +import 'src/generated/unicode_glyph_set.dart'; + +/// A [GlyphSet] that always returns ASCII glyphs. +const GlyphSet asciiGlyphs = const AsciiGlyphSet(); + +/// A [GlyphSet] that always returns Unicode glyphs. +const GlyphSet unicodeGlyphs = const UnicodeGlyphSet(); + +/// Returns [asciiGlyphs] if [ascii] is `true` or [unicodeGlyphs] otherwise. +/// +/// Returns [unicodeGlyphs] by default. +GlyphSet get glyphs => _glyphs; +GlyphSet _glyphs = unicodeGlyphs; + +/// Whether the glyph getters return plain ASCII, as opposed to Unicode +/// characters or sequences. +/// +/// Defaults to `false`. +bool get ascii => glyphs == asciiGlyphs; + +set ascii(bool value) { + _glyphs = value ? asciiGlyphs : unicodeGlyphs; +} /// Returns [glyph] if Unicode glyph are allowed, and [alternative] if they /// aren't. String glyphOrAscii(String glyph, String alternative) => - ascii ? alternative : glyph; + glyphs.glyphOrAscii(glyph, alternative); diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 4cbaeb4be..29ea7d6b6 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,7 +1,7 @@ name: term_glyph -version: 1.0.2-dev +version: 1.1.0 -description: Useful glyphs and Windows-safe equivalents. +description: Useful Unicode glyphs and ASCII substitutes. author: Dart Team homepage: https://github.com/dart-lang/term_glyph @@ -11,4 +11,5 @@ environment: dev_dependencies: csv: '>=3.0.0 <5.0.0' dart_style: '>=0.2.0 <2.0.0' + meta: '>=0.9.0 <2.0.0' test: '>=0.12.0 <2.0.0' diff --git a/pkgs/term_glyph/test/symbol_test.dart b/pkgs/term_glyph/test/symbol_test.dart index e3f94e575..1e665e80c 100644 --- a/pkgs/term_glyph/test/symbol_test.dart +++ b/pkgs/term_glyph/test/symbol_test.dart @@ -12,7 +12,7 @@ void main() { glyph.ascii = false; }); - test("glyphs return Unicode versions", () { + test("glyph getters return Unicode versions", () { expect(glyph.topLeftCorner, equals("┌")); expect(glyph.teeUpBold, equals("┻")); expect(glyph.longLeftArrow, equals("◀━")); @@ -21,6 +21,16 @@ void main() { test("glyphOrAscii returns the first argument", () { expect(glyph.glyphOrAscii("A", "B"), equals("A")); }); + + test("glyphs returns unicodeGlyphs", () { + expect(glyph.glyphs, equals(glyph.unicodeGlyphs)); + }); + + test("asciiGlyphs still returns ASCII characters", () { + expect(glyph.asciiGlyphs.topLeftCorner, equals(",")); + expect(glyph.asciiGlyphs.teeUpBold, equals("+")); + expect(glyph.asciiGlyphs.longLeftArrow, equals("<=")); + }); }); group("with ascii = true", () { @@ -37,5 +47,15 @@ void main() { test("glyphOrAscii returns the second argument", () { expect(glyph.glyphOrAscii("A", "B"), equals("B")); }); + + test("glyphs returns asciiGlyphs", () { + expect(glyph.glyphs, equals(glyph.asciiGlyphs)); + }); + + test("unicodeGlyphs still returns Unicode characters", () { + expect(glyph.unicodeGlyphs.topLeftCorner, equals("┌")); + expect(glyph.unicodeGlyphs.teeUpBold, equals("┻")); + expect(glyph.unicodeGlyphs.longLeftArrow, equals("◀━")); + }); }); } diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index aa05c13fa..b4b3e431c 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:csv/csv.dart'; +import 'package:meta/meta.dart'; void main() { var csv = new CsvCodec(eol: "\n"); @@ -13,36 +14,130 @@ void main() { // Remove comments and empty lines. data.removeWhere((row) => row.length < 3); - var file = new File("lib/src/generated.dart").openSync(mode: FileMode.write); - file.writeStringSync(""" - // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file + new Directory("lib/src/generated").createSync(recursive: true); + + _writeGlyphSetInterface(data); + _writeGlyphSet(data, ascii: false); + _writeGlyphSet(data, ascii: true); + _writeTopLevel(data); + + var result = Process.runSync( + "pub", ["run", "dart_style:format", "-w", "lib/src/generated"]); + print(result.stderr); + exit(result.exitCode); +} + +/// Writes `lib/src/generated/glyph_set.dart`. +void _writeGlyphSetInterface(List data) { + var file = new File("lib/src/generated/glyph_set.dart") + .openSync(mode: FileMode.write); + file.writeStringSync(r""" + // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // Don't modify this file by hand! It's generated by tool/generate.dart. - /// Whether the glyph getters return plain ASCII, as opposed to Unicode - /// characters or sequences. + /// A class that provides access to every configurable glyph. + /// + /// This is provided as a class so that individual chunks of code can choose + /// between [ascii] and [unicode] glyphs. For example: /// - /// Defaults to `false`. - bool get ascii => _ascii; - var _ascii = false; - set ascii(bool value) { - _ascii = value; - if (value) { + /// ```dart + /// import 'package:term_glyph/term_glyph.dart' as glyph; + /// + /// /// Adds a vertical line to the left of [text]. + /// /// + /// /// If [unicode] is `true`, this uses Unicode for the line. If it's + /// /// `false`, this uses plain ASCII characters. If it's `null`, it + /// /// defaults to [glyph.ascii]. + /// void addVerticalLine(String text, {bool unicode}) { + /// var glyphs = + /// (unicode ?? !glyph.ascii) ? glyph.unicodeGlyphs : glyph.asciiGlyphs; + /// + /// return text + /// .split("\n") + /// .map((line) => "${glyphs.verticalLine} $line") + /// .join("\n"); + /// } + /// ``` + abstract class GlyphSet { + /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// otherwise. + String glyphOrAscii(String glyph, String alternative); """); for (var glyph in data) { - file.writeStringSync("_${glyph[0]} = ${_quote(glyph[2])};"); + for (var line in glyph[3].split("\n")) { + file.writeStringSync("/// $line\n"); + } + + file.writeStringSync("String get ${glyph[0]};"); } - file.writeStringSync("} else {"); + file.writeStringSync("}"); + file.closeSync(); +} + +/// Writes `lib/src/generated/${prefix.toLowerCase()}_glyph_set.dart`. +/// +/// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes +/// the Unicode glyph set. +void _writeGlyphSet(List data, {@required bool ascii}) { + var file = new File( + "lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart") + .openSync(mode: FileMode.write); + + var className = "${ascii ? "Ascii" : "Unicode"}GlyphSet"; + file.writeStringSync(""" + // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Don't modify this file by hand! It's generated by tool/generate.dart. + + import 'glyph_set.dart'; + + /// A [GlyphSet] that includes only ${ascii ? "ASCII" : "Unicode"} glyphs. + class $className implements GlyphSet { + const $className(); + /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// otherwise. + String glyphOrAscii(String glyph, String alternative) => + ${ascii ? "alternative" : "glyph"}; + """); + var index = ascii ? 2 : 1; for (var glyph in data) { - file.writeStringSync("_${glyph[0]} = ${_quote(glyph[1])};"); + for (var line in glyph[3].split("\n")) { + file.writeStringSync("/// $line\n"); + } + + file.writeStringSync(""" + /// + /// Always ${_quote(glyph[index])} for [this]. + String get ${glyph[0]} => ${_quote(glyph[index])}; + """); } - file.writeStringSync("}}"); + file.writeStringSync("}"); + file.closeSync(); +} + +/// Writes `lib/src/generated/top_level.dart`. +void _writeTopLevel(List data) { + var file = new File("lib/src/generated/top_level.dart") + .openSync(mode: FileMode.write); + + file.writeStringSync(""" + // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Don't modify this file by hand! It's generated by tool/generate.dart. + + import '../../term_glyph.dart' as glyph; + """); for (var glyph in data) { for (var line in glyph[3].split("\n")) { @@ -53,15 +148,11 @@ void main() { /// /// If [ascii] is `false`, this is "${glyph[1]}". If it's `true`, this is /// "${glyph[2]}" instead. - String get ${glyph[0]} => _${glyph[0]}; - var _${glyph[0]} = ${_quote(glyph[1])}; + String get ${glyph[0]} => glyph.glyphs.${glyph[0]}; """); } - var result = Process.runSync( - "pub", ["run", "dart_style:format", "-w", "lib/src/generated.dart"]); - print(result.stderr); - exit(result.exitCode); + file.closeSync(); } String _quote(String input) => input.contains('"') ? "'$input'" : '"$input"'; From 78adc2b4ac74fe32c56ca361e8c66069fed26759 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 9 Dec 2019 17:27:35 -0800 Subject: [PATCH 08/61] Run dartfmt --fix (dart-lang/term_glyph#8) Drops optional new and const. --- pkgs/term_glyph/lib/term_glyph.dart | 4 ++-- pkgs/term_glyph/tool/generate.dart | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/term_glyph/lib/term_glyph.dart b/pkgs/term_glyph/lib/term_glyph.dart index 57c762e55..b7361be6d 100644 --- a/pkgs/term_glyph/lib/term_glyph.dart +++ b/pkgs/term_glyph/lib/term_glyph.dart @@ -10,10 +10,10 @@ import 'src/generated/glyph_set.dart'; import 'src/generated/unicode_glyph_set.dart'; /// A [GlyphSet] that always returns ASCII glyphs. -const GlyphSet asciiGlyphs = const AsciiGlyphSet(); +const GlyphSet asciiGlyphs = AsciiGlyphSet(); /// A [GlyphSet] that always returns Unicode glyphs. -const GlyphSet unicodeGlyphs = const UnicodeGlyphSet(); +const GlyphSet unicodeGlyphs = UnicodeGlyphSet(); /// Returns [asciiGlyphs] if [ascii] is `true` or [unicodeGlyphs] otherwise. /// diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index b4b3e431c..370994f96 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -8,13 +8,13 @@ import 'package:csv/csv.dart'; import 'package:meta/meta.dart'; void main() { - var csv = new CsvCodec(eol: "\n"); - var data = csv.decoder.convert(new File("data.csv").readAsStringSync()); + var csv = CsvCodec(eol: "\n"); + var data = csv.decoder.convert(File("data.csv").readAsStringSync()); // Remove comments and empty lines. data.removeWhere((row) => row.length < 3); - new Directory("lib/src/generated").createSync(recursive: true); + Directory("lib/src/generated").createSync(recursive: true); _writeGlyphSetInterface(data); _writeGlyphSet(data, ascii: false); @@ -29,8 +29,8 @@ void main() { /// Writes `lib/src/generated/glyph_set.dart`. void _writeGlyphSetInterface(List data) { - var file = new File("lib/src/generated/glyph_set.dart") - .openSync(mode: FileMode.write); + var file = + File("lib/src/generated/glyph_set.dart").openSync(mode: FileMode.write); file.writeStringSync(r""" // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a @@ -84,9 +84,9 @@ void _writeGlyphSetInterface(List data) { /// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes /// the Unicode glyph set. void _writeGlyphSet(List data, {@required bool ascii}) { - var file = new File( - "lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart") - .openSync(mode: FileMode.write); + var file = + File("lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart") + .openSync(mode: FileMode.write); var className = "${ascii ? "Ascii" : "Unicode"}GlyphSet"; file.writeStringSync(""" @@ -126,8 +126,8 @@ void _writeGlyphSet(List data, {@required bool ascii}) { /// Writes `lib/src/generated/top_level.dart`. void _writeTopLevel(List data) { - var file = new File("lib/src/generated/top_level.dart") - .openSync(mode: FileMode.write); + var file = + File("lib/src/generated/top_level.dart").openSync(mode: FileMode.write); file.writeStringSync(""" // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file From b1a5507ed3dd26ee9dcb402ecfca85503f4f3f3a Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 9 Dec 2019 17:39:36 -0800 Subject: [PATCH 09/61] Enforce and fix package:pedantic lints (dart-lang/term_glyph#9) - annotate_overrides - prefer_single_quotes Update `tool/generate.dart` to prefer single quotes and add override annotations. Regenerate files. Fix other cases by hand. --- pkgs/term_glyph/analysis_options.yaml | 1 + .../lib/src/generated/ascii_glyph_set.dart | 269 ++++++++++------ .../lib/src/generated/glyph_set.dart | 16 +- .../lib/src/generated/unicode_glyph_set.dart | 301 +++++++++++------- pkgs/term_glyph/test/symbol_test.dart | 48 +-- pkgs/term_glyph/tool/generate.dart | 64 ++-- 6 files changed, 412 insertions(+), 287 deletions(-) create mode 100644 pkgs/term_glyph/analysis_options.yaml diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml new file mode 100644 index 000000000..108d1058a --- /dev/null +++ b/pkgs/term_glyph/analysis_options.yaml @@ -0,0 +1 @@ +include: package:pedantic/analysis_options.yaml diff --git a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart index f470fe4a0..c233bf510 100644 --- a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart @@ -12,311 +12,372 @@ class AsciiGlyphSet implements GlyphSet { /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] /// otherwise. + @override String glyphOrAscii(String glyph, String alternative) => alternative; /// A bullet point. /// - /// Always "*" for [this]. - String get bullet => "*"; + /// Always '*' for [this]. + @override + String get bullet => '*'; /// A left-pointing arrow. /// /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// - /// Always "<" for [this]. - String get leftArrow => "<"; + /// Always '<' for [this]. + @override + String get leftArrow => '<'; /// A right-pointing arrow. /// /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// - /// Always ">" for [this]. - String get rightArrow => ">"; + /// Always '>' for [this]. + @override + String get rightArrow => '>'; /// An upwards-pointing arrow. /// - /// Always "^" for [this]. - String get upArrow => "^"; + /// Always '^' for [this]. + @override + String get upArrow => '^'; /// A downwards-pointing arrow. /// - /// Always "v" for [this]. - String get downArrow => "v"; + /// Always 'v' for [this]. + @override + String get downArrow => 'v'; /// A two-character left-pointing arrow. /// - /// Always "<=" for [this]. - String get longLeftArrow => "<="; + /// Always '<=' for [this]. + @override + String get longLeftArrow => '<='; /// A two-character right-pointing arrow. /// - /// Always "=>" for [this]. - String get longRightArrow => "=>"; + /// Always '=>' for [this]. + @override + String get longRightArrow => '=>'; /// A horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLine => "-"; + /// Always '-' for [this]. + @override + String get horizontalLine => '-'; /// A vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLine => "|"; + /// Always '|' for [this]. + @override + String get verticalLine => '|'; /// The upper left-hand corner of a box. /// - /// Always "," for [this]. - String get topLeftCorner => ","; + /// Always ',' for [this]. + @override + String get topLeftCorner => ','; /// The upper right-hand corner of a box. /// - /// Always "," for [this]. - String get topRightCorner => ","; + /// Always ',' for [this]. + @override + String get topRightCorner => ','; /// The lower left-hand corner of a box. /// /// Always "'" for [this]. + @override String get bottomLeftCorner => "'"; /// The lower right-hand corner of a box. /// /// Always "'" for [this]. + @override String get bottomRightCorner => "'"; /// An intersection of vertical and horizontal box lines. /// - /// Always "+" for [this]. - String get cross => "+"; + /// Always '+' for [this]. + @override + String get cross => '+'; /// A horizontal box line with a vertical line going up from the middle. /// - /// Always "+" for [this]. - String get teeUp => "+"; + /// Always '+' for [this]. + @override + String get teeUp => '+'; /// A horizontal box line with a vertical line going down from the middle. /// - /// Always "+" for [this]. - String get teeDown => "+"; + /// Always '+' for [this]. + @override + String get teeDown => '+'; /// A vertical box line with a horizontal line going left from the middle. /// - /// Always "+" for [this]. - String get teeLeft => "+"; + /// Always '+' for [this]. + @override + String get teeLeft => '+'; /// A vertical box line with a horizontal line going right from the middle. /// - /// Always "+" for [this]. - String get teeRight => "+"; + /// Always '+' for [this]. + @override + String get teeRight => '+'; /// The top half of a vertical box line. /// /// Always "'" for [this]. + @override String get upEnd => "'"; /// The bottom half of a vertical box line. /// - /// Always "," for [this]. - String get downEnd => ","; + /// Always ',' for [this]. + @override + String get downEnd => ','; /// The left half of a horizontal box line. /// - /// Always "-" for [this]. - String get leftEnd => "-"; + /// Always '-' for [this]. + @override + String get leftEnd => '-'; /// The right half of a horizontal box line. /// - /// Always "-" for [this]. - String get rightEnd => "-"; + /// Always '-' for [this]. + @override + String get rightEnd => '-'; /// A bold horizontal line that can be used to draw a box. /// - /// Always "=" for [this]. - String get horizontalLineBold => "="; + /// Always '=' for [this]. + @override + String get horizontalLineBold => '='; /// A bold vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineBold => "|"; + /// Always '|' for [this]. + @override + String get verticalLineBold => '|'; /// The bold upper left-hand corner of a box. /// - /// Always "," for [this]. - String get topLeftCornerBold => ","; + /// Always ',' for [this]. + @override + String get topLeftCornerBold => ','; /// The bold upper right-hand corner of a box. /// - /// Always "," for [this]. - String get topRightCornerBold => ","; + /// Always ',' for [this]. + @override + String get topRightCornerBold => ','; /// The bold lower left-hand corner of a box. /// /// Always "'" for [this]. + @override String get bottomLeftCornerBold => "'"; /// The bold lower right-hand corner of a box. /// /// Always "'" for [this]. + @override String get bottomRightCornerBold => "'"; /// An intersection of bold vertical and horizontal box lines. /// - /// Always "+" for [this]. - String get crossBold => "+"; + /// Always '+' for [this]. + @override + String get crossBold => '+'; /// A bold horizontal box line with a vertical line going up from the middle. /// - /// Always "+" for [this]. - String get teeUpBold => "+"; + /// Always '+' for [this]. + @override + String get teeUpBold => '+'; /// A bold horizontal box line with a vertical line going down from the middle. /// - /// Always "+" for [this]. - String get teeDownBold => "+"; + /// Always '+' for [this]. + @override + String get teeDownBold => '+'; /// A bold vertical box line with a horizontal line going left from the middle. /// - /// Always "+" for [this]. - String get teeLeftBold => "+"; + /// Always '+' for [this]. + @override + String get teeLeftBold => '+'; /// A bold vertical box line with a horizontal line going right from the middle. /// - /// Always "+" for [this]. - String get teeRightBold => "+"; + /// Always '+' for [this]. + @override + String get teeRightBold => '+'; /// The top half of a bold vertical box line. /// /// Always "'" for [this]. + @override String get upEndBold => "'"; /// The bottom half of a bold vertical box line. /// - /// Always "," for [this]. - String get downEndBold => ","; + /// Always ',' for [this]. + @override + String get downEndBold => ','; /// The left half of a bold horizontal box line. /// - /// Always "-" for [this]. - String get leftEndBold => "-"; + /// Always '-' for [this]. + @override + String get leftEndBold => '-'; /// The right half of a bold horizontal box line. /// - /// Always "-" for [this]. - String get rightEndBold => "-"; + /// Always '-' for [this]. + @override + String get rightEndBold => '-'; /// A double horizontal line that can be used to draw a box. /// - /// Always "=" for [this]. - String get horizontalLineDouble => "="; + /// Always '=' for [this]. + @override + String get horizontalLineDouble => '='; /// A double vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineDouble => "|"; + /// Always '|' for [this]. + @override + String get verticalLineDouble => '|'; /// The double upper left-hand corner of a box. /// - /// Always "," for [this]. - String get topLeftCornerDouble => ","; + /// Always ',' for [this]. + @override + String get topLeftCornerDouble => ','; /// The double upper right-hand corner of a box. /// - /// Always "," for [this]. - String get topRightCornerDouble => ","; + /// Always ',' for [this]. + @override + String get topRightCornerDouble => ','; /// The double lower left-hand corner of a box. /// /// Always '"' for [this]. + @override String get bottomLeftCornerDouble => '"'; /// The double lower right-hand corner of a box. /// /// Always '"' for [this]. + @override String get bottomRightCornerDouble => '"'; /// An intersection of double vertical and horizontal box lines. /// - /// Always "+" for [this]. - String get crossDouble => "+"; + /// Always '+' for [this]. + @override + String get crossDouble => '+'; /// A double horizontal box line with a vertical line going up from the middle. /// - /// Always "+" for [this]. - String get teeUpDouble => "+"; + /// Always '+' for [this]. + @override + String get teeUpDouble => '+'; /// A double horizontal box line with a vertical line going down from the middle. /// - /// Always "+" for [this]. - String get teeDownDouble => "+"; + /// Always '+' for [this]. + @override + String get teeDownDouble => '+'; /// A double vertical box line with a horizontal line going left from the middle. /// - /// Always "+" for [this]. - String get teeLeftDouble => "+"; + /// Always '+' for [this]. + @override + String get teeLeftDouble => '+'; /// A double vertical box line with a horizontal line going right from the middle. /// - /// Always "+" for [this]. - String get teeRightDouble => "+"; + /// Always '+' for [this]. + @override + String get teeRightDouble => '+'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineDoubleDash => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineDoubleDash => '-'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineDoubleDashBold => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineDoubleDashBold => '-'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineDoubleDash => "|"; + /// Always '|' for [this]. + @override + String get verticalLineDoubleDash => '|'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineDoubleDashBold => "|"; + /// Always '|' for [this]. + @override + String get verticalLineDoubleDashBold => '|'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineTripleDash => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineTripleDash => '-'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineTripleDashBold => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineTripleDashBold => '-'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineTripleDash => "|"; + /// Always '|' for [this]. + @override + String get verticalLineTripleDash => '|'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineTripleDashBold => "|"; + /// Always '|' for [this]. + @override + String get verticalLineTripleDashBold => '|'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineQuadrupleDash => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineQuadrupleDash => '-'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "-" for [this]. - String get horizontalLineQuadrupleDashBold => "-"; + /// Always '-' for [this]. + @override + String get horizontalLineQuadrupleDashBold => '-'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineQuadrupleDash => "|"; + /// Always '|' for [this]. + @override + String get verticalLineQuadrupleDash => '|'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "|" for [this]. - String get verticalLineQuadrupleDashBold => "|"; + /// Always '|' for [this]. + @override + String get verticalLineQuadrupleDashBold => '|'; } diff --git a/pkgs/term_glyph/lib/src/generated/glyph_set.dart b/pkgs/term_glyph/lib/src/generated/glyph_set.dart index 93676db9a..941da4f00 100644 --- a/pkgs/term_glyph/lib/src/generated/glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/glyph_set.dart @@ -14,17 +14,17 @@ /// /// /// Adds a vertical line to the left of [text]. /// /// -/// /// If [ascii] is `true`, this uses plain ASCII for the line. If it's -/// /// `false`, this uses Unicode characters. If it's `null`, it defaults -/// /// to [glyph.ascii]. -/// void addVerticalLine(String text, {bool ascii}) { +/// /// If [unicode] is `true`, this uses Unicode for the line. If it's +/// /// `false`, this uses plain ASCII characters. If it's `null`, it +/// /// defaults to [glyph.ascii]. +/// void addVerticalLine(String text, {bool unicode}) { /// var glyphs = -/// (ascii ?? glyph.ascii) ? glyph.asciiGlyphs : glyph.unicodeGlyphs; +/// (unicode ?? !glyph.ascii) ? glyph.unicodeGlyphs : glyph.asciiGlyphs; /// /// return text -/// .split("\n") -/// .map((line) => "${glyphs.verticalLine} $line") -/// .join("\n"); +/// .split('\n') +/// .map((line) => '${glyphs.verticalLine} $line') +/// .join('\n'); /// } /// ``` abstract class GlyphSet { diff --git a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart index 4e54068ac..bc6ad3348 100644 --- a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart @@ -12,311 +12,372 @@ class UnicodeGlyphSet implements GlyphSet { /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] /// otherwise. + @override String glyphOrAscii(String glyph, String alternative) => glyph; /// A bullet point. /// - /// Always "•" for [this]. - String get bullet => "•"; + /// Always '•' for [this]. + @override + String get bullet => '•'; /// A left-pointing arrow. /// /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// - /// Always "←" for [this]. - String get leftArrow => "←"; + /// Always '←' for [this]. + @override + String get leftArrow => '←'; /// A right-pointing arrow. /// /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// - /// Always "→" for [this]. - String get rightArrow => "→"; + /// Always '→' for [this]. + @override + String get rightArrow => '→'; /// An upwards-pointing arrow. /// - /// Always "↑" for [this]. - String get upArrow => "↑"; + /// Always '↑' for [this]. + @override + String get upArrow => '↑'; /// A downwards-pointing arrow. /// - /// Always "↓" for [this]. - String get downArrow => "↓"; + /// Always '↓' for [this]. + @override + String get downArrow => '↓'; /// A two-character left-pointing arrow. /// - /// Always "◀━" for [this]. - String get longLeftArrow => "◀━"; + /// Always '◀━' for [this]. + @override + String get longLeftArrow => '◀━'; /// A two-character right-pointing arrow. /// - /// Always "━▶" for [this]. - String get longRightArrow => "━▶"; + /// Always '━▶' for [this]. + @override + String get longRightArrow => '━▶'; /// A horizontal line that can be used to draw a box. /// - /// Always "─" for [this]. - String get horizontalLine => "─"; + /// Always '─' for [this]. + @override + String get horizontalLine => '─'; /// A vertical line that can be used to draw a box. /// - /// Always "│" for [this]. - String get verticalLine => "│"; + /// Always '│' for [this]. + @override + String get verticalLine => '│'; /// The upper left-hand corner of a box. /// - /// Always "┌" for [this]. - String get topLeftCorner => "┌"; + /// Always '┌' for [this]. + @override + String get topLeftCorner => '┌'; /// The upper right-hand corner of a box. /// - /// Always "┐" for [this]. - String get topRightCorner => "┐"; + /// Always '┐' for [this]. + @override + String get topRightCorner => '┐'; /// The lower left-hand corner of a box. /// - /// Always "└" for [this]. - String get bottomLeftCorner => "└"; + /// Always '└' for [this]. + @override + String get bottomLeftCorner => '└'; /// The lower right-hand corner of a box. /// - /// Always "┘" for [this]. - String get bottomRightCorner => "┘"; + /// Always '┘' for [this]. + @override + String get bottomRightCorner => '┘'; /// An intersection of vertical and horizontal box lines. /// - /// Always "┼" for [this]. - String get cross => "┼"; + /// Always '┼' for [this]. + @override + String get cross => '┼'; /// A horizontal box line with a vertical line going up from the middle. /// - /// Always "┴" for [this]. - String get teeUp => "┴"; + /// Always '┴' for [this]. + @override + String get teeUp => '┴'; /// A horizontal box line with a vertical line going down from the middle. /// - /// Always "┬" for [this]. - String get teeDown => "┬"; + /// Always '┬' for [this]. + @override + String get teeDown => '┬'; /// A vertical box line with a horizontal line going left from the middle. /// - /// Always "┤" for [this]. - String get teeLeft => "┤"; + /// Always '┤' for [this]. + @override + String get teeLeft => '┤'; /// A vertical box line with a horizontal line going right from the middle. /// - /// Always "├" for [this]. - String get teeRight => "├"; + /// Always '├' for [this]. + @override + String get teeRight => '├'; /// The top half of a vertical box line. /// - /// Always "╵" for [this]. - String get upEnd => "╵"; + /// Always '╵' for [this]. + @override + String get upEnd => '╵'; /// The bottom half of a vertical box line. /// - /// Always "╷" for [this]. - String get downEnd => "╷"; + /// Always '╷' for [this]. + @override + String get downEnd => '╷'; /// The left half of a horizontal box line. /// - /// Always "╴" for [this]. - String get leftEnd => "╴"; + /// Always '╴' for [this]. + @override + String get leftEnd => '╴'; /// The right half of a horizontal box line. /// - /// Always "╶" for [this]. - String get rightEnd => "╶"; + /// Always '╶' for [this]. + @override + String get rightEnd => '╶'; /// A bold horizontal line that can be used to draw a box. /// - /// Always "━" for [this]. - String get horizontalLineBold => "━"; + /// Always '━' for [this]. + @override + String get horizontalLineBold => '━'; /// A bold vertical line that can be used to draw a box. /// - /// Always "┃" for [this]. - String get verticalLineBold => "┃"; + /// Always '┃' for [this]. + @override + String get verticalLineBold => '┃'; /// The bold upper left-hand corner of a box. /// - /// Always "┏" for [this]. - String get topLeftCornerBold => "┏"; + /// Always '┏' for [this]. + @override + String get topLeftCornerBold => '┏'; /// The bold upper right-hand corner of a box. /// - /// Always "┓" for [this]. - String get topRightCornerBold => "┓"; + /// Always '┓' for [this]. + @override + String get topRightCornerBold => '┓'; /// The bold lower left-hand corner of a box. /// - /// Always "┗" for [this]. - String get bottomLeftCornerBold => "┗"; + /// Always '┗' for [this]. + @override + String get bottomLeftCornerBold => '┗'; /// The bold lower right-hand corner of a box. /// - /// Always "┛" for [this]. - String get bottomRightCornerBold => "┛"; + /// Always '┛' for [this]. + @override + String get bottomRightCornerBold => '┛'; /// An intersection of bold vertical and horizontal box lines. /// - /// Always "╋" for [this]. - String get crossBold => "╋"; + /// Always '╋' for [this]. + @override + String get crossBold => '╋'; /// A bold horizontal box line with a vertical line going up from the middle. /// - /// Always "┻" for [this]. - String get teeUpBold => "┻"; + /// Always '┻' for [this]. + @override + String get teeUpBold => '┻'; /// A bold horizontal box line with a vertical line going down from the middle. /// - /// Always "┳" for [this]. - String get teeDownBold => "┳"; + /// Always '┳' for [this]. + @override + String get teeDownBold => '┳'; /// A bold vertical box line with a horizontal line going left from the middle. /// - /// Always "┫" for [this]. - String get teeLeftBold => "┫"; + /// Always '┫' for [this]. + @override + String get teeLeftBold => '┫'; /// A bold vertical box line with a horizontal line going right from the middle. /// - /// Always "┣" for [this]. - String get teeRightBold => "┣"; + /// Always '┣' for [this]. + @override + String get teeRightBold => '┣'; /// The top half of a bold vertical box line. /// - /// Always "╹" for [this]. - String get upEndBold => "╹"; + /// Always '╹' for [this]. + @override + String get upEndBold => '╹'; /// The bottom half of a bold vertical box line. /// - /// Always "╻" for [this]. - String get downEndBold => "╻"; + /// Always '╻' for [this]. + @override + String get downEndBold => '╻'; /// The left half of a bold horizontal box line. /// - /// Always "╸" for [this]. - String get leftEndBold => "╸"; + /// Always '╸' for [this]. + @override + String get leftEndBold => '╸'; /// The right half of a bold horizontal box line. /// - /// Always "╺" for [this]. - String get rightEndBold => "╺"; + /// Always '╺' for [this]. + @override + String get rightEndBold => '╺'; /// A double horizontal line that can be used to draw a box. /// - /// Always "═" for [this]. - String get horizontalLineDouble => "═"; + /// Always '═' for [this]. + @override + String get horizontalLineDouble => '═'; /// A double vertical line that can be used to draw a box. /// - /// Always "║" for [this]. - String get verticalLineDouble => "║"; + /// Always '║' for [this]. + @override + String get verticalLineDouble => '║'; /// The double upper left-hand corner of a box. /// - /// Always "╔" for [this]. - String get topLeftCornerDouble => "╔"; + /// Always '╔' for [this]. + @override + String get topLeftCornerDouble => '╔'; /// The double upper right-hand corner of a box. /// - /// Always "╗" for [this]. - String get topRightCornerDouble => "╗"; + /// Always '╗' for [this]. + @override + String get topRightCornerDouble => '╗'; /// The double lower left-hand corner of a box. /// - /// Always "╚" for [this]. - String get bottomLeftCornerDouble => "╚"; + /// Always '╚' for [this]. + @override + String get bottomLeftCornerDouble => '╚'; /// The double lower right-hand corner of a box. /// - /// Always "╝" for [this]. - String get bottomRightCornerDouble => "╝"; + /// Always '╝' for [this]. + @override + String get bottomRightCornerDouble => '╝'; /// An intersection of double vertical and horizontal box lines. /// - /// Always "╬" for [this]. - String get crossDouble => "╬"; + /// Always '╬' for [this]. + @override + String get crossDouble => '╬'; /// A double horizontal box line with a vertical line going up from the middle. /// - /// Always "╩" for [this]. - String get teeUpDouble => "╩"; + /// Always '╩' for [this]. + @override + String get teeUpDouble => '╩'; /// A double horizontal box line with a vertical line going down from the middle. /// - /// Always "╦" for [this]. - String get teeDownDouble => "╦"; + /// Always '╦' for [this]. + @override + String get teeDownDouble => '╦'; /// A double vertical box line with a horizontal line going left from the middle. /// - /// Always "╣" for [this]. - String get teeLeftDouble => "╣"; + /// Always '╣' for [this]. + @override + String get teeLeftDouble => '╣'; /// A double vertical box line with a horizontal line going right from the middle. /// - /// Always "╠" for [this]. - String get teeRightDouble => "╠"; + /// Always '╠' for [this]. + @override + String get teeRightDouble => '╠'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "╌" for [this]. - String get horizontalLineDoubleDash => "╌"; + /// Always '╌' for [this]. + @override + String get horizontalLineDoubleDash => '╌'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "╍" for [this]. - String get horizontalLineDoubleDashBold => "╍"; + /// Always '╍' for [this]. + @override + String get horizontalLineDoubleDashBold => '╍'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "╎" for [this]. - String get verticalLineDoubleDash => "╎"; + /// Always '╎' for [this]. + @override + String get verticalLineDoubleDash => '╎'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "╏" for [this]. - String get verticalLineDoubleDashBold => "╏"; + /// Always '╏' for [this]. + @override + String get verticalLineDoubleDashBold => '╏'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "┄" for [this]. - String get horizontalLineTripleDash => "┄"; + /// Always '┄' for [this]. + @override + String get horizontalLineTripleDash => '┄'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "┅" for [this]. - String get horizontalLineTripleDashBold => "┅"; + /// Always '┅' for [this]. + @override + String get horizontalLineTripleDashBold => '┅'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "┆" for [this]. - String get verticalLineTripleDash => "┆"; + /// Always '┆' for [this]. + @override + String get verticalLineTripleDash => '┆'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "┇" for [this]. - String get verticalLineTripleDashBold => "┇"; + /// Always '┇' for [this]. + @override + String get verticalLineTripleDashBold => '┇'; /// A dashed horizontal line that can be used to draw a box. /// - /// Always "┈" for [this]. - String get horizontalLineQuadrupleDash => "┈"; + /// Always '┈' for [this]. + @override + String get horizontalLineQuadrupleDash => '┈'; /// A bold dashed horizontal line that can be used to draw a box. /// - /// Always "┉" for [this]. - String get horizontalLineQuadrupleDashBold => "┉"; + /// Always '┉' for [this]. + @override + String get horizontalLineQuadrupleDashBold => '┉'; /// A dashed vertical line that can be used to draw a box. /// - /// Always "┊" for [this]. - String get verticalLineQuadrupleDash => "┊"; + /// Always '┊' for [this]. + @override + String get verticalLineQuadrupleDash => '┊'; /// A bold dashed vertical line that can be used to draw a box. /// - /// Always "┋" for [this]. - String get verticalLineQuadrupleDashBold => "┋"; + /// Always '┋' for [this]. + @override + String get verticalLineQuadrupleDashBold => '┋'; } diff --git a/pkgs/term_glyph/test/symbol_test.dart b/pkgs/term_glyph/test/symbol_test.dart index 1e665e80c..22993a737 100644 --- a/pkgs/term_glyph/test/symbol_test.dart +++ b/pkgs/term_glyph/test/symbol_test.dart @@ -7,55 +7,55 @@ import 'package:test/test.dart'; import 'package:term_glyph/term_glyph.dart' as glyph; void main() { - group("with ascii = false", () { + group('with ascii = false', () { setUpAll(() { glyph.ascii = false; }); - test("glyph getters return Unicode versions", () { - expect(glyph.topLeftCorner, equals("┌")); - expect(glyph.teeUpBold, equals("┻")); - expect(glyph.longLeftArrow, equals("◀━")); + test('glyph getters return Unicode versions', () { + expect(glyph.topLeftCorner, equals('┌')); + expect(glyph.teeUpBold, equals('┻')); + expect(glyph.longLeftArrow, equals('◀━')); }); - test("glyphOrAscii returns the first argument", () { - expect(glyph.glyphOrAscii("A", "B"), equals("A")); + test('glyphOrAscii returns the first argument', () { + expect(glyph.glyphOrAscii('A', 'B'), equals('A')); }); - test("glyphs returns unicodeGlyphs", () { + test('glyphs returns unicodeGlyphs', () { expect(glyph.glyphs, equals(glyph.unicodeGlyphs)); }); - test("asciiGlyphs still returns ASCII characters", () { - expect(glyph.asciiGlyphs.topLeftCorner, equals(",")); - expect(glyph.asciiGlyphs.teeUpBold, equals("+")); - expect(glyph.asciiGlyphs.longLeftArrow, equals("<=")); + test('asciiGlyphs still returns ASCII characters', () { + expect(glyph.asciiGlyphs.topLeftCorner, equals(',')); + expect(glyph.asciiGlyphs.teeUpBold, equals('+')); + expect(glyph.asciiGlyphs.longLeftArrow, equals('<=')); }); }); - group("with ascii = true", () { + group('with ascii = true', () { setUpAll(() { glyph.ascii = true; }); - test("glyphs return ASCII versions", () { - expect(glyph.topLeftCorner, equals(",")); - expect(glyph.teeUpBold, equals("+")); - expect(glyph.longLeftArrow, equals("<=")); + test('glyphs return ASCII versions', () { + expect(glyph.topLeftCorner, equals(',')); + expect(glyph.teeUpBold, equals('+')); + expect(glyph.longLeftArrow, equals('<=')); }); - test("glyphOrAscii returns the second argument", () { - expect(glyph.glyphOrAscii("A", "B"), equals("B")); + test('glyphOrAscii returns the second argument', () { + expect(glyph.glyphOrAscii('A', 'B'), equals('B')); }); - test("glyphs returns asciiGlyphs", () { + test('glyphs returns asciiGlyphs', () { expect(glyph.glyphs, equals(glyph.asciiGlyphs)); }); - test("unicodeGlyphs still returns Unicode characters", () { - expect(glyph.unicodeGlyphs.topLeftCorner, equals("┌")); - expect(glyph.unicodeGlyphs.teeUpBold, equals("┻")); - expect(glyph.unicodeGlyphs.longLeftArrow, equals("◀━")); + test('unicodeGlyphs still returns Unicode characters', () { + expect(glyph.unicodeGlyphs.topLeftCorner, equals('┌')); + expect(glyph.unicodeGlyphs.teeUpBold, equals('┻')); + expect(glyph.unicodeGlyphs.longLeftArrow, equals('◀━')); }); }); } diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 370994f96..04a919b1f 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -8,13 +8,13 @@ import 'package:csv/csv.dart'; import 'package:meta/meta.dart'; void main() { - var csv = CsvCodec(eol: "\n"); - var data = csv.decoder.convert(File("data.csv").readAsStringSync()); + var csv = CsvCodec(eol: '\n'); + var data = csv.decoder.convert(File('data.csv').readAsStringSync()); // Remove comments and empty lines. data.removeWhere((row) => row.length < 3); - Directory("lib/src/generated").createSync(recursive: true); + Directory('lib/src/generated').createSync(recursive: true); _writeGlyphSetInterface(data); _writeGlyphSet(data, ascii: false); @@ -22,7 +22,7 @@ void main() { _writeTopLevel(data); var result = Process.runSync( - "pub", ["run", "dart_style:format", "-w", "lib/src/generated"]); + 'pub', ['run', 'dart_style:format', '-w', 'lib/src/generated']); print(result.stderr); exit(result.exitCode); } @@ -30,8 +30,8 @@ void main() { /// Writes `lib/src/generated/glyph_set.dart`. void _writeGlyphSetInterface(List data) { var file = - File("lib/src/generated/glyph_set.dart").openSync(mode: FileMode.write); - file.writeStringSync(r""" + File('lib/src/generated/glyph_set.dart').openSync(mode: FileMode.write); + file.writeStringSync(r''' // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @@ -56,26 +56,26 @@ void _writeGlyphSetInterface(List data) { /// (unicode ?? !glyph.ascii) ? glyph.unicodeGlyphs : glyph.asciiGlyphs; /// /// return text - /// .split("\n") - /// .map((line) => "${glyphs.verticalLine} $line") - /// .join("\n"); + /// .split('\n') + /// .map((line) => '${glyphs.verticalLine} $line') + /// .join('\n'); /// } /// ``` abstract class GlyphSet { /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] /// otherwise. String glyphOrAscii(String glyph, String alternative); - """); + '''); for (var glyph in data) { - for (var line in glyph[3].split("\n")) { - file.writeStringSync("/// $line\n"); + for (var line in glyph[3].split('\n')) { + file.writeStringSync('/// $line\n'); } - file.writeStringSync("String get ${glyph[0]};"); + file.writeStringSync('String get ${glyph[0]};'); } - file.writeStringSync("}"); + file.writeStringSync('}'); file.closeSync(); } @@ -85,11 +85,11 @@ void _writeGlyphSetInterface(List data) { /// the Unicode glyph set. void _writeGlyphSet(List data, {@required bool ascii}) { var file = - File("lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart") + File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart') .openSync(mode: FileMode.write); - var className = "${ascii ? "Ascii" : "Unicode"}GlyphSet"; - file.writeStringSync(""" + var className = '${ascii ? "Ascii" : "Unicode"}GlyphSet'; + file.writeStringSync(''' // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @@ -103,33 +103,35 @@ void _writeGlyphSet(List data, {@required bool ascii}) { const $className(); /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] /// otherwise. + @override String glyphOrAscii(String glyph, String alternative) => ${ascii ? "alternative" : "glyph"}; - """); + '''); var index = ascii ? 2 : 1; for (var glyph in data) { - for (var line in glyph[3].split("\n")) { - file.writeStringSync("/// $line\n"); + for (var line in glyph[3].split('\n')) { + file.writeStringSync('/// $line\n'); } - file.writeStringSync(""" + file.writeStringSync(''' /// /// Always ${_quote(glyph[index])} for [this]. + @override String get ${glyph[0]} => ${_quote(glyph[index])}; - """); + '''); } - file.writeStringSync("}"); + file.writeStringSync('}'); file.closeSync(); } /// Writes `lib/src/generated/top_level.dart`. void _writeTopLevel(List data) { var file = - File("lib/src/generated/top_level.dart").openSync(mode: FileMode.write); + File('lib/src/generated/top_level.dart').openSync(mode: FileMode.write); - file.writeStringSync(""" + file.writeStringSync(''' // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @@ -137,22 +139,22 @@ void _writeTopLevel(List data) { // Don't modify this file by hand! It's generated by tool/generate.dart. import '../../term_glyph.dart' as glyph; - """); + '''); for (var glyph in data) { - for (var line in glyph[3].split("\n")) { - file.writeStringSync("/// $line\n"); + for (var line in glyph[3].split('\n')) { + file.writeStringSync('/// $line\n'); } - file.writeStringSync(""" + file.writeStringSync(''' /// /// If [ascii] is `false`, this is "${glyph[1]}". If it's `true`, this is /// "${glyph[2]}" instead. String get ${glyph[0]} => glyph.glyphs.${glyph[0]}; - """); + '''); } file.closeSync(); } -String _quote(String input) => input.contains('"') ? "'$input'" : '"$input"'; +String _quote(String input) => input.contains("'") ? '"$input"' : "'$input'"; From af16ef10241425d54fc17a9657a6ec8508a255cb Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 11 Dec 2019 17:17:53 -0800 Subject: [PATCH 10/61] Drop the doc comments on overrides (dart-lang/term_glyph#10) These classes are not public and so the docs don't show up on the pub site. Even if they did show up the comments as is only duplicate the information from the interface (which dartdoc would show anyway) and the implementation (which dartdoc also shows). --- .../lib/src/generated/ascii_glyph_set.dart | 246 ------------------ .../lib/src/generated/unicode_glyph_set.dart | 246 ------------------ pkgs/term_glyph/pubspec.yaml | 2 +- pkgs/term_glyph/tool/generate.dart | 6 - 4 files changed, 1 insertion(+), 499 deletions(-) diff --git a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart index c233bf510..e0c3a4994 100644 --- a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart @@ -14,370 +14,124 @@ class AsciiGlyphSet implements GlyphSet { /// otherwise. @override String glyphOrAscii(String glyph, String alternative) => alternative; - - /// A bullet point. - /// - /// Always '*' for [this]. @override String get bullet => '*'; - - /// A left-pointing arrow. - /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. - /// - /// Always '<' for [this]. @override String get leftArrow => '<'; - - /// A right-pointing arrow. - /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. - /// - /// Always '>' for [this]. @override String get rightArrow => '>'; - - /// An upwards-pointing arrow. - /// - /// Always '^' for [this]. @override String get upArrow => '^'; - - /// A downwards-pointing arrow. - /// - /// Always 'v' for [this]. @override String get downArrow => 'v'; - - /// A two-character left-pointing arrow. - /// - /// Always '<=' for [this]. @override String get longLeftArrow => '<='; - - /// A two-character right-pointing arrow. - /// - /// Always '=>' for [this]. @override String get longRightArrow => '=>'; - - /// A horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLine => '-'; - - /// A vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLine => '|'; - - /// The upper left-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topLeftCorner => ','; - - /// The upper right-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topRightCorner => ','; - - /// The lower left-hand corner of a box. - /// - /// Always "'" for [this]. @override String get bottomLeftCorner => "'"; - - /// The lower right-hand corner of a box. - /// - /// Always "'" for [this]. @override String get bottomRightCorner => "'"; - - /// An intersection of vertical and horizontal box lines. - /// - /// Always '+' for [this]. @override String get cross => '+'; - - /// A horizontal box line with a vertical line going up from the middle. - /// - /// Always '+' for [this]. @override String get teeUp => '+'; - - /// A horizontal box line with a vertical line going down from the middle. - /// - /// Always '+' for [this]. @override String get teeDown => '+'; - - /// A vertical box line with a horizontal line going left from the middle. - /// - /// Always '+' for [this]. @override String get teeLeft => '+'; - - /// A vertical box line with a horizontal line going right from the middle. - /// - /// Always '+' for [this]. @override String get teeRight => '+'; - - /// The top half of a vertical box line. - /// - /// Always "'" for [this]. @override String get upEnd => "'"; - - /// The bottom half of a vertical box line. - /// - /// Always ',' for [this]. @override String get downEnd => ','; - - /// The left half of a horizontal box line. - /// - /// Always '-' for [this]. @override String get leftEnd => '-'; - - /// The right half of a horizontal box line. - /// - /// Always '-' for [this]. @override String get rightEnd => '-'; - - /// A bold horizontal line that can be used to draw a box. - /// - /// Always '=' for [this]. @override String get horizontalLineBold => '='; - - /// A bold vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineBold => '|'; - - /// The bold upper left-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topLeftCornerBold => ','; - - /// The bold upper right-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topRightCornerBold => ','; - - /// The bold lower left-hand corner of a box. - /// - /// Always "'" for [this]. @override String get bottomLeftCornerBold => "'"; - - /// The bold lower right-hand corner of a box. - /// - /// Always "'" for [this]. @override String get bottomRightCornerBold => "'"; - - /// An intersection of bold vertical and horizontal box lines. - /// - /// Always '+' for [this]. @override String get crossBold => '+'; - - /// A bold horizontal box line with a vertical line going up from the middle. - /// - /// Always '+' for [this]. @override String get teeUpBold => '+'; - - /// A bold horizontal box line with a vertical line going down from the middle. - /// - /// Always '+' for [this]. @override String get teeDownBold => '+'; - - /// A bold vertical box line with a horizontal line going left from the middle. - /// - /// Always '+' for [this]. @override String get teeLeftBold => '+'; - - /// A bold vertical box line with a horizontal line going right from the middle. - /// - /// Always '+' for [this]. @override String get teeRightBold => '+'; - - /// The top half of a bold vertical box line. - /// - /// Always "'" for [this]. @override String get upEndBold => "'"; - - /// The bottom half of a bold vertical box line. - /// - /// Always ',' for [this]. @override String get downEndBold => ','; - - /// The left half of a bold horizontal box line. - /// - /// Always '-' for [this]. @override String get leftEndBold => '-'; - - /// The right half of a bold horizontal box line. - /// - /// Always '-' for [this]. @override String get rightEndBold => '-'; - - /// A double horizontal line that can be used to draw a box. - /// - /// Always '=' for [this]. @override String get horizontalLineDouble => '='; - - /// A double vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineDouble => '|'; - - /// The double upper left-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topLeftCornerDouble => ','; - - /// The double upper right-hand corner of a box. - /// - /// Always ',' for [this]. @override String get topRightCornerDouble => ','; - - /// The double lower left-hand corner of a box. - /// - /// Always '"' for [this]. @override String get bottomLeftCornerDouble => '"'; - - /// The double lower right-hand corner of a box. - /// - /// Always '"' for [this]. @override String get bottomRightCornerDouble => '"'; - - /// An intersection of double vertical and horizontal box lines. - /// - /// Always '+' for [this]. @override String get crossDouble => '+'; - - /// A double horizontal box line with a vertical line going up from the middle. - /// - /// Always '+' for [this]. @override String get teeUpDouble => '+'; - - /// A double horizontal box line with a vertical line going down from the middle. - /// - /// Always '+' for [this]. @override String get teeDownDouble => '+'; - - /// A double vertical box line with a horizontal line going left from the middle. - /// - /// Always '+' for [this]. @override String get teeLeftDouble => '+'; - - /// A double vertical box line with a horizontal line going right from the middle. - /// - /// Always '+' for [this]. @override String get teeRightDouble => '+'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineDoubleDash => '-'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineDoubleDashBold => '-'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineDoubleDash => '|'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineDoubleDashBold => '|'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineTripleDash => '-'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineTripleDashBold => '-'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineTripleDash => '|'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineTripleDashBold => '|'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineQuadrupleDash => '-'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '-' for [this]. @override String get horizontalLineQuadrupleDashBold => '-'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineQuadrupleDash => '|'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '|' for [this]. @override String get verticalLineQuadrupleDashBold => '|'; } diff --git a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart index bc6ad3348..1737b391b 100644 --- a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart @@ -14,370 +14,124 @@ class UnicodeGlyphSet implements GlyphSet { /// otherwise. @override String glyphOrAscii(String glyph, String alternative) => glyph; - - /// A bullet point. - /// - /// Always '•' for [this]. @override String get bullet => '•'; - - /// A left-pointing arrow. - /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. - /// - /// Always '←' for [this]. @override String get leftArrow => '←'; - - /// A right-pointing arrow. - /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. - /// - /// Always '→' for [this]. @override String get rightArrow => '→'; - - /// An upwards-pointing arrow. - /// - /// Always '↑' for [this]. @override String get upArrow => '↑'; - - /// A downwards-pointing arrow. - /// - /// Always '↓' for [this]. @override String get downArrow => '↓'; - - /// A two-character left-pointing arrow. - /// - /// Always '◀━' for [this]. @override String get longLeftArrow => '◀━'; - - /// A two-character right-pointing arrow. - /// - /// Always '━▶' for [this]. @override String get longRightArrow => '━▶'; - - /// A horizontal line that can be used to draw a box. - /// - /// Always '─' for [this]. @override String get horizontalLine => '─'; - - /// A vertical line that can be used to draw a box. - /// - /// Always '│' for [this]. @override String get verticalLine => '│'; - - /// The upper left-hand corner of a box. - /// - /// Always '┌' for [this]. @override String get topLeftCorner => '┌'; - - /// The upper right-hand corner of a box. - /// - /// Always '┐' for [this]. @override String get topRightCorner => '┐'; - - /// The lower left-hand corner of a box. - /// - /// Always '└' for [this]. @override String get bottomLeftCorner => '└'; - - /// The lower right-hand corner of a box. - /// - /// Always '┘' for [this]. @override String get bottomRightCorner => '┘'; - - /// An intersection of vertical and horizontal box lines. - /// - /// Always '┼' for [this]. @override String get cross => '┼'; - - /// A horizontal box line with a vertical line going up from the middle. - /// - /// Always '┴' for [this]. @override String get teeUp => '┴'; - - /// A horizontal box line with a vertical line going down from the middle. - /// - /// Always '┬' for [this]. @override String get teeDown => '┬'; - - /// A vertical box line with a horizontal line going left from the middle. - /// - /// Always '┤' for [this]. @override String get teeLeft => '┤'; - - /// A vertical box line with a horizontal line going right from the middle. - /// - /// Always '├' for [this]. @override String get teeRight => '├'; - - /// The top half of a vertical box line. - /// - /// Always '╵' for [this]. @override String get upEnd => '╵'; - - /// The bottom half of a vertical box line. - /// - /// Always '╷' for [this]. @override String get downEnd => '╷'; - - /// The left half of a horizontal box line. - /// - /// Always '╴' for [this]. @override String get leftEnd => '╴'; - - /// The right half of a horizontal box line. - /// - /// Always '╶' for [this]. @override String get rightEnd => '╶'; - - /// A bold horizontal line that can be used to draw a box. - /// - /// Always '━' for [this]. @override String get horizontalLineBold => '━'; - - /// A bold vertical line that can be used to draw a box. - /// - /// Always '┃' for [this]. @override String get verticalLineBold => '┃'; - - /// The bold upper left-hand corner of a box. - /// - /// Always '┏' for [this]. @override String get topLeftCornerBold => '┏'; - - /// The bold upper right-hand corner of a box. - /// - /// Always '┓' for [this]. @override String get topRightCornerBold => '┓'; - - /// The bold lower left-hand corner of a box. - /// - /// Always '┗' for [this]. @override String get bottomLeftCornerBold => '┗'; - - /// The bold lower right-hand corner of a box. - /// - /// Always '┛' for [this]. @override String get bottomRightCornerBold => '┛'; - - /// An intersection of bold vertical and horizontal box lines. - /// - /// Always '╋' for [this]. @override String get crossBold => '╋'; - - /// A bold horizontal box line with a vertical line going up from the middle. - /// - /// Always '┻' for [this]. @override String get teeUpBold => '┻'; - - /// A bold horizontal box line with a vertical line going down from the middle. - /// - /// Always '┳' for [this]. @override String get teeDownBold => '┳'; - - /// A bold vertical box line with a horizontal line going left from the middle. - /// - /// Always '┫' for [this]. @override String get teeLeftBold => '┫'; - - /// A bold vertical box line with a horizontal line going right from the middle. - /// - /// Always '┣' for [this]. @override String get teeRightBold => '┣'; - - /// The top half of a bold vertical box line. - /// - /// Always '╹' for [this]. @override String get upEndBold => '╹'; - - /// The bottom half of a bold vertical box line. - /// - /// Always '╻' for [this]. @override String get downEndBold => '╻'; - - /// The left half of a bold horizontal box line. - /// - /// Always '╸' for [this]. @override String get leftEndBold => '╸'; - - /// The right half of a bold horizontal box line. - /// - /// Always '╺' for [this]. @override String get rightEndBold => '╺'; - - /// A double horizontal line that can be used to draw a box. - /// - /// Always '═' for [this]. @override String get horizontalLineDouble => '═'; - - /// A double vertical line that can be used to draw a box. - /// - /// Always '║' for [this]. @override String get verticalLineDouble => '║'; - - /// The double upper left-hand corner of a box. - /// - /// Always '╔' for [this]. @override String get topLeftCornerDouble => '╔'; - - /// The double upper right-hand corner of a box. - /// - /// Always '╗' for [this]. @override String get topRightCornerDouble => '╗'; - - /// The double lower left-hand corner of a box. - /// - /// Always '╚' for [this]. @override String get bottomLeftCornerDouble => '╚'; - - /// The double lower right-hand corner of a box. - /// - /// Always '╝' for [this]. @override String get bottomRightCornerDouble => '╝'; - - /// An intersection of double vertical and horizontal box lines. - /// - /// Always '╬' for [this]. @override String get crossDouble => '╬'; - - /// A double horizontal box line with a vertical line going up from the middle. - /// - /// Always '╩' for [this]. @override String get teeUpDouble => '╩'; - - /// A double horizontal box line with a vertical line going down from the middle. - /// - /// Always '╦' for [this]. @override String get teeDownDouble => '╦'; - - /// A double vertical box line with a horizontal line going left from the middle. - /// - /// Always '╣' for [this]. @override String get teeLeftDouble => '╣'; - - /// A double vertical box line with a horizontal line going right from the middle. - /// - /// Always '╠' for [this]. @override String get teeRightDouble => '╠'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '╌' for [this]. @override String get horizontalLineDoubleDash => '╌'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '╍' for [this]. @override String get horizontalLineDoubleDashBold => '╍'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '╎' for [this]. @override String get verticalLineDoubleDash => '╎'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '╏' for [this]. @override String get verticalLineDoubleDashBold => '╏'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '┄' for [this]. @override String get horizontalLineTripleDash => '┄'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '┅' for [this]. @override String get horizontalLineTripleDashBold => '┅'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '┆' for [this]. @override String get verticalLineTripleDash => '┆'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '┇' for [this]. @override String get verticalLineTripleDashBold => '┇'; - - /// A dashed horizontal line that can be used to draw a box. - /// - /// Always '┈' for [this]. @override String get horizontalLineQuadrupleDash => '┈'; - - /// A bold dashed horizontal line that can be used to draw a box. - /// - /// Always '┉' for [this]. @override String get horizontalLineQuadrupleDashBold => '┉'; - - /// A dashed vertical line that can be used to draw a box. - /// - /// Always '┊' for [this]. @override String get verticalLineQuadrupleDash => '┊'; - - /// A bold dashed vertical line that can be used to draw a box. - /// - /// Always '┋' for [this]. @override String get verticalLineQuadrupleDashBold => '┋'; } diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 29ea7d6b6..9c650e3f1 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.1.0 +version: 1.1.1-dev description: Useful Unicode glyphs and ASCII substitutes. author: Dart Team diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 04a919b1f..6e18536f0 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -110,13 +110,7 @@ void _writeGlyphSet(List data, {@required bool ascii}) { var index = ascii ? 2 : 1; for (var glyph in data) { - for (var line in glyph[3].split('\n')) { - file.writeStringSync('/// $line\n'); - } - file.writeStringSync(''' - /// - /// Always ${_quote(glyph[index])} for [this]. @override String get ${glyph[0]} => ${_quote(glyph[index])}; '''); From e437a224b092e78d5e6557d9ff51a4326addd2ee Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 20 May 2020 09:42:50 -0700 Subject: [PATCH 11/61] Update URLs to point to pub.dev (dart-lang/term_glyph#11) - Point links at `pub.dev` instead of `dartdocs.org`. - Remove unused `author` field from pubspec. --- pkgs/term_glyph/README.md | 2 +- pkgs/term_glyph/pubspec.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md index 0d5b78c79..0d64ced35 100644 --- a/pkgs/term_glyph/README.md +++ b/pkgs/term_glyph/README.md @@ -22,7 +22,7 @@ characters instead. It currently defaults to `false`, although in the future it may default to `true` for applications running on the Dart VM on Windows. For example: -[ascii]: https://www.dartdocs.org/documentation/term_glyph/latest/term_glyph/ascii.html +[ascii]: https://pub.dev/documentation/term_glyph/latest/term_glyph/ascii.html ```dart import 'dart:io'; diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 9c650e3f1..06d09d5ac 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -2,7 +2,6 @@ name: term_glyph version: 1.1.1-dev description: Useful Unicode glyphs and ASCII substitutes. -author: Dart Team homepage: https://github.com/dart-lang/term_glyph environment: From 7f0ec30a03975acecb8c0ab2698733941245e2e6 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Tue, 14 Jul 2020 13:11:18 -0700 Subject: [PATCH 12/61] merge null safety branch into master (dart-lang/term_glyph#13) --- pkgs/term_glyph/.travis.yml | 34 +++++++++----- pkgs/term_glyph/CHANGELOG.md | 4 ++ pkgs/term_glyph/analysis_options.yaml | 3 ++ pkgs/term_glyph/pubspec.yaml | 68 +++++++++++++++++++++++++-- pkgs/term_glyph/tool/generate.dart | 3 +- 5 files changed, 95 insertions(+), 17 deletions(-) diff --git a/pkgs/term_glyph/.travis.yml b/pkgs/term_glyph/.travis.yml index 31cbd43ad..8fd288834 100644 --- a/pkgs/term_glyph/.travis.yml +++ b/pkgs/term_glyph/.travis.yml @@ -1,23 +1,33 @@ language: dart dart: - - dev - - stable +- dev -dart_task: - - test - -matrix: +jobs: include: - # Only validate formatting,analyzer using the dev release - - dart: dev - dart_task: dartfmt - - dart: dev - dart_task: dartanalyzer + - stage: analyze_and_format + name: "Analyze test/" + dart: dev + os: linux + script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . + - stage: analyze_and_format + name: "Format" + dart: dev + os: linux + script: dartfmt -n --set-exit-if-changed . + - stage: test + name: "Vm Tests" + dart: dev + os: linux + script: pub run --enable-experiment=non-nullable test -p vm + +stages: + - analyze_and_format + - test # Only building master means that we don't run two builds for each pull request. branches: - only: [master] + only: [master, null_safety] cache: directories: diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 7b73fc851..c4926bd8b 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0-nullsafety + +* Update to null safety. All apis require non-nullable types. + ## 1.1.0 * Add a `GlyphSet` class that can be used to easily choose which set of glyphs diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index 108d1058a..64ff556c6 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1 +1,4 @@ include: package:pedantic/analysis_options.yaml +analyzer: + enable-experiment: + - non-nullable diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 06d09d5ac..ace629c54 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,14 +1,76 @@ name: term_glyph -version: 1.1.1-dev +version: 1.2.0-nullsafety description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: - sdk: '>=1.8.0 <3.0.0' + sdk: '>=2.9.0-18.0 <2.9.0' dev_dependencies: csv: '>=3.0.0 <5.0.0' dart_style: '>=0.2.0 <2.0.0' - meta: '>=0.9.0 <2.0.0' test: '>=0.12.0 <2.0.0' + +dependency_overrides: + async: + git: + url: git://github.com/dart-lang/async.git + ref: null_safety + boolean_selector: + git: + url: git://github.com/dart-lang/boolean_selector.git + ref: null_safety + charcode: + git: + url: git://github.com/dart-lang/charcode.git + ref: null_safety + collection: 1.15.0-nullsafety + matcher: + git: + url: git://github.com/dart-lang/matcher.git + ref: null_safety + meta: 1.3.0-nullsafety + path: + git: + url: git://github.com/dart-lang/path.git + ref: null_safety + pedantic: + git: + url: git://github.com/dart-lang/pedantic.git + ref: null_safety + pool: + git: + url: git://github.com/dart-lang/pool.git + ref: null_safety + source_span: + git: + url: git://github.com/dart-lang/source_span.git + ref: null_safety + stack_trace: + git: + url: git://github.com/dart-lang/stack_trace.git + ref: null_safety + stream_channel: + git: + url: git://github.com/dart-lang/stream_channel.git + ref: null_safety + string_scanner: + git: + url: git://github.com/dart-lang/string_scanner.git + ref: null_safety + test_api: + git: + url: git://github.com/dart-lang/test.git + ref: null_safety + path: pkgs/test_api + test_core: + git: + url: git://github.com/dart-lang/test.git + ref: null_safety + path: pkgs/test_core + test: + git: + url: git://github.com/dart-lang/test.git + ref: null_safety + path: pkgs/test diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 6e18536f0..0a1136ecf 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:csv/csv.dart'; -import 'package:meta/meta.dart'; void main() { var csv = CsvCodec(eol: '\n'); @@ -83,7 +82,7 @@ void _writeGlyphSetInterface(List data) { /// /// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes /// the Unicode glyph set. -void _writeGlyphSet(List data, {@required bool ascii}) { +void _writeGlyphSet(List data, {required bool ascii}) { var file = File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart') .openSync(mode: FileMode.write); From 4d29fd49eb4bdb10aee2810f232dff1fd7ffd96a Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Tue, 21 Jul 2020 19:41:56 -0700 Subject: [PATCH 13/61] update for the 2.10 dev sdk (dart-lang/term_glyph#14) This is in preparation for the actual 2.10 dev sdk release. --- pkgs/term_glyph/.travis.yml | 10 +++--- pkgs/term_glyph/pubspec.yaml | 66 ++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 42 deletions(-) diff --git a/pkgs/term_glyph/.travis.yml b/pkgs/term_glyph/.travis.yml index 8fd288834..2d5616518 100644 --- a/pkgs/term_glyph/.travis.yml +++ b/pkgs/term_glyph/.travis.yml @@ -1,23 +1,23 @@ language: dart dart: -- dev +- preview/raw/2.10.0-0.2-dev jobs: include: - stage: analyze_and_format name: "Analyze test/" - dart: dev + dart: preview/raw/2.10.0-0.2-dev os: linux script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . - stage: analyze_and_format name: "Format" - dart: dev + dart: preview/raw/2.10.0-0.2-dev os: linux script: dartfmt -n --set-exit-if-changed . - stage: test name: "Vm Tests" - dart: dev + dart: preview/raw/2.10.0-0.2-dev os: linux script: pub run --enable-experiment=non-nullable test -p vm @@ -27,7 +27,7 @@ stages: # Only building master means that we don't run two builds for each pull request. branches: - only: [master, null_safety] + only: [master] cache: directories: diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index ace629c54..f69546ddb 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -5,7 +5,8 @@ description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: - sdk: '>=2.9.0-18.0 <2.9.0' + # This must remain a tight constraint until nnbd is stable + sdk: '>=2.10.0-0 <2.10.0' dev_dependencies: csv: '>=3.0.0 <5.0.0' @@ -14,63 +15,54 @@ dev_dependencies: dependency_overrides: async: - git: - url: git://github.com/dart-lang/async.git - ref: null_safety + git: git://github.com/dart-lang/async.git boolean_selector: - git: - url: git://github.com/dart-lang/boolean_selector.git - ref: null_safety + git: git://github.com/dart-lang/boolean_selector.git charcode: + git: git://github.com/dart-lang/charcode.git + collection: + git: git://github.com/dart-lang/collection.git + js: git: - url: git://github.com/dart-lang/charcode.git - ref: null_safety - collection: 1.15.0-nullsafety + url: git://github.com/dart-lang/sdk.git + path: pkg/js + ref: 2-10-pkgs matcher: + git: git://github.com/dart-lang/matcher.git + meta: git: - url: git://github.com/dart-lang/matcher.git - ref: null_safety - meta: 1.3.0-nullsafety + url: git://github.com/dart-lang/sdk.git + path: pkg/meta + ref: 2-10-pkgs path: - git: - url: git://github.com/dart-lang/path.git - ref: null_safety + git: git://github.com/dart-lang/path.git pedantic: - git: - url: git://github.com/dart-lang/pedantic.git - ref: null_safety + git: git://github.com/dart-lang/pedantic.git pool: - git: - url: git://github.com/dart-lang/pool.git - ref: null_safety + git: git://github.com/dart-lang/pool.git + source_maps: + git: git://github.com/dart-lang/source_maps.git + source_map_stack_trace: + git: git://github.com/dart-lang/source_map_stack_trace.git source_span: - git: - url: git://github.com/dart-lang/source_span.git - ref: null_safety + git: git://github.com/dart-lang/source_span.git stack_trace: - git: - url: git://github.com/dart-lang/stack_trace.git - ref: null_safety + git: git://github.com/dart-lang/stack_trace.git stream_channel: - git: - url: git://github.com/dart-lang/stream_channel.git - ref: null_safety + git: git://github.com/dart-lang/stream_channel.git string_scanner: - git: - url: git://github.com/dart-lang/string_scanner.git - ref: null_safety + git: git://github.com/dart-lang/string_scanner.git test_api: git: url: git://github.com/dart-lang/test.git - ref: null_safety path: pkgs/test_api test_core: git: url: git://github.com/dart-lang/test.git - ref: null_safety path: pkgs/test_core test: git: url: git://github.com/dart-lang/test.git - ref: null_safety path: pkgs/test + typed_data: + git: git://github.com/dart-lang/typed_data.git From fc61ff28f25bc50a437c943e13f0dba48620f777 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 28 Jul 2020 16:50:38 -0700 Subject: [PATCH 14/61] Update Travis-CI to test on dev branch (dart-lang/term_glyph#15) --- pkgs/term_glyph/.travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/term_glyph/.travis.yml b/pkgs/term_glyph/.travis.yml index 2d5616518..0b9689924 100644 --- a/pkgs/term_glyph/.travis.yml +++ b/pkgs/term_glyph/.travis.yml @@ -1,25 +1,22 @@ language: dart dart: -- preview/raw/2.10.0-0.2-dev +- dev jobs: include: - stage: analyze_and_format - name: "Analyze test/" - dart: preview/raw/2.10.0-0.2-dev + name: "Analyze" os: linux - script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . + script: dartanalyzer --fatal-warnings --fatal-infos . - stage: analyze_and_format name: "Format" - dart: preview/raw/2.10.0-0.2-dev os: linux script: dartfmt -n --set-exit-if-changed . - stage: test name: "Vm Tests" - dart: preview/raw/2.10.0-0.2-dev os: linux - script: pub run --enable-experiment=non-nullable test -p vm + script: pub run test -p vm stages: - analyze_and_format From dfbcc2984d6a61a73619545e697c57983888895d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 22 Sep 2020 09:20:54 -0700 Subject: [PATCH 15/61] Prepare for the 2.11 dev SDKs (dart-lang/term_glyph#16) Bump the upper bound to allow 2.10 stable and 2.11.0 dev SDK versions. --- pkgs/term_glyph/CHANGELOG.md | 4 ++++ pkgs/term_glyph/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index c4926bd8b..f5c7ed2e3 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0-nullsafety.1 + +* Allow 2.10 stable and 2.11.0 dev SDK versions. + ## 1.2.0-nullsafety * Update to null safety. All apis require non-nullable types. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index f69546ddb..5027d8e86 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,12 +1,12 @@ name: term_glyph -version: 1.2.0-nullsafety +version: 1.2.0-nullsafety.1 description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: # This must remain a tight constraint until nnbd is stable - sdk: '>=2.10.0-0 <2.10.0' + sdk: '>=2.10.0-0 <2.11.0' dev_dependencies: csv: '>=3.0.0 <5.0.0' From da66d86e7e0bdafb6cc2c03d5a9e43e1b80d9066 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Fri, 23 Oct 2020 13:14:09 -0700 Subject: [PATCH 16/61] allow the 2.12 prerelease sdks (dart-lang/term_glyph#17) --- pkgs/term_glyph/CHANGELOG.md | 4 +++ pkgs/term_glyph/pubspec.yaml | 60 ++---------------------------------- 2 files changed, 7 insertions(+), 57 deletions(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index f5c7ed2e3..a2c1dfbfd 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0-nullsafety.2 + +* Allow prerelease versions of the 2.12 sdk. + ## 1.2.0-nullsafety.1 * Allow 2.10 stable and 2.11.0 dev SDK versions. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 5027d8e86..148db8df4 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,68 +1,14 @@ name: term_glyph -version: 1.2.0-nullsafety.1 +version: 1.2.0-nullsafety.2 description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: # This must remain a tight constraint until nnbd is stable - sdk: '>=2.10.0-0 <2.11.0' + sdk: '>=2.10.0-0 <2.12.0' dev_dependencies: csv: '>=3.0.0 <5.0.0' dart_style: '>=0.2.0 <2.0.0' - test: '>=0.12.0 <2.0.0' - -dependency_overrides: - async: - git: git://github.com/dart-lang/async.git - boolean_selector: - git: git://github.com/dart-lang/boolean_selector.git - charcode: - git: git://github.com/dart-lang/charcode.git - collection: - git: git://github.com/dart-lang/collection.git - js: - git: - url: git://github.com/dart-lang/sdk.git - path: pkg/js - ref: 2-10-pkgs - matcher: - git: git://github.com/dart-lang/matcher.git - meta: - git: - url: git://github.com/dart-lang/sdk.git - path: pkg/meta - ref: 2-10-pkgs - path: - git: git://github.com/dart-lang/path.git - pedantic: - git: git://github.com/dart-lang/pedantic.git - pool: - git: git://github.com/dart-lang/pool.git - source_maps: - git: git://github.com/dart-lang/source_maps.git - source_map_stack_trace: - git: git://github.com/dart-lang/source_map_stack_trace.git - source_span: - git: git://github.com/dart-lang/source_span.git - stack_trace: - git: git://github.com/dart-lang/stack_trace.git - stream_channel: - git: git://github.com/dart-lang/stream_channel.git - string_scanner: - git: git://github.com/dart-lang/string_scanner.git - test_api: - git: - url: git://github.com/dart-lang/test.git - path: pkgs/test_api - test_core: - git: - url: git://github.com/dart-lang/test.git - path: pkgs/test_core - test: - git: - url: git://github.com/dart-lang/test.git - path: pkgs/test - typed_data: - git: git://github.com/dart-lang/typed_data.git + test: ^1.16.0-nullsafety From e8095c708d17e0fd95a6fa6d186ec234eed06fbd Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 3 Nov 2020 14:36:32 -0800 Subject: [PATCH 17/61] Bump SDK constraints for pub (dart-lang/term_glyph#18) Use a 2.12.0 lower bound since pub does not understand allowed experiments for earlier versions. Use a 3.0.0 upper bound to avoid a warning in pub and to give some flexibility in publishing for stable. --- pkgs/term_glyph/CHANGELOG.md | 5 +++++ pkgs/term_glyph/pubspec.yaml | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index a2c1dfbfd..7f8ed6036 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.2.0-nullsafety.3 + +* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release + guidelines. + ## 1.2.0-nullsafety.2 * Allow prerelease versions of the 2.12 sdk. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 148db8df4..f4a49e813 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,12 +1,11 @@ name: term_glyph -version: 1.2.0-nullsafety.2 +version: 1.2.0-nullsafety.3 description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: - # This must remain a tight constraint until nnbd is stable - sdk: '>=2.10.0-0 <2.12.0' + sdk: ">=2.12.0-0 <3.0.0" dev_dependencies: csv: '>=3.0.0 <5.0.0' From 755f0d3b9e47109a1a388cb23da408c1e656d111 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Mon, 9 Nov 2020 17:46:25 -0800 Subject: [PATCH 18/61] opt out the tool/generate.dart script (dart-lang/term_glyph#19) --- pkgs/term_glyph/pubspec.yaml | 1 + pkgs/term_glyph/tool/generate.dart | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index f4a49e813..d989ae90b 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -10,4 +10,5 @@ environment: dev_dependencies: csv: '>=3.0.0 <5.0.0' dart_style: '>=0.2.0 <2.0.0' + meta: ^1.3.0-nullsafety test: ^1.16.0-nullsafety diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 0a1136ecf..90fc2e825 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -1,10 +1,14 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// +// TODO: Remove once package:csv/csv.dart is migrated. +// @dart=2.9 import 'dart:io'; import 'package:csv/csv.dart'; +import 'package:meta/meta.dart'; void main() { var csv = CsvCodec(eol: '\n'); @@ -82,7 +86,7 @@ void _writeGlyphSetInterface(List data) { /// /// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes /// the Unicode glyph set. -void _writeGlyphSet(List data, {required bool ascii}) { +void _writeGlyphSet(List data, {@required bool ascii}) { var file = File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart') .openSync(mode: FileMode.write); From c1169d2ad4915bd0bbd9889363c9b07d9880f781 Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Thu, 12 Nov 2020 07:14:16 -0800 Subject: [PATCH 19/61] remove redundant experiment (dart-lang/term_glyph#20) --- pkgs/term_glyph/analysis_options.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index 64ff556c6..108d1058a 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1,4 +1 @@ include: package:pedantic/analysis_options.yaml -analyzer: - enable-experiment: - - non-nullable From 100498c048aae66e21c2a298771ac31d5cb58190 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 20 Jan 2021 16:35:56 +0100 Subject: [PATCH 20/61] Migrate to GitHub Actions (dart-lang/term_glyph#21) * Migrate to GitHub Actions --- .../.github/workflows/test-package.yml | 61 +++++++++++++++++++ pkgs/term_glyph/.travis.yml | 31 ---------- 2 files changed, 61 insertions(+), 31 deletions(-) create mode 100644 pkgs/term_glyph/.github/workflows/test-package.yml delete mode 100644 pkgs/term_glyph/.travis.yml diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml new file mode 100644 index 000000000..21a3c50b6 --- /dev/null +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -0,0 +1,61 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +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@v2 + - uses: dart-lang/setup-dart@v0.3 + 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: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + 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' diff --git a/pkgs/term_glyph/.travis.yml b/pkgs/term_glyph/.travis.yml deleted file mode 100644 index 0b9689924..000000000 --- a/pkgs/term_glyph/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: dart - -dart: -- dev - -jobs: - include: - - stage: analyze_and_format - name: "Analyze" - os: linux - script: dartanalyzer --fatal-warnings --fatal-infos . - - stage: analyze_and_format - name: "Format" - os: linux - script: dartfmt -n --set-exit-if-changed . - - stage: test - name: "Vm Tests" - os: linux - script: pub run test -p vm - -stages: - - analyze_and_format - - test - -# Only building master means that we don't run two builds for each pull request. -branches: - only: [master] - -cache: - directories: - - $HOME/.pub-cache From 370a95dbbaaa08e6af9892dd7c673c87e0da63c9 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 2 Feb 2021 15:20:17 -0800 Subject: [PATCH 21/61] Prepare to publish for stable null safety (dart-lang/term_glyph#22) --- pkgs/term_glyph/CHANGELOG.md | 4 ++++ pkgs/term_glyph/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 7f8ed6036..15cbaf5cb 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0 + +* Stable release for null safety. + ## 1.2.0-nullsafety.3 * Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index d989ae90b..18177a356 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.2.0-nullsafety.3 +version: 1.2.0 description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph From b151328b9395ea934e79b6e900228e75ea4799bb Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 19 Mar 2021 12:15:10 -0700 Subject: [PATCH 22/61] A bunch of general cleanup (dart-lang/term_glyph#23) Set the SDK constraint to stable Bump dependencies to stable versions drop unneeded deps Move last bit of code to null safety Update CI Enable and fix standard lints --- .../.github/workflows/test-package.yml | 6 +- pkgs/term_glyph/CHANGELOG.md | 2 + pkgs/term_glyph/analysis_options.yaml | 77 +++++++++++ .../lib/src/generated/ascii_glyph_set.dart | 2 +- .../lib/src/generated/glyph_set.dart | 4 +- .../lib/src/generated/top_level.dart | 120 +++++++++--------- .../lib/src/generated/unicode_glyph_set.dart | 2 +- pkgs/term_glyph/lib/term_glyph.dart | 6 +- pkgs/term_glyph/pubspec.yaml | 11 +- pkgs/term_glyph/tool/generate.dart | 36 +++--- 10 files changed, 170 insertions(+), 96 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 21a3c50b6..e47bf6600 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1.0 with: sdk: ${{ matrix.sdk }} - id: install @@ -47,10 +47,10 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [dev] + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1.0 with: sdk: ${{ matrix.sdk }} - id: install diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 15cbaf5cb..f2cd28f40 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.2.1-dev + ## 1.2.0 * Stable release for null safety. diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index 108d1058a..acbc3d01c 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1 +1,78 @@ include: package:pedantic/analysis_options.yaml + +analyzer: + strong-mode: + implicit-casts: false + +linter: + rules: + - avoid_bool_literals_in_conditional_expressions + - avoid_catching_errors + - avoid_classes_with_only_static_members + - avoid_function_literals_in_foreach_calls + - avoid_private_typedef_functions + - avoid_redundant_argument_values + - avoid_renaming_method_parameters + - avoid_returning_null + - avoid_returning_null_for_future + - avoid_returning_null_for_void + - avoid_returning_this + - avoid_single_cascade_in_expression_statements + - avoid_unused_constructor_parameters + - avoid_void_async + - await_only_futures + - camel_case_types + - cancel_subscriptions + #- cascade_invocations + - comment_references + - constant_identifier_names + - control_flow_in_finally + - directives_ordering + - empty_statements + - file_names + - hash_and_equals + - implementation_imports + - invariant_booleans + - iterable_contains_unrelated_type + - join_return_with_assignment + #- lines_longer_than_80_chars + - list_remove_unrelated_type + - literal_only_boolean_expressions + - missing_whitespace_between_adjacent_strings + - no_adjacent_strings_in_list + - no_runtimeType_toString + - non_constant_identifier_names + - only_throw_errors + - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_asserts_in_initializer_lists + - prefer_const_constructors + - prefer_const_declarations + - prefer_expression_function_bodies + - prefer_final_locals + - prefer_function_declarations_over_variables + - prefer_initializing_formals + - prefer_inlined_adds + - prefer_interpolation_to_compose_strings + - prefer_is_not_operator + - prefer_null_aware_operators + - prefer_relative_imports + - prefer_typing_uninitialized_variables + - prefer_void_to_null + - provide_deprecation_message + - sort_pub_dependencies + - test_types_in_equals + - throw_in_finally + - unnecessary_await_in_return + - unnecessary_brace_in_string_interps + - unnecessary_getters_setters + - unnecessary_lambdas + - unnecessary_null_aware_assignments + - unnecessary_overrides + - unnecessary_parenthesis + - unnecessary_statements + - unnecessary_string_interpolations + - use_string_buffers + - void_checks diff --git a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart index e0c3a4994..7c97d7f29 100644 --- a/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/ascii_glyph_set.dart @@ -10,7 +10,7 @@ import 'glyph_set.dart'; class AsciiGlyphSet implements GlyphSet { const AsciiGlyphSet(); - /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// Returns [glyph] if `this` supports Unicode glyphs and [alternative] /// otherwise. @override String glyphOrAscii(String glyph, String alternative) => alternative; diff --git a/pkgs/term_glyph/lib/src/generated/glyph_set.dart b/pkgs/term_glyph/lib/src/generated/glyph_set.dart index 941da4f00..10713b275 100644 --- a/pkgs/term_glyph/lib/src/generated/glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/glyph_set.dart @@ -7,7 +7,7 @@ /// A class that provides access to every configurable glyph. /// /// This is provided as a class so that individual chunks of code can choose -/// between [ascii] and [unicode] glyphs. For example: +/// between `ascii` and `unicode` glyphs. For example: /// /// ```dart /// import 'package:term_glyph/term_glyph.dart' as glyph; @@ -28,7 +28,7 @@ /// } /// ``` abstract class GlyphSet { - /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// Returns [glyph] if `this` supports Unicode glyphs and [alternative] /// otherwise. String glyphOrAscii(String glyph, String alternative); diff --git a/pkgs/term_glyph/lib/src/generated/top_level.dart b/pkgs/term_glyph/lib/src/generated/top_level.dart index 9475953ce..c430b33b9 100644 --- a/pkgs/term_glyph/lib/src/generated/top_level.dart +++ b/pkgs/term_glyph/lib/src/generated/top_level.dart @@ -8,7 +8,7 @@ import '../../term_glyph.dart' as glyph; /// A bullet point. /// -/// If [ascii] is `false`, this is "•". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "•". If it's `true`, this is /// "*" instead. String get bullet => glyph.glyphs.bullet; @@ -17,7 +17,7 @@ String get bullet => glyph.glyphs.bullet; /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// -/// If [ascii] is `false`, this is "←". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "←". If it's `true`, this is /// "<" instead. String get leftArrow => glyph.glyphs.leftArrow; @@ -26,355 +26,355 @@ String get leftArrow => glyph.glyphs.leftArrow; /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some /// terminal fonts, and should generally be surrounding by spaces. /// -/// If [ascii] is `false`, this is "→". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "→". If it's `true`, this is /// ">" instead. String get rightArrow => glyph.glyphs.rightArrow; /// An upwards-pointing arrow. /// -/// If [ascii] is `false`, this is "↑". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "↑". If it's `true`, this is /// "^" instead. String get upArrow => glyph.glyphs.upArrow; /// A downwards-pointing arrow. /// -/// If [ascii] is `false`, this is "↓". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "↓". If it's `true`, this is /// "v" instead. String get downArrow => glyph.glyphs.downArrow; /// A two-character left-pointing arrow. /// -/// If [ascii] is `false`, this is "◀━". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "◀━". If it's `true`, this is /// "<=" instead. String get longLeftArrow => glyph.glyphs.longLeftArrow; /// A two-character right-pointing arrow. /// -/// If [ascii] is `false`, this is "━▶". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "━▶". If it's `true`, this is /// "=>" instead. String get longRightArrow => glyph.glyphs.longRightArrow; /// A horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "─". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "─". If it's `true`, this is /// "-" instead. String get horizontalLine => glyph.glyphs.horizontalLine; /// A vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "│". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "│". If it's `true`, this is /// "|" instead. String get verticalLine => glyph.glyphs.verticalLine; /// The upper left-hand corner of a box. /// -/// If [ascii] is `false`, this is "┌". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┌". If it's `true`, this is /// "," instead. String get topLeftCorner => glyph.glyphs.topLeftCorner; /// The upper right-hand corner of a box. /// -/// If [ascii] is `false`, this is "┐". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┐". If it's `true`, this is /// "," instead. String get topRightCorner => glyph.glyphs.topRightCorner; /// The lower left-hand corner of a box. /// -/// If [ascii] is `false`, this is "└". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "└". If it's `true`, this is /// "'" instead. String get bottomLeftCorner => glyph.glyphs.bottomLeftCorner; /// The lower right-hand corner of a box. /// -/// If [ascii] is `false`, this is "┘". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┘". If it's `true`, this is /// "'" instead. String get bottomRightCorner => glyph.glyphs.bottomRightCorner; /// An intersection of vertical and horizontal box lines. /// -/// If [ascii] is `false`, this is "┼". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┼". If it's `true`, this is /// "+" instead. String get cross => glyph.glyphs.cross; /// A horizontal box line with a vertical line going up from the middle. /// -/// If [ascii] is `false`, this is "┴". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┴". If it's `true`, this is /// "+" instead. String get teeUp => glyph.glyphs.teeUp; /// A horizontal box line with a vertical line going down from the middle. /// -/// If [ascii] is `false`, this is "┬". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┬". If it's `true`, this is /// "+" instead. String get teeDown => glyph.glyphs.teeDown; /// A vertical box line with a horizontal line going left from the middle. /// -/// If [ascii] is `false`, this is "┤". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┤". If it's `true`, this is /// "+" instead. String get teeLeft => glyph.glyphs.teeLeft; /// A vertical box line with a horizontal line going right from the middle. /// -/// If [ascii] is `false`, this is "├". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "├". If it's `true`, this is /// "+" instead. String get teeRight => glyph.glyphs.teeRight; /// The top half of a vertical box line. /// -/// If [ascii] is `false`, this is "╵". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╵". If it's `true`, this is /// "'" instead. String get upEnd => glyph.glyphs.upEnd; /// The bottom half of a vertical box line. /// -/// If [ascii] is `false`, this is "╷". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╷". If it's `true`, this is /// "," instead. String get downEnd => glyph.glyphs.downEnd; /// The left half of a horizontal box line. /// -/// If [ascii] is `false`, this is "╴". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╴". If it's `true`, this is /// "-" instead. String get leftEnd => glyph.glyphs.leftEnd; /// The right half of a horizontal box line. /// -/// If [ascii] is `false`, this is "╶". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╶". If it's `true`, this is /// "-" instead. String get rightEnd => glyph.glyphs.rightEnd; /// A bold horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "━". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "━". If it's `true`, this is /// "=" instead. String get horizontalLineBold => glyph.glyphs.horizontalLineBold; /// A bold vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┃". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┃". If it's `true`, this is /// "|" instead. String get verticalLineBold => glyph.glyphs.verticalLineBold; /// The bold upper left-hand corner of a box. /// -/// If [ascii] is `false`, this is "┏". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┏". If it's `true`, this is /// "," instead. String get topLeftCornerBold => glyph.glyphs.topLeftCornerBold; /// The bold upper right-hand corner of a box. /// -/// If [ascii] is `false`, this is "┓". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┓". If it's `true`, this is /// "," instead. String get topRightCornerBold => glyph.glyphs.topRightCornerBold; /// The bold lower left-hand corner of a box. /// -/// If [ascii] is `false`, this is "┗". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┗". If it's `true`, this is /// "'" instead. String get bottomLeftCornerBold => glyph.glyphs.bottomLeftCornerBold; /// The bold lower right-hand corner of a box. /// -/// If [ascii] is `false`, this is "┛". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┛". If it's `true`, this is /// "'" instead. String get bottomRightCornerBold => glyph.glyphs.bottomRightCornerBold; /// An intersection of bold vertical and horizontal box lines. /// -/// If [ascii] is `false`, this is "╋". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╋". If it's `true`, this is /// "+" instead. String get crossBold => glyph.glyphs.crossBold; /// A bold horizontal box line with a vertical line going up from the middle. /// -/// If [ascii] is `false`, this is "┻". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┻". If it's `true`, this is /// "+" instead. String get teeUpBold => glyph.glyphs.teeUpBold; /// A bold horizontal box line with a vertical line going down from the middle. /// -/// If [ascii] is `false`, this is "┳". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┳". If it's `true`, this is /// "+" instead. String get teeDownBold => glyph.glyphs.teeDownBold; /// A bold vertical box line with a horizontal line going left from the middle. /// -/// If [ascii] is `false`, this is "┫". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┫". If it's `true`, this is /// "+" instead. String get teeLeftBold => glyph.glyphs.teeLeftBold; /// A bold vertical box line with a horizontal line going right from the middle. /// -/// If [ascii] is `false`, this is "┣". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┣". If it's `true`, this is /// "+" instead. String get teeRightBold => glyph.glyphs.teeRightBold; /// The top half of a bold vertical box line. /// -/// If [ascii] is `false`, this is "╹". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╹". If it's `true`, this is /// "'" instead. String get upEndBold => glyph.glyphs.upEndBold; /// The bottom half of a bold vertical box line. /// -/// If [ascii] is `false`, this is "╻". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╻". If it's `true`, this is /// "," instead. String get downEndBold => glyph.glyphs.downEndBold; /// The left half of a bold horizontal box line. /// -/// If [ascii] is `false`, this is "╸". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╸". If it's `true`, this is /// "-" instead. String get leftEndBold => glyph.glyphs.leftEndBold; /// The right half of a bold horizontal box line. /// -/// If [ascii] is `false`, this is "╺". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╺". If it's `true`, this is /// "-" instead. String get rightEndBold => glyph.glyphs.rightEndBold; /// A double horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "═". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "═". If it's `true`, this is /// "=" instead. String get horizontalLineDouble => glyph.glyphs.horizontalLineDouble; /// A double vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "║". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "║". If it's `true`, this is /// "|" instead. String get verticalLineDouble => glyph.glyphs.verticalLineDouble; /// The double upper left-hand corner of a box. /// -/// If [ascii] is `false`, this is "╔". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╔". If it's `true`, this is /// "," instead. String get topLeftCornerDouble => glyph.glyphs.topLeftCornerDouble; /// The double upper right-hand corner of a box. /// -/// If [ascii] is `false`, this is "╗". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╗". If it's `true`, this is /// "," instead. String get topRightCornerDouble => glyph.glyphs.topRightCornerDouble; /// The double lower left-hand corner of a box. /// -/// If [ascii] is `false`, this is "╚". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╚". If it's `true`, this is /// """ instead. String get bottomLeftCornerDouble => glyph.glyphs.bottomLeftCornerDouble; /// The double lower right-hand corner of a box. /// -/// If [ascii] is `false`, this is "╝". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╝". If it's `true`, this is /// """ instead. String get bottomRightCornerDouble => glyph.glyphs.bottomRightCornerDouble; /// An intersection of double vertical and horizontal box lines. /// -/// If [ascii] is `false`, this is "╬". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╬". If it's `true`, this is /// "+" instead. String get crossDouble => glyph.glyphs.crossDouble; /// A double horizontal box line with a vertical line going up from the middle. /// -/// If [ascii] is `false`, this is "╩". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╩". If it's `true`, this is /// "+" instead. String get teeUpDouble => glyph.glyphs.teeUpDouble; /// A double horizontal box line with a vertical line going down from the middle. /// -/// If [ascii] is `false`, this is "╦". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╦". If it's `true`, this is /// "+" instead. String get teeDownDouble => glyph.glyphs.teeDownDouble; /// A double vertical box line with a horizontal line going left from the middle. /// -/// If [ascii] is `false`, this is "╣". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╣". If it's `true`, this is /// "+" instead. String get teeLeftDouble => glyph.glyphs.teeLeftDouble; /// A double vertical box line with a horizontal line going right from the middle. /// -/// If [ascii] is `false`, this is "╠". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╠". If it's `true`, this is /// "+" instead. String get teeRightDouble => glyph.glyphs.teeRightDouble; /// A dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "╌". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╌". If it's `true`, this is /// "-" instead. String get horizontalLineDoubleDash => glyph.glyphs.horizontalLineDoubleDash; /// A bold dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "╍". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╍". If it's `true`, this is /// "-" instead. String get horizontalLineDoubleDashBold => glyph.glyphs.horizontalLineDoubleDashBold; /// A dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "╎". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╎". If it's `true`, this is /// "|" instead. String get verticalLineDoubleDash => glyph.glyphs.verticalLineDoubleDash; /// A bold dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "╏". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "╏". If it's `true`, this is /// "|" instead. String get verticalLineDoubleDashBold => glyph.glyphs.verticalLineDoubleDashBold; /// A dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┄". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┄". If it's `true`, this is /// "-" instead. String get horizontalLineTripleDash => glyph.glyphs.horizontalLineTripleDash; /// A bold dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┅". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┅". If it's `true`, this is /// "-" instead. String get horizontalLineTripleDashBold => glyph.glyphs.horizontalLineTripleDashBold; /// A dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┆". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┆". If it's `true`, this is /// "|" instead. String get verticalLineTripleDash => glyph.glyphs.verticalLineTripleDash; /// A bold dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┇". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┇". If it's `true`, this is /// "|" instead. String get verticalLineTripleDashBold => glyph.glyphs.verticalLineTripleDashBold; /// A dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┈". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┈". If it's `true`, this is /// "-" instead. String get horizontalLineQuadrupleDash => glyph.glyphs.horizontalLineQuadrupleDash; /// A bold dashed horizontal line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┉". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┉". If it's `true`, this is /// "-" instead. String get horizontalLineQuadrupleDashBold => glyph.glyphs.horizontalLineQuadrupleDashBold; /// A dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┊". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┊". If it's `true`, this is /// "|" instead. String get verticalLineQuadrupleDash => glyph.glyphs.verticalLineQuadrupleDash; /// A bold dashed vertical line that can be used to draw a box. /// -/// If [ascii] is `false`, this is "┋". If it's `true`, this is +/// If [glyph.ascii] is `false`, this is "┋". If it's `true`, this is /// "|" instead. String get verticalLineQuadrupleDashBold => glyph.glyphs.verticalLineQuadrupleDashBold; diff --git a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart index 1737b391b..1ddd165d7 100644 --- a/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/unicode_glyph_set.dart @@ -10,7 +10,7 @@ import 'glyph_set.dart'; class UnicodeGlyphSet implements GlyphSet { const UnicodeGlyphSet(); - /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// Returns [glyph] if `this` supports Unicode glyphs and [alternative] /// otherwise. @override String glyphOrAscii(String glyph, String alternative) => glyph; diff --git a/pkgs/term_glyph/lib/term_glyph.dart b/pkgs/term_glyph/lib/term_glyph.dart index b7361be6d..9f2b42293 100644 --- a/pkgs/term_glyph/lib/term_glyph.dart +++ b/pkgs/term_glyph/lib/term_glyph.dart @@ -2,13 +2,13 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -export 'src/generated/glyph_set.dart'; -export 'src/generated/top_level.dart'; - import 'src/generated/ascii_glyph_set.dart'; import 'src/generated/glyph_set.dart'; import 'src/generated/unicode_glyph_set.dart'; +export 'src/generated/glyph_set.dart'; +export 'src/generated/top_level.dart'; + /// A [GlyphSet] that always returns ASCII glyphs. const GlyphSet asciiGlyphs = AsciiGlyphSet(); diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 18177a356..428f76665 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,14 +1,13 @@ name: term_glyph -version: 1.2.0 +version: 1.2.1-dev description: Useful Unicode glyphs and ASCII substitutes. homepage: https://github.com/dart-lang/term_glyph environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" dev_dependencies: - csv: '>=3.0.0 <5.0.0' - dart_style: '>=0.2.0 <2.0.0' - meta: ^1.3.0-nullsafety - test: ^1.16.0-nullsafety + csv: ^5.0.0 + dart_style: ^2.0.0 + test: ^1.16.0 diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 90fc2e825..007913b3a 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -1,18 +1,14 @@ // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// -// TODO: Remove once package:csv/csv.dart is migrated. -// @dart=2.9 import 'dart:io'; import 'package:csv/csv.dart'; -import 'package:meta/meta.dart'; void main() { - var csv = CsvCodec(eol: '\n'); - var data = csv.decoder.convert(File('data.csv').readAsStringSync()); + final csv = CsvCodec(eol: '\n'); + final data = csv.decoder.convert(File('data.csv').readAsStringSync()); // Remove comments and empty lines. data.removeWhere((row) => row.length < 3); @@ -24,7 +20,7 @@ void main() { _writeGlyphSet(data, ascii: true); _writeTopLevel(data); - var result = Process.runSync( + final result = Process.runSync( 'pub', ['run', 'dart_style:format', '-w', 'lib/src/generated']); print(result.stderr); exit(result.exitCode); @@ -32,7 +28,7 @@ void main() { /// Writes `lib/src/generated/glyph_set.dart`. void _writeGlyphSetInterface(List data) { - var file = + final file = File('lib/src/generated/glyph_set.dart').openSync(mode: FileMode.write); file.writeStringSync(r''' // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file @@ -44,7 +40,7 @@ void _writeGlyphSetInterface(List data) { /// A class that provides access to every configurable glyph. /// /// This is provided as a class so that individual chunks of code can choose - /// between [ascii] and [unicode] glyphs. For example: + /// between `ascii` and `unicode` glyphs. For example: /// /// ```dart /// import 'package:term_glyph/term_glyph.dart' as glyph; @@ -65,13 +61,13 @@ void _writeGlyphSetInterface(List data) { /// } /// ``` abstract class GlyphSet { - /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// Returns [glyph] if `this` supports Unicode glyphs and [alternative] /// otherwise. String glyphOrAscii(String glyph, String alternative); '''); for (var glyph in data) { - for (var line in glyph[3].split('\n')) { + for (var line in (glyph[3] as String).split('\n')) { file.writeStringSync('/// $line\n'); } @@ -86,12 +82,12 @@ void _writeGlyphSetInterface(List data) { /// /// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes /// the Unicode glyph set. -void _writeGlyphSet(List data, {@required bool ascii}) { - var file = +void _writeGlyphSet(List data, {required bool ascii}) { + final file = File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart') .openSync(mode: FileMode.write); - var className = '${ascii ? "Ascii" : "Unicode"}GlyphSet'; + final className = '${ascii ? "Ascii" : "Unicode"}GlyphSet'; file.writeStringSync(''' // Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a @@ -104,18 +100,18 @@ void _writeGlyphSet(List data, {@required bool ascii}) { /// A [GlyphSet] that includes only ${ascii ? "ASCII" : "Unicode"} glyphs. class $className implements GlyphSet { const $className(); - /// Returns [glyph] if [this] supports Unicode glyphs and [alternative] + /// Returns [glyph] if `this` supports Unicode glyphs and [alternative] /// otherwise. @override String glyphOrAscii(String glyph, String alternative) => ${ascii ? "alternative" : "glyph"}; '''); - var index = ascii ? 2 : 1; + final index = ascii ? 2 : 1; for (var glyph in data) { file.writeStringSync(''' @override - String get ${glyph[0]} => ${_quote(glyph[index])}; + String get ${glyph[0]} => ${_quote(glyph[index] as String)}; '''); } @@ -125,7 +121,7 @@ void _writeGlyphSet(List data, {@required bool ascii}) { /// Writes `lib/src/generated/top_level.dart`. void _writeTopLevel(List data) { - var file = + final file = File('lib/src/generated/top_level.dart').openSync(mode: FileMode.write); file.writeStringSync(''' @@ -139,13 +135,13 @@ void _writeTopLevel(List data) { '''); for (var glyph in data) { - for (var line in glyph[3].split('\n')) { + for (var line in (glyph[3] as String).split('\n')) { file.writeStringSync('/// $line\n'); } file.writeStringSync(''' /// - /// If [ascii] is `false`, this is "${glyph[1]}". If it's `true`, this is + /// If [glyph.ascii] is `false`, this is "${glyph[1]}". If it's `true`, this is /// "${glyph[2]}" instead. String get ${glyph[0]} => glyph.glyphs.${glyph[0]}; '''); From cc20f55a56e9c089ca3905963ecb068676df6765 Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Wed, 31 Mar 2021 15:21:34 -0700 Subject: [PATCH 23/61] Update LICENSE (dart-lang/term_glyph#24) Changes to comply to internal review --- pkgs/term_glyph/LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/LICENSE b/pkgs/term_glyph/LICENSE index 389ce9856..03af64abe 100644 --- a/pkgs/term_glyph/LICENSE +++ b/pkgs/term_glyph/LICENSE @@ -1,4 +1,5 @@ -Copyright 2017, the Dart project authors. All rights reserved. +Copyright 2017, 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: @@ -9,7 +10,7 @@ met: 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 Inc. nor the names of its + * 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. From d71db5ef0efc170888f7bbb2fc26c9395927bf8d Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 25 Apr 2021 17:04:10 -0700 Subject: [PATCH 24/61] fix lints --- pkgs/term_glyph/test/symbol_test.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/term_glyph/test/symbol_test.dart b/pkgs/term_glyph/test/symbol_test.dart index 22993a737..b3b4d0937 100644 --- a/pkgs/term_glyph/test/symbol_test.dart +++ b/pkgs/term_glyph/test/symbol_test.dart @@ -2,9 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:test/test.dart'; - import 'package:term_glyph/term_glyph.dart' as glyph; +import 'package:test/test.dart'; void main() { group('with ascii = false', () { From 2e592b85da1dd25b402d87786b265ffa4a05aff9 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 2 Oct 2021 20:59:06 -0700 Subject: [PATCH 25/61] Move to pkg:lints (dart-lang/term_glyph#25) --- pkgs/term_glyph/analysis_options.yaml | 2 +- pkgs/term_glyph/pubspec.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index acbc3d01c..a7d6f2d46 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml analyzer: strong-mode: diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 428f76665..e1b26bb95 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -10,4 +10,5 @@ environment: dev_dependencies: csv: ^5.0.0 dart_style: ^2.0.0 + lints: ^1.0.0 test: ^1.16.0 From 5244f50a955c582ce3e520637a3e378c5c0447ba Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 3 May 2022 15:15:55 -0700 Subject: [PATCH 26/61] populate the repository field (dart-lang/term_glyph#26) --- pkgs/term_glyph/CHANGELOG.md | 3 +++ pkgs/term_glyph/pubspec.yaml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index f2cd28f40..7100d1b39 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,5 +1,8 @@ ## 1.2.1-dev +* Migrate to `package:lints`. +* Populate the pubspec `repository` field. + ## 1.2.0 * Stable release for null safety. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index e1b26bb95..d1313a4a1 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,8 +1,7 @@ name: term_glyph version: 1.2.1-dev - description: Useful Unicode glyphs and ASCII substitutes. -homepage: https://github.com/dart-lang/term_glyph +repository: https://github.com/dart-lang/term_glyph environment: sdk: ">=2.12.0 <3.0.0" From 613b13a7e4734882f6a7f4c25760003ecb1a39f7 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 15 Jun 2022 13:33:55 -0700 Subject: [PATCH 27/61] prep to publish 1.2.1 (dart-lang/term_glyph#27) * prep for publishing 1.2.1 * update markdown badges --- pkgs/term_glyph/CHANGELOG.md | 2 +- pkgs/term_glyph/README.md | 4 ++++ pkgs/term_glyph/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 7100d1b39..4f9037660 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.2.1-dev +## 1.2.1 * Migrate to `package:lints`. * Populate the pubspec `repository` field. diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md index 0d64ced35..3a75d0606 100644 --- a/pkgs/term_glyph/README.md +++ b/pkgs/term_glyph/README.md @@ -1,3 +1,7 @@ +[![Dart CI](https://github.com/dart-lang/term_glyph/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/term_glyph/actions/workflows/test-package.yml) +[![pub package](https://img.shields.io/pub/v/term_glyph.svg)](https://pub.dev/packages/term_glyph) +[![package publisher](https://img.shields.io/pub/publisher/term_glyph.svg)](https://pub.dev/packages/term_glyph/publisher) + This library contains getters for useful Unicode glyphs as well as plain ASCII alternatives. It's intended to be used in command-line applications that may run in places where Unicode isn't well-supported and libraries that may be used by diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index d1313a4a1..7019e2db6 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.2.1-dev +version: 1.2.1 description: Useful Unicode glyphs and ASCII substitutes. repository: https://github.com/dart-lang/term_glyph From 2930843ceebc932108cbe72498a967376ec2eed1 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 25 Jul 2022 13:26:06 -0700 Subject: [PATCH 28/61] Remove deprecated experimental invariant_booleans lint rule (dart-lang/term_glyph#28) --- pkgs/term_glyph/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index a7d6f2d46..99b42ff11 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -32,7 +32,6 @@ linter: - file_names - hash_and_equals - implementation_imports - - invariant_booleans - iterable_contains_unrelated_type - join_return_with_assignment #- lines_longer_than_80_chars From 29a7bf053ebbe238828b79d5d1221553740425b1 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 15 Nov 2022 14:30:33 -0800 Subject: [PATCH 29/61] blast_repo fixes (dart-lang/term_glyph#29) Dependabot GitHub Action --- pkgs/term_glyph/.github/dependabot.yml | 9 +++++++++ pkgs/term_glyph/.github/workflows/test-package.yml | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 pkgs/term_glyph/.github/dependabot.yml diff --git a/pkgs/term_glyph/.github/dependabot.yml b/pkgs/term_glyph/.github/dependabot.yml new file mode 100644 index 000000000..1603cdd9e --- /dev/null +++ b/pkgs/term_glyph/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Dependabot configuration file. +# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index e47bf6600..81ebfebcd 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install @@ -49,8 +49,8 @@ jobs: os: [ubuntu-latest] sdk: [2.12.0, dev] steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install From 56f1543d690d30eb8e0b9b47d711ba754a55580a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 11:04:13 -0800 Subject: [PATCH 30/61] Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/term_glyph#30) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 81ebfebcd..ab056f0b5 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.12.0, dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 3cc119564734b677884305876b8bad914420667d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 9 Jan 2023 19:24:38 -0800 Subject: [PATCH 31/61] Migrate from no-implicit-casts to strict-casts (dart-lang/term_glyph#31) --- pkgs/term_glyph/analysis_options.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index 99b42ff11..52624aa1b 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1,8 +1,8 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true linter: rules: From fa13587588a16e2d8be243d205bba29bbf59784a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:14:47 -0800 Subject: [PATCH 32/61] Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/term_glyph#33) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/6a218f2413a3e78e9087f638a238f6b40893203d...a57a6c04cf7d4840e88432aad6281d1e125f0d46) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index ab056f0b5..3a909ed30 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.12.0, dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - id: install From d73ff18038b519118089eddc9f8c1156a4037206 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:34:04 -0800 Subject: [PATCH 33/61] Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/term_glyph#32) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 3a909ed30..b552d6ae0 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.12.0, dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From b4b07bb95273f0ecbaeca0517f334538bb1fe029 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 12 Feb 2023 09:57:51 -0800 Subject: [PATCH 34/61] Fix CI, update lints (dart-lang/term_glyph#34) --- .../.github/workflows/test-package.yml | 2 +- pkgs/term_glyph/CHANGELOG.md | 19 ++------ pkgs/term_glyph/analysis_options.yaml | 46 ++----------------- .../lib/src/generated/glyph_set.dart | 29 +++++++----- .../lib/src/generated/top_level.dart | 17 ++++--- pkgs/term_glyph/pubspec.yaml | 6 +-- pkgs/term_glyph/tool/generate.dart | 6 +-- 7 files changed, 42 insertions(+), 83 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index b552d6ae0..58201d820 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.12.0, dev] + sdk: [2.17.0, dev] steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 4f9037660..1cf47ac41 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.2-dev + +* Require Dart 2.17 + ## 1.2.1 * Migrate to `package:lints`. @@ -6,24 +10,9 @@ ## 1.2.0 * Stable release for null safety. - -## 1.2.0-nullsafety.3 - * Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release guidelines. -## 1.2.0-nullsafety.2 - -* Allow prerelease versions of the 2.12 sdk. - -## 1.2.0-nullsafety.1 - -* Allow 2.10 stable and 2.11.0 dev SDK versions. - -## 1.2.0-nullsafety - -* Update to null safety. All apis require non-nullable types. - ## 1.1.0 * Add a `GlyphSet` class that can be used to easily choose which set of glyphs diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index 52624aa1b..a4cc65912 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1,77 +1,37 @@ -include: package:lints/recommended.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: strict-casts: true + strict-inference: true + strict-raw-types: true linter: rules: - avoid_bool_literals_in_conditional_expressions - - avoid_catching_errors - avoid_classes_with_only_static_members - - avoid_function_literals_in_foreach_calls - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_renaming_method_parameters - avoid_returning_null - avoid_returning_null_for_future - - avoid_returning_null_for_void - avoid_returning_this - - avoid_single_cascade_in_expression_statements - avoid_unused_constructor_parameters - avoid_void_async - - await_only_futures - - camel_case_types - cancel_subscriptions #- cascade_invocations - comment_references - - constant_identifier_names - - control_flow_in_finally - - directives_ordering - - empty_statements - - file_names - - hash_and_equals - - implementation_imports - - iterable_contains_unrelated_type - join_return_with_assignment #- lines_longer_than_80_chars - - list_remove_unrelated_type - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - non_constant_identifier_names - - only_throw_errors - - overridden_fields - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_asserts_in_initializer_lists - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_function_declarations_over_variables - - prefer_initializing_formals - - prefer_inlined_adds - - prefer_interpolation_to_compose_strings - - prefer_is_not_operator - - prefer_null_aware_operators - prefer_relative_imports - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - provide_deprecation_message - - sort_pub_dependencies - test_types_in_equals - - throw_in_finally - unnecessary_await_in_return - - unnecessary_brace_in_string_interps - - unnecessary_getters_setters - - unnecessary_lambdas - - unnecessary_null_aware_assignments - - unnecessary_overrides - - unnecessary_parenthesis - - unnecessary_statements - - unnecessary_string_interpolations - use_string_buffers - - void_checks diff --git a/pkgs/term_glyph/lib/src/generated/glyph_set.dart b/pkgs/term_glyph/lib/src/generated/glyph_set.dart index 10713b275..be1a668a1 100644 --- a/pkgs/term_glyph/lib/src/generated/glyph_set.dart +++ b/pkgs/term_glyph/lib/src/generated/glyph_set.dart @@ -37,14 +37,14 @@ abstract class GlyphSet { /// A left-pointing arrow. /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in + /// some terminal fonts, and should generally be surrounding by spaces. String get leftArrow; /// A right-pointing arrow. /// - /// Note that the Unicode arrow glyphs may overlap with adjacent characters in some - /// terminal fonts, and should generally be surrounding by spaces. + /// Note that the Unicode arrow glyphs may overlap with adjacent characters in + /// some terminal fonts, and should generally be surrounding by spaces. String get rightArrow; /// An upwards-pointing arrow. @@ -128,13 +128,16 @@ abstract class GlyphSet { /// A bold horizontal box line with a vertical line going up from the middle. String get teeUpBold; - /// A bold horizontal box line with a vertical line going down from the middle. + /// A bold horizontal box line with a vertical line going down from the + /// middle. String get teeDownBold; - /// A bold vertical box line with a horizontal line going left from the middle. + /// A bold vertical box line with a horizontal line going left from the + /// middle. String get teeLeftBold; - /// A bold vertical box line with a horizontal line going right from the middle. + /// A bold vertical box line with a horizontal line going right from the + /// middle. String get teeRightBold; /// The top half of a bold vertical box line. @@ -170,16 +173,20 @@ abstract class GlyphSet { /// An intersection of double vertical and horizontal box lines. String get crossDouble; - /// A double horizontal box line with a vertical line going up from the middle. + /// A double horizontal box line with a vertical line going up from the + /// middle. String get teeUpDouble; - /// A double horizontal box line with a vertical line going down from the middle. + /// A double horizontal box line with a vertical line going down from the + /// middle. String get teeDownDouble; - /// A double vertical box line with a horizontal line going left from the middle. + /// A double vertical box line with a horizontal line going left from the + /// middle. String get teeLeftDouble; - /// A double vertical box line with a horizontal line going right from the middle. + /// A double vertical box line with a horizontal line going right from the + /// middle. String get teeRightDouble; /// A dashed horizontal line that can be used to draw a box. diff --git a/pkgs/term_glyph/lib/src/generated/top_level.dart b/pkgs/term_glyph/lib/src/generated/top_level.dart index c430b33b9..925903eef 100644 --- a/pkgs/term_glyph/lib/src/generated/top_level.dart +++ b/pkgs/term_glyph/lib/src/generated/top_level.dart @@ -14,8 +14,8 @@ String get bullet => glyph.glyphs.bullet; /// A left-pointing arrow. /// -/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some -/// terminal fonts, and should generally be surrounding by spaces. +/// Note that the Unicode arrow glyphs may overlap with adjacent characters in +/// some terminal fonts, and should generally be surrounding by spaces. /// /// If [glyph.ascii] is `false`, this is "←". If it's `true`, this is /// "<" instead. @@ -23,8 +23,8 @@ String get leftArrow => glyph.glyphs.leftArrow; /// A right-pointing arrow. /// -/// Note that the Unicode arrow glyphs may overlap with adjacent characters in some -/// terminal fonts, and should generally be surrounding by spaces. +/// Note that the Unicode arrow glyphs may overlap with adjacent characters in +/// some terminal fonts, and should generally be surrounding by spaces. /// /// If [glyph.ascii] is `false`, this is "→". If it's `true`, this is /// ">" instead. @@ -282,19 +282,22 @@ String get crossDouble => glyph.glyphs.crossDouble; /// "+" instead. String get teeUpDouble => glyph.glyphs.teeUpDouble; -/// A double horizontal box line with a vertical line going down from the middle. +/// A double horizontal box line with a vertical line going down from the +/// middle. /// /// If [glyph.ascii] is `false`, this is "╦". If it's `true`, this is /// "+" instead. String get teeDownDouble => glyph.glyphs.teeDownDouble; -/// A double vertical box line with a horizontal line going left from the middle. +/// A double vertical box line with a horizontal line going left from the +/// middle. /// /// If [glyph.ascii] is `false`, this is "╣". If it's `true`, this is /// "+" instead. String get teeLeftDouble => glyph.glyphs.teeLeftDouble; -/// A double vertical box line with a horizontal line going right from the middle. +/// A double vertical box line with a horizontal line going right from the +/// middle. /// /// If [glyph.ascii] is `false`, this is "╠". If it's `true`, this is /// "+" instead. diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 7019e2db6..6c6a5f1ab 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,13 +1,13 @@ name: term_glyph -version: 1.2.1 +version: 1.2.2-dev description: Useful Unicode glyphs and ASCII substitutes. repository: https://github.com/dart-lang/term_glyph environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" dev_dependencies: csv: ^5.0.0 + dart_flutter_team_lints: ^0.1.0 dart_style: ^2.0.0 - lints: ^1.0.0 test: ^1.16.0 diff --git a/pkgs/term_glyph/tool/generate.dart b/pkgs/term_glyph/tool/generate.dart index 007913b3a..f5cdade9e 100644 --- a/pkgs/term_glyph/tool/generate.dart +++ b/pkgs/term_glyph/tool/generate.dart @@ -27,7 +27,7 @@ void main() { } /// Writes `lib/src/generated/glyph_set.dart`. -void _writeGlyphSetInterface(List data) { +void _writeGlyphSetInterface(List> data) { final file = File('lib/src/generated/glyph_set.dart').openSync(mode: FileMode.write); file.writeStringSync(r''' @@ -82,7 +82,7 @@ void _writeGlyphSetInterface(List data) { /// /// If [ascii] is `true`, this writes the ASCII glyph set. Otherwise it writes /// the Unicode glyph set. -void _writeGlyphSet(List data, {required bool ascii}) { +void _writeGlyphSet(List> data, {required bool ascii}) { final file = File('lib/src/generated/${ascii ? "ascii" : "unicode"}_glyph_set.dart') .openSync(mode: FileMode.write); @@ -120,7 +120,7 @@ void _writeGlyphSet(List data, {required bool ascii}) { } /// Writes `lib/src/generated/top_level.dart`. -void _writeTopLevel(List data) { +void _writeTopLevel(List> data) { final file = File('lib/src/generated/top_level.dart').openSync(mode: FileMode.write); From e3f7c5f256cd455a901d69376b17b5c9a1912fed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:36:32 -0700 Subject: [PATCH 35/61] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/term_glyph#36) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/a57a6c04cf7d4840e88432aad6281d1e125f0d46...d6a63dab3335f427404425de0fbfed4686d93c4f) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 58201d820..a8d9e0928 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - id: install From 8201a84a45551519b8f40ed7f716d7d4fa536ee3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:52:29 -0700 Subject: [PATCH 36/61] Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/term_glyph#35) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/ac593985615ec2ede58e132d2e21d2b1cbd6127c...8f4b7f84864484a7bf31766abe9204da3cbe65b3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index a8d9e0928..7bcd23232 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 8d3eeef39ff1c20e0ee5b5426968a3c6a878c85c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 12:24:33 -0700 Subject: [PATCH 37/61] Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/term_glyph#37) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 7bcd23232..c21c3dde5 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From ebdfcfa3a2dc9bde66f553b942d7ff9013baaf00 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 19 May 2023 09:52:27 -0700 Subject: [PATCH 38/61] blast_repo fixes (dart-lang/term_glyph#38) dependabot --- pkgs/term_glyph/.github/dependabot.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/term_glyph/.github/dependabot.yml b/pkgs/term_glyph/.github/dependabot.yml index 1603cdd9e..725f03af2 100644 --- a/pkgs/term_glyph/.github/dependabot.yml +++ b/pkgs/term_glyph/.github/dependabot.yml @@ -3,7 +3,9 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "monthly" + interval: monthly + labels: + - autosubmit From 88d113b6fdcabf305a06bc3833b4741339f221c1 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 7 Jun 2023 20:31:04 -0700 Subject: [PATCH 39/61] Require Dart 3.0, update lints (dart-lang/term_glyph#39) --- pkgs/term_glyph/.github/workflows/test-package.yml | 2 +- pkgs/term_glyph/CHANGELOG.md | 4 ++-- pkgs/term_glyph/analysis_options.yaml | 7 +++++-- pkgs/term_glyph/pubspec.yaml | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index c21c3dde5..1f8243089 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.17.0, dev] + sdk: [3.0.0, dev] steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 1cf47ac41..657329c98 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,6 +1,6 @@ -## 1.2.2-dev +## 1.2.2-wip -* Require Dart 2.17 +* Require Dart 3.0 ## 1.2.1 diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index a4cc65912..fc4afe346 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -1,3 +1,4 @@ +# https://dart.dev/guides/language/analysis-options include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: @@ -18,10 +19,8 @@ linter: - avoid_unused_constructor_parameters - avoid_void_async - cancel_subscriptions - #- cascade_invocations - comment_references - join_return_with_assignment - #- lines_longer_than_80_chars - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list @@ -34,4 +33,8 @@ linter: - prefer_relative_imports - test_types_in_equals - unnecessary_await_in_return + - unnecessary_breaks + - use_if_null_to_convert_nulls_to_bools + - use_raw_strings - use_string_buffers + - use_super_parameters diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 6c6a5f1ab..5a7702044 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,13 +1,13 @@ name: term_glyph -version: 1.2.2-dev +version: 1.2.2-wip description: Useful Unicode glyphs and ASCII substitutes. repository: https://github.com/dart-lang/term_glyph environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ^3.0.0 dev_dependencies: csv: ^5.0.0 - dart_flutter_team_lints: ^0.1.0 + dart_flutter_team_lints: ^1.0.0 dart_style: ^2.0.0 test: ^1.16.0 From ac94099fa613bf722c125ab70967a8568a038e54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 13:37:24 +0000 Subject: [PATCH 40/61] Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/term_glyph#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
Release notes

Sourced from actions/checkout's releases.

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

v2.3.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.2&new-version=3.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 1f8243089..325fac8f3 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 8e8317dbadc16ae8c4a80106e5c4f6f3d871ff65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 13:06:36 +0000 Subject: [PATCH 41/61] Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/term_glyph#41) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
Release notes

Sourced from actions/checkout's releases.

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 325fac8f3..6e4f6ec13 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 81b1b45414c7952e9ecb739147d4b716bd3f7ead Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 13:03:48 +0000 Subject: [PATCH 42/61] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/term_glyph#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (dart-lang/term_glyph#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (dart-lang/term_glyph#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.0&new-version=1.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 6e4f6ec13..f476e3586 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.0.0, dev] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - id: install From bf593770c8402dcdd27b3cb5fdba8b5eff7be6b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:58:21 -0700 Subject: [PATCH 43/61] Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/term_glyph#43) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/f43a0e5ff2bd294095638e18286ca9a3d1956744...8ade135a41bc03ea155e62e844d188df1ea18608) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index f476e3586..8f5c3b290 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From 9883125c6940493edc7c1617b7a459c14c616b16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 13:10:59 +0000 Subject: [PATCH 44/61] Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/term_glyph#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
Release notes

Sourced from actions/checkout's releases.

v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 8f5c3b290..9ba65f0e6 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From 513cae5f98b75b8da4db197de0ada4c78ebb79a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:55:59 +0000 Subject: [PATCH 45/61] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/term_glyph#45) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (dart-lang/term_glyph#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (dart-lang/term_glyph#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 9ba65f0e6..38ced1a4f 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.0.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - id: install From 4bfe3cb099c34967cec38c7e4252022a8a610878 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 4 Dec 2023 10:30:52 -0800 Subject: [PATCH 46/61] drop outdated lints (dart-lang/term_glyph#46) --- pkgs/term_glyph/analysis_options.yaml | 7 ------- pkgs/term_glyph/pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index fc4afe346..d16ad8251 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -13,28 +13,21 @@ linter: - avoid_classes_with_only_static_members - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_returning_null - - avoid_returning_null_for_future - avoid_returning_this - avoid_unused_constructor_parameters - avoid_void_async - cancel_subscriptions - - comment_references - join_return_with_assignment - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - package_api_docs - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_relative_imports - - test_types_in_equals - unnecessary_await_in_return - unnecessary_breaks - use_if_null_to_convert_nulls_to_bools - use_raw_strings - use_string_buffers - - use_super_parameters diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 5a7702044..76eb5bed1 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -8,6 +8,6 @@ environment: dev_dependencies: csv: ^5.0.0 - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 dart_style: ^2.0.0 test: ^1.16.0 From f75e9197b1f1c1758ddb4ebd7ea2f0a7ed697bf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:35:13 +0000 Subject: [PATCH 47/61] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/term_glyph#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (dart-lang/term_glyph#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (dart-lang/term_glyph#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 38ced1a4f..84cd3ea5c 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.0.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install From 6ec3f739f28256404a524151648e303df4b54b62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:09:06 +0000 Subject: [PATCH 48/61] Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/term_glyph#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
Release notes

Sourced from actions/checkout's releases.

v4.1.2

We are investigating the following issue with this release and have rolled-back the v4 tag to point to v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.1...v4.1.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 84cd3ea5c..3e522b91d 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 4086768e98e0d1cafa94705e4f2051080ce3fabe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 13:25:56 +0000 Subject: [PATCH 49/61] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/term_glyph#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 3e522b91d..9048acb25 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.0.0, dev] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install From 41fa1df6414042697310a6bf67a2173fbf91783e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 13:28:42 +0000 Subject: [PATCH 50/61] Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/term_glyph#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
Release notes

Sourced from actions/checkout's releases.

v4.1.4

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.3...v4.1.4

v4.1.3

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 9048acb25..c5260d0dd 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 3c7d7b2c757be76efda63a0feeb33cd116d09db2 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 13 May 2024 10:36:06 -0700 Subject: [PATCH 51/61] blast_repo fixes (dart-lang/term_glyph#51) dependabot --- pkgs/term_glyph/.github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/term_glyph/.github/dependabot.yml b/pkgs/term_glyph/.github/dependabot.yml index 725f03af2..cde02ad6a 100644 --- a/pkgs/term_glyph/.github/dependabot.yml +++ b/pkgs/term_glyph/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From 8e0fdcb2c07f842c576f9211c50940a15b4fcb90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:39:15 +0000 Subject: [PATCH 52/61] Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (dart-lang/term_glyph#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5
Release notes

Sourced from actions/checkout's releases.

v4.1.5

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.4&new-version=4.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index c5260d0dd..9d2ae2032 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 120716000fd9183b83aff7252e7533a017b54295 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 13:05:22 +0000 Subject: [PATCH 53/61] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/term_glyph#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.5 to 4.1.6
Release notes

Sourced from actions/checkout's releases.

v4.1.6

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.5...v4.1.6

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.5&new-version=4.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 9d2ae2032..f1bac4131 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.0.0, dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 8fb6114848ada20a9654797f619f1d736572fd0c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 24 Jun 2024 10:02:59 -0700 Subject: [PATCH 54/61] bump lints (dart-lang/term_glyph#54) --- pkgs/term_glyph/.github/workflows/test-package.yml | 2 +- pkgs/term_glyph/CHANGELOG.md | 2 +- pkgs/term_glyph/pubspec.yaml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index f1bac4131..c744a64da 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [3.0.0, dev] + sdk: [3.1, dev] steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index 657329c98..d25ef1ab5 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.2.2-wip -* Require Dart 3.0 +* Require Dart 3.1 ## 1.2.1 diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 76eb5bed1..e4c998d79 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -4,10 +4,10 @@ description: Useful Unicode glyphs and ASCII substitutes. repository: https://github.com/dart-lang/term_glyph environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dev_dependencies: - csv: ^5.0.0 - dart_flutter_team_lints: ^2.0.0 + csv: ^6.0.0 + dart_flutter_team_lints: ^3.0.0 dart_style: ^2.0.0 - test: ^1.16.0 + test: ^1.16.6 From 7e9844312f2dcb1b1d795f3c30f027320aa81bea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:57:05 +0000 Subject: [PATCH 55/61] Bump the github-actions group with 2 updates (dart-lang/term_glyph#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7
Release notes

Sourced from actions/checkout's releases.

v4.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.6...v4.1.7

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

... (truncated)

Commits

Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.5

dart-lang/term_glyph#118: dart-lang/setup-dartdart-lang/term_glyph#118

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.5

dart-lang/term_glyph#118: dart-lang/setup-dartdart-lang/term_glyph#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index c744a64da..d1828e76b 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - id: install @@ -49,8 +49,8 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - id: install From fa98761393e41cde49826989a9ec5ed2cbb404d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:07:05 +0000 Subject: [PATCH 56/61] Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/term_glyph#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.7 to 4.2.0
Release notes

Sourced from actions/checkout's releases.

v4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.7...v4.2.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.7&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index d1828e76b..aedb2c1e0 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 28028c8afd6b79f99f1b10c5e3659d7a573f6783 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 29 Oct 2024 11:07:01 -0700 Subject: [PATCH 57/61] blast_repo fixes (dart-lang/term_glyph#57) drop-lint --- pkgs/term_glyph/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/term_glyph/analysis_options.yaml b/pkgs/term_glyph/analysis_options.yaml index d16ad8251..6d74ee93f 100644 --- a/pkgs/term_glyph/analysis_options.yaml +++ b/pkgs/term_glyph/analysis_options.yaml @@ -22,7 +22,6 @@ linter: - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - package_api_docs - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals From 3f2fadb2af1d2ae7c1dd6324b347e58145f829e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:55:19 +0000 Subject: [PATCH 58/61] Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group (dart-lang/term_glyph#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.0 to 4.2.2
Release notes

Sourced from actions/checkout's releases.

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.2.0&new-version=4.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index aedb2c1e0..08951cc08 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From da99c5c9fb37c524894582d862a25c2245623384 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 13:31:33 +0000 Subject: [PATCH 59/61] Bump dart-lang/setup-dart in the github-actions group (dart-lang/term_glyph#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `dart-lang/setup-dart` from 1.6.5 to 1.7.0
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.7.0

What's Changed

  • Install a Flutter SDK in the publish workflow allowing for publication of flutter packages.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.7.0

v1.6.5

dart-lang/term_glyph#118: dart-lang/setup-dartdart-lang/term_glyph#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.5&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/term_glyph/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/pkgs/term_glyph/.github/workflows/test-package.yml index 08951cc08..15b3b623e 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/pkgs/term_glyph/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.1, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - id: install From ce1f43e32c730a0dfa771e4547a18da7522375f5 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 11 Dec 2024 14:17:24 +0100 Subject: [PATCH 60/61] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/term_glyph.md | 5 +++++ pkgs/term_glyph/CONTRIBUTING.md | 33 ---------------------------- pkgs/term_glyph/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 34 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/term_glyph.md delete mode 100644 pkgs/term_glyph/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/term_glyph.md b/.github/ISSUE_TEMPLATE/term_glyph.md new file mode 100644 index 000000000..b6a47669c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/term_glyph.md @@ -0,0 +1,5 @@ +--- +name: "package:term_glyph" +about: "Create a bug or file a feature request against package:term_glyph." +labels: "package:term_glyph" +--- \ No newline at end of file diff --git a/pkgs/term_glyph/CONTRIBUTING.md b/pkgs/term_glyph/CONTRIBUTING.md deleted file mode 100644 index 6f5e0ea67..000000000 --- a/pkgs/term_glyph/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. - -### File headers -All files in the project must start with the following header. - - // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. - -### The small print -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index e4c998d79..2fb408774 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,7 +1,7 @@ name: term_glyph version: 1.2.2-wip description: Useful Unicode glyphs and ASCII substitutes. -repository: https://github.com/dart-lang/term_glyph +repository: https://github.com/dart-lang/tools/tree/main/pkgs/term_glyph environment: sdk: ^3.1.0 From 1d99aaacbf709a2284c6eee3583d0fafcfec21da Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 11 Dec 2024 14:22:30 +0100 Subject: [PATCH 61/61] Moving fixes --- .github/labeler.yml | 4 ++++ .../workflows/term_glyph.yaml | 17 ++++++++++++++--- README.md | 1 + pkgs/term_glyph/.github/dependabot.yml | 15 --------------- pkgs/term_glyph/CHANGELOG.md | 3 ++- pkgs/term_glyph/README.md | 2 +- pkgs/term_glyph/pubspec.yaml | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-) rename pkgs/term_glyph/.github/workflows/test-package.yml => .github/workflows/term_glyph.yaml (85%) delete mode 100644 pkgs/term_glyph/.github/dependabot.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 1cc4b2058..4c93a3929 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -108,6 +108,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/sse/**' +'package:term_glyph': + - changed-files: + - any-glob-to-any-file: 'pkgs/term_glyph/**' + 'package:unified_analytics': - changed-files: - any-glob-to-any-file: 'pkgs/unified_analytics/**' diff --git a/pkgs/term_glyph/.github/workflows/test-package.yml b/.github/workflows/term_glyph.yaml similarity index 85% rename from pkgs/term_glyph/.github/workflows/test-package.yml rename to .github/workflows/term_glyph.yaml index 15b3b623e..5b3b3209b 100644 --- a/pkgs/term_glyph/.github/workflows/test-package.yml +++ b/.github/workflows/term_glyph.yaml @@ -1,17 +1,28 @@ -name: Dart CI +name: package:term_glyph on: # Run on PRs and pushes to the default branch. push: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/term_glyph.yaml' + - 'pkgs/term_glyph/**' pull_request: - branches: [ master ] + branches: [ main ] + paths: + - '.github/workflows/term_glyph.yaml' + - 'pkgs/term_glyph/**' schedule: - cron: "0 0 * * 0" env: PUB_ENVIRONMENT: bot.github + +defaults: + run: + working-directory: pkgs/term_glyph/ + jobs: # Check code formatting and static analysis on a single OS (linux) # against Dart dev. diff --git a/README.md b/README.md index 79d1dde21..fc9fa4b41 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ don't naturally belong to other topic monorepos (like | [source_maps](pkgs/source_maps/) | A library to programmatically manipulate source map files. | [![package issues](https://img.shields.io/badge/package:source_maps-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_maps) | [![pub package](https://img.shields.io/pub/v/source_maps.svg)](https://pub.dev/packages/source_maps) | | [source_span](pkgs/source_span/) | Provides a standard representation for source code locations and spans. | [![package issues](https://img.shields.io/badge/package:source_span-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_span) | [![pub package](https://img.shields.io/pub/v/source_span.svg)](https://pub.dev/packages/source_span) | | [sse](pkgs/sse/) | Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. | [![package issues](https://img.shields.io/badge/package:sse-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asse) | [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) | +| [term_glyph](pkgs/term_glyph/) | Useful Unicode glyphs and ASCII substitutes. | [![package issues](https://img.shields.io/badge/package:term_glyph-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aterm_glyph) | [![pub package](https://img.shields.io/pub/v/term_glyph.svg)](https://pub.dev/packages/term_glyph) | | [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) | ## Publishing automation diff --git a/pkgs/term_glyph/.github/dependabot.yml b/pkgs/term_glyph/.github/dependabot.yml deleted file mode 100644 index cde02ad6a..000000000 --- a/pkgs/term_glyph/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Dependabot configuration file. -# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/term_glyph/CHANGELOG.md b/pkgs/term_glyph/CHANGELOG.md index d25ef1ab5..b7359cfb7 100644 --- a/pkgs/term_glyph/CHANGELOG.md +++ b/pkgs/term_glyph/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.2.2-wip +## 1.2.2 * Require Dart 3.1 +* Move to `dart-lang/tools` monorepo. ## 1.2.1 diff --git a/pkgs/term_glyph/README.md b/pkgs/term_glyph/README.md index 3a75d0606..75039aaeb 100644 --- a/pkgs/term_glyph/README.md +++ b/pkgs/term_glyph/README.md @@ -1,4 +1,4 @@ -[![Dart CI](https://github.com/dart-lang/term_glyph/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/term_glyph/actions/workflows/test-package.yml) +[![Build Status](https://github.com/dart-lang/tools/actions/workflows/term_glyph.yaml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/term_glyph.yaml) [![pub package](https://img.shields.io/pub/v/term_glyph.svg)](https://pub.dev/packages/term_glyph) [![package publisher](https://img.shields.io/pub/publisher/term_glyph.svg)](https://pub.dev/packages/term_glyph/publisher) diff --git a/pkgs/term_glyph/pubspec.yaml b/pkgs/term_glyph/pubspec.yaml index 2fb408774..c429307b9 100644 --- a/pkgs/term_glyph/pubspec.yaml +++ b/pkgs/term_glyph/pubspec.yaml @@ -1,5 +1,5 @@ name: term_glyph -version: 1.2.2-wip +version: 1.2.2 description: Useful Unicode glyphs and ASCII substitutes. repository: https://github.com/dart-lang/tools/tree/main/pkgs/term_glyph