Skip to content

Conversation

aldenquimby
Copy link
Contributor

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Background

Proposal

Alternatives

  • If there's a way to configure esbuild similar to the webpack commonjsMagicComments, that should do the trick
  • However the proposed solution in this PR seems more robust, especially as more bundlers/minifiers are gaining traction

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aldenquimby!

return;
}

const { Client } = this._usePgNative ? pkg.native : pkg;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg.native?.Client is now nullable to align with @types/pg. Unfortunately TS is not great with multiple boolean conditions. The changes here were the least disruptive I could come up with

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) October 12, 2023 13:31
@AbhiPrasad AbhiPrasad merged commit e507110 into getsentry:develop Oct 12, 2023
@aldenquimby aldenquimby deleted the pg-module branch October 12, 2023 17:49
@AbhiPrasad
Copy link
Member

Released with https://github.com/getsentry/sentry-javascript/releases/tag/7.74.0!

@aldenquimby
Copy link
Contributor Author

@AbhiPrasad thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants