uuid 8.0.0-beta.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
-import uuid from 'uuid';
|
|
13
|
+
-console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869'
|
|
14
|
+
+import { v4 as uuidv4 } from 'uuid';
|
|
15
|
+
+uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported.
|
|
19
|
+
|
|
20
|
+
Instead use the named exports that this module exports.
|
|
21
|
+
|
|
22
|
+
For ECMAScript Modules (ESM):
|
|
23
|
+
|
|
24
|
+
```diff
|
|
25
|
+
-import uuidv4 from 'uuid/v4';
|
|
26
|
+
+import { v4 as uuidv4 } from 'uuid';
|
|
27
|
+
uuidv4();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For CommonJS:
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
-const uuidv4 = require('uuid/v4');
|
|
34
|
+
+const { v4: uuidv4 } = require('uuid');
|
|
35
|
+
uuidv4();
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342)
|
|
41
|
+
- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba))
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0))
|
|
46
|
+
|
|
5
47
|
### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)
|
|
6
48
|
|
|
7
49
|
### Bug Fixes
|