Skip to content

Upgrade dartdoc: 0.30.0+1 #3234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 10, 2020
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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Important changes to data-models, configuration and migrations between each
AppEngine version, listed here to ease deployment and troubleshooting.

## Next Release (replace with git tag when deployed)
* Bumped runtimeVersion to `2020.01.02`.
* Upgraded dartdoc to `0.29.3`.
* Bumped runtimeVersion to `2020.01.10`.
* Upgraded dartdoc to `0.30.0+1`.
* Upgraded pana to `0.13.3`.

## `20191218t150816-all`
Expand Down
14 changes: 11 additions & 3 deletions app/lib/dartdoc/customization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ class DartdocCustomizer {

void _stripCanonicalUrl(Element elem) {
if (elem == null) return;
final href = elem.attributes['href'];
String href = elem.attributes['href'];
if (href != null && href.endsWith('/index.html')) {
elem.attributes['href'] =
href.substring(0, href.length - 'index.html'.length);
href = href.substring(0, href.length - 'index.html'.length);
}
if (href != null) {
// Since the <base /> tag removal, dartdoc calculates the canonical URL
// with extra `../../` segments. Removing them as a temporary fix.
// https://github.com/dart-lang/dartdoc/issues/2122
// TODO: Remove this after the dartdoc issue is fixed
href = href.replaceAll('../', '');

elem.attributes['href'] = href;
}
}

Expand Down
4 changes: 0 additions & 4 deletions app/lib/dartdoc/dartdoc_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ class DartdocJobProcessor extends JobProcessor {
'--sdk-docs',
'--output',
outputDir,
'--hosted-url',
siteRoot,
'--link-to-remote',
'--no-validate-links',
];
Expand Down Expand Up @@ -381,8 +379,6 @@ class DartdocJobProcessor extends JobProcessor {
pkgPath,
'--output',
outputDir,
'--hosted-url',
siteRoot,
'--rel-canonical-prefix',
canonicalUrl,
if (!isReduced) '--link-to-remote',
Expand Down
6 changes: 3 additions & 3 deletions app/lib/shared/versions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final RegExp runtimeVersionPattern = RegExp(r'\d{4}\.\d{2}\.\d{2}');
/// Increment the version when a change is significant enough to trigger
/// reprocessing, including: version change in pana, dartdoc, or the SDKs,
/// or when an feature or bugfix should be picked up by the analysis ASAP.
const String runtimeVersion = '2020.01.02';
const String runtimeVersion = '2020.01.10';
final Version semanticRuntimeVersion = Version.parse(runtimeVersion);

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

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

// Version that control the dartdoc serving.
Expand Down
7 changes: 4 additions & 3 deletions app/test/dartdoc/golden/pana_0.12.2_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
<meta name="generator" content="made with love by dartdoc 0.29.3">
<meta name="generator" content="made with love by dartdoc 0.30.0+1">
<meta name="description" content="pana API docs, for the Dart programming language.">
<title>pana - Dart API docs</title>
<link rel="canonical" href="https://pub.dartlang.org/documentation/pana/0.12.2/index.html">
<link rel="canonical" href="https://pub.dev/documentation/pana/0.12.2/index.html">


<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="static-assets/github.css">
Expand Down Expand Up @@ -128,7 +129,7 @@ <h2>Libraries</h2>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>
<script id="dartdoc_script_js" src="static-assets/script.js"></script>
<!-- footer placeholder -->

</body>
Expand Down
6 changes: 3 additions & 3 deletions app/test/dartdoc/golden/pana_0.12.2_index.out.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"/>
<meta name="generator" content="made with love by dartdoc 0.29.3"/>
<meta name="generator" content="made with love by dartdoc 0.30.0+1"/>
<meta name="description" content="pana API docs, for the Dart programming language."/>
<title>pana - Dart API docs</title>
<link rel="alternate" href="/documentation/pana/latest/"/>
<link rel="canonical" href="https://pub.dartlang.org/documentation/pana/0.12.2/"/>
<link rel="canonical" href="https://pub.dev/documentation/pana/0.12.2/"/>
<link rel="stylesheet" type="text/css" href="/static/css/github-markdown.css?hash=t2ti0tfkd3q7dsh5njovil42c3bnhf5s"/>
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
Expand Down Expand Up @@ -144,7 +144,7 @@ <h2>Libraries</h2>
<script src="static-assets/typeahead.bundle.min.js"/>
<script src="static-assets/highlight.pack.js"/>
<script src="static-assets/URI.js"/>
<script src="static-assets/script.js"/>
<script id="dartdoc_script_js" src="static-assets/script.js"/>
<!-- footer placeholder -->
</body>
</html>
Loading