balena-io / pinejs

Generate rest APIs from natural language models
Apache License 2.0
62 stars 10 forks source link

Deprecate LoggingClient in favor of a separate logger dictionary #757

Closed Page- closed 4 months ago

Page- commented 4 months ago

Change-type: patch

joshbwlng commented 4 months ago

Looks like somethings going wrong at runtime:

 Exception during run: TypeError: Cannot read properties of undefined (reading 'migrations')
    at Object.<anonymous> (/home/runner/work/pinejs/pinejs/src/migrator/async.ts:31:19)
Page- commented 4 months ago

@joshbwlng it must be because I changed (sbvrUtils.api?.migrations?.logger.info ?? console.info)( to remove that first ? because the variable is immediately declared so should never be able to be undefined.. I'm guessing it's because of import ordering and cyclic dependencies so I've put that ? back and assuming it'll be fixed when moving to ESM (because it'll either just work or break until it's fixed properly)