Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency slonik to v45 #1937

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 13, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
slonik ^40.0.0 -> ^45.0.0 age adoption passing confidence

Release Notes

gajus/slonik (slonik)

v45.2.1

Compare Source

Patch Changes

v45.2.0

Compare Source

Patch Changes

v45.1.0

Compare Source

Patch Changes

v45.0.0

Compare Source

Minor Changes
  • 5525659 Thanks @​gajus! - * fixes TypeScript error due to clashing "cause" property in Error object (#​567)
    • protects against unsafe invocation of sql.fragment (#​602)
    • correct manyFirst example in README (#​600)
Patch Changes

v44.0.0

Compare Source

Major Changes
  • 96db9f0 Thanks @​gajus! - Convert token types to symbols to ensures that SQL tokens cannot be injected from outside of the codebase, e.g. through JSON.

    Thanks to @​alxndrsn for reporting the issue and suggesting patch (#​595).

    Thanks to @​danielrearden for suggesting a viable patch.

Patch Changes

v43.0.8

Compare Source

Patch Changes

v43.0.7

Compare Source

Patch Changes

v43.0.6

Compare Source

Patch Changes

v43.0.5

Compare Source

Patch Changes

v43.0.4

Compare Source

Patch Changes

v43.0.3

Compare Source

Patch Changes

v43.0.2

Compare Source

Patch Changes

v43.0.1

Compare Source

Patch Changes

v43.0.0

Compare Source

Minor Changes
Patch Changes

v42.0.0

Compare Source

Minor Changes
Patch Changes

v41.2.1

Compare Source

v41.2.0

Compare Source

v41.1.0

Compare Source

v41.0.1

Compare Source

The fix is in this commit: gajus/slonik@0e83bc1

It shows how simultaneously releasing and ending the pool could have resulted in termination sequence proceeding without waiting for release sequence to complete. The symptom of this would have been an error that complains about an attempt to use a terminated backend.

Shoutout to @​mikeroelens for going above and beyond to chase down the root of the issue and suggest a fix and context that led to replicating the mysterious behavior. 🥳

v41.0.0

Compare Source

New Slonik behavior means that you can no longer accidentally run a non-transaction query inside of a transaction.

If you receive an error UnexpectedForeignConnectionError, then you are trying to execute a query using a connection that is not associated with the transaction. This error is thrown to prevent accidental unsafe transaction handling, e.g.

connection.transaction(async (transactionConnection) => {
  await connection.query(sql.typeAlias('void')`INSERT INTO foo (bar) VALUES ('baz')`);
});

In this example, the query is executed using the connection that is not associated with the transaction. This is unsafe because the query is not part of the transaction and will not be rolled back if the transaction is aborted.

This behavior is achieved using AsyncLocalContext.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

@codecov codecov bot left a comment

Choose a reason for hiding this comment

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

The code review is centered on a minor version update for the slonik package in the project's dependencies. While not a massive change, it's important to verify compatibility with the other parts of the codebase that interact with this package.

@@ -25,7 +25,7 @@
"pg": "^8.11.5",
"pg-hstore": "^2.3.4",
"sequelize": "^6.37.3",
"slonik": "^40.0.0",
"slonik": "^45.0.0",
Copy link

Choose a reason for hiding this comment

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

The slonik package has been upgraded from '^40.0.0' to '^45.0.0'. Please ensure the update doesn't introduce breaking changes that could affect the existing implementation and confirm that there was sufficient testing in place to verify the updated functionality.

Copy link
Contributor

coderabbitai bot commented May 13, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@codecov codecov bot left a comment

Choose a reason for hiding this comment

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

All changes in this diff are related to updating the version of slonik package from ^40.0.0 to ^45.0.0 in the package.json file of the /database package. The change is likely done for newest features, bug fixes or security patches, which is a good practice. Adding or changing a version for any library should not be done lightly. It is always recommended to consult the changelog or documentation to understand what the changes are. Depending on the version update, there might be breaking changes introduced and this needs to be thoroughly tested.

@@ -25,7 +25,7 @@
"pg": "^8.11.5",
"pg-hstore": "^2.3.4",
"sequelize": "^6.37.3",
"slonik": "^40.0.0",
"slonik": "^45.0.0",
Copy link

@codecov codecov bot May 13, 2024

Choose a reason for hiding this comment

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

You have updated the version of slonik from 40.0.0 to 45.0.0. This is a major version change and might include breaking changes according to semantic versioning principles. While updating dependencies is essential for security and leveraging new features, it is crucial to ensure that this update does not break existing functionality. Please ensure adequate testing is conducted to cover the database operations this package is responsible for.

Copy link

deepsource-io bot commented May 13, 2024

Here's the code health analysis summary for commits 5a736b2..1fa79dd. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

socket-security bot commented May 13, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/slonik@45.5.0 Transitive: environment +28 1.45 MB gajus

🚮 Removed packages: npm/slonik@40.2.6

View full report↗︎

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.74%. Comparing base (5a736b2) to head (1fa79dd).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1937   +/-   ##
=====================================
  Coverage   9.74%   9.74%           
=====================================
  Files        133     133           
  Lines       9730    9730           
  Branches     131     141   +10     
=====================================
  Hits         948     948           
  Misses      8782    8782           
Flag Coverage Δ
cli 0.00% <ø> (ø)
connection 25.66% <ø> (ø)
database 9.70% <ø> (ø)
gateway 41.48% <ø> (ø)
mcots 0.00% <ø> (ø)
nps 0.00% <ø> (ø)
patch 86.08% <ø> (ø)
schema 0.00% <ø> (ø)
shard 41.47% <ø> (ø)
shared 13.44% <ø> (ø)
shared-packets 0.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@codecov codecov bot left a comment

Choose a reason for hiding this comment

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

CodecovAI submitted a new review for 82db26f

@@ -25,7 +25,7 @@
"pg": "^8.11.5",
"pg-hstore": "^2.3.4",
"sequelize": "^6.37.3",
"slonik": "^40.0.0",
Copy link

Choose a reason for hiding this comment

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

The version update of slonik is quite significant. Have you checked if there are any breaking changes between version 40.0.0 and 45.0.0? If there are, they could cause unexpected behaviors in our application if not properly addressed.

@renovate renovate bot force-pushed the renovate/slonik-45.x branch 5 times, most recently from 2545e2b to 5e40a54 Compare May 24, 2024 19:27
Copy link

@codecov codecov bot left a comment

Choose a reason for hiding this comment

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

CodecovAI submitted a new review for 5e40a54

@@ -25,7 +25,7 @@
"pg": "^8.11.5",
Copy link

@codecov codecov bot May 24, 2024

Choose a reason for hiding this comment

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

Check the compatibility of the updated Slonik package with the 'pg' package. Minor or patch updates may be needed to ensure compatibility.

@renovate renovate bot force-pushed the renovate/slonik-45.x branch 2 times, most recently from 6716d43 to 7c9f22c Compare May 29, 2024 19:38
Copy link

@codecov codecov bot left a comment

Choose a reason for hiding this comment

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

CodecovAI submitted a new review for b748e64

@@ -25,7 +25,7 @@
"pg": "^8.11.5",
"pg-hstore": "^2.3.4",
"sequelize": "^6.37.3",
Copy link

Choose a reason for hiding this comment

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

Ensure the sequelize package is compatible with the new Slonik version. In case of conflict, update or downgrade to a suitable version.

@renovate renovate bot force-pushed the renovate/slonik-45.x branch 2 times, most recently from dc3c0bd to 4abc84c Compare June 3, 2024 19:16
@drazisil drazisil enabled auto-merge June 3, 2024 19:17
@renovate renovate bot force-pushed the renovate/slonik-45.x branch 3 times, most recently from e4a236b to 234ba30 Compare June 3, 2024 19:24
Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@drazisil drazisil merged commit 72bd27c into main Jun 5, 2024
14 checks passed
@drazisil drazisil deleted the renovate/slonik-45.x branch June 5, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant