Skip to content

Commit

Permalink
docs: updates for RFC9562 (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmccarren committed Jun 5, 2024
1 parent 59c2711 commit f24c530
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
-- This file is auto-generated from README_js.md. Changes should be made there.
-->


# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formally [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs

- **Complete** - Support for RFC4122 version 1, 3, 4, 5, and 7 UUIDs
- **Complete** - Support for all RFC9562 UUID versions
- **Cross-platform** - Support for ...
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
Expand Down Expand Up @@ -173,7 +172,7 @@ Create an RFC version 1 (timestamp) UUID

<!-- prettier-ignore -->
> [!NOTE]
> The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
<!-- prettier-ignore -->
> [!NOTE]
Expand Down Expand Up @@ -386,7 +385,7 @@ Usage:
uuid --help

Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
defined by RFC4122
defined by RFC9562
```

## ECMAScript Modules
Expand Down Expand Up @@ -521,6 +520,5 @@ const uuid = require('uuid'); // <== REMOVED!

This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.

---

Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
----
Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](https://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
8 changes: 4 additions & 4 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ require('crypto').randomUUID = undefined;

# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formally [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs

- **Complete** - Support for RFC4122 version 1, 3, 4, 5, and 7 UUIDs
- **Complete** - Support for RFC9562 version 1, 3, 4, 5, and 7 UUIDs
- **Cross-platform** - Support for ...
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
Expand Down Expand Up @@ -181,7 +181,7 @@ Create an RFC version 1 (timestamp) UUID

<!-- prettier-ignore -->
> [!NOTE]
> The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
<!-- prettier-ignore -->
> [!NOTE]
Expand Down Expand Up @@ -394,7 +394,7 @@ Usage:
uuid --help

Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
defined by RFC4122
defined by RFC9562
```

## ECMAScript Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function benchmark(uuid, Benchmark) {
try {
uuid.v1(null, array, 0);
} catch (err) {
// The spec (https://tools.ietf.org/html/rfc4122#section-4.2.1.2) defines that only 10M/s v1
// The spec (https://datatracker.ietf.org/doc/html/rfc9562#name-timestamp-considerations) defines that only 10M/s v1
// UUIDs can be generated on a single node. This library throws an error if we hit that limit
// (which can happen on modern hardware and modern Node.js versions).
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "uuid",
"version": "9.0.1",
"description": "RFC4122 (v1, v3, v4, v5, and v7) UUIDs",
"description": "RFC9562 UUIDs",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
Expand All @@ -14,7 +14,8 @@
"keywords": [
"uuid",
"guid",
"rfc4122"
"rfc4122",
"rfc9562"
],
"license": "MIT",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/uuid-bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function usage() {
console.log(' uuid v7');
console.log(' uuid --help');
console.log(
'\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'
'\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'
);
}

Expand Down

0 comments on commit f24c530

Please sign in to comment.