github-url-detection 6.1.0 → 7.0.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.
@@ -113,7 +113,7 @@ export declare const isUserTheOrganizationOwner: () => boolean;
113
113
  export declare const canUserEditRepo: () => boolean;
114
114
  export declare const isNewRepo: (url?: URL | HTMLAnchorElement | Location) => boolean;
115
115
  export declare const isNewRepoTemplate: (url?: URL | HTMLAnchorElement | Location) => boolean;
116
- export interface RepositoryInfo {
116
+ export declare type RepositoryInfo = {
117
117
  owner: string;
118
118
  name: string;
119
119
  /** The 'user/repo' part from an URL */
@@ -123,7 +123,7 @@ export interface RepositoryInfo {
123
123
  @example '/user/repo/' -> ''
124
124
  @example '/settings/token/' -> undefined */
125
125
  path: string;
126
- }
126
+ };
127
127
  export declare const utils: {
128
128
  getUsername: () => string | undefined;
129
129
  getCleanPathname: (url?: URL | HTMLAnchorElement | Location) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-url-detection",
3
- "version": "6.1.0",
3
+ "version": "7.0.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",
@@ -16,8 +16,9 @@
16
16
  "author": "Federico Brigante <me@fregante.com> (https://fregante.com)",
17
17
  "sideEffects": false,
18
18
  "type": "module",
19
- "main": "distribution/index.js",
20
- "module": "distribution/index.js",
19
+ "exports": "./distribution/index.js",
20
+ "main": "./distribution/index.js",
21
+ "types": "./distribution/index.d.ts",
21
22
  "files": [
22
23
  "distribution/index.js",
23
24
  "distribution/index.d.ts"
@@ -27,9 +28,9 @@
27
28
  "build": "run-p build:*",
28
29
  "build:vite": "vite build",
29
30
  "build:typescript": "tsc --declaration --emitDeclarationOnly",
30
- "demo:build": "vite build demo --config demo/vite.config.js",
31
+ "demo:build": "vite build demo",
31
32
  "demo:test": "svelte-check",
32
- "demo:watch": "vite serve demo --config demo/vite.config.js",
33
+ "demo:watch": "vite preview demo & vite build demo --watch # vite serve isn't real",
33
34
  "prepack": "npm run build",
34
35
  "test": "run-p build ava xo",
35
36
  "watch": "run-p watch:typescript demo:watch # vite watch doesn’t generate the lib, so just use the demo",
@@ -66,26 +67,25 @@
66
67
  "ts": "module"
67
68
  },
68
69
  "nodeArguments": [
69
- "--loader=esbuild-node-loader",
70
- "--experimental-specifier-resolution=node"
70
+ "--loader=@esbuild-kit/esm-loader"
71
71
  ]
72
72
  },
73
73
  "devDependencies": {
74
+ "@esbuild-kit/esm-loader": "^2.5.0",
74
75
  "@sindresorhus/tsconfig": "^3.0.1",
75
- "@sveltejs/vite-plugin-svelte": "^1.0.1",
76
- "ava": "^4.3.1",
77
- "esbuild-node-loader": "^0.8.0",
76
+ "@sveltejs/vite-plugin-svelte": "^1.1.0",
77
+ "ava": "^5.0.1",
78
78
  "github-reserved-names": "^2.0.4",
79
79
  "npm-run-all": "^4.1.5",
80
80
  "strip-indent": "^4.0.0",
81
- "svelte": "^3.49.0",
82
- "svelte-check": "^2.8.0",
81
+ "svelte": "^3.52.0",
82
+ "svelte-check": "^2.9.2",
83
83
  "tslib": "^2.4.0",
84
- "typescript": "^4.7.4",
85
- "vite": "^3.0.2",
86
- "xo": "^0.51.0"
84
+ "typescript": "^4.8.4",
85
+ "vite": "^3.1.8",
86
+ "xo": "^0.52.4"
87
87
  },
88
88
  "engines": {
89
- "node": ">=14"
89
+ "node": ">=18"
90
90
  }
91
91
  }