Socket
Socket
Sign inDemoInstall

@nestjs/throttler

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/throttler - npm Package Versions

13

5.0.0

Diff

Changelog

Source

5.0.0

nestjscore
published 4.2.1 •

Changelog

Source

4.2.1

Patch Changes

  • b72c9cb: Revert resolvable properties for ttl and limit

    The resolvable properties made a breaking change for custom guards that was unforseen. This reverts it and schedules the changes for 5.0.0 instead

nestjscore
published 4.2.0 •

Changelog

Source

4.2.0

Minor Changes

  • d8d8c93: Allow for ttl and limit to be set based on the execution context, instead of statically assigned for the entire application
nestjscore
published 4.1.0 •

Changelog

Source

4.1.0

Minor Changes

  • 527d51c: Support Nest v10
nestjscore
published 4.0.0 •

Changelog

Source

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

nestjscore
published 3.1.0 •

Changelog

Source

3.1.0

Minor Changes

  • da3c950: Add skipIf option to throttler module options

    With the new option, you can pass a factory to skipIf and determine if the throttler guard should be used in the first palce or not. This acts just like applying @SkipThrottle() to every route, but can be customized to work off of the process.env or ExecutionContext object to provide better support for dev and QA environments.

nestjscore
published 3.0.0 •

Changelog

Source

3.0.0

Major Changes

  • c9fcd51: Upgrade nest version to v9. No breaking changes in direct code, but in nest v9 upgrade
nestjscore
published 2.0.1 •

Changelog

Source

2.0.1

Patch Changes

  • cf50808: fix memory leak for timeoutIds array. Before this, the timeoutIds array would not be trimmed and would grow until out of memory. Now ids are properly removed on timeout.

Features

  • adding in a comment about version (b13bf53)

BREAKING CHANGES

  • v2 and above is now being developed specificially for nest v8 and could have some unforseen side effects with Nest v7. use with v7 at your own risk.
nestjscore
published 2.0.0 •

nestjscore
published 1.2.1 •

Changelog

Source

1.2.1 (2021-07-09)

Performance Improvements

Bug Fixes

  • module: async register is now forRootAsync (a1c6ace)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc