You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And, searching code from the initial commit for await it does appear to not be necessary: 1e02b72
I assume it's there to reserve the capability to use await should it be necessary in the future.
Could I create a PR which creates an alias, createWriteStreamSync which simply doesn't have the async keyword?
Code will end up looking something like:
functioncreateWriteStreamBase(){// ... }// This forces callers to use `await` which in turn will allow us to use `await` should we need to in the future (without causing any breaking changes)exportconstcreateWriteStream=async(...args)=>createWriteStreamBase(...args)// Should `createWriteStream` need to resolve asynchronously in the future, this method may be removed.exportconstcreateWriteStreamSync=createWriteStreamBase
Although breaking changes of course always keep code cleaner, this library is small, doesn't have a ton of users, so I think breaking changes may be preferable in this scenario.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
next-logger expects to resolve a
logger
function synchronously, without needing toawait
anything. (sainsburys-tech/next-logger#12)I see that
createWriteStream
does not actually use theawait
keyword: https://github.com/ovhemert/pino-applicationinsights/blame/d85e7426d2f7fe6cb45557631bac6eba26cd2b41/src/index.js#L7And, searching code from the
initial commit
forawait
it does appear to not be necessary: 1e02b72I assume it's there to reserve the capability to use
await
should it be necessary in the future.Could I create a PR which creates an alias,
createWriteStreamSync
which simply doesn't have the async keyword?Code will end up looking something like:
Although breaking changes of course always keep code cleaner, this library is small, doesn't have a ton of users, so I think breaking changes may be preferable in this scenario.
The text was updated successfully, but these errors were encountered: