Skip to content

Commit 17e8b80

Browse files
authored
Prepare for 0.20.0 (#1702)
* Test-pin to a bleeding edge SDK to verify fix for relative path resolution * fix test to allow edge * args version needs revision for dart 2 * dartfmt, fix bug with hide * Require .59 for Dart 2. * dartfmt * pubspec fix * Version number bump and regen docs
1 parent 8a1d977 commit 17e8b80

File tree

9 files changed

+67
-23
lines changed

9 files changed

+67
-23
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.20.0
2+
* include and exclude are now available in dartdoc_options.yaml as supported options
3+
(#1700, #1674)
4+
* Support a new `{@animation}` directive in documentation comments to display
5+
videos in a simple player.
6+
* Fix Dart 2.0 support (#1668) and expand test coverage to include --help.
7+
18
## 0.19.1
29
* Update `package:markdown` to `2.0.0`, which includes many improvements –
310
especially to the parsing of links.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ and Library pages.
155155
library my_library;
156156
```
157157

158+
### Animations
159+
160+
You can specify links to videos inline that will be handled with a simple HTML5 player:
161+
162+
```dart
163+
/// This widget is a dancing Linux penguin.
164+
///
165+
/// {@animation name 100 200 http://host.com/path/to/video.mp4}
166+
```
167+
168+
'name' is user defined, and the numbers are the width and height of the animation in pixels.
169+
158170
### Macros
159171

160172
You can specify "macros", i.e. reusable pieces of documentation. For that, first specify a template

lib/dartdoc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export 'package:dartdoc/src/package_meta.dart';
3737

3838
const String name = 'dartdoc';
3939
// Update when pubspec version changes.
40-
const String dartdocVersion = '0.19.1';
40+
const String dartdocVersion = '0.20.0';
4141

4242
/// Helper class to initialize the default generators since they require
4343
/// GeneratorContext.

lib/src/dartdoc_options.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ class DartdocOptionArgSynth<T> extends DartdocOption<T>
357357
{String abbr,
358358
bool mustExist = false,
359359
String help = '',
360+
bool hide = false,
360361
bool isDir = false,
361362
bool isFile = false,
362363
bool negatable,
@@ -487,7 +488,7 @@ class DartdocOptionArgOnly<T> extends DartdocOption<T>
487488
{String abbr,
488489
bool mustExist = false,
489490
String help = '',
490-
bool hide,
491+
bool hide = false,
491492
bool isDir = false,
492493
bool isFile = false,
493494
bool negatable,
@@ -522,7 +523,7 @@ class DartdocOptionArgFile<T> extends DartdocOption<T>
522523
{String abbr,
523524
bool mustExist = false,
524525
String help: '',
525-
bool hide,
526+
bool hide = false,
526527
bool isDir = false,
527528
bool isFile = false,
528529
bool negatable,

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: analyzer
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "0.32.0"
10+
version: "0.32.1"
1111
args:
1212
dependency: "direct main"
1313
description:
@@ -84,7 +84,7 @@ packages:
8484
name: front_end
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "0.1.0"
87+
version: "0.1.1"
8888
glob:
8989
dependency: transitive
9090
description:
@@ -147,7 +147,7 @@ packages:
147147
name: kernel
148148
url: "https://pub.dartlang.org"
149149
source: hosted
150-
version: "0.3.0"
150+
version: "0.3.1"
151151
logging:
152152
dependency: "direct main"
153153
description:
@@ -394,4 +394,4 @@ packages:
394394
source: hosted
395395
version: "2.1.13"
396396
sdks:
397-
dart: ">=2.0.0-dev.54.0 <=2.0.0-dev.58.0"
397+
dart: "2.0.0-dev.59.0"

pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: dartdoc
22
# Also update the `version` field in lib/dartdoc.dart.
3-
version: 0.19.1
3+
version: 0.20.0
44
author: Dart Team <[email protected]>
55
description: A documentation generator for Dart.
66
homepage: https://github.com/dart-lang/dartdoc
77
environment:
8-
sdk: '>=2.0.0-dev.54.0 <3.0.0'
8+
sdk: '>=2.0.0-dev.59.0 <3.0.0'
99
dependencies:
10-
analyzer: 0.32.0
11-
args: '>=0.13.0 <2.0.0'
10+
analyzer: 0.32.1
11+
args: '>=1.4.1 <2.0.0'
1212
collection: ^1.2.0
13-
front_end: ^0.1.0
13+
front_end: ^0.1.1
1414
html: '>=0.12.1 <0.14.0'
1515
# We don't use http_parser directly; this dep exists to ensure that we get at
1616
# least version 3.0.3 to work around an issue with 3.0.2.

test/dartdoc_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void main() {
9292
startsWith(
9393
'<a href="https://pub.dartlang.org/documentation/tuple/1.0.1/tuple/Tuple2-class.html">Tuple2</a>'));
9494
RegExp stringLink = new RegExp(
95-
'https://api.dartlang.org/(dev|stable|be)/${Platform.version.split(' ').first}/dart-core/String-class.html">String</a>');
95+
'https://api.dartlang.org/(dev|stable|edge|be)/${Platform.version.split(' ').first}/dart-core/String-class.html">String</a>');
9696
expect(useSomethingInAnotherPackage.modelType.linkedName,
9797
contains(stringLink));
9898
});

testing/test_package_docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<meta name="generator" content="made with love by dartdoc 0.19.1">
7+
<meta name="generator" content="made with love by dartdoc 0.20.0">
88
<meta name="description" content="test_package API docs, for the Dart programming language.">
99
<title>test_package - Dart API docs</title>
1010

tool/grind.dart

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,12 @@ test() async {
722722
await testFutures.wait();
723723
}
724724

725+
List<File> get binFiles => new Directory('bin')
726+
.listSync(recursive: true)
727+
.where((e) => e is File && e.path.endsWith('.dart'))
728+
.cast<File>()
729+
..toList();
730+
725731
List<File> get testFiles => new Directory('test')
726732
.listSync(recursive: true)
727733
.where((e) => e is File && e.path.endsWith('test.dart'))
@@ -731,31 +737,49 @@ List<File> get testFiles => new Directory('test')
731737
testPreviewDart2() async {
732738
List<String> parameters = ['--preview-dart-2', '--enable-asserts'];
733739

734-
// sdk#32901 is really bad on Windows.
735-
for (File dartFile in testFiles.where((f) =>
736-
!f.path.endsWith('html_generator_test.dart') && !Platform.isWindows)) {
737-
// absolute path to work around dart-lang/sdk#32901
740+
for (File dartFile in testFiles) {
741+
await testFutures.addFuture(
742+
new SubprocessLauncher('dart2-${pathLib.basename(dartFile.path)}')
743+
.runStreamed(
744+
Platform.resolvedExecutable,
745+
<String>[]
746+
..addAll(parameters)
747+
..add(dartFile.path)));
748+
}
749+
750+
for (File dartFile in binFiles) {
738751
await testFutures.addFuture(new SubprocessLauncher(
739-
'dart2-${pathLib.basename(dartFile.absolute.path)}')
752+
'dart2-bin-${pathLib.basename(dartFile.path)}-help')
740753
.runStreamed(
741754
Platform.resolvedExecutable,
742755
<String>[]
743756
..addAll(parameters)
744-
..add(dartFile.absolute.path)));
757+
..add(dartFile.path)
758+
..add('--help')));
745759
}
746760
}
747761

748762
testDart1() async {
749763
List<String> parameters = ['--checked'];
750764
for (File dartFile in testFiles) {
751-
// absolute path to work around dart-lang/sdk#32901
765+
await testFutures.addFuture(
766+
new SubprocessLauncher('dart1-${pathLib.basename(dartFile.path)}')
767+
.runStreamed(
768+
Platform.resolvedExecutable,
769+
<String>[]
770+
..addAll(parameters)
771+
..add(dartFile.path)));
772+
}
773+
774+
for (File dartFile in binFiles) {
752775
await testFutures.addFuture(new SubprocessLauncher(
753-
'dart1-${pathLib.basename(dartFile.absolute.path)}')
776+
'dart1-bin-${pathLib.basename(dartFile.path)}-help')
754777
.runStreamed(
755778
Platform.resolvedExecutable,
756779
<String>[]
757780
..addAll(parameters)
758-
..add(dartFile.absolute.path)));
781+
..add(dartFile.path)
782+
..add('--help')));
759783
}
760784
}
761785

0 commit comments

Comments
 (0)