Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 1.1.1

* Updated `LocalPlatform` to use new `dart.io` API for ansi color support queries
* Bumped minimum Dart SDK version to 1.23.0-dev.10.0

### 1.1.0

* Added `ansiSupported`
Expand Down
4 changes: 2 additions & 2 deletions lib/src/interface/local_platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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' as io show Platform;
import 'dart:io' as io show Platform, stdin;

import 'platform.dart';

Expand Down Expand Up @@ -48,5 +48,5 @@ class LocalPlatform extends Platform {
String get version => io.Platform.version;

@override
bool get ansiSupported => io.Platform.ansiSupported;
bool get ansiSupported => io.stdin.supportsAnsiEscapes;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also now stdout.supportsAnsiEscapes. We currently don't need it, but maybe we should make sure it can be added easily in a non-confusing way? Would it make sense to call this stdinAnsiSupported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. I'll update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. On the other hand, this would break all clients. I leave that call to you and @tvolkert. Happy either way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be too worried about that and just bump the major version number to indicate that we made incompatible API changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it would be a breaking change, let's hold off and make the breaking change if and when such an API is added to the SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK! Stand by...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. Missed you comment @tvolkert. Thanks.

}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dev_dependencies:
test: ^0.12.10

environment:
sdk: '>=1.23.0-dev.9.0 <2.0.0'
sdk: '>=1.23.0-dev.10.0 <2.0.0'