@scm-manager/ui-components 2.25.1-20211003-143409 → 2.26.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.
Files changed (96) hide show
  1. package/package.json +10 -8
  2. package/src/Autocomplete.tsx +6 -6
  3. package/src/BranchSelector.stories.tsx +1 -1
  4. package/src/Breadcrumb.tsx +4 -1
  5. package/src/CardColumn.stories.tsx +2 -2
  6. package/src/CardColumn.tsx +1 -2
  7. package/src/HelpIcon.tsx +3 -1
  8. package/src/Icon.stories.tsx +3 -3
  9. package/src/Notification.stories.tsx +1 -1
  10. package/src/Paginator.test.tsx +16 -16
  11. package/src/ProtectedRoute.tsx +3 -3
  12. package/src/Tag.tsx +1 -1
  13. package/src/__resources__/Diff.markdown.ts +19 -21
  14. package/src/__resources__/changesets.tsx +73 -109
  15. package/src/__resources__/repository.ts +8 -8
  16. package/src/__snapshots__/storyshots.test.ts.snap +71237 -71286
  17. package/src/buttons/Button.tsx +63 -74
  18. package/src/buttons/ButtonAddons.tsx +1 -1
  19. package/src/buttons/ButtonGroup.tsx +1 -1
  20. package/src/buttons/SubmitButton.tsx +1 -1
  21. package/src/buttons/index.stories.tsx +5 -6
  22. package/src/comparators.test.ts +6 -6
  23. package/src/comparators.ts +1 -1
  24. package/src/devBuild.ts +1 -1
  25. package/src/forms/AddKeyValueEntryToTableField.stories.tsx +1 -1
  26. package/src/forms/AutocompleteAddEntryToTableField.tsx +1 -1
  27. package/src/forms/Checkbox.stories.tsx +4 -4
  28. package/src/forms/DropDown.stories.tsx +4 -4
  29. package/src/forms/DropDown.tsx +1 -1
  30. package/src/forms/FileInput.stories.tsx +1 -1
  31. package/src/forms/FilterInput.tsx +1 -1
  32. package/src/forms/InputField.stories.tsx +1 -1
  33. package/src/forms/MemberNameTagGroup.tsx +3 -3
  34. package/src/forms/PasswordConfirmation.tsx +4 -4
  35. package/src/forms/Radio.stories.tsx +2 -2
  36. package/src/forms/Select.stories.tsx +4 -5
  37. package/src/forms/Textarea.stories.tsx +1 -1
  38. package/src/languages.ts +1 -1
  39. package/src/layout/Footer.stories.tsx +3 -3
  40. package/src/layout/SecondaryNavigationColumn.tsx +1 -1
  41. package/src/layout/Title.tsx +2 -2
  42. package/src/markdown/MarkdownCodeRenderer.tsx +1 -1
  43. package/src/markdown/MarkdownHeadingRenderer.tsx +2 -2
  44. package/src/markdown/MarkdownLinkRenderer.test.tsx +1 -1
  45. package/src/markdown/MarkdownLinkRenderer.tsx +1 -1
  46. package/src/markdown/MarkdownView.stories.tsx +4 -4
  47. package/src/markdown/MarkdownView.tsx +9 -9
  48. package/src/markdown/createComponentList.ts +1 -1
  49. package/src/markdown/createMdastPlugin.ts +1 -1
  50. package/src/markdown/markdownExtensions.ts +1 -1
  51. package/src/markdown/remarkChangesetShortLinkParser.ts +7 -7
  52. package/src/markdown/remarkToRehypeRendererAdapters.ts +10 -9
  53. package/src/modals/ConfirmAlert.stories.tsx +5 -5
  54. package/src/modals/ConfirmAlert.tsx +2 -2
  55. package/src/modals/CreateTagModal.tsx +4 -4
  56. package/src/modals/Modal.stories.tsx +1 -1
  57. package/src/navigation/MenuContext.tsx +2 -2
  58. package/src/navigation/NavAction.tsx +3 -3
  59. package/src/navigation/SecondaryNavigation.stories.tsx +4 -4
  60. package/src/navigation/SubNavigation.tsx +2 -2
  61. package/src/popover/Popover.stories.tsx +37 -35
  62. package/src/popover/usePopover.ts +10 -10
  63. package/src/repos/Diff.stories.tsx +1 -1
  64. package/src/repos/DiffExpander.test.ts +39 -41
  65. package/src/repos/DiffExpander.ts +10 -10
  66. package/src/repos/RepositoryEntry.stories.tsx +1 -1
  67. package/src/repos/RepositoryFlag.tsx +1 -1
  68. package/src/repos/Tokenize.worker.ts +3 -3
  69. package/src/repos/TokenizedDiffView.tsx +1 -1
  70. package/src/repos/annotate/Annotate.stories.tsx +29 -29
  71. package/src/repos/changesets/ChangesetAuthor.tsx +4 -4
  72. package/src/repos/changesets/ChangesetDescription.tsx +2 -2
  73. package/src/repos/changesets/ChangesetDiff.test.ts +18 -18
  74. package/src/repos/changesets/ChangesetId.tsx +1 -1
  75. package/src/repos/changesets/ChangesetList.tsx +1 -1
  76. package/src/repos/changesets/ChangesetTagsCollapsed.tsx +1 -1
  77. package/src/repos/changesets/Changesets.stories.tsx +185 -142
  78. package/src/repos/changesets/SignatureIcon.tsx +4 -4
  79. package/src/repos/changesets/changesets.ts +1 -1
  80. package/src/repos/diffs.test.ts +3 -3
  81. package/src/repos/refractorAdapter.ts +3 -3
  82. package/src/repositories.test.ts +18 -18
  83. package/src/storyshots.test.ts +3 -3
  84. package/src/syntax-highlighting.module.css +17 -16
  85. package/src/syntax-highlighting.ts +59 -54
  86. package/src/table/Table.stories.tsx +7 -7
  87. package/src/table/Table.tsx +1 -1
  88. package/src/table/TextColumn.tsx +1 -1
  89. package/src/textSplitAndReplace.test.ts +3 -3
  90. package/src/textSplitAndReplace.ts +2 -2
  91. package/src/toast/Toast.tsx +2 -2
  92. package/src/toast/index.stories.tsx +2 -2
  93. package/src/toast/themes.ts +6 -6
  94. package/src/useDateFormatter.ts +3 -3
  95. package/src/validation.test.ts +6 -6
  96. package/src/validation.ts +1 -4
@@ -22,19 +22,19 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import {storiesOf} from "@storybook/react";
25
+ import { storiesOf } from "@storybook/react";
26
26
  import * as React from "react";
27
27
  import styled from "styled-components";
28
- import {MemoryRouter} from "react-router-dom";
28
+ import { MemoryRouter } from "react-router-dom";
29
29
  import repository from "../../__resources__/repository";
30
30
  import ChangesetRow from "./ChangesetRow";
31
- import {one, two, three, four, five} from "../../__resources__/changesets";
32
- import {Binder, BinderContext} from "@scm-manager/ui-extensions";
31
+ import { one, two, three, four, five } from "../../__resources__/changesets";
32
+ import { Binder, BinderContext } from "@scm-manager/ui-extensions";
33
33
  // @ts-ignore
34
34
  import hitchhiker from "../../__resources__/hitchhiker.png";
35
- import {Person} from "../../avatar/Avatar";
36
- import {Changeset} from "@scm-manager/ui-types";
37
- import {Replacement} from "../../SplitAndReplace";
35
+ import { Person } from "../../avatar/Avatar";
36
+ import { Changeset } from "@scm-manager/ui-types";
37
+ import { Replacement } from "../../SplitAndReplace";
38
38
 
39
39
  const Wrapper = styled.div`
40
40
  margin: 25rem 4rem;
@@ -49,7 +49,7 @@ const withAvatarFactory = (factory: (person: Person) => string, changeset: Chang
49
49
  binder.bind("avatar.factory", factory);
50
50
  return (
51
51
  <BinderContext.Provider value={binder}>
52
- <ChangesetRow repository={repository} changeset={changeset}/>
52
+ <ChangesetRow repository={repository} changeset={changeset} />
53
53
  </BinderContext.Provider>
54
54
  );
55
55
  };
@@ -59,10 +59,10 @@ const withReplacements = (
59
59
  changeset: Changeset
60
60
  ) => {
61
61
  const binder = new Binder("changeset stories");
62
- replacements.forEach(replacement => binder.bind("changeset.description.tokens", replacement));
62
+ replacements.forEach((replacement) => binder.bind("changeset.description.tokens", replacement));
63
63
  return (
64
64
  <BinderContext.Provider value={binder}>
65
- <ChangesetRow repository={repository} changeset={changeset}/>
65
+ <ChangesetRow repository={repository} changeset={changeset} />
66
66
  </BinderContext.Provider>
67
67
  );
68
68
  };
@@ -71,13 +71,13 @@ function copy<T>(input: T): T {
71
71
  return JSON.parse(JSON.stringify(input));
72
72
  }
73
73
 
74
- storiesOf("Changesets", module)
75
- .addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
76
- .addDecorator(storyFn => <Wrapper className="box box-link-shadow">{storyFn()}</Wrapper>)
77
- .add("Default", () => <ChangesetRow repository={repository} changeset={three}/>)
78
- .add("With Committer", () => <ChangesetRow repository={repository} changeset={two}/>)
79
- .add("With Committer and Co-Author", () => <ChangesetRow repository={repository} changeset={one}/>)
80
- .add("With multiple Co-Authors", () => <ChangesetRow repository={repository} changeset={four}/>)
74
+ storiesOf("Repositories/Changesets", module)
75
+ .addDecorator((story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
76
+ .addDecorator((storyFn) => <Wrapper className="box box-link-shadow">{storyFn()}</Wrapper>)
77
+ .add("Default", () => <ChangesetRow repository={repository} changeset={three} />)
78
+ .add("With Committer", () => <ChangesetRow repository={repository} changeset={two} />)
79
+ .add("With Committer and Co-Author", () => <ChangesetRow repository={repository} changeset={one} />)
80
+ .add("With multiple Co-Authors", () => <ChangesetRow repository={repository} changeset={four} />)
81
81
  .add("With avatar", () => {
82
82
  return withAvatarFactory(() => hitchhiker, three);
83
83
  })
@@ -92,156 +92,199 @@ storiesOf("Changesets", module)
92
92
  const mail = <a href={"mailto:hog@example.com"}>Arthur</a>;
93
93
  return withReplacements(
94
94
  [
95
- () => [{textToReplace: "HOG-42", replacement: link}],
96
- () => [{textToReplace: "arthur@guide.galaxy", replacement: mail}]
95
+ () => [{ textToReplace: "HOG-42", replacement: link }],
96
+ () => [{ textToReplace: "arthur@guide.galaxy", replacement: mail }],
97
97
  ],
98
98
  five
99
99
  );
100
100
  })
101
101
  .add("With unknown signature", () => {
102
102
  const changeset = copy(three);
103
- changeset.signatures = [{
104
- keyId: "0x247E908C6FD35473",
105
- type: "gpg",
106
- status: "NOT_FOUND"
107
- }];
108
- return <ChangesetRow repository={repository} changeset={changeset}/>;
103
+ changeset.signatures = [
104
+ {
105
+ keyId: "0x247E908C6FD35473",
106
+ type: "gpg",
107
+ status: "NOT_FOUND",
108
+ },
109
+ ];
110
+ return <ChangesetRow repository={repository} changeset={changeset} />;
109
111
  })
110
112
  .add("With valid signature", () => {
111
113
  const changeset = copy(three);
112
- changeset.signatures = [{
113
- keyId: "0x247E908C6FD35473",
114
- type: "gpg",
115
- status: "VERIFIED",
116
- owner: "trillian",
117
- contacts: [{
118
- name: "Tricia Marie McMilla",
119
- mail: "trillian@hitchhiker.com"
120
- }]
121
- }];
122
- return <ChangesetRow repository={repository} changeset={changeset}/>;
114
+ changeset.signatures = [
115
+ {
116
+ keyId: "0x247E908C6FD35473",
117
+ type: "gpg",
118
+ status: "VERIFIED",
119
+ owner: "trillian",
120
+ contacts: [
121
+ {
122
+ name: "Tricia Marie McMilla",
123
+ mail: "trillian@hitchhiker.com",
124
+ },
125
+ ],
126
+ },
127
+ ];
128
+ return <ChangesetRow repository={repository} changeset={changeset} />;
123
129
  })
124
130
  .add("With unowned signature", () => {
125
131
  const changeset = copy(three);
126
- changeset.signatures = [{
127
- keyId: "0x247E908C6FD35473",
128
- type: "gpg",
129
- status: "VERIFIED",
130
- contacts: [{
131
- name: "Tricia Marie McMilla",
132
- mail: "trillian@hitchhiker.com"
133
- }]
134
- }];
135
- return <ChangesetRow repository={repository} changeset={changeset}/>;
132
+ changeset.signatures = [
133
+ {
134
+ keyId: "0x247E908C6FD35473",
135
+ type: "gpg",
136
+ status: "VERIFIED",
137
+ contacts: [
138
+ {
139
+ name: "Tricia Marie McMilla",
140
+ mail: "trillian@hitchhiker.com",
141
+ },
142
+ ],
143
+ },
144
+ ];
145
+ return <ChangesetRow repository={repository} changeset={changeset} />;
136
146
  })
137
147
  .add("With contactless signature", () => {
138
148
  const changeset = copy(three);
139
- changeset.signatures = [{
140
- keyId: "0x247E908C6FD35473",
141
- type: "gpg",
142
- status: "VERIFIED",
143
- owner: "trillian"
144
- }];
145
- return <ChangesetRow repository={repository} changeset={changeset}/>;
149
+ changeset.signatures = [
150
+ {
151
+ keyId: "0x247E908C6FD35473",
152
+ type: "gpg",
153
+ status: "VERIFIED",
154
+ owner: "trillian",
155
+ },
156
+ ];
157
+ return <ChangesetRow repository={repository} changeset={changeset} />;
146
158
  })
147
159
  .add("With invalid signature", () => {
148
160
  const changeset = copy(three);
149
- changeset.signatures = [{
150
- keyId: "0x247E908C6FD35473",
151
- type: "gpg",
152
- status: "INVALID",
153
- owner: "trillian",
154
- contacts: [{
155
- name: "Tricia Marie McMilla",
156
- mail: "trillian@hitchhiker.com"
157
- }]
158
- }];
159
- return <ChangesetRow repository={repository} changeset={changeset}/>;
161
+ changeset.signatures = [
162
+ {
163
+ keyId: "0x247E908C6FD35473",
164
+ type: "gpg",
165
+ status: "INVALID",
166
+ owner: "trillian",
167
+ contacts: [
168
+ {
169
+ name: "Tricia Marie McMilla",
170
+ mail: "trillian@hitchhiker.com",
171
+ },
172
+ ],
173
+ },
174
+ ];
175
+ return <ChangesetRow repository={repository} changeset={changeset} />;
160
176
  })
161
177
  .add("With multiple signatures and invalid status", () => {
162
178
  const changeset = copy(three);
163
- changeset.signatures = [{
164
- keyId: "0x912389FJIQW8W223",
165
- type: "gpg",
166
- status: "INVALID",
167
- owner: "trillian",
168
- contacts: [{
169
- name: "Tricia Marie McMilla",
170
- mail: "trillian@hitchhiker.com"
171
- }]
172
- }, {
173
- keyId: "0x247E908C6FD35473",
174
- type: "gpg",
175
- status: "VERIFIED",
176
- owner: "trillian",
177
- contacts: [{
178
- name: "Tricia Marie McMilla",
179
- mail: "trillian@hitchhiker.com"
180
- }]
181
- }, {
182
- keyId: "0x9123891239VFIA33",
183
- type: "gpg",
184
- status: "NOT_FOUND",
185
- owner: "trillian",
186
- contacts: [{
187
- name: "Tricia Marie McMilla",
188
- mail: "trillian@hitchhiker.com"
189
- }]
190
- }];
191
- return <ChangesetRow repository={repository} changeset={changeset}/>;
179
+ changeset.signatures = [
180
+ {
181
+ keyId: "0x912389FJIQW8W223",
182
+ type: "gpg",
183
+ status: "INVALID",
184
+ owner: "trillian",
185
+ contacts: [
186
+ {
187
+ name: "Tricia Marie McMilla",
188
+ mail: "trillian@hitchhiker.com",
189
+ },
190
+ ],
191
+ },
192
+ {
193
+ keyId: "0x247E908C6FD35473",
194
+ type: "gpg",
195
+ status: "VERIFIED",
196
+ owner: "trillian",
197
+ contacts: [
198
+ {
199
+ name: "Tricia Marie McMilla",
200
+ mail: "trillian@hitchhiker.com",
201
+ },
202
+ ],
203
+ },
204
+ {
205
+ keyId: "0x9123891239VFIA33",
206
+ type: "gpg",
207
+ status: "NOT_FOUND",
208
+ owner: "trillian",
209
+ contacts: [
210
+ {
211
+ name: "Tricia Marie McMilla",
212
+ mail: "trillian@hitchhiker.com",
213
+ },
214
+ ],
215
+ },
216
+ ];
217
+ return <ChangesetRow repository={repository} changeset={changeset} />;
192
218
  })
193
219
  .add("With multiple signatures and valid status", () => {
194
220
  const changeset = copy(three);
195
- changeset.signatures = [{
196
- keyId: "0x912389FJIQW8W223",
197
- type: "gpg",
198
- status: "NOT_FOUND",
199
- owner: "trillian",
200
- contacts: [{
201
- name: "Tricia Marie McMilla",
202
- mail: "trillian@hitchhiker.com"
203
- }]
204
- }, {
205
- keyId: "0x247E908C6FD35473",
206
- type: "gpg",
207
- status: "VERIFIED",
208
- owner: "trillian",
209
- contacts: [{
210
- name: "Tricia Marie McMilla",
211
- mail: "trillian@hitchhiker.com"
212
- }]
213
- }, {
214
- keyId: "0x9123891239VFIA33",
215
- type: "gpg",
216
- status: "NOT_FOUND",
217
- owner: "trillian",
218
- contacts: [{
219
- name: "Tricia Marie McMilla",
220
- mail: "trillian@hitchhiker.com"
221
- }]
222
- }];
223
- return <ChangesetRow repository={repository} changeset={changeset}/>;
221
+ changeset.signatures = [
222
+ {
223
+ keyId: "0x912389FJIQW8W223",
224
+ type: "gpg",
225
+ status: "NOT_FOUND",
226
+ owner: "trillian",
227
+ contacts: [
228
+ {
229
+ name: "Tricia Marie McMilla",
230
+ mail: "trillian@hitchhiker.com",
231
+ },
232
+ ],
233
+ },
234
+ {
235
+ keyId: "0x247E908C6FD35473",
236
+ type: "gpg",
237
+ status: "VERIFIED",
238
+ owner: "trillian",
239
+ contacts: [
240
+ {
241
+ name: "Tricia Marie McMilla",
242
+ mail: "trillian@hitchhiker.com",
243
+ },
244
+ ],
245
+ },
246
+ {
247
+ keyId: "0x9123891239VFIA33",
248
+ type: "gpg",
249
+ status: "NOT_FOUND",
250
+ owner: "trillian",
251
+ contacts: [
252
+ {
253
+ name: "Tricia Marie McMilla",
254
+ mail: "trillian@hitchhiker.com",
255
+ },
256
+ ],
257
+ },
258
+ ];
259
+ return <ChangesetRow repository={repository} changeset={changeset} />;
224
260
  })
225
261
  .add("With multiple signatures and not found status", () => {
226
262
  const changeset = copy(three);
227
- changeset.signatures = [{
228
- keyId: "0x912389FJIQW8W223",
229
- type: "gpg",
230
- status: "NOT_FOUND",
231
- owner: "trillian",
232
- contacts: [{
233
- name: "Tricia Marie McMilla",
234
- mail: "trillian@hitchhiker.com"
235
- }]
236
- }, {
237
- keyId: "0x9123891239VFIA33",
238
- type: "gpg",
239
- status: "NOT_FOUND",
240
- owner: "trillian",
241
- contacts: [{
242
- name: "Tricia Marie McMilla",
243
- mail: "trillian@hitchhiker.com"
244
- }]
245
- }];
246
- return <ChangesetRow repository={repository} changeset={changeset}/>;
263
+ changeset.signatures = [
264
+ {
265
+ keyId: "0x912389FJIQW8W223",
266
+ type: "gpg",
267
+ status: "NOT_FOUND",
268
+ owner: "trillian",
269
+ contacts: [
270
+ {
271
+ name: "Tricia Marie McMilla",
272
+ mail: "trillian@hitchhiker.com",
273
+ },
274
+ ],
275
+ },
276
+ {
277
+ keyId: "0x9123891239VFIA33",
278
+ type: "gpg",
279
+ status: "NOT_FOUND",
280
+ owner: "trillian",
281
+ contacts: [
282
+ {
283
+ name: "Tricia Marie McMilla",
284
+ mail: "trillian@hitchhiker.com",
285
+ },
286
+ ],
287
+ },
288
+ ];
289
+ return <ChangesetRow repository={repository} changeset={changeset} />;
247
290
  });
@@ -58,11 +58,11 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
58
58
  }
59
59
 
60
60
  const getColor = (signaturesToVerify: Signature[]) => {
61
- const invalid = signaturesToVerify.some(sig => sig.status === "INVALID");
61
+ const invalid = signaturesToVerify.some((sig) => sig.status === "INVALID");
62
62
  if (invalid) {
63
63
  return "danger";
64
64
  }
65
- const verified = signaturesToVerify.some(sig => sig.status === "VERIFIED");
65
+ const verified = signaturesToVerify.some((sig) => sig.status === "VERIFIED");
66
66
  if (verified) {
67
67
  return "success";
68
68
  }
@@ -109,7 +109,7 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
109
109
  <>
110
110
  <div>{t("changeset.keyContacts")}:</div>
111
111
  {signature.contacts &&
112
- signature.contacts.map(contact => (
112
+ signature.contacts.map((contact) => (
113
113
  <div>
114
114
  - {contact.name}
115
115
  {contact.mail && ` <${contact.mail}>`}
@@ -121,7 +121,7 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
121
121
  );
122
122
  };
123
123
 
124
- const signatureElements = signatures.map(signature => createSignatureBlock(signature));
124
+ const signatureElements = signatures.map((signature) => createSignatureBlock(signature));
125
125
 
126
126
  return (
127
127
  <>
@@ -53,6 +53,6 @@ export function parseDescription(description?: string): Description {
53
53
 
54
54
  return {
55
55
  title,
56
- message
56
+ message,
57
57
  };
58
58
  }
@@ -33,7 +33,7 @@ describe("tests for diff util functions", () => {
33
33
  oldPath,
34
34
  newPath,
35
35
  newEndingNewLine: true,
36
- oldEndingNewLine: true
36
+ oldEndingNewLine: true,
37
37
  };
38
38
  };
39
39
 
@@ -52,7 +52,7 @@ describe("tests for diff util functions", () => {
52
52
  const createHunk = (content: string): Hunk => {
53
53
  return {
54
54
  content,
55
- changes: []
55
+ changes: [],
56
56
  };
57
57
  };
58
58
 
@@ -83,7 +83,7 @@ describe("tests for diff util functions", () => {
83
83
  it("should create identifier", () => {
84
84
  const identifier = createHunkIdentifierFromContext({
85
85
  file: rm("/etc/passwd"),
86
- hunk: createHunk("@@ -1,42 +1,39 @@")
86
+ hunk: createHunk("@@ -1,42 +1,39 @@"),
87
87
  });
88
88
  expect(identifier).toBe("delete_/etc/passwd_@@ -1,42 +1,39 @@");
89
89
  });
@@ -46,7 +46,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
46
46
  import(
47
47
  /* webpackChunkName: "tokenizer-refractor-[request]" */
48
48
  `refractor/lang/${lang}`
49
- ).then(loadedLanguage => {
49
+ ).then((loadedLanguage) => {
50
50
  refractor.register(loadedLanguage.default);
51
51
  callback();
52
52
  });
@@ -58,7 +58,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
58
58
  const runHook = (name: string, env: RunHookEnv) => {
59
59
  originalRunHook.apply(name, env);
60
60
  if (env.classes) {
61
- env.classes = env.classes.map(className => theme[className] || className);
61
+ env.classes = env.classes.map((className) => theme[className] || className);
62
62
  }
63
63
  };
64
64
  // @ts-ignore hooks are not in the type definition
@@ -67,7 +67,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
67
67
  return {
68
68
  isLanguageRegistered,
69
69
  loadLanguage,
70
- ...refractor
70
+ ...refractor,
71
71
  };
72
72
  };
73
73
 
@@ -35,10 +35,10 @@ describe("getProtocolLinkByType tests", () => {
35
35
  protocol: [
36
36
  {
37
37
  name: "http",
38
- href: "http://scm.scm-manager.org/repo/scm/core"
39
- }
40
- ]
41
- }
38
+ href: "http://scm.scm-manager.org/repo/scm/core",
39
+ },
40
+ ],
41
+ },
42
42
  };
43
43
 
44
44
  const link = getProtocolLinkByType(repository, "http");
@@ -54,14 +54,14 @@ describe("getProtocolLinkByType tests", () => {
54
54
  protocol: [
55
55
  {
56
56
  name: "http",
57
- href: "http://scm.scm-manager.org/repo/scm/core"
57
+ href: "http://scm.scm-manager.org/repo/scm/core",
58
58
  },
59
59
  {
60
60
  name: "ssh",
61
- href: "git@scm.scm-manager.org:scm/core"
62
- }
63
- ]
64
- }
61
+ href: "git@scm.scm-manager.org:scm/core",
62
+ },
63
+ ],
64
+ },
65
65
  };
66
66
 
67
67
  const link = getProtocolLinkByType(repository, "http");
@@ -76,9 +76,9 @@ describe("getProtocolLinkByType tests", () => {
76
76
  _links: {
77
77
  protocol: {
78
78
  name: "http",
79
- href: "http://scm.scm-manager.org/repo/scm/core"
80
- }
81
- }
79
+ href: "http://scm.scm-manager.org/repo/scm/core",
80
+ },
81
+ },
82
82
  };
83
83
 
84
84
  const link = getProtocolLinkByType(repository, "http");
@@ -94,14 +94,14 @@ describe("getProtocolLinkByType tests", () => {
94
94
  protocol: [
95
95
  {
96
96
  name: "http",
97
- href: "http://scm.scm-manager.org/repo/scm/core"
97
+ href: "http://scm.scm-manager.org/repo/scm/core",
98
98
  },
99
99
  {
100
100
  name: "ssh",
101
- href: "git@scm.scm-manager.org:scm/core"
102
- }
103
- ]
104
- }
101
+ href: "git@scm.scm-manager.org:scm/core",
102
+ },
103
+ ],
104
+ },
105
105
  };
106
106
 
107
107
  const link = getProtocolLinkByType(repository, "awesome");
@@ -113,7 +113,7 @@ describe("getProtocolLinkByType tests", () => {
113
113
  namespace: "scm",
114
114
  name: "core",
115
115
  type: "git",
116
- _links: {}
116
+ _links: {},
117
117
  };
118
118
 
119
119
  const link = getProtocolLinkByType(repository, "http");
@@ -30,7 +30,7 @@ const createNodeMock = (element: any) => {
30
30
  if (element.type === "tr") {
31
31
  return {
32
32
  // eslint-disable-next-line @typescript-eslint/no-empty-function
33
- querySelector: (selector: string) => {}
33
+ querySelector: (selector: string) => {},
34
34
  };
35
35
  }
36
36
  };
@@ -41,6 +41,6 @@ initStoryshots({
41
41
  // @see https://github.com/storybookjs/storybook/pull/1090
42
42
  test: snapshotWithOptions({
43
43
  // @ts-ignore types seems not to match
44
- createNodeMock
45
- })
44
+ createNodeMock,
45
+ }),
46
46
  });