Skip to content

Commit 6ce9f56

Browse files
authored
Bump NPM packages (#39)
1 parent 7e48b25 commit 6ce9f56

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

dist/index.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4473,13 +4473,28 @@ var import_graphql = __nccwpck_require__(7);
44734473
var import_auth_token = __nccwpck_require__(7864);
44744474

44754475
// pkg/dist-src/version.js
4476-
var VERSION = "5.2.1";
4476+
var VERSION = "5.2.2";
44774477

44784478
// pkg/dist-src/index.js
44794479
var noop = () => {
44804480
};
44814481
var consoleWarn = console.warn.bind(console);
44824482
var consoleError = console.error.bind(console);
4483+
function createLogger(logger = {}) {
4484+
if (typeof logger.debug !== "function") {
4485+
logger.debug = noop;
4486+
}
4487+
if (typeof logger.info !== "function") {
4488+
logger.info = noop;
4489+
}
4490+
if (typeof logger.warn !== "function") {
4491+
logger.warn = consoleWarn;
4492+
}
4493+
if (typeof logger.error !== "function") {
4494+
logger.error = consoleError;
4495+
}
4496+
return logger;
4497+
}
44834498
var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
44844499
var Octokit = class {
44854500
static {
@@ -4553,15 +4568,7 @@ var Octokit = class {
45534568
}
45544569
this.request = import_request.request.defaults(requestDefaults);
45554570
this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);
4556-
this.log = Object.assign(
4557-
{
4558-
debug: noop,
4559-
info: noop,
4560-
warn: consoleWarn,
4561-
error: consoleError
4562-
},
4563-
options.log
4564-
);
4571+
this.log = createLogger(options.log);
45654572
this.hook = hook;
45664573
if (!options.authStrategy) {
45674574
if (!options.auth) {

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)