github-url-detection 8.1.0 → 8.1.1

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.
@@ -1,4 +1,6 @@
1
1
  const reservedNames = [
2
+ "300",
3
+ "302",
2
4
  "400",
3
5
  "401",
4
6
  "402",
@@ -43,6 +45,10 @@ const reservedNames = [
43
45
  "509",
44
46
  "510",
45
47
  "511",
48
+ "693",
49
+ "694",
50
+ "695",
51
+ "900",
46
52
  "about",
47
53
  "access",
48
54
  "account",
@@ -68,6 +74,7 @@ const reservedNames = [
68
74
  "central",
69
75
  "certification",
70
76
  "changelog",
77
+ "chat",
71
78
  "cla",
72
79
  "cloud",
73
80
  "codereview",
@@ -86,6 +93,7 @@ const reservedNames = [
86
93
  "customer-stories",
87
94
  "customer",
88
95
  "customers",
96
+ "dashboard-feed",
89
97
  "dashboard",
90
98
  "dashboards",
91
99
  "design",
@@ -287,7 +295,7 @@ const isCommitList = (url = location) => isRepoCommitList(url) || isPRCommitList
287
295
  const isRepoCommitList = (url = location) => Boolean(getRepo(url)?.path.startsWith("commits"));
288
296
  const isCompare = (url = location) => Boolean(getRepo(url)?.path.startsWith("compare"));
289
297
  const isCompareWikiPage = (url = location) => isRepoWiki(url) && getCleanPathname(url).split("/").slice(3, 5).includes("_compare");
290
- const isDashboard = (url = location) => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(\/|$)/.test(getCleanPathname(url));
298
+ const isDashboard = (url = location) => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(-feed)?(\/|$)/.test(getCleanPathname(url));
291
299
  const isEnterprise = (url = location) => url.hostname !== "github.com" && url.hostname !== "gist.github.com";
292
300
  const isGist = (url = location) => typeof getCleanGistPathname(url) === "string";
293
301
  const isGlobalIssueOrPRList = (url = location) => ["issues", "pulls"].includes(url.pathname.split("/", 2)[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-url-detection",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
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",
@@ -24,7 +24,6 @@
24
24
  "distribution/index.d.ts"
25
25
  ],
26
26
  "scripts": {
27
- "ava": "ava --timeout 30s",
28
27
  "build": "run-p build:*",
29
28
  "build:vite": "vite build",
30
29
  "build:typescript": "tsc --declaration --emitDeclarationOnly",
@@ -32,10 +31,11 @@
32
31
  "demo:test": "svelte-check",
33
32
  "demo:watch": "vite preview demo & vite build demo --watch # vite serve isn't real",
34
33
  "prepack": "npm run build",
35
- "test": "run-p build ava xo",
34
+ "test": "run-p build test:unit xo",
35
+ "test:unit": "bun test",
36
36
  "watch": "run-p watch:typescript demo:watch # vite watch doesn’t generate the lib, so just use the demo",
37
37
  "watch:typescript": "tsc --watch --noEmit",
38
- "watch:ava": "run-p 'ava -- --watch' 'watch:typescript -- --watch'",
38
+ "watch:test:unit": "run-p 'test:unit -- --watch' 'watch:typescript -- --watch'",
39
39
  "xo": "xo"
40
40
  },
41
41
  "xo": {
@@ -48,7 +48,7 @@
48
48
  "*.ts"
49
49
  ],
50
50
  "rules": {
51
- "ava/assertion-arguments": "off",
51
+ "@typescript-eslint/triple-slash-reference": "off",
52
52
  "@typescript-eslint/dot-notation": "off",
53
53
  "@typescript-eslint/no-non-null-assertion": "off",
54
54
  "@typescript-eslint/no-unsafe-member-access": "off",
@@ -62,27 +62,19 @@
62
62
  "camelcase": "off"
63
63
  }
64
64
  },
65
- "ava": {
66
- "extensions": {
67
- "ts": "module"
68
- },
69
- "nodeArguments": [
70
- "--loader=@esbuild-kit/esm-loader"
71
- ]
72
- },
73
65
  "devDependencies": {
74
- "@esbuild-kit/esm-loader": "^2.5.5",
75
- "@sindresorhus/tsconfig": "^3.0.1",
76
- "@sveltejs/vite-plugin-svelte": "^2.4.3",
77
- "ava": "^5.3.1",
78
- "github-reserved-names": "^2.0.4",
66
+ "@sindresorhus/tsconfig": "^4.0.0",
67
+ "@sveltejs/vite-plugin-svelte": "^2.4.6",
68
+ "bun": "^1.0.3",
69
+ "bun-types": "^1.0.3",
70
+ "github-reserved-names": "^2.0.5",
79
71
  "npm-run-all": "^4.1.5",
80
72
  "strip-indent": "^4.0.0",
81
- "svelte": "^4.1.2",
82
- "svelte-check": "^3.4.6",
83
- "typescript": "^5.1.6",
84
- "vite": "^4.4.7",
85
- "xo": "^0.55.0"
73
+ "svelte": "^4.2.1",
74
+ "svelte-check": "^3.5.2",
75
+ "typescript": "^5.2.2",
76
+ "vite": "^4.4.9",
77
+ "xo": "^0.56.0"
86
78
  },
87
79
  "engines": {
88
80
  "node": ">=18"