Skip to content

Commit

Permalink
Do not use pana's License.path, use 'license' label instead. (#7846)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos committed Jul 5, 2024
1 parent d0e4e07 commit d7d3c60
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 58 deletions.
3 changes: 1 addition & 2 deletions app/lib/frontend/templates/views/pkg/info_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ d.Node? _licenseNode({
required String licenseUrl,
required bool isPending,
}) {
final paths = licenses.map((e) => e.path).toSet().toList();
final labels = isPending
? '(pending)'
: licenses.map((e) => e.spdxIdentifier).toSet().join(', ');
Expand All @@ -177,7 +176,7 @@ d.Node? _licenseNode({
),
d.text(labels),
d.text(' ('),
d.a(href: licenseUrl, text: paths.join(', ')),
d.a(href: licenseUrl, text: 'license'),
d.text(')'),
]);
}
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -490,7 +490,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_admin_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -731,7 +731,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_changelog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_example_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -358,7 +358,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_install_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -384,7 +384,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_score_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -446,7 +446,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_page_discontinued.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/pkg/license">LICENSE</a>
<a href="/packages/pkg/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -354,7 +354,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/pkg/license">LICENSE</a>
<a href="/packages/pkg/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_page_flutter_plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/flutter_titanium/license">LICENSE</a>
<a href="/packages/flutter_titanium/license">license</a>
)
</p>
<h3 class="title">Dependencies</h3>
Expand Down Expand Up @@ -354,7 +354,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/flutter_titanium/license">LICENSE</a>
<a href="/packages/flutter_titanium/license">license</a>
)
</p>
<h3 class="title">Dependencies</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_page_publisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/neon/license">LICENSE</a>
<a href="/packages/neon/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -355,7 +355,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/neon/license">LICENSE</a>
<a href="/packages/neon/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_page_retracted.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/pkg/versions/1.0.0/license">LICENSE</a>
<a href="/packages/pkg/versions/1.0.0/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -323,7 +323,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/pkg/versions/1.0.0/license">LICENSE</a>
<a href="/packages/pkg/versions/1.0.0/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/pkg/license">LICENSE</a>
<a href="/packages/pkg/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -345,7 +345,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/pkg/license">LICENSE</a>
<a href="/packages/pkg/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_show_version_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -355,7 +355,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/frontend/golden/pkg_versions_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -468,7 +468,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
BSD-3-Clause (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -355,7 +355,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -358,7 +358,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -384,7 +384,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -357,7 +357,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/score.html
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -684,7 +684,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/test/task/testdata/goldens/packages/oxygen/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down Expand Up @@ -417,7 +417,7 @@ <h3 class="title">License</h3>
<p>
<img class="inline-icon-img" src="/static/hash-%%etag%%/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>
unknown (
<a href="/packages/oxygen/license">LICENSE</a>
<a href="/packages/oxygen/license">license</a>
)
</p>
<h3 class="title">More</h3>
Expand Down
Loading

0 comments on commit d7d3c60

Please sign in to comment.