googleapis / nodejs-logging-winston

Node.js client integration between Stackdriver Logging and Winston.
https://cloud.google.com/logging/
Apache License 2.0
105 stars 50 forks source link

Avoid using require to read package version #761

Closed dzbarsky closed 1 year ago

dzbarsky commented 1 year ago

Using this library with Webpack and yarn PnP results in the following warning:

../../../.yarn/__virtual__/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/common.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
../../../.yarn/__virtual__/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/common.js
../../../.yarn/__virtual__/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/index.js

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Fixes #762

dzbarsky commented 1 year ago

Sounds great, thanks!