repository-provider-test-support 3.1.52 → 4.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.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "repository-provider-test-support",
3
- "version": "3.1.52",
3
+ "version": "4.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
7
7
  },
8
+ "packageManager": "npm@11.6.0+sha512.77f3fb0dbbd881835d7bd1217deabdf7ed77fc4ec4f363df64fc3cb986404abf6c437661041080f5c5d225103508e7c9ea30cb2742b7e942675d05a10af2d7b9",
8
9
  "types": "./types/module.d.mts",
9
10
  "exports": {
10
11
  ".": {
11
- "types": "./types/module.d.mts",
12
12
  "default": "./src/module.mjs"
13
13
  }
14
14
  },
@@ -24,30 +24,26 @@
24
24
  ],
25
25
  "license": "0BSD",
26
26
  "scripts": {
27
- "prepare": "node --run prepare:typescript",
28
- "prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
29
27
  "test": "node --run test:ava",
30
28
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
31
29
  "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",
32
30
  "docs": "documentation readme --section=API ./src**/*.mjs",
33
- "lint": "node --run lint:docs && node --run lint:typescript",
34
- "lint:docs": "documentation lint ./src**/*.mjs",
35
- "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
31
+ "lint": "node --run lint:docs",
32
+ "lint:docs": "documentation lint ./src**/*.mjs"
36
33
  },
37
34
  "dependencies": {
38
35
  "browser-stream-util": "^1.3.6",
39
- "content-entry": "^14.2.4"
36
+ "content-entry": "^14.2.5"
40
37
  },
41
38
  "devDependencies": {
42
39
  "ava": "^6.4.1",
43
40
  "c8": "^10.1.3",
44
41
  "documentation": "^14.0.3",
45
- "repository-provider": "^35.5.10",
46
- "semantic-release": "^24.2.7",
47
- "typescript": "^5.9.2"
42
+ "repository-provider": "^35.6.0",
43
+ "semantic-release": "^24.2.9"
48
44
  },
49
45
  "engines": {
50
- "node": ">=22.17.1"
46
+ "node": ">=22.19.5"
51
47
  },
52
48
  "repository": {
53
49
  "type": "git",
@@ -60,8 +56,7 @@
60
56
  "template": {
61
57
  "inheritFrom": [
62
58
  "arlac77/template-arlac77-github",
63
- "arlac77/template-javascript-component",
64
- "arlac77/template-typescript"
59
+ "arlac77/template-javascript-component"
65
60
  ]
66
61
  }
67
62
  }
@@ -4,11 +4,6 @@ export async function providerTest(t, provider) {
4
4
  t.truthy(provider.fullName, `${provider.name} has a fullName`);
5
5
  t.truthy(provider.url, `${provider.name} has a url`);
6
6
 
7
- /*
8
- const repositoryGroup = await provider.repositoryGroup();
9
- t.is(repositoryGroup, undefined, "undefined repositoryGroup");
10
- */
11
-
12
7
  const repository = await provider.repository();
13
8
  t.is(repository, undefined, "undefined repository");
14
9
 
@@ -24,29 +19,6 @@ export async function providerParseNameTest(t, provider, fixtures) {
24
19
  t.deepEqual(provider.parseName(name), repo, name);
25
20
  }
26
21
  }
27
-
28
22
  providerParseNameTest.title = (providedTitle = "provider name", provider) =>
29
23
  `${providedTitle} ${provider ? provider.name : "undefined"}`.trim();
30
24
 
31
- export async function providerOptionsFromEnvironmentTest(
32
- t,
33
- factory,
34
- env,
35
- expected,
36
- areOptionsSufficcient = true
37
- ) {
38
- const oFromEnv = factory.optionsFromEnvironment(env);
39
- t.deepEqual(oFromEnv, expected, "optionsFromEnvironment");
40
- t.is(
41
- factory.areOptionsSufficcient(oFromEnv),
42
- areOptionsSufficcient,
43
- "areOptionsSufficcient"
44
- );
45
- }
46
-
47
- providerOptionsFromEnvironmentTest.title = (
48
- providedTitle = "optionsFromEnvironment",
49
- factory,
50
- env,
51
- expected
52
- ) => `${providedTitle} ${factory.name} ${JSON.stringify(env)}`.trim();
@@ -1,4 +0,0 @@
1
- export function branchListTest(t: any, provider: any, pattern: any, expected: any, withProviderName?: boolean): Promise<void>;
2
- export namespace branchListTest {
3
- function title(providedTitle: string, provider: any, pattern: any, expected: any): string;
4
- }
@@ -1 +0,0 @@
1
- export function assertBranchUpdateAttributes(t: any, branch: any): Promise<void>;
@@ -1,8 +0,0 @@
1
- export const REPOSITORY_OWNER: "arlac77";
2
- export const REPOSITORY_NAME: "arlac77/sync-test-repository";
3
- export const REPOSITORY_NAME_GITHUB_HTTP: "https://github.com/arlac77/sync-test-repository.git";
4
- export const REPOSITORY_NAME_GITHUB_GIT: "git@github.com:arlac77/sync-test-repository.git";
5
- export const REPOSITORY_NAME_WITH_BRANCH: string;
6
- export const REPOSITORY_NAME_WITH_BRANCH_GITHUB_HTTP: string;
7
- export const REPOSITORY_NAME_WITH_BRANCH_GITHUB_GIT: string;
8
- export const BITBUCKET_REPOSITORY_NAME: "arlac77/sync-test-repository";
@@ -1 +0,0 @@
1
- export function entryListTest(t: any, branch: any, pattern: any, entryFixtures: any): Promise<void>;
@@ -1,8 +0,0 @@
1
- export function groupListTest(t: any, provider: any, pattern: any, expected: any, withProviderName?: boolean): Promise<void>;
2
- export namespace groupListTest {
3
- function title(providedTitle: string, provider: any, pattern: any, expected: any): string;
4
- }
5
- export function groupTest(t: any, provider: any, name: any, expected: any): Promise<void>;
6
- export namespace groupTest {
7
- function title(providedTitle: string, provider: any, name: any, expected: any): string;
8
- }
@@ -1,10 +0,0 @@
1
- export function createMessageDestination(): {
2
- messageDestination: {
3
- trace: (...args: any[]) => any[];
4
- info: (...args: any[]) => any[];
5
- error: (...args: any[]) => any[];
6
- warn: (...args: any[]) => any[];
7
- };
8
- messages: {};
9
- levels: string[];
10
- };
@@ -1,16 +0,0 @@
1
- export function assertBranch(t: any, branch: any, fixture: any, url: any): Promise<void>;
2
- export function assertRepo(t: any, repository: any, fixture: any, url: any): Promise<void>;
3
- export function assertCommit(t: any, repository: any, entryName?: string): Promise<void>;
4
- export * from "./group-test.mjs";
5
- export * from "./repository-list-test.mjs";
6
- export * from "./repository-owner-test.mjs";
7
- export * from "./branch-list-test.mjs";
8
- export * from "./branch-test.mjs";
9
- export * from "./tag-list-test.mjs";
10
- export * from "./provider-test.mjs";
11
- export * from "./repository-test.mjs";
12
- export * from "./pull-request-test.mjs";
13
- export * from "./entry-list-test.mjs";
14
- export * from "./messages.mjs";
15
- export * from "./repositories.mjs";
16
- export * from "./constants.mjs";
@@ -1,12 +0,0 @@
1
- export function providerTest(t: any, provider: any): Promise<void>;
2
- export namespace providerTest {
3
- function title(providedTitle: string, provider: any): string;
4
- }
5
- export function providerParseNameTest(t: any, provider: any, fixtures: any): Promise<void>;
6
- export namespace providerParseNameTest {
7
- function title(providedTitle: string, provider: any): string;
8
- }
9
- export function providerOptionsFromEnvironmentTest(t: any, factory: any, env: any, expected: any, areOptionsSufficcient?: boolean): Promise<void>;
10
- export namespace providerOptionsFromEnvironmentTest {
11
- function title(providedTitle: string, factory: any, env: any, expected: any): string;
12
- }
@@ -1,2 +0,0 @@
1
- export function pullRequestLivecycle(t: any, provider: any, repoName: any): Promise<void>;
2
- export function pullRequestList(t: any, provider: any, repoName: any): Promise<void>;
@@ -1,174 +0,0 @@
1
- export const githubRepositories: {
2
- "https://github.com/arlac77/sync-test-repository.git#mybranch": {
3
- base: string;
4
- group: string;
5
- repository: string;
6
- branch: string;
7
- };
8
- "https://user:password@github.com/arlac77/sync-test-repository.git#mybranch": {
9
- base: string;
10
- group: string;
11
- repository: string;
12
- branch: string;
13
- };
14
- "https://user@github.com/arlac77/sync-test-repository.git#mybranch": {
15
- base: string;
16
- group: string;
17
- repository: string;
18
- branch: string;
19
- };
20
- };
21
- export const bitbucketRepositories: {
22
- "git@bitbucket.org:arlac77/sync-test-repository.git#mybranch": {
23
- base: string;
24
- group: string;
25
- repository: string;
26
- branch: string;
27
- };
28
- "git@bitbucket.org/arlac77/sync-test-repository.git": {
29
- base: string;
30
- group: string;
31
- repository: string;
32
- };
33
- "https://arlac77@bitbucket.org/arlac77/sync-test-repository.git": {
34
- base: string;
35
- group: string;
36
- repository: string;
37
- };
38
- };
39
- export const otherRepositories: {
40
- "http://otherdomain.com/arlac77/sync-test-repository.git#mybranch": {
41
- base: string;
42
- group: string;
43
- repository: string;
44
- branch: string;
45
- };
46
- "git+http://otherdomain.com/arlac77/sync-test-repository.git#mybranch": {
47
- base: string;
48
- group: string;
49
- repository: string;
50
- branch: string;
51
- };
52
- "git+http://arlac77@otherdomain.com/prefix/arlac77/sync-test-repository.git": {
53
- base: string;
54
- group: string;
55
- repository: string;
56
- };
57
- };
58
- export const fragmentRepositories: {
59
- "": {};
60
- "abc/def/g": {
61
- group: string;
62
- repository: string;
63
- };
64
- "xxx/abc/def.git#mybranch": {
65
- group: string;
66
- repository: string;
67
- branch: string;
68
- };
69
- abc: {
70
- repository: string;
71
- };
72
- " abc/def": {
73
- group: string;
74
- repository: string;
75
- };
76
- "abc/def#mybranch ": {
77
- group: string;
78
- repository: string;
79
- branch: string;
80
- };
81
- "abc/def.git": {
82
- group: string;
83
- repository: string;
84
- };
85
- "abc/def.git#mybranch": {
86
- group: string;
87
- repository: string;
88
- branch: string;
89
- };
90
- };
91
- export const repositories: {
92
- "http://otherdomain.com/arlac77/sync-test-repository.git#mybranch": {
93
- base: string;
94
- group: string;
95
- repository: string;
96
- branch: string;
97
- };
98
- "git+http://otherdomain.com/arlac77/sync-test-repository.git#mybranch": {
99
- base: string;
100
- group: string;
101
- repository: string;
102
- branch: string;
103
- };
104
- "git+http://arlac77@otherdomain.com/prefix/arlac77/sync-test-repository.git": {
105
- base: string;
106
- group: string;
107
- repository: string;
108
- };
109
- "git@bitbucket.org:arlac77/sync-test-repository.git#mybranch": {
110
- base: string;
111
- group: string;
112
- repository: string;
113
- branch: string;
114
- };
115
- "git@bitbucket.org/arlac77/sync-test-repository.git": {
116
- base: string;
117
- group: string;
118
- repository: string;
119
- };
120
- "https://arlac77@bitbucket.org/arlac77/sync-test-repository.git": {
121
- base: string;
122
- group: string;
123
- repository: string;
124
- };
125
- "https://github.com/arlac77/sync-test-repository.git#mybranch": {
126
- base: string;
127
- group: string;
128
- repository: string;
129
- branch: string;
130
- };
131
- "https://user:password@github.com/arlac77/sync-test-repository.git#mybranch": {
132
- base: string;
133
- group: string;
134
- repository: string;
135
- branch: string;
136
- };
137
- "https://user@github.com/arlac77/sync-test-repository.git#mybranch": {
138
- base: string;
139
- group: string;
140
- repository: string;
141
- branch: string;
142
- };
143
- "": {};
144
- "abc/def/g": {
145
- group: string;
146
- repository: string;
147
- };
148
- "xxx/abc/def.git#mybranch": {
149
- group: string;
150
- repository: string;
151
- branch: string;
152
- };
153
- abc: {
154
- repository: string;
155
- };
156
- " abc/def": {
157
- group: string;
158
- repository: string;
159
- };
160
- "abc/def#mybranch ": {
161
- group: string;
162
- repository: string;
163
- branch: string;
164
- };
165
- "abc/def.git": {
166
- group: string;
167
- repository: string;
168
- };
169
- "abc/def.git#mybranch": {
170
- group: string;
171
- repository: string;
172
- branch: string;
173
- };
174
- };
@@ -1,4 +0,0 @@
1
- export function repositoryListTest(t: any, provider: any, pattern: any, expected: any): Promise<void>;
2
- export namespace repositoryListTest {
3
- function title(providedTitle: string, provider: any, pattern: any, expected: any): string;
4
- }
@@ -1,8 +0,0 @@
1
- export function ownerTypeLookupTest(t: any, type: any, owner: any, name: any, expected: any): Promise<void>;
2
- export namespace ownerTypeLookupTest {
3
- function title(providedTitle: string, type: any, owner: any, name: any, expected: any): string;
4
- }
5
- export function ownerTypeListTest(t: any, type: any, owner: any, pattern: any, expected: any): Promise<void>;
6
- export namespace ownerTypeListTest {
7
- function title(providedTitle: string, type: any, owner: any, pattern: any, expected: any): string;
8
- }
@@ -1,5 +0,0 @@
1
- export function repositoryEqualityTest(t: any, p1: any, rn1: any, rn2: any): Promise<void>;
2
- export namespace repositoryEqualityTest {
3
- function title(providedTitle: string, provider: any): string;
4
- }
5
- export function repositoryLivecycleTest(t: any, provider: any, repoName: string, groupName: any, options: any, assert?: (t: any, repository: any) => Promise<void>): Promise<void>;
@@ -1,4 +0,0 @@
1
- export function tagListTest(t: any, provider: any, pattern: any, expected: any, withProviderName?: boolean): Promise<void>;
2
- export namespace tagListTest {
3
- function title(providedTitle: string, provider: any, pattern: any, expected: any): string;
4
- }
package/types/util.d.mts DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * @typedef {import('repository-provider').Repository} Repository
3
- */
4
- /**
5
- * find a new branch name for a given pattern
6
- * '*' will be replaced by a number
7
- * 'something/*' will get to something/1 something/2 ...
8
- * @param {Repository} repository
9
- * @param {string} pattern
10
- */
11
- export function generateBranchName(repository: Repository, pattern: string): Promise<string>;
12
- export type Repository = import("repository-provider").Repository;