From abb2545230cc7068aa2ad4abb4e5720e13351c62 Mon Sep 17 00:00:00 2001 From: port19 Date: Tue, 12 Sep 2023 11:04:39 +0200 Subject: [PATCH 1/8] Include `/dashboard-feed` in `isDashboard` --- index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index d1dccb7..43c6f3b 100644 --- a/index.ts +++ b/index.ts @@ -61,7 +61,7 @@ addTests('isCompareWikiPage', [ 'https://github.com/brookhong/Surfingkeys/wiki/Color-Themes/_compare/8ebb46b1a12d16fc1af442b7df0ca13ca3bb34dc...80e51eeabe69b15a3f23880ecc36f800b71e6c6d', ]); -export const isDashboard = (url: URL | HTMLAnchorElement | Location = location): boolean => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(\/|$)/.test(getCleanPathname(url)); +export const isDashboard = (url: URL | HTMLAnchorElement | Location = location): boolean => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(-feed)?(\/|$)/.test(getCleanPathname(url)); addTests('isDashboard', [ 'https://github.com///', 'https://github.com//', @@ -81,6 +81,8 @@ addTests('isDashboard', [ 'https://github.com/?tab=following', // Gotcha for `isUserProfileFollowingTab` 'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab` 'https://github.com?search=1', // Gotcha for `isRepoTree` + 'https://github.com/dashboard-feed', + 'https://github.com//dashboard-feed' ]); export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com'; From 9d25b239561e9f59740714e0691f2846775119e9 Mon Sep 17 00:00:00 2001 From: port19 Date: Tue, 12 Sep 2023 11:11:20 +0200 Subject: [PATCH 2/8] fix indentation --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 43c6f3b..cd35ccb 100644 --- a/index.ts +++ b/index.ts @@ -81,8 +81,8 @@ addTests('isDashboard', [ 'https://github.com/?tab=following', // Gotcha for `isUserProfileFollowingTab` 'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab` 'https://github.com?search=1', // Gotcha for `isRepoTree` - 'https://github.com/dashboard-feed', - 'https://github.com//dashboard-feed' + 'https://github.com/dashboard-feed', + 'https://github.com//dashboard-feed' ]); export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com'; From 0ea3a01afdc441e5ac39748a2b022a25353d9b8e Mon Sep 17 00:00:00 2001 From: port19 Date: Tue, 12 Sep 2023 11:12:40 +0200 Subject: [PATCH 3/8] appease the linter --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index cd35ccb..ed88b55 100644 --- a/index.ts +++ b/index.ts @@ -82,7 +82,7 @@ addTests('isDashboard', [ 'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab` 'https://github.com?search=1', // Gotcha for `isRepoTree` 'https://github.com/dashboard-feed', - 'https://github.com//dashboard-feed' + 'https://github.com//dashboard-feed', ]); export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com'; From 2313219f8b2d4698db3fc8889711d6c18de886c5 Mon Sep 17 00:00:00 2001 From: port19 Date: Tue, 12 Sep 2023 11:16:26 +0200 Subject: [PATCH 4/8] bump `github-reserved-names` to version including `dashboard-feed` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 96ac40f..f89cef1 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@sindresorhus/tsconfig": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^2.4.3", "ava": "^5.3.1", - "github-reserved-names": "^2.0.4", + "github-reserved-names": "^2.0.5", "npm-run-all": "^4.1.5", "strip-indent": "^4.0.0", "svelte": "^4.1.2", From 1d77b96e4f9b6e0c848b9ac57b8afd70df44cb0e Mon Sep 17 00:00:00 2001 From: port19 Date: Tue, 12 Sep 2023 11:22:50 +0200 Subject: [PATCH 5/8] Shoutout to `npm i --package-lock-only` --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70b7d99..aad1502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@sindresorhus/tsconfig": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^2.4.3", "ava": "^5.3.1", - "github-reserved-names": "^2.0.4", + "github-reserved-names": "^2.0.5", "npm-run-all": "^4.1.5", "strip-indent": "^4.0.0", "svelte": "^4.1.2", @@ -4378,9 +4378,9 @@ } }, "node_modules/github-reserved-names": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/github-reserved-names/-/github-reserved-names-2.0.4.tgz", - "integrity": "sha512-T2azXbRJTJGQc28G6x89LpzQmuVjzl0hzJXPRD2t9yMh7URYUW8Opqr5ptHvjAVDJ+hwhBtoYmVx3VyFawRoFg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/github-reserved-names/-/github-reserved-names-2.0.5.tgz", + "integrity": "sha512-9MAoXwjdafN1P2Ve6Y54+buAYRDZLKJcJo12KxMbPe1flaC7S314dS+TleNbNFeh+36s3L00Fgfir7OD4NJ56Q==", "dev": true }, "node_modules/glob": { From 2a88d2e4e683c75f2bb2fa03b083ad8b7af1dca5 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Tue, 12 Sep 2023 18:52:01 +0800 Subject: [PATCH 6/8] lint --- index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/index.ts b/index.ts index ed88b55..874ea1b 100644 --- a/index.ts +++ b/index.ts @@ -82,7 +82,6 @@ addTests('isDashboard', [ 'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab` 'https://github.com?search=1', // Gotcha for `isRepoTree` 'https://github.com/dashboard-feed', - 'https://github.com//dashboard-feed', ]); export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com'; From 8146b71f64e1d8a0ace6512a07991197005f8ad7 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Thu, 28 Sep 2023 20:04:06 +0800 Subject: [PATCH 7/8] Discard changes to package-lock.json --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index aad1502..70b7d99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@sindresorhus/tsconfig": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^2.4.3", "ava": "^5.3.1", - "github-reserved-names": "^2.0.5", + "github-reserved-names": "^2.0.4", "npm-run-all": "^4.1.5", "strip-indent": "^4.0.0", "svelte": "^4.1.2", @@ -4378,9 +4378,9 @@ } }, "node_modules/github-reserved-names": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/github-reserved-names/-/github-reserved-names-2.0.5.tgz", - "integrity": "sha512-9MAoXwjdafN1P2Ve6Y54+buAYRDZLKJcJo12KxMbPe1flaC7S314dS+TleNbNFeh+36s3L00Fgfir7OD4NJ56Q==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/github-reserved-names/-/github-reserved-names-2.0.4.tgz", + "integrity": "sha512-T2azXbRJTJGQc28G6x89LpzQmuVjzl0hzJXPRD2t9yMh7URYUW8Opqr5ptHvjAVDJ+hwhBtoYmVx3VyFawRoFg==", "dev": true }, "node_modules/glob": { From 286b40bca4b5f916b12c21c996d6a0813fc2e99a Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Thu, 28 Sep 2023 20:04:10 +0800 Subject: [PATCH 8/8] Discard changes to package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f89cef1..96ac40f 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@sindresorhus/tsconfig": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^2.4.3", "ava": "^5.3.1", - "github-reserved-names": "^2.0.5", + "github-reserved-names": "^2.0.4", "npm-run-all": "^4.1.5", "strip-indent": "^4.0.0", "svelte": "^4.1.2",