Skip to content

Commit

Permalink
v3.0.4 Released
Browse files Browse the repository at this point in the history
Maintenance:

- Improved documentation about generator's clock rollback behavior
- Updated dev dependencies
  • Loading branch information
LiosK committed Sep 18, 2023
2 parents 9118884 + 05f0cfe commit 37f3414
Show file tree
Hide file tree
Showing 16 changed files with 331 additions and 309 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 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

### Maintenance
Expand Down
19 changes: 11 additions & 8 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export declare class Scru128Id {
* ```
*
* @remarks
* The generator offers four different methods to generate a SCRU128 ID:
* The generator comes with four different methods that generate a SCRU128 ID:
*
* | Flavor | Timestamp | On big clock rewind |
* | --------------------------- | --------- | ------------------- |
Expand All @@ -179,13 +179,16 @@ export declare class Scru128Id {
* | {@link generateOrResetCore} | Argument | Resets generator |
* | {@link generateOrAbortCore} | Argument | Returns `undefined` |
*
* 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.
*/
export declare class Scru128Generator {
private timestamp;
Expand Down
19 changes: 11 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export class Scru128Id {
* ```
*
* @remarks
* The generator offers four different methods to generate a SCRU128 ID:
* The generator comes with four different methods that generate a SCRU128 ID:
*
* | Flavor | Timestamp | On big clock rewind |
* | --------------------------- | --------- | ------------------- |
Expand All @@ -387,13 +387,16 @@ export class Scru128Id {
* | {@link generateOrResetCore} | Argument | Resets generator |
* | {@link generateOrAbortCore} | Argument | Returns `undefined` |
*
* 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.
*/
export class Scru128Generator {
/**
Expand Down
7 changes: 4 additions & 3 deletions docs/assets/main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 26 additions & 10 deletions docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
--light-color-ts-accessor: var(--light-color-ts-property);
--light-color-ts-get-signature: var(--light-color-ts-accessor);
--light-color-ts-set-signature: var(--light-color-ts-accessor);
/* object literal not included as it is not used and will be removed in 0.25 */
--light-color-ts-type-alias: #d51270;
/* reference not included as links will be colored with the kind that it points to */

Expand Down Expand Up @@ -72,7 +71,6 @@
--dark-color-ts-accessor: var(--dark-color-ts-property);
--dark-color-ts-get-signature: var(--dark-color-ts-accessor);
--dark-color-ts-set-signature: var(--dark-color-ts-accessor);
/* object literal not included as it is not used and will be removed in 0.25 */
--dark-color-ts-type-alias: #ff6492;
/* reference not included as links will be colored with the kind that it points to */

Expand Down Expand Up @@ -468,13 +466,12 @@ blockquote {
padding: 0 0 0 20px;
margin: 0;
}
.tsd-typography h4,
.tsd-typography .tsd-index-panel h3,
.tsd-index-panel .tsd-typography h3,
.tsd-typography h4,
.tsd-typography h5,
.tsd-typography h6 {
font-size: 1em;
margin: 0;
}
.tsd-typography h5,
.tsd-typography h6 {
Expand All @@ -485,6 +482,19 @@ blockquote {
.tsd-typography ol {
margin: 1em 0;
}
.tsd-typography table {
border-collapse: collapse;
border: none;
}
.tsd-typography td,
.tsd-typography th {
padding: 6px 13px;
border: 1px solid var(--color-accent);
}
.tsd-typography thead,
.tsd-typography tr:nth-child(even) {
background-color: var(--color-background-secondary);
}

.tsd-breadcrumb {
margin: 0;
Expand Down Expand Up @@ -900,21 +910,25 @@ a.tsd-index-link {
box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
#tsd-search .results li {
padding: 0 10px;
background-color: var(--color-background);
line-height: initial;
padding: 4px;
}
#tsd-search .results li:nth-child(even) {
background-color: var(--color-background-secondary);
}
#tsd-search .results li.state {
display: none;
}
#tsd-search .results li.current,
#tsd-search .results li:hover {
#tsd-search .results li.current:not(.no-results),
#tsd-search .results li:hover:not(.no-results) {
background-color: var(--color-accent);
}
#tsd-search .results a {
display: block;
display: flex;
align-items: center;
padding: 0.25rem;
box-sizing: border-box;
}
#tsd-search .results a:before {
top: 10px;
Expand Down Expand Up @@ -1070,7 +1084,9 @@ ul.tsd-type-parameter-list h5 {
overflow: hidden;
opacity: 0.8;
height: 40px;
transition: opacity 0.1s, background-color 0.2s;
transition:
opacity 0.1s,
background-color 0.2s;
vertical-align: bottom;
cursor: pointer;
}
Expand Down Expand Up @@ -1122,7 +1138,7 @@ img {
}

.deprecated {
text-decoration: line-through;
text-decoration: line-through !important;
}

.warning {
Expand Down
Loading

0 comments on commit 37f3414

Please sign in to comment.