backport 6.1.5 → 6.2.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 (92) hide show
  1. package/dist/backportRun.d.ts +14 -0
  2. package/dist/backportRun.js +75 -0
  3. package/dist/entrypoint.api.d.ts +22 -0
  4. package/dist/entrypoint.api.js +57 -0
  5. package/dist/entrypoint.api.private.test.d.ts +1 -0
  6. package/dist/entrypoint.api.private.test.js +37 -0
  7. package/dist/options/config/getProjectConfig.d.ts +0 -0
  8. package/dist/options/config/getProjectConfig.js +1 -0
  9. package/dist/options/config/globalConfig.test.js +2 -2
  10. package/dist/options/options.test.js +3 -2
  11. package/dist/react-components/0-loadOptions.d.ts +6 -0
  12. package/dist/react-components/0-loadOptions.js +45 -0
  13. package/dist/react-components/1-loadCommit.d.ts +8 -0
  14. package/dist/react-components/1-loadCommit.js +88 -0
  15. package/dist/react-components/1a-loadCommit.d.ts +5 -0
  16. package/dist/react-components/1a-loadCommit.js +76 -0
  17. package/dist/react-components/1b-commitChoices.d.ts +5 -0
  18. package/dist/react-components/1b-commitChoices.js +98 -0
  19. package/dist/react-components/2-commitChoices.d.ts +8 -0
  20. package/dist/react-components/2-commitChoices.js +96 -0
  21. package/dist/react-components/2-commitsPrompt.d.ts +8 -0
  22. package/dist/react-components/2-commitsPrompt.js +96 -0
  23. package/dist/react-components/2-targetBranchChoices.d.ts +9 -0
  24. package/dist/react-components/2-targetBranchChoices.js +109 -0
  25. package/dist/react-components/3-cherrypick.d.ts +1 -0
  26. package/dist/react-components/3-cherrypick.js +2 -0
  27. package/dist/react-components/App.d.ts +2 -0
  28. package/dist/react-components/App.js +35 -0
  29. package/dist/react-components/BackportStateContext.d.ts +33 -0
  30. package/dist/react-components/BackportStateContext.js +42 -0
  31. package/dist/react-components/CommitPrompt/2-commitsPrompt.d.ts +8 -0
  32. package/dist/react-components/CommitPrompt/2-commitsPrompt.js +96 -0
  33. package/dist/react-components/CommitPrompt/CommitPrompt.d.ts +8 -0
  34. package/dist/react-components/CommitPrompt/CommitPrompt.js +96 -0
  35. package/dist/react-components/CommitPrompt/getCommits.d.ts +2 -0
  36. package/dist/react-components/CommitPrompt/getCommits.js +27 -0
  37. package/dist/react-components/CommitPrompt.d.ts +8 -0
  38. package/dist/react-components/CommitPrompt.js +96 -0
  39. package/dist/react-components/CustomMultiSelect.d.ts +13 -0
  40. package/dist/react-components/CustomMultiSelect.js +21 -0
  41. package/dist/react-components/CustomMultiSelectItem.d.ts +5 -0
  42. package/dist/react-components/CustomMultiSelectItem.js +12 -0
  43. package/dist/react-components/CustomSelect.d.ts +14 -0
  44. package/dist/react-components/CustomSelect.js +34 -0
  45. package/dist/react-components/ErrorBoundary.d.ts +15 -0
  46. package/dist/react-components/ErrorBoundary.js +53 -0
  47. package/dist/react-components/MultiSelect.d.ts +7 -0
  48. package/dist/react-components/MultiSelect.js +16 -0
  49. package/dist/react-components/hooks/useAsync.d.ts +12 -0
  50. package/dist/react-components/hooks/useAsync.js +73 -0
  51. package/dist/runSequentially.test.js +2 -2
  52. package/dist/services/backportRun/backportRun.ci.d.ts +6 -0
  53. package/dist/services/backportRun/backportRun.ci.js +81 -0
  54. package/dist/services/backportRun/backportRun.d.ts +14 -0
  55. package/dist/services/backportRun/backportRun.interactive.d.ts +1 -0
  56. package/dist/services/backportRun/backportRun.interactive.js +4 -0
  57. package/dist/services/backportRun/backportRun.js +14 -0
  58. package/dist/services/backportRun/backportState.d.ts +4 -0
  59. package/dist/services/backportRun/backportState.js +28 -0
  60. package/dist/services/backportRun/getCommits.d.ts +2 -0
  61. package/dist/services/backportRun/getCommits.js +20 -0
  62. package/dist/services/backportRun/runSequentially.d.ts +20 -0
  63. package/dist/services/backportRun/runSequentially.js +41 -0
  64. package/dist/services/backportRun/runSequentially.test.d.ts +1 -0
  65. package/dist/services/backportRun/runSequentially.test.js +199 -0
  66. package/dist/services/cherrypickAndCreateTargetPullRequest.d.ts +12 -0
  67. package/dist/services/cherrypickAndCreateTargetPullRequest.js +206 -0
  68. package/dist/services/cherrypickAndCreateTargetPullRequest.test.d.ts +1 -0
  69. package/dist/services/cherrypickAndCreateTargetPullRequest.test.js +403 -0
  70. package/dist/services/getCommits.d.ts +2 -0
  71. package/dist/services/getCommits.js +38 -0
  72. package/dist/services/getCommitsWithoutBackports.d.ts +11 -0
  73. package/dist/services/getCommitsWithoutBackports.js +68 -0
  74. package/dist/services/getCommitsWithoutBackports.test.d.ts +1 -0
  75. package/dist/services/getCommitsWithoutBackports.test.js +259 -0
  76. package/dist/services/getTargetBranches.d.ts +5 -0
  77. package/dist/services/getTargetBranches.js +60 -0
  78. package/dist/services/getTargetBranches.test.d.ts +1 -0
  79. package/dist/services/getTargetBranches.test.js +180 -0
  80. package/dist/services/github/v3/createStatusComment.test.js +35 -0
  81. package/dist/services/maybeSetupRepo.d.ts +2 -0
  82. package/dist/services/maybeSetupRepo.js +33 -0
  83. package/dist/services/maybeSetupRepo.test.d.ts +1 -0
  84. package/dist/services/maybeSetupRepo.test.js +78 -0
  85. package/dist/test/backport-e2e.private.test.d.ts +1 -0
  86. package/dist/test/backport-e2e.private.test.js +327 -0
  87. package/dist/test/handleUnbackportedPullRequests.private.test.d.ts +1 -0
  88. package/dist/test/handleUnbackportedPullRequests.private.test.js +43 -0
  89. package/dist/ui/maybeSetupRepo.test.js +8 -4
  90. package/dist/utils/sequentially.d.ts +1 -0
  91. package/dist/utils/sequentially.js +10 -0
  92. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jest/no-commented-out-tests */
7
+ const os_1 = __importDefault(require("os"));
8
+ const path_1 = require("path");
9
+ const rest_1 = require("@octokit/rest");
10
+ const del = require("del");
11
+ const nock_1 = __importDefault(require("nock"));
12
+ const options_1 = require("../options/options");
13
+ const runSequentially_1 = require("../runSequentially");
14
+ const getCommits_1 = require("../ui/getCommits");
15
+ const mockConfigFiles_1 = require("./mockConfigFiles");
16
+ const nockHelpers_1 = require("./nockHelpers");
17
+ const getDevAccessToken_1 = require("./private/getDevAccessToken");
18
+ jest.unmock('make-dir');
19
+ jest.unmock('del');
20
+ jest.setTimeout(10000);
21
+ const E2E_TEST_DATA_PATH = (0, path_1.resolve)('./src/test/tmp-mock-environments/backport-e2e');
22
+ const HOMEDIR_PATH = (0, path_1.resolve)('./src/test/tmp-mock-environments/backport-e2e/homedir');
23
+ const REPO_OWNER = 'backport-org';
24
+ const REPO_NAME = 'integration-test';
25
+ const BRANCH_NAME = 'backport/7.x/commit-5bf29b7d';
26
+ const AUHTOR = 'sqren';
27
+ describe('backport e2e', () => {
28
+ afterAll(() => {
29
+ nock_1.default.cleanAll();
30
+ });
31
+ beforeAll(() => {
32
+ // set alternative homedir
33
+ jest.spyOn(os_1.default, 'homedir').mockReturnValue(HOMEDIR_PATH);
34
+ (0, mockConfigFiles_1.mockConfigFiles)({
35
+ globalConfig: {},
36
+ projectConfig: {},
37
+ });
38
+ });
39
+ describe('when a single commit is backported', () => {
40
+ let res;
41
+ let accessToken;
42
+ let createPullRequestsMockCalls;
43
+ beforeAll(async () => {
44
+ accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
45
+ await resetState(accessToken);
46
+ createPullRequestsMockCalls = mockCreatePullRequest({
47
+ number: 1337,
48
+ html_url: 'myHtmlUrl',
49
+ });
50
+ const options = await (0, options_1.getOptions)([], {
51
+ githubApiBaseUrlV3: 'https://api.foo.com',
52
+ ci: true,
53
+ sha: '5bf29b7d847ea3dbde9280448f0f62ad0f22d3ad',
54
+ author: AUHTOR,
55
+ accessToken,
56
+ repoOwner: 'backport-org',
57
+ repoName: 'integration-test',
58
+ });
59
+ const commits = await (0, getCommits_1.getCommits)(options);
60
+ const targetBranches = ['7.x'];
61
+ res = await (0, runSequentially_1.runSequentially)({ options, commits, targetBranches });
62
+ });
63
+ it('returns pull request', () => {
64
+ expect(res).toEqual([
65
+ {
66
+ didUpdate: false,
67
+ pullRequestUrl: 'myHtmlUrl',
68
+ pullRequestNumber: 1337,
69
+ status: 'success',
70
+ targetBranch: '7.x',
71
+ },
72
+ ]);
73
+ });
74
+ it('sends the correct http body when creating pull request', () => {
75
+ expect(createPullRequestsMockCalls).toMatchInlineSnapshot(`
76
+ Array [
77
+ Object {
78
+ "base": "7.x",
79
+ "body": "# Backport
80
+
81
+ This is an automatic backport to \`7.x\` of:
82
+ - Add ❤️ emoji (5bf29b7d)
83
+
84
+ ### Questions ?
85
+ Please refer to the [Backport tool documentation](https://github.com/sqren/backport)
86
+ ",
87
+ "head": "sqren:backport/7.x/commit-5bf29b7d",
88
+ "title": "[7.x] Add ❤️ emoji",
89
+ },
90
+ ]
91
+ `);
92
+ });
93
+ it('should not create new branches in origin (backport-org/integration-test)', async () => {
94
+ const branches = await getBranches({
95
+ accessToken,
96
+ repoOwner: REPO_OWNER,
97
+ repoName: REPO_NAME,
98
+ });
99
+ expect(branches.map((b) => b.name)).toEqual(['7.x', 'master']);
100
+ });
101
+ it('should create branch in the fork (sqren/integration-test)', async () => {
102
+ const branches = await getBranches({
103
+ accessToken,
104
+ repoOwner: AUHTOR,
105
+ repoName: REPO_NAME,
106
+ });
107
+ expect(branches.map((b) => b.name)).toEqual([
108
+ '7.x',
109
+ BRANCH_NAME,
110
+ 'master',
111
+ ]);
112
+ });
113
+ it('should have cherry picked the correct commit', async () => {
114
+ const branches = await getBranches({
115
+ accessToken,
116
+ repoOwner: AUHTOR,
117
+ repoName: REPO_NAME,
118
+ });
119
+ const sha = branches.find((branch) => branch.name === '7.x')?.commit.sha;
120
+ expect(sha).toEqual('b68e4fcaaf4427fe1e902c718b3bb3f07b560fb5');
121
+ });
122
+ });
123
+ // describe.skip('when two commits are backported', () => {
124
+ // let createPullRequestsMockCalls: unknown[];
125
+ // let res: Awaited<ReturnType<typeof runSequentially>>;
126
+ // let accessToken: string;
127
+ // beforeAll(async () => {
128
+ // accessToken = await getDevAccessToken();
129
+ // await resetState(accessToken);
130
+ // createPullRequestsMockCalls = mockCreatePullRequest({
131
+ // number: 1337,
132
+ // html_url: 'myHtmlUrl',
133
+ // });
134
+ // const options = {
135
+ // githubApiBaseUrlV3: 'https://api.foo.com',
136
+ // ci: true,
137
+ // sha: '5bf29b7d847ea3dbde9280448f0f62ad0f22d3ad',
138
+ // author: AUHTOR,
139
+ // accessToken,
140
+ // repoOwner: 'backport-org',
141
+ // reponame: 'integration-test',
142
+ // } as ValidConfigOptions;
143
+ // const commits = await getCommits(options);
144
+ // const targetBranches: string[] = ['7.x'];
145
+ // res = await runSequentially({ options, commits, targetBranches });
146
+ // });
147
+ // it('sends the correct http body when creating pull request', () => {
148
+ // expect(createPullRequestsMockCalls).toMatchInlineSnapshot();
149
+ // });
150
+ // it('returns pull request', () => {
151
+ // expect(res).toEqual([
152
+ // { pullRequestUrl: 'myHtmlUrl', success: true, targetBranch: '6.0' },
153
+ // ]);
154
+ // });
155
+ // it('should not create new branches in origin (backport-org/integration-test)', async () => {
156
+ // const branches = await getBranches({
157
+ // accessToken,
158
+ // repoOwner: REPO_OWNER,
159
+ // repoName: REPO_NAME,
160
+ // });
161
+ // expect(branches.map((b) => b.name)).toEqual(['7.x', '* master']);
162
+ // });
163
+ // it('should create branch in the fork (sqren/integration-test)', async () => {
164
+ // const branches = await getBranches({
165
+ // accessToken,
166
+ // repoOwner: AUHTOR,
167
+ // repoName: REPO_NAME,
168
+ // });
169
+ // expect(branches.map((b) => b.name)).toEqual([
170
+ // '7.x',
171
+ // 'backport/6.0/pr-85_commit-2e63475c',
172
+ // 'master',
173
+ // ]);
174
+ // });
175
+ // it('should have cherry picked the correct commit', async () => {
176
+ // const branches = await getBranches({
177
+ // accessToken,
178
+ // repoOwner: AUHTOR,
179
+ // repoName: REPO_NAME,
180
+ // });
181
+ // const sha = branches.find((branch) => branch.name === '7.x')?.commit.sha;
182
+ // expect(sha).toEqual('foo');
183
+ // });
184
+ // });
185
+ describe('when disabling fork mode', () => {
186
+ let res;
187
+ let accessToken;
188
+ let createPullRequestsMockCalls;
189
+ beforeAll(async () => {
190
+ accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
191
+ await resetState(accessToken);
192
+ createPullRequestsMockCalls = mockCreatePullRequest({
193
+ number: 1337,
194
+ html_url: 'myHtmlUrl',
195
+ });
196
+ const options = await (0, options_1.getOptions)([], {
197
+ author: AUHTOR,
198
+ githubApiBaseUrlV3: 'https://api.foo.com',
199
+ ci: true,
200
+ sha: '5bf29b7d847ea3dbde9280448f0f62ad0f22d3ad',
201
+ accessToken,
202
+ repoOwner: 'backport-org',
203
+ repoName: 'integration-test',
204
+ fork: false,
205
+ });
206
+ const commits = await (0, getCommits_1.getCommits)(options);
207
+ const targetBranches = ['7.x'];
208
+ res = await (0, runSequentially_1.runSequentially)({ options, commits, targetBranches });
209
+ });
210
+ it('sends the correct http body when creating pull request', () => {
211
+ expect(createPullRequestsMockCalls).toMatchInlineSnapshot(`
212
+ Array [
213
+ Object {
214
+ "base": "7.x",
215
+ "body": "# Backport
216
+
217
+ This is an automatic backport to \`7.x\` of:
218
+ - Add ❤️ emoji (5bf29b7d)
219
+
220
+ ### Questions ?
221
+ Please refer to the [Backport tool documentation](https://github.com/sqren/backport)
222
+ ",
223
+ "head": "backport-org:backport/7.x/commit-5bf29b7d",
224
+ "title": "[7.x] Add ❤️ emoji",
225
+ },
226
+ ]
227
+ `);
228
+ });
229
+ it('returns pull request', () => {
230
+ expect(res).toEqual([
231
+ {
232
+ didUpdate: false,
233
+ pullRequestNumber: 1337,
234
+ pullRequestUrl: 'myHtmlUrl',
235
+ status: 'success',
236
+ targetBranch: '7.x',
237
+ },
238
+ ]);
239
+ });
240
+ it('should create new branches in origin (backport-org/integration-test)', async () => {
241
+ const branches = await getBranches({
242
+ accessToken,
243
+ repoOwner: REPO_OWNER,
244
+ repoName: REPO_NAME,
245
+ });
246
+ expect(branches.map((b) => b.name)).toEqual([
247
+ '7.x',
248
+ BRANCH_NAME,
249
+ 'master',
250
+ ]);
251
+ });
252
+ it('should NOT create branch in the fork (sqren/integration-test)', async () => {
253
+ const branches = await getBranches({
254
+ accessToken,
255
+ repoOwner: AUHTOR,
256
+ repoName: REPO_NAME,
257
+ });
258
+ expect(branches.map((b) => b.name)).toEqual(['7.x', 'master']);
259
+ });
260
+ it('should cherry pick the correct commit', async () => {
261
+ const branches = await getBranches({
262
+ accessToken,
263
+ repoOwner: REPO_OWNER,
264
+ repoName: REPO_NAME,
265
+ });
266
+ const sha = branches.find((branch) => branch.name === '7.x')?.commit.sha;
267
+ expect(sha).toEqual('b68e4fcaaf4427fe1e902c718b3bb3f07b560fb5');
268
+ });
269
+ });
270
+ });
271
+ function mockCreatePullRequest(response) {
272
+ const scope = (0, nock_1.default)('https://api.foo.com', { allowUnmocked: true })
273
+ .post('/repos/backport-org/integration-test/pulls')
274
+ .reply(200, response);
275
+ return (0, nockHelpers_1.listenForCallsToNockScope)(scope);
276
+ }
277
+ async function getBranches({ accessToken, repoOwner, repoName, }) {
278
+ // console.log(`fetch branches for ${repoOwner}`);
279
+ const octokit = new rest_1.Octokit({
280
+ auth: accessToken,
281
+ });
282
+ const res = await octokit.repos.listBranches({
283
+ owner: repoOwner,
284
+ repo: repoName,
285
+ });
286
+ return res.data;
287
+ }
288
+ async function deleteBranch({ accessToken, repoOwner, repoName, branchName, }) {
289
+ try {
290
+ const octokit = new rest_1.Octokit({
291
+ auth: accessToken,
292
+ });
293
+ // console.log({ accessToken });
294
+ const opts = {
295
+ owner: repoOwner,
296
+ repo: repoName,
297
+ ref: `heads/${branchName}`,
298
+ };
299
+ const res = await octokit.git.deleteRef(opts);
300
+ // console.log(`Deleted ${repoOwner}:heads/${branchName}`);
301
+ return res.data;
302
+ }
303
+ catch (e) {
304
+ // console.log(
305
+ // `Could not delete ${repoOwner}:heads/${branchName} (${e.message})`
306
+ // );
307
+ if (e.message === 'Reference does not exist') {
308
+ return;
309
+ }
310
+ throw e;
311
+ }
312
+ }
313
+ async function resetState(accessToken) {
314
+ await deleteBranch({
315
+ accessToken,
316
+ repoOwner: REPO_OWNER,
317
+ repoName: REPO_NAME,
318
+ branchName: BRANCH_NAME,
319
+ });
320
+ await deleteBranch({
321
+ accessToken,
322
+ repoOwner: AUHTOR,
323
+ repoName: REPO_NAME,
324
+ branchName: BRANCH_NAME,
325
+ });
326
+ await del(E2E_TEST_DATA_PATH);
327
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path_1 = require("path");
4
+ const entrypoint_module_1 = require("../entrypoint.module");
5
+ const getDevAccessToken_1 = require("./private/getDevAccessToken");
6
+ jest.unmock('find-up');
7
+ jest.setTimeout(15000);
8
+ describe('Handle unbackported pull requests', () => {
9
+ it('shows missing backports for PR number 8', async () => {
10
+ const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
11
+ const commits = await (0, entrypoint_module_1.getCommits)({
12
+ accessToken: accessToken,
13
+ repoOwner: 'backport-org',
14
+ repoName: 'repo-with-conflicts',
15
+ pullNumber: 8,
16
+ });
17
+ expect(commits[0]).toEqual({
18
+ committedDate: '2021-12-16T00:03:34Z',
19
+ expectedTargetPullRequests: [{ branch: '7.x', state: 'MISSING' }],
20
+ originalMessage: 'Change Barca to Braithwaite (#8)',
21
+ pullNumber: 8,
22
+ pullUrl: 'https://github.com/backport-org/repo-with-conflicts/pull/8',
23
+ sha: '343402a748be2375325b2730fa979bcea5b96ba1',
24
+ sourceBranch: 'main',
25
+ });
26
+ });
27
+ it('shows that backport failed because PR number 8 was not backported', async () => {
28
+ const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
29
+ const result = await (0, entrypoint_module_1.backportRun)({
30
+ accessToken: accessToken,
31
+ repoOwner: 'backport-org',
32
+ repoName: 'repo-with-conflicts',
33
+ pullNumber: 12,
34
+ targetBranches: ['7.x'],
35
+ dir: (0, path_1.resolve)('./src/test/tmp-mock-environments/handleUnbackportedPullRequests'),
36
+ ci: true,
37
+ publishStatusComment: false,
38
+ });
39
+ expect(
40
+ //@ts-expect-error
41
+ result.results[0].error.meta?.commitsWithoutBackports[0].commit.pullNumber).toBe(8);
42
+ });
43
+ });
@@ -24,7 +24,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  const os_1 = __importDefault(require("os"));
26
26
  const del_1 = __importDefault(require("del"));
27
- const makeDir = require("make-dir");
28
27
  const childProcess = __importStar(require("../services/child-process-promisified"));
29
28
  const fs = __importStar(require("../services/fs-promisified"));
30
29
  const maybeSetupRepo_1 = require("./maybeSetupRepo");
@@ -38,15 +37,20 @@ describe('maybeSetupRepo', () => {
38
37
  });
39
38
  it('should delete repo if an error occurs', async () => {
40
39
  expect.assertions(2);
41
- makeDir.mockImplementationOnce(() => {
42
- throw new Error('makeDir failed');
40
+ execSpy = jest
41
+ .spyOn(childProcess, 'execAsCallback')
42
+ .mockImplementation((cmd) => {
43
+ if (cmd.startsWith('git clone')) {
44
+ throw new Error('Simulated git clone failure');
45
+ }
46
+ throw new Error('unknown error');
43
47
  });
44
48
  await expect((0, maybeSetupRepo_1.maybeSetupRepo)({
45
49
  accessToken: 'myAccessToken',
46
50
  gitHostname: 'github.com',
47
51
  repoName: 'kibana',
48
52
  repoOwner: 'elastic',
49
- })).rejects.toThrowError('makeDir failed');
53
+ })).rejects.toThrowError('Simulated git clone failure');
50
54
  expect(del_1.default).toHaveBeenCalledWith('/myHomeDir/.backport/repositories/elastic/kibana');
51
55
  });
52
56
  describe('if repo already exists', () => {
@@ -0,0 +1 @@
1
+ export declare function sequentially<T>(items: T[], handler: (item: T) => Promise<void>): Promise<void>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sequentially = void 0;
4
+ function sequentially(items, handler) {
5
+ return items.reduce(async (p, item) => {
6
+ await p;
7
+ return handler(item);
8
+ }, Promise.resolve());
9
+ }
10
+ exports.sequentially = sequentially;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "branches",
15
15
  "branching"
16
16
  ],
17
- "version": "6.1.5",
17
+ "version": "6.2.0",
18
18
  "main": "./dist/entrypoint.module.js",
19
19
  "types": "dist/entrypoint.module.d.ts",
20
20
  "bin": {