diff --git a/CHANGELOG.md b/CHANGELOG.md index e90df7d4..ff78c5ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [v1.17.7] - 2022-03-13 + +[Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.7) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.6...v1.17.7) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.7) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.7.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.7.tar.gz)) + +### Dependency updates + +- [`c17e3fc`](https://github.com/betahuhn/repo-file-sync-action/commit/c17e3fc) Bump action-input-parser from 1.2.27 to 1.2.28 + ## [v1.17.6] - 2022-03-07 [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.6) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.5...v1.17.6) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.6) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.tar.gz)) diff --git a/dist/index.js b/dist/index.js index 7c851a85..5b121e46 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3994,7 +3994,7 @@ function _defineProperty(obj, key, value) { return obj; } -const VERSION = "3.5.2"; +const VERSION = "3.6.1"; const noop = () => Promise.resolve(); // @ts-ignore @@ -4145,21 +4145,21 @@ function throttling(octokit, octokitOptions = {}) { const state = Object.assign(_objectSpread2({ clustering: connection != null, triggersNotification, - minimumAbuseRetryAfter: 5, + minimumSecondaryRateRetryAfter: 5, retryAfterBaseValue: 1000, retryLimiter: new Bottleneck(), id }, groups), // @ts-ignore octokitOptions.throttle); - if (typeof state.onAbuseLimit !== "function" || typeof state.onRateLimit !== "function") { + if (typeof state.onSecondaryRateLimit !== "function" && typeof state.onAbuseLimit !== "function" || typeof state.onRateLimit !== "function") { throw new Error(`octokit/plugin-throttling error: - You must pass the onAbuseLimit and onRateLimit error handlers. + You must pass the onSecondaryRateLimit and onRateLimit error handlers. See https://github.com/octokit/rest.js#throttling const octokit = new Octokit({ throttle: { - onAbuseLimit: (retryAfter, options) => {/* ... */}, + onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, onRateLimit: (retryAfter, options) => {/* ... */} } }) @@ -4169,11 +4169,14 @@ function throttling(octokit, octokitOptions = {}) { const events = {}; const emitter = new Bottleneck.Events(events); // @ts-ignore - events.on("abuse-limit", state.onAbuseLimit); // @ts-ignore + events.on("secondary-limit", state.onSecondaryRateLimit || function (...args) { + octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"); + return state.onAbuseLimit(...args); + }); // @ts-ignore events.on("rate-limit", state.onRateLimit); // @ts-ignore - events.on("error", e => console.warn("Error in throttling-plugin limit handler", e)); // @ts-ignore + events.on("error", e => octokit.log.warn("Error in throttling-plugin limit handler", e)); // @ts-ignore state.retryLimiter.on("failed", async function (error, info) { const options = info.args[info.args.length - 1]; @@ -4193,12 +4196,12 @@ function throttling(octokit, octokitOptions = {}) { retryAfter } = await async function () { if (/\bsecondary rate\b/i.test(error.message)) { - // The user has hit the abuse rate limit. (REST and GraphQL) - // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#abuse-rate-limits - // The Retry-After header can sometimes be blank when hitting an abuse limit, + // The user has hit the secondary rate limit. (REST and GraphQL) + // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits + // The Retry-After header can sometimes be blank when hitting a secondary rate limit, // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default. - const retryAfter = Math.max(~~error.response.headers["retry-after"], state.minimumAbuseRetryAfter); - const wantRetry = await emitter.trigger("abuse-limit", retryAfter, options, octokit); + const retryAfter = Math.max(~~error.response.headers["retry-after"], state.minimumSecondaryRateRetryAfter); + const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit); return { wantRetry, retryAfter @@ -7723,7 +7726,7 @@ return Promise; /***/ }), -/***/ 3338: +/***/ 9618: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -7895,19 +7898,6 @@ function copyLink (resolvedSrc, dest) { module.exports = copySync -/***/ }), - -/***/ 1135: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = { - copySync: __nccwpck_require__(3338) -} - - /***/ }), /***/ 8834: @@ -8158,7 +8148,8 @@ module.exports = copy const u = (__nccwpck_require__(1463).fromCallback) module.exports = { - copy: u(__nccwpck_require__(8834)) + copy: u(__nccwpck_require__(8834)), + copySync: __nccwpck_require__(9618) } @@ -8294,26 +8285,26 @@ module.exports = { "use strict"; -const file = __nccwpck_require__(2164) -const link = __nccwpck_require__(3797) -const symlink = __nccwpck_require__(2549) +const { createFile, createFileSync } = __nccwpck_require__(2164) +const { createLink, createLinkSync } = __nccwpck_require__(3797) +const { createSymlink, createSymlinkSync } = __nccwpck_require__(2549) module.exports = { // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, + createFile, + createFileSync, + ensureFile: createFile, + ensureFileSync: createFileSync, // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, + createLink, + createLinkSync, + ensureLink: createLink, + ensureLinkSync: createLinkSync, // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync + createSymlink, + createSymlinkSync, + ensureSymlink: createSymlink, + ensureSymlinkSync: createSymlinkSync } @@ -8764,15 +8755,13 @@ module.exports = { // Export promiseified graceful-fs: ...__nccwpck_require__(1176), // Export extra methods: - ...__nccwpck_require__(1135), ...__nccwpck_require__(1335), ...__nccwpck_require__(6970), ...__nccwpck_require__(55), ...__nccwpck_require__(213), ...__nccwpck_require__(8605), - ...__nccwpck_require__(9665), ...__nccwpck_require__(1497), - ...__nccwpck_require__(6570), + ...__nccwpck_require__(1832), ...__nccwpck_require__(3835), ...__nccwpck_require__(7357) } @@ -8830,7 +8819,7 @@ module.exports = { const { stringify } = __nccwpck_require__(5902) -const { outputFileSync } = __nccwpck_require__(6570) +const { outputFileSync } = __nccwpck_require__(1832) function outputJsonSync (file, data, options) { const str = stringify(data, options) @@ -8850,7 +8839,7 @@ module.exports = outputJsonSync const { stringify } = __nccwpck_require__(5902) -const { outputFile } = __nccwpck_require__(6570) +const { outputFile } = __nccwpck_require__(1832) async function outputJson (file, data, options = {}) { const str = stringify(data, options) @@ -8949,20 +8938,22 @@ module.exports.checkPath = function checkPath (pth) { /***/ }), -/***/ 9665: +/***/ 1497: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +const u = (__nccwpck_require__(1463).fromCallback) module.exports = { - moveSync: __nccwpck_require__(6445) + move: u(__nccwpck_require__(2231)), + moveSync: __nccwpck_require__(2047) } /***/ }), -/***/ 6445: +/***/ 2047: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -8970,7 +8961,7 @@ module.exports = { const fs = __nccwpck_require__(7758) const path = __nccwpck_require__(1017) -const copySync = (__nccwpck_require__(1135).copySync) +const copySync = (__nccwpck_require__(1335).copySync) const removeSync = (__nccwpck_require__(7357).removeSync) const mkdirpSync = (__nccwpck_require__(8605).mkdirpSync) const stat = __nccwpck_require__(3901) @@ -9022,20 +9013,6 @@ function moveAcrossDevice (src, dest, overwrite) { module.exports = moveSync -/***/ }), - -/***/ 1497: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(1463).fromCallback) -module.exports = { - move: u(__nccwpck_require__(2231)) -} - - /***/ }), /***/ 2231: @@ -9119,7 +9096,7 @@ module.exports = move /***/ }), -/***/ 6570: +/***/ 1832: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; diff --git a/package-lock.json b/package-lock.json index 1c0d020f..ae09fcb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "repo-file-sync-action", - "version": "1.17.6", + "version": "1.17.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5fc9835e..b893e597 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "repo-file-sync-action", - "version": "1.17.6", + "version": "1.17.7", "description": "GitHub Action to keep files like Action workflows or entire directories in sync between multiple repositories.", "main": "dist/index.js", "scripts": {