Comparing version 3.0.3 to 3.0.4
# Changelog | ||
## v3.0.4 - 2023-09-18 | ||
### Maintenance | ||
- Improved documentation about generator's clock rollback behavior | ||
- Updated dev dependencies | ||
## v3.0.3 - 2023-08-01 | ||
@@ -4,0 +11,0 @@ |
@@ -173,3 +173,3 @@ /** | ||
* @remarks | ||
* The generator offers four different methods to generate a SCRU128 ID: | ||
* The generator comes with four different methods that generate a SCRU128 ID: | ||
* | ||
@@ -183,9 +183,12 @@ * | Flavor | Timestamp | On big clock rewind | | ||
* | ||
* All of these methods return monotonically increasing IDs unless a `timestamp` | ||
* provided is significantly (by default, more than ten seconds) smaller than | ||
* the one embedded in the immediately preceding ID. If such a significant clock | ||
* rollback is detected, the `generate` (OrReset) method resets the generator | ||
* and returns a new ID based on the given `timestamp`, while the `OrAbort` | ||
* variants abort and return `undefined`. The `Core` functions offer low-level | ||
* primitives. | ||
* All of the four return a monotonically increasing ID by reusing the previous | ||
* `timestamp` even if the one provided is smaller than the immediately | ||
* preceding ID's. However, when such a clock rollback is considered significant | ||
* (by default, more than ten seconds): | ||
* | ||
* 1. `generate` (OrReset) methods reset the generator and return a new ID based | ||
* on the given `timestamp`, breaking the increasing order of IDs. | ||
* 2. `OrAbort` variants abort and return `undefined` immediately. | ||
* | ||
* The `Core` functions offer low-level primitives to customize the behavior. | ||
*/ | ||
@@ -192,0 +195,0 @@ export declare class Scru128Generator { |
@@ -381,3 +381,3 @@ /** | ||
* @remarks | ||
* The generator offers four different methods to generate a SCRU128 ID: | ||
* The generator comes with four different methods that generate a SCRU128 ID: | ||
* | ||
@@ -391,9 +391,12 @@ * | Flavor | Timestamp | On big clock rewind | | ||
* | ||
* All of these methods return monotonically increasing IDs unless a `timestamp` | ||
* provided is significantly (by default, more than ten seconds) smaller than | ||
* the one embedded in the immediately preceding ID. If such a significant clock | ||
* rollback is detected, the `generate` (OrReset) method resets the generator | ||
* and returns a new ID based on the given `timestamp`, while the `OrAbort` | ||
* variants abort and return `undefined`. The `Core` functions offer low-level | ||
* primitives. | ||
* All of the four return a monotonically increasing ID by reusing the previous | ||
* `timestamp` even if the one provided is smaller than the immediately | ||
* preceding ID's. However, when such a clock rollback is considered significant | ||
* (by default, more than ten seconds): | ||
* | ||
* 1. `generate` (OrReset) methods reset the generator and return a new ID based | ||
* on the given `timestamp`, breaking the increasing order of IDs. | ||
* 2. `OrAbort` variants abort and return `undefined` immediately. | ||
* | ||
* The `Core` functions offer low-level primitives to customize the behavior. | ||
*/ | ||
@@ -400,0 +403,0 @@ export class Scru128Generator { |
{ | ||
"name": "scru128", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "SCRU128: Sortable, Clock and Random number-based Unique identifier", | ||
@@ -41,5 +41,5 @@ "type": "module", | ||
"mocha": "^10.2.0", | ||
"typedoc": "^0.24.8", | ||
"typescript": "^5.1.6" | ||
"typedoc": "^0.25.1", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
51933
895