webcomponents / webcomponents.org

Home of the web components community
https://www.webcomponents.org
Apache License 2.0
356 stars 95 forks source link

Add 'isLatest' field to reduce array-contains uses #1364

Closed justinfagnani closed 1 year ago

justinfagnani commented 1 year ago

This denormalizes the 'latest' dist-tag to an isLatest field on PackageVersion and CustomElement. 'latest' will by far be the most common dist-tag to search for and this will be marginally more efficient, but more importantly it will make other queries that rely on array-contains, like full-text search, easier.

Part of #1363

justinfagnani commented 1 year ago

This doesn't change behavior and is covered on existing tests. It's searching via other dist-tags that doesn't have coverage yet.