repository-provider 35.2.15 → 35.2.16

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.
package/README.md CHANGED
@@ -894,7 +894,7 @@ Returns **[BaseProvider](#baseprovider)** this
894
894
 
895
895
  List all defined entries from attributes.
896
896
 
897
- Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
897
+ Returns **{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}** 
898
898
 
899
899
  ### instanceIdentifier
900
900
 
@@ -1145,7 +1145,7 @@ Returns **[BaseProvider](#baseprovider)** this
1145
1145
 
1146
1146
  List all defined entries from attributes.
1147
1147
 
1148
- Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
1148
+ Returns **{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}** 
1149
1149
 
1150
1150
  ### instanceIdentifier
1151
1151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "35.2.15",
3
+ "version": "35.2.16",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -25,32 +25,33 @@
25
25
  ],
26
26
  "license": "BSD-2-Clause",
27
27
  "scripts": {
28
- "prepare": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
28
+ "prepare": "npm run prepare:typescript",
29
+ "prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule -t esnext -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
29
30
  "test": "npm run test:browser-ava && npm run test:ava",
30
31
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
31
32
  "test:browser-ava": "browser-ava --headless --no-keep-open tests/*-ava.mjs tests/*-ava-browser.mjs",
32
33
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
33
34
  "docs": "documentation readme --section=API ./src/**/*.mjs",
34
- "lint": "npm run lint:docs && npm run lint:tsc",
35
+ "lint": "npm run lint:docs && npm run lint:typescript",
35
36
  "lint:docs": "documentation lint ./src/**/*.mjs",
36
- "lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
37
+ "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
37
38
  },
38
39
  "dependencies": {
39
- "content-entry": "^9.0.1",
40
+ "content-entry": "^11.0.0",
40
41
  "matching-iterator": "^2.1.3",
41
- "pacc": "^3.1.5"
42
+ "pacc": "^3.1.7"
42
43
  },
43
44
  "devDependencies": {
44
- "ava": "^6.1.2",
45
- "browser-ava": "^2.2.2",
45
+ "ava": "^6.1.3",
46
+ "browser-ava": "^2.2.14",
46
47
  "c8": "^9.1.0",
47
48
  "documentation": "^14.0.3",
48
49
  "repository-provider-test-support": "^3.1.4",
49
- "semantic-release": "^23.0.2",
50
- "typescript": "^5.3.3"
50
+ "semantic-release": "^23.1.1",
51
+ "typescript": "^5.4.5"
51
52
  },
52
53
  "engines": {
53
- "node": ">=20.11.1"
54
+ "node": ">=20.12.2"
54
55
  },
55
56
  "repository": {
56
57
  "type": "git",
@@ -23,11 +23,11 @@ import {
23
23
  /**
24
24
  * @typedef {Object} MessageDestination
25
25
  * Endpoint to deliver log messages to.
26
- * @property {Function} info
27
- * @property {Function} debug
28
- * @property {Function} warn
29
- * @property {Function} error
30
- * @property {Function} trace
26
+ * @property {function(string):void} info
27
+ * @property {function(string):void} debug
28
+ * @property {function(string):void} warn
29
+ * @property {function(string):void} error
30
+ * @property {function(string):void} trace
31
31
  */
32
32
 
33
33
  /**
@@ -436,7 +436,7 @@ export class BaseProvider extends BaseObject {
436
436
 
437
437
  /**
438
438
  * List all defined entries from attributes.
439
- * @return {object}
439
+ * @return {{name: string}}
440
440
  */
441
441
  toJSON() {
442
442
  const json = { name: this.name };
package/src/util.mjs CHANGED
@@ -15,7 +15,7 @@ export function asArray(value) {
15
15
  * A URL auth component will be removed to.
16
16
  * @param {string|undefined} name
17
17
  * @param {string[]} repositoryBases all possible bases
18
- * @param {Function} [whenFound] to be called with the found base name
18
+ * @param {function(string):void} [whenFound] to be called with the found base name
19
19
  * @return {string|undefined} name without base
20
20
  */
21
21
  export function stripBaseName(name, repositoryBases, whenFound) {
@@ -39,7 +39,7 @@ export function stripBaseName(name, repositoryBases, whenFound) {
39
39
  * Loops over names and executes stripBaseName.
40
40
  * @param {string[]|string|undefined} names
41
41
  * @param {string[]} repositoryBases all possible bases
42
- * @param {Function} [whenFound] to be called with the found base name
42
+ * @param {function(string):void} [whenFound] to be called with the found base name
43
43
  * @return {string[]|string|undefined} names without base
44
44
  */
45
45
  export function stripBaseNames(names, repositoryBases, whenFound) {
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * @typedef {Object} MessageDestination
7
7
  * Endpoint to deliver log messages to.
8
- * @property {Function} info
9
- * @property {Function} debug
10
- * @property {Function} warn
11
- * @property {Function} error
12
- * @property {Function} trace
8
+ * @property {function(string):void} info
9
+ * @property {function(string):void} debug
10
+ * @property {function(string):void} warn
11
+ * @property {function(string):void} error
12
+ * @property {function(string):void} trace
13
13
  */
14
14
  /**
15
15
  * @param {Object} [options]
@@ -57,14 +57,6 @@ export class BaseProvider extends BaseObject {
57
57
  description?: string;
58
58
  default?: any;
59
59
  set?: Function;
60
- /**
61
- * Extract options suitable for the constructor.
62
- * Form the given set of environment variables.
63
- * Object with the detected key value pairs is delivered.
64
- * @param {Object} [env] as from process.env
65
- * @param {string} instanceIdentifier part of variable name.
66
- * @return {Object|undefined} undefined if no suitable environment variables have been found
67
- */
68
60
  get?: Function;
69
61
  };
70
62
  url: import("pacc").AttributeDefinition;
@@ -84,14 +76,6 @@ export class BaseProvider extends BaseObject {
84
76
  additionalAttributes: string[];
85
77
  description?: string;
86
78
  set?: Function;
87
- /**
88
- * Extract options suitable for the constructor.
89
- * Form the given set of environment variables.
90
- * Object with the detected key value pairs is delivered.
91
- * @param {Object} [env] as from process.env
92
- * @param {string} instanceIdentifier part of variable name.
93
- * @return {Object|undefined} undefined if no suitable environment variables have been found
94
- */
95
79
  get?: Function;
96
80
  env?: string | string[];
97
81
  };
@@ -246,9 +230,11 @@ export class BaseProvider extends BaseObject {
246
230
  get provider(): BaseProvider;
247
231
  /**
248
232
  * List all defined entries from attributes.
249
- * @return {object}
233
+ * @return {{name: string}}
250
234
  */
251
- toJSON(): object;
235
+ toJSON(): {
236
+ name: string;
237
+ };
252
238
  initializeRepositories(): void;
253
239
  trace(...args: any[]): any;
254
240
  debug(...args: any[]): any;
@@ -269,11 +255,11 @@ export type Milestone = import('./milestone.mjs').Milestone;
269
255
  * Endpoint to deliver log messages to.
270
256
  */
271
257
  export type MessageDestination = {
272
- info: Function;
273
- debug: Function;
274
- warn: Function;
275
- error: Function;
276
- trace: Function;
258
+ info: (arg0: string) => void;
259
+ debug: (arg0: string) => void;
260
+ warn: (arg0: string) => void;
261
+ error: (arg0: string) => void;
262
+ trace: (arg0: string) => void;
277
263
  };
278
264
  import { BaseObject } from "./base-object.mjs";
279
265
  import { Repository } from "./repository.mjs";
package/types/util.d.mts CHANGED
@@ -10,18 +10,18 @@ export function asArray(value: any[] | any): any[];
10
10
  * A URL auth component will be removed to.
11
11
  * @param {string|undefined} name
12
12
  * @param {string[]} repositoryBases all possible bases
13
- * @param {Function} [whenFound] to be called with the found base name
13
+ * @param {function(string):void} [whenFound] to be called with the found base name
14
14
  * @return {string|undefined} name without base
15
15
  */
16
- export function stripBaseName(name: string | undefined, repositoryBases: string[], whenFound?: Function): string | undefined;
16
+ export function stripBaseName(name: string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string | undefined;
17
17
  /**
18
18
  * Loops over names and executes stripBaseName.
19
19
  * @param {string[]|string|undefined} names
20
20
  * @param {string[]} repositoryBases all possible bases
21
- * @param {Function} [whenFound] to be called with the found base name
21
+ * @param {function(string):void} [whenFound] to be called with the found base name
22
22
  * @return {string[]|string|undefined} names without base
23
23
  */
24
- export function stripBaseNames(names: string[] | string | undefined, repositoryBases: string[], whenFound?: Function): string[] | string | undefined;
24
+ export function stripBaseNames(names: string[] | string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string[] | string | undefined;
25
25
  /**
26
26
  * Find a new branch name for a given pattern.
27
27
  * '*' will be replaced by a number.