Skip to content

Commit 2df474d

Browse files
committed
Upgrade pub_dartdoc
1 parent b26a2b6 commit 2df474d

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

app/lib/shared/versions.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final RegExp runtimeVersionPattern = RegExp(r'\d{4}\.\d{2}\.\d{2}');
1717
/// Increment the version when a change is significant enough to trigger
1818
/// reprocessing, including: version change in pana, dartdoc, or the SDKs,
1919
/// or when an feature or bugfix should be picked up by the analysis ASAP.
20-
const String runtimeVersion = '2020.01.02';
20+
const String runtimeVersion = '2020.01.10';
2121
final Version semanticRuntimeVersion = Version.parse(runtimeVersion);
2222

2323
/// The version which marks the earliest version of the data which we'd like to
@@ -26,7 +26,7 @@ final Version semanticRuntimeVersion = Version.parse(runtimeVersion);
2626
///
2727
/// Make sure that at least two versions are kept here as the next candidates
2828
/// when the version switch happens:
29-
/// - 2020.01.02
29+
/// - 2020.01.10
3030
/// - 2019.12.13
3131
/// - 2019.12.09
3232
final String gcBeforeRuntimeVersion = '2019.11.29';
@@ -46,7 +46,7 @@ final String flutterVersion = '1.12.13+hotfix.5';
4646
final Version semanticFlutterVersion = Version.parse(flutterVersion);
4747

4848
// keep in-sync with pkg/pub_dartdoc/pubspec.yaml
49-
final String dartdocVersion = '0.29.3';
49+
final String dartdocVersion = '0.30.0+1';
5050
final Version semanticDartdocVersion = Version.parse(dartdocVersion);
5151

5252
// Version that control the dartdoc serving.

app/test/shared/versions_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void main() {
3131
// This test is a reminder that if pana, the SDK or any of the above
3232
// versions change, we should also adjust the [runtimeVersion]. Before
3333
// updating the hash value, double-check if it is being updated.
34-
expect(hash, 446452479);
34+
expect(hash, 425660634);
3535
});
3636

3737
test('runtime version should be (somewhat) lexicographically ordered', () {

pkg/pub_dartdoc/lib/pub_data_generator.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import 'dart:convert' as convert;
77
import 'dart:io';
88

99
import 'package:dartdoc/dartdoc.dart';
10+
// ignore: implementation_imports
11+
import 'package:dartdoc/src/warnings.dart';
1012
import 'package:path/path.dart' as p;
1113

1214
import 'package:pub_dartdoc_data/pub_dartdoc_data.dart';
@@ -17,7 +19,7 @@ const fileName = 'pub-data.json';
1719
/// [PubDartdocData] instance.
1820
class PubDataGenerator implements Generator {
1921
final _onFileCreated = StreamController<File>();
20-
final _writtenFiles = Set<String>();
22+
final _writtenFiles = <String, Warnable>{};
2123
final String _inputDirectory;
2224

2325
PubDataGenerator(this._inputDirectory);
@@ -57,7 +59,10 @@ class PubDataGenerator implements Generator {
5759
// the filename every time.
5860
// source: p.relative(elem.sourceFileName, from: _inputDirectory),
5961
source: null,
60-
href: isReferenced ? _trimToNull(elem.href) : null,
62+
href: isReferenced
63+
? _trimToNull(elem.href
64+
?.replaceAll('%%__HTMLBASE_dartdoc_internal__%%', ''))
65+
: null,
6166
documentation: _trimToNull(elem.documentation),
6267
));
6368
if (elem.enclosingElement is ModelElement) {
@@ -92,14 +97,14 @@ class PubDataGenerator implements Generator {
9297
final outputFile = File(p.join(outputDirectoryPath, fileName));
9398
await outputFile.writeAsString(convert.json.encode(extract.toJson()));
9499
_onFileCreated.add(outputFile);
95-
_writtenFiles.add(fileName);
100+
_writtenFiles[fileName] = null;
96101
}
97102

98103
@override
99104
Stream<File> get onFileCreated => _onFileCreated.stream;
100105

101106
@override
102-
Set<String> get writtenFiles => _writtenFiles;
107+
Map<String, Warnable> get writtenFiles => _writtenFiles;
103108

104109
// Inherited member, should not show up in pub-data.json
105110
@override

pkg/pub_dartdoc/pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ packages:
77
name: _fe_analyzer_shared
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "1.0.1"
10+
version: "1.0.3"
1111
analyzer:
1212
dependency: transitive
1313
description:
1414
name: analyzer
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "0.39.2+1"
17+
version: "0.39.4"
1818
args:
1919
dependency: transitive
2020
description:
@@ -84,7 +84,7 @@ packages:
8484
name: dartdoc
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "0.29.3"
87+
version: "0.30.0+1"
8888
file:
8989
dependency: transitive
9090
description:

pkg/pub_dartdoc/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88
pub_dartdoc_data:
99
path: ../pub_dartdoc_data
1010
# dartdoc version to be pinned, keep in-sync with app/lib/shared/versions.dart
11-
dartdoc: 0.29.3
11+
dartdoc: 0.30.0+1
1212

1313
dev_dependencies:
1414
test: '^1.3.0'

0 commit comments

Comments
 (0)