File tree Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -4473,13 +4473,28 @@ var import_graphql = __nccwpck_require__(7);
44734473var 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
44794479var noop = () => {
44804480};
44814481var consoleWarn = console.warn.bind(console);
44824482var 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+ }
44834498var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
44844499var 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) {
You can’t perform that action at this time.
0 commit comments