summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json6
-rw-r--r--package.json2
-rw-r--r--source/features/extend-status-labels.tsx4
-rw-r--r--source/features/follow-file-renames.tsx2
-rw-r--r--source/features/mark-unread.tsx2
-rw-r--r--source/features/move-marketplace-link-to-profile-dropdown.tsx2
-rw-r--r--source/libs/pr-ci-status.ts2
7 files changed, 10 insertions, 10 deletions
diff --git a/package-lock.json b/package-lock.json
index 1c977a91..8e7f3056 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10808,9 +10808,9 @@
}
},
"select-dom": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/select-dom/-/select-dom-5.0.2.tgz",
- "integrity": "sha512-j0kx0KeZLPBL6hDF8FNy55lLPNnduxeFaLPJVDHVLpwbjv4syoZnoGe7MoFa5qzwVtNYlRr5B0rRGNvV1R4Mww=="
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/select-dom/-/select-dom-5.1.0.tgz",
+ "integrity": "sha512-roC9kDCsz/xxio7LJtr7VGiJ163MBcl9emB0jIXdvahdUdvTO2wD91diHxUR9EjrG7XSyXOyH+QaqgPLGZOiFg=="
},
"semver": {
"version": "5.7.0",
diff --git a/package.json b/package.json
index f759579c..13895c1f 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"mem": "github:sindresorhus/mem#10f13c0",
"onetime": "^5.0.0",
"p-memoize": "^3.0.0",
- "select-dom": "^5.0.2",
+ "select-dom": "^5.1.0",
"shorten-repo-url": "^1.5.1",
"tiny-version-compare": "^1.0.0",
"type-fest": "^0.4.1",
diff --git a/source/features/extend-status-labels.tsx b/source/features/extend-status-labels.tsx
index 06364444..f514a866 100644
--- a/source/features/extend-status-labels.tsx
+++ b/source/features/extend-status-labels.tsx
@@ -9,11 +9,11 @@ function init(): false | void {
return false;
}
- const lastStatusChange = select.all(`
+ const lastStatusChange = select.last(`
.discussion-item-closed,
.discussion-item-reopened,
.discussion-item-merged
- `).pop();
+ `);
// Leave if the issue/PR was never closed or if it was reopened
if (!lastStatusChange || lastStatusChange.matches('.discussion-item-reopened')) {
diff --git a/source/features/follow-file-renames.tsx b/source/features/follow-file-renames.tsx
index 0eca5682..4f820fff 100644
--- a/source/features/follow-file-renames.tsx
+++ b/source/features/follow-file-renames.tsx
@@ -36,7 +36,7 @@ async function init(): Promise<false | void> {
const fromKey = isNewer ? 'previous_filename' : 'filename';
const toKey = isNewer ? 'filename' : 'previous_filename';
- const sha = isNewer ? select('.commit .sha') : select.all('.commit .sha').pop();
+ const sha = (isNewer ? select : select.last)('.commit .sha');
const files = await findRename(user, repo, sha!.textContent!.trim());
diff --git a/source/features/mark-unread.tsx b/source/features/mark-unread.tsx
index 0b42e993..e3a63f4c 100644
--- a/source/features/mark-unread.tsx
+++ b/source/features/mark-unread.tsx
@@ -110,7 +110,7 @@ async function markUnread({currentTarget}: React.MouseEvent): Promise<void> {
throw new Error('Refined GitHub: A new issue state was introduced?');
}
- const lastCommentTime = select.all<HTMLTimeElement>('.timeline-comment-header relative-time').pop();
+ const lastCommentTime = select.last<HTMLTimeElement>('.timeline-comment-header relative-time');
const unreadNotifications = await getNotifications();
unreadNotifications.push({
diff --git a/source/features/move-marketplace-link-to-profile-dropdown.tsx b/source/features/move-marketplace-link-to-profile-dropdown.tsx
index 82acd383..c2937608 100644
--- a/source/features/move-marketplace-link-to-profile-dropdown.tsx
+++ b/source/features/move-marketplace-link-to-profile-dropdown.tsx
@@ -3,7 +3,7 @@ import select from 'select-dom';
import features from '../libs/features';
function init(): false | void {
- const lastDivider = select.all('.user-nav .dropdown-divider').pop();
+ const lastDivider = select.last('.user-nav .dropdown-divider');
if (!lastDivider) {
return false;
}
diff --git a/source/libs/pr-ci-status.ts b/source/libs/pr-ci-status.ts
index a2f44ca2..fc702015 100644
--- a/source/libs/pr-ci-status.ts
+++ b/source/libs/pr-ci-status.ts
@@ -5,7 +5,7 @@ type CommitStatus = false | typeof SUCCESS | typeof FAILURE | typeof PENDING | t
type StatusListener = (status: CommitStatus) => void;
function getLastCommit(): string | null {
- return select.all('[id^="commits-pushed"] .commit-id').pop()!.textContent;
+ return select.last('[id^="commits-pushed"] .commit-id')!.textContent;
}
export const SUCCESS = Symbol('Success');