Skip to content

Commit

Permalink
npm: bump @lit/task from 1.0.1 to 1.0.2 (#4693)
Browse files Browse the repository at this point in the history
* npm: bump @lit/task from 1.0.1 to 1.0.2

Bumps [@lit/task](https://github.com/lit/lit/tree/HEAD/packages/task) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/lit/lit/releases)
- [Changelog](https://github.com/lit/lit/blob/main/packages/task/CHANGELOG.md)
- [Commits](https://github.com/lit/lit/commits/@lit/[email protected]/packages/task)

---
updated-dependencies:
- dependency-name: "@lit/task"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add missing undefined to arg type

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Scott <[email protected]>
  • Loading branch information
dependabot[bot] and jcscottiii authored Jan 22, 2025
1 parent d129229 commit 5adb3ca
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 30 deletions.
52 changes: 27 additions & 25 deletions client-src/elements/chromedash-report-external-reviews-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,34 @@ export class ChromedashReportExternalReviewsPage extends LitElement {
private _client: DefaultApiInterface = window.csOpenApiClient;

@property({attribute: false})
private _reviewsTask: Task<('tag' | 'gecko' | 'webkit')[], TaskReviewResult> =
new Task(this, {
task: async ([reviewer], {signal}) => {
if (reviewer === undefined) {
throw new Error('Element must have "reviewer" attribute.', {
cause: this,
});
}
if (!['tag', 'gecko', 'webkit'].includes(reviewer)) {
throw new Error(
`Reviewer (${reviewer}) must be 'tag', 'gecko', or 'webkit'.`,
{cause: this}
);
}
const response = await this._client.listExternalReviews(
{reviewGroup: reviewer},
{signal}
private _reviewsTask: Task<
('tag' | 'gecko' | 'webkit' | undefined)[],
TaskReviewResult
> = new Task(this, {
task: async ([reviewer], {signal}) => {
if (reviewer === undefined) {
throw new Error('Element must have "reviewer" attribute.', {
cause: this,
});
}
if (!['tag', 'gecko', 'webkit'].includes(reviewer)) {
throw new Error(
`Reviewer (${reviewer}) must be 'tag', 'gecko', or 'webkit'.`,
{cause: this}
);
return {
reviews: this.groupReviews(response.reviews),
links: response.link_previews,
noOutstandingReviews: response.reviews.length === 0,
};
},
args: () => [this.reviewer],
});
}
const response = await this._client.listExternalReviews(
{reviewGroup: reviewer},
{signal}
);
return {
reviews: this.groupReviews(response.reviews),
links: response.link_previews,
noOutstandingReviews: response.reviews.length === 0,
};
},
args: () => [this.reviewer],
});

groupReviews(
reviews: OutstandingReview[]
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"typescript": "^5.7.3"
},
"dependencies": {
"@lit/task": "^1.0.1",
"@lit/task": "^1.0.2",
"@polymer/iron-collapse": "^3.0.1",
"@polymer/iron-icon": "^3.0.1",
"@polymer/iron-iconset-svg": "^3.0.1",
Expand Down

0 comments on commit 5adb3ca

Please sign in to comment.