From 21fd57107e46afbe6ed6e978d0ab96c5a0d57e23 Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 26 Feb 2026 17:57:10 +0500 Subject: [PATCH 1/2] Deprecate `isEmptyRepo` --- index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.ts b/index.ts index fe4450b..9ba3ee1 100644 --- a/index.ts +++ b/index.ts @@ -400,6 +400,9 @@ TEST: addTests('hasRepoHeader', combinedTestOnly); // On empty repos, there's only isRepoHome; this element is found in `` export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel="canonical"]'); +/** + * @deprecated Doesn't work anymore. Use API instead. + */ export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]'); export const isPublicRepo = (): boolean => exists('meta[name="octolytics-dimension-repository_public"][content="true"]'); From de75a50c3ed1122f616fa95ccf438b1345e17d9e Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 26 Feb 2026 21:36:22 +0500 Subject: [PATCH 2/2] Apply suggestion --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 9ba3ee1..269ee86 100644 --- a/index.ts +++ b/index.ts @@ -401,7 +401,7 @@ TEST: addTests('hasRepoHeader', combinedTestOnly); export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel="canonical"]'); /** - * @deprecated Doesn't work anymore. Use API instead. + * @deprecated Doesn't work anymore. Use `isEmptyRepoRoot` or API instead. */ export const isEmptyRepo = (): boolean => exists('[aria-label="Cannot fork because repository is empty."]');