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

deps: bump @nestjs/throttler from 3.1.0 to 4.0.0 in /apps/uploader-service #645

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Jan 23, 2023

Bumps @nestjs/throttler from 3.1.0 to 4.0.0.

Release notes

Sourced from @​nestjs/throttler's releases.

v4.0.0

Major Changes

  • 4803dda: Rewrite the storage service to better handle large numbers of operations

    Why

    The initial behavior was that getRecord() returned an list of sorted TTL timestamps, then if it didn't reach the limit, it will call addRecord(). This change was made based on the use of the Redis storage community package where it was found how to prevent this issue. It was found out that express-rate-limit is incrementing a single number and returning the information in a single roundtrip, which is significantly faster than how NestJS throttler works by called getRecord(), then addRecord.

    Breaking Changes

    • removed getRecord
    • addRecord(key: string, ttl: number): Promise<number[]>; changes to increment(key: string, ttl: number): Promise<ThrottlerStorageRecord>;

    How to Migrate

    If you are just using the throttler library, you're already covered. No changes necessary to your code, version 4.0.0 will work as is.

    If you are providing a custom storage, you will need to remove your current service's getRecord method and rename addRecord to incremenet while adhering to the new interface and returning an ThrottlerStorageRecord object

Changelog

Sourced from @​nestjs/throttler's changelog.

4.0.0

Major Changes

  • 4803dda: Rewrite the storage service to better handle large numbers of operations

    Why

    The initial behavior was that getRecord() returned an list of sorted TTL timestamps, then if it didn't reach the limit, it will call addRecord(). This change was made based on the use of the Redis storage community package where it was found how to prevent this issue. It was found out that express-rate-limit is incrementing a single number and returning the information in a single roundtrip, which is significantly faster than how NestJS throttler works by called getRecord(), then addRecord.

    Breaking Changes

    • removed getRecord
    • addRecord(key: string, ttl: number): Promise<number[]>; changes to increment(key: string, ttl: number): Promise<ThrottlerStorageRecord>;

    How to Migrate

    If you are just using the throttler library, you're already covered. No changes necessary to your code, version 4.0.0 will work as is.

    If you are providing a custom storage, you will need to remove your current service's getRecord method and rename addRecord to incremenet while adhering to the new interface and returning an ThrottlerStorageRecord object

Commits
  • f8a1be2 chore: version packages
  • 4803dda chore: add changeset file for 4.0.0
  • 99e2ed7 fix(throttler-storage-record): adjust incorrect const name
  • 49fa003 test(guard): make the get-expiration-time method private
  • 389c32d test(controller): adjust regex to only require whole numbers
  • 552f81a feat: create additional interfaces for extensibility and refactor code
  • 10db85e fix(service): make the time-to-expire dynamic
  • e97f992 docs(throttler-storage interface): change expiration typo to expires
  • 3ebadd6 docs(readme): update the throttler storage interface definition
  • cf33dc1 test(guard): updated guard tests
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@nestjs/throttler](https://github.com/nestjs/throttler) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/nestjs/throttler/releases)
- [Changelog](https://github.com/nestjs/throttler/blob/master/CHANGELOG.md)
- [Commits](nestjs/throttler@v3.1.0...v4.0.0)

---
updated-dependencies:
- dependency-name: "@nestjs/throttler"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 23, 2023
@vercel
Copy link

vercel bot commented Jan 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
beg-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 23, 2023 at 5:22AM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants