github-url-detection 5.4.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ export declare const isOpenPR: () => boolean;
46
46
  export declare const isMergedPR: () => boolean;
47
47
  export declare const isClosedPR: () => boolean;
48
48
  export declare const isReleasesOrTags: (url?: URL | HTMLAnchorElement | Location) => boolean;
49
+ export declare const isDeletingFile: (url?: URL | HTMLAnchorElement | Location) => boolean;
49
50
  export declare const isEditingFile: (url?: URL | HTMLAnchorElement | Location) => boolean;
50
51
  export declare const isEditingRelease: (url?: URL | HTMLAnchorElement | Location) => boolean;
51
52
  export declare const isEditingWikiPage: (url?: URL | HTMLAnchorElement | Location) => boolean;
@@ -162,6 +162,11 @@ const isReleasesOrTags = (url = location) => {
162
162
  return /^tags$|^releases($|\/tag)/.test(null === (_a = getRepo(url)) || void 0 === _a ? void 0 : _a.path);
163
163
  };
164
164
 
165
+ const isDeletingFile = (url = location) => {
166
+ var _a;
167
+ return Boolean(null === (_a = getRepo(url)) || void 0 === _a ? void 0 : _a.path.startsWith("delete"));
168
+ };
169
+
165
170
  const isEditingFile = (url = location) => {
166
171
  var _a;
167
172
  return Boolean(null === (_a = getRepo(url)) || void 0 === _a ? void 0 : _a.path.startsWith("edit"));
@@ -361,4 +366,4 @@ const utils = {
361
366
  getRepositoryInfo: getRepo
362
367
  };
363
368
 
364
- export { canUserEditOrganization, canUserEditRepo, hasCode, hasComments, hasRichTextEditor, is404, is500, isActionJobRun, isActionRun, isBlame, isBranches, isClosedPR, isCommit, isCommitList, isCompare, isConversation, isConversationList, isDashboard, isDiscussion, isDiscussionList, isDraftPR, isEditingFile, isEditingRelease, isEditingWikiPage, isEmptyRepo, isEmptyRepoRoot, isEnterprise, isFileFinder, isForkedRepo, isGist, isGlobalConversationList, isGlobalSearchResults, isIssue, isLabelList, isMarketplaceAction, isMergedPR, isMilestone, isMilestoneList, isNewAction, isNewFile, isNewIssue, isNewRelease, isNewRepo, isNewRepoTemplate, isNewWikiPage, isNotifications, isOpenPR, isOrganizationDiscussion, isOrganizationProfile, isOrganizationRepo, isOwnOrganizationProfile, isOwnUserProfile, isPR, isPRCommit, isPRCommit404, isPRCommitList, isPRConflicts, isPRConversation, isPRFile404, isPRFiles, isPRList, isPasswordConfirmation, isProfile, isProject, isQuickPR, isReleasesOrTags, isRepliesSettings, isRepo, isRepoCommitList, isRepoConversationList, isRepoForksList, isRepoHome, isRepoIssueList, isRepoMainSettings, isRepoNetworkGraph, isRepoPRList, isRepoRoot, isRepoSearch, isRepoSettings, isRepoTaxonomyConversationList, isRepoTree, isRepoWiki, isRepositoryActions, isSingleCommit, isSingleFile, isSingleGist, isSingleTag, isTrending, isUserProfile, isUserProfileFollowersTab, isUserProfileFollowingTab, isUserProfileMainTab, isUserProfileRepoTab, isUserProfileStarsTab, isUserSettings, isUserTheOrganizationOwner, utils };
369
+ export { canUserEditOrganization, canUserEditRepo, hasCode, hasComments, hasRichTextEditor, is404, is500, isActionJobRun, isActionRun, isBlame, isBranches, isClosedPR, isCommit, isCommitList, isCompare, isConversation, isConversationList, isDashboard, isDeletingFile, isDiscussion, isDiscussionList, isDraftPR, isEditingFile, isEditingRelease, isEditingWikiPage, isEmptyRepo, isEmptyRepoRoot, isEnterprise, isFileFinder, isForkedRepo, isGist, isGlobalConversationList, isGlobalSearchResults, isIssue, isLabelList, isMarketplaceAction, isMergedPR, isMilestone, isMilestoneList, isNewAction, isNewFile, isNewIssue, isNewRelease, isNewRepo, isNewRepoTemplate, isNewWikiPage, isNotifications, isOpenPR, isOrganizationDiscussion, isOrganizationProfile, isOrganizationRepo, isOwnOrganizationProfile, isOwnUserProfile, isPR, isPRCommit, isPRCommit404, isPRCommitList, isPRConflicts, isPRConversation, isPRFile404, isPRFiles, isPRList, isPasswordConfirmation, isProfile, isProject, isQuickPR, isReleasesOrTags, isRepliesSettings, isRepo, isRepoCommitList, isRepoConversationList, isRepoForksList, isRepoHome, isRepoIssueList, isRepoMainSettings, isRepoNetworkGraph, isRepoPRList, isRepoRoot, isRepoSearch, isRepoSettings, isRepoTaxonomyConversationList, isRepoTree, isRepoWiki, isRepositoryActions, isSingleCommit, isSingleFile, isSingleGist, isSingleTag, isTrending, isUserProfile, isUserProfileFollowersTab, isUserProfileFollowingTab, isUserProfileMainTab, isUserProfileRepoTab, isUserProfileStarsTab, isUserSettings, isUserTheOrganizationOwner, utils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-url-detection",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript.",
5
5
  "keywords": [
6
6
  "github",
package/readme.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Battle-tested by and extracted from the [Refined GitHub](https://github.com/sindresorhus/refined-github) extension.
6
6
 
7
7
  - Try the live [demo](https://fregante.github.io/github-url-detection/)
8
- - See the code and expected URLs for [every detection](https://github.com/fregante/github-url-detection/blob/master/index.ts)
8
+ - See the code and expected URLs for [every detection](https://github.com/fregante/github-url-detection/blob/main/index.ts)
9
9
 
10
10
  ## Install
11
11