uuid 7.0.2-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 CHANGED
@@ -2,6 +2,62 @@
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
+
47
+ ### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)
48
+
49
+ ### Bug Fixes
50
+
51
+ - make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408)
52
+
53
+ ### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)
54
+
55
+ ### Bug Fixes
56
+
57
+ - make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))
58
+ - simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))
59
+ - update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))
60
+
5
61
  ### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)
6
62
 
7
63
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2010-2016 Robert Kieffer and other contributors
3
+ Copyright (c) 2010-2020 Robert Kieffer and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -9,10 +9,10 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
9
9
  - **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
10
10
  - **Cross-platform** - Support for ...
11
11
  - CommonJS, [ECMAScript Modules](#ecmascript-modules) and UMD builds
12
- - Node 8, 10, 12
12
+ - Node 8, 10, 12, 14
13
13
  - Chrome, Safari, Firefox, Edge, IE 11 browsers
14
14
  - Webpack and rollup.js module bundlers
15
- - React Native ([see note](#getrandomvalues-not-supported))
15
+ - [React Native](#react-native)
16
16
  - **Secure** - Cryptographically-strong random values
17
17
  - **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
18
18
  - **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -20,7 +20,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
20
20
  **Upgrading from uuid\@3?** Your code is probably okay, but check out [Upgrading
21
21
  From uuid\@3](#upgrading-from-uuid3) for details.
22
22
 
23
- ## Quickstart - Node.js/CommonJS
23
+ ## Quickstart
24
24
 
25
25
  ```shell
26
26
  npm install uuid
@@ -38,16 +38,25 @@ versions, all of which are supported here. In order of popularity, they are:
38
38
 
39
39
  ### Create Version 4 (Random) UUIDs
40
40
 
41
+ ECMAScript Module syntax:
42
+
41
43
  ```javascript
42
44
  import { v4 as uuidv4 } from 'uuid';
43
45
  uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
44
46
  ```
45
47
 
48
+ CommonJS syntax:
49
+
50
+ ```javascript
51
+ const { v4: uuidv4 } = require('uuid');
52
+ uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
53
+ ```
54
+
46
55
  ### Create Version 1 (Timestamp) UUIDs
47
56
 
48
57
  ```javascript
49
58
  import { v1 as uuidv1 } from 'uuid';
50
- uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8b2d-1b9d6bcdbbfd'
59
+ uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
51
60
  ```
52
61
 
53
62
  ### Create Version 3 or Version 5 (Namespace) UUIDs
@@ -133,17 +142,17 @@ Example: Generate two IDs in a single buffer
133
142
  const buffer = new Array();
134
143
  uuidv4(null, buffer, 0); // ⇨
135
144
  // [
136
- // 155, 29, 235, 77, 59,
137
- // 125, 75, 173, 155, 221,
138
- // 43, 13, 123, 61, 203,
139
- // 109
145
+ // 27, 157, 107, 205, 187,
146
+ // 253, 75, 45, 155, 93,
147
+ // 171, 141, 251, 189, 75,
148
+ // 237
140
149
  // ]
141
150
  uuidv4(null, buffer, 16); // ⇨
142
151
  // [
143
- // 155, 29, 235, 77, 59, 125, 75, 173,
144
- // 155, 221, 43, 13, 123, 61, 203, 109,
145
152
  // 27, 157, 107, 205, 187, 253, 75, 45,
146
- // 155, 93, 171, 141, 251, 189, 75, 237
153
+ // 155, 93, 171, 141, 251, 189, 75, 237,
154
+ // 155, 29, 235, 77, 59, 125, 75, 173,
155
+ // 155, 221, 43, 13, 123, 61, 203, 109
147
156
  // ]
148
157
  ```
149
158
 
@@ -193,17 +202,16 @@ Example: In-place generation of two binary IDs
193
202
  const arr = new Array();
194
203
  uuidv1(null, arr, 0); // ⇨
195
204
  // [
196
- // 44, 94, 164, 192, 64,
197
- // 103, 17, 233, 146, 52,
198
- // 27, 157, 107, 205, 187,
199
- // 253
205
+ // 44, 94, 164, 192, 64, 103,
206
+ // 17, 233, 146, 52, 155, 29,
207
+ // 235, 77, 59, 125
200
208
  // ]
201
209
  uuidv1(null, arr, 16); // ⇨
202
210
  // [
203
- // 44, 94, 164, 192, 64, 103, 17, 233,
204
- // 146, 52, 27, 157, 107, 205, 187, 253,
205
- // 44, 94, 164, 193, 64, 103, 17, 233,
206
- // 146, 52, 27, 157, 107, 205, 187, 253
211
+ // 44, 94, 164, 192, 64, 103, 17, 233,
212
+ // 146, 52, 155, 29, 235, 77, 59, 125,
213
+ // 44, 94, 164, 193, 64, 103, 17, 233,
214
+ // 146, 52, 155, 29, 235, 77, 59, 125
207
215
  // ]
208
216
  ```
209
217
 
@@ -289,20 +297,18 @@ defined by RFC4122
289
297
 
290
298
  ## ECMAScript Modules
291
299
 
292
- For usage in the browser `uuid` provides support for [ECMAScript
293
- Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) that enable
294
- tree-shaking for bundlers, like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking)
295
- ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/)
296
- ([example](./examples/browser-webpack/)).
300
+ This library comes with [ECMAScript
301
+ Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js
302
+ versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like
303
+ [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/))
304
+ and [webpack](https://webpack.js.org/guides/tree-shaking/)
305
+ ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments).
297
306
 
298
307
  ```javascript
299
308
  import { v4 as uuidv4 } from 'uuid';
300
309
  uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
301
310
  ```
302
311
 
303
- There is experimental native ESM support for [the browser](./examples/browser-esmodules/) but it
304
- should not be considered ready for production use and may change or disappear in future releases.
305
-
306
312
  To run the examples you must first create a dist build of this library in the module root:
307
313
 
308
314
  ```
@@ -341,9 +347,48 @@ This error occurs in environments where the standard
341
347
  [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
342
348
  API is not supported. This issue can be resolved by adding an appropriate polyfill:
343
349
 
344
- | Environment | Suggested Polyfill |
345
- | ------------ | --------------------------------------------------------------------------------------------------- |
346
- | React Native | [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) |
350
+ ### React Native
351
+
352
+ 1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
353
+ 1. Import it before `uuid`:
354
+
355
+ ```javascript
356
+ import 'react-native-get-random-values';
357
+ import { v4 as uuidv4 } from 'uuid';
358
+ ```
359
+
360
+ ### Web Workers / Service Workers (Edge <= 18)
361
+
362
+ [In Edge <= 18, Web Crypto is not supported in Web Workers or Service
363
+ Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if
364
+ you find one, please).
365
+
366
+ ## Upgrading From uuid\@7
367
+
368
+ ### Only Named Exports Supported When Using with Node.js ESM
369
+
370
+ uuid\@7 did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in
371
+ Node.js ESM consequently imported the CommonJS source with a default export. This library now comes
372
+ with true Node.js ESM support and only provides named exports.
373
+
374
+ Instead of doing:
375
+
376
+ ```javascript
377
+ import uuid from 'uuid';
378
+ uuid.v4();
379
+ ```
380
+
381
+ you will now have to use the named exports:
382
+
383
+ ```javascript
384
+ import { v4 as uuidv4 } from 'uuid';
385
+ uuidv4();
386
+ ```
387
+
388
+ ### Deep Requires No Longer Supported
389
+
390
+ Deep requires like `require('uuid/v4')` [which have been deprecated in
391
+ uuid\@7](#deep-requires-now-deprecated) are no longer supported.
347
392
 
348
393
  ## Upgrading From uuid\@3
349
394
 
@@ -23,5 +23,4 @@ function bytesToUuid(buf, offset) {
23
23
  }
24
24
 
25
25
  var _default = bytesToUuid;
26
- exports.default = _default;
27
- module.exports = exports.default;
26
+ exports.default = _default;
@@ -3,9 +3,7 @@
3
3
  // generators (like Math.random()).
4
4
  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
5
5
  // find the complete implementation of crypto (msCrypto) on IE11.
6
- // Use self in order to support WebWorkers as well, see
7
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/self
8
- var getRandomValues = typeof self !== 'undefined' && (typeof self.crypto !== 'undefined' && self.crypto.getRandomValues && self.crypto.getRandomValues.bind(self.crypto) || typeof self.msCrypto !== 'undefined' && self.msCrypto.getRandomValues && self.msCrypto.getRandomValues.bind(self.msCrypto));
6
+ var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
9
7
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
10
8
 
11
9
  export default function rng() {
@@ -221,5 +221,4 @@ function md5ii(a, b, c, d, x, s, t) {
221
221
  }
222
222
 
223
223
  var _default = md5;
224
- exports.default = _default;
225
- module.exports = exports.default;
224
+ exports.default = _default;
package/dist/md5.js CHANGED
@@ -20,5 +20,4 @@ function md5(bytes) {
20
20
  }
21
21
 
22
22
  var _default = md5;
23
- exports.default = _default;
24
- module.exports = exports.default;
23
+ exports.default = _default;
@@ -9,9 +9,7 @@ exports.default = rng;
9
9
  // generators (like Math.random()).
10
10
  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
11
11
  // find the complete implementation of crypto (msCrypto) on IE11.
12
- // Use self in order to support WebWorkers as well, see
13
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/self
14
- var getRandomValues = typeof self !== 'undefined' && (typeof self.crypto !== 'undefined' && self.crypto.getRandomValues && self.crypto.getRandomValues.bind(self.crypto) || typeof self.msCrypto !== 'undefined' && self.msCrypto.getRandomValues && self.msCrypto.getRandomValues.bind(self.msCrypto));
12
+ var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
15
13
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
16
14
 
17
15
  function rng() {
@@ -20,6 +18,4 @@ function rng() {
20
18
  }
21
19
 
22
20
  return getRandomValues(rnds8);
23
- }
24
-
25
- module.exports = exports.default;
21
+ }
package/dist/rng.js CHANGED
@@ -11,6 +11,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
 
12
12
  function rng() {
13
13
  return _crypto.default.randomBytes(16);
14
- }
15
-
16
- module.exports = exports.default;
14
+ }
@@ -92,5 +92,4 @@ function sha1(bytes) {
92
92
  }
93
93
 
94
94
  var _default = sha1;
95
- exports.default = _default;
96
- module.exports = exports.default;
95
+ exports.default = _default;
package/dist/sha1.js CHANGED
@@ -20,5 +20,4 @@ function sha1(bytes) {
20
20
  }
21
21
 
22
22
  var _default = sha1;
23
- exports.default = _default;
24
- module.exports = exports.default;
23
+ exports.default = _default;
@@ -1 +1 @@
1
- !function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r=r||self).uuid={})}(this,(function(r){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),n=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}for(var o,a,u=[],f=0;f<256;++f)u[f]=(f+256).toString(16).substr(1);function c(r,e){var n=e||0,t=u;return[t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]]].join("")}var i=0,s=0;function v(r,e,n){var t=function(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=new Array(r.length),n=0;n<r.length;n++)e[n]=r.charCodeAt(n);return e}(r)),"string"==typeof t&&(t=function(r){var e=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){e.push(parseInt(r,16))})),e}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=n(t.concat(r));if(f[6]=15&f[6]|e,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)};try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function l(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function d(r,e,n,t,o,a){return l((u=l(l(e,r),l(t,a)))<<(f=o)|u>>>32-f,n);var u,f}function p(r,e,n,t,o,a,u){return d(e&n|~e&t,r,e,o,a,u)}function y(r,e,n,t,o,a,u){return d(e&t|n&~t,r,e,o,a,u)}function h(r,e,n,t,o,a,u){return d(e^n^t,r,e,o,a,u)}function g(r,e,n,t,o,a,u){return d(n^(e|~t),r,e,o,a,u)}var m=v("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Array(e.length);for(var n=0;n<e.length;n++)r[n]=e.charCodeAt(n)}return function(r){var e,n,t,o=[],a=32*r.length;for(e=0;e<a;e+=8)n=r[e>>5]>>>e%32&255,t=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),o.push(t);return o}(function(r,e){var n,t,o,a,u;r[e>>5]|=128<<e%32,r[14+(e+64>>>9<<4)]=e;var f=1732584193,c=-271733879,i=-1732584194,s=271733878;for(n=0;n<r.length;n+=16)t=f,o=c,a=i,u=s,f=p(f,c,i,s,r[n],7,-680876936),s=p(s,f,c,i,r[n+1],12,-389564586),i=p(i,s,f,c,r[n+2],17,606105819),c=p(c,i,s,f,r[n+3],22,-1044525330),f=p(f,c,i,s,r[n+4],7,-176418897),s=p(s,f,c,i,r[n+5],12,1200080426),i=p(i,s,f,c,r[n+6],17,-1473231341),c=p(c,i,s,f,r[n+7],22,-45705983),f=p(f,c,i,s,r[n+8],7,1770035416),s=p(s,f,c,i,r[n+9],12,-1958414417),i=p(i,s,f,c,r[n+10],17,-42063),c=p(c,i,s,f,r[n+11],22,-1990404162),f=p(f,c,i,s,r[n+12],7,1804603682),s=p(s,f,c,i,r[n+13],12,-40341101),i=p(i,s,f,c,r[n+14],17,-1502002290),c=p(c,i,s,f,r[n+15],22,1236535329),f=y(f,c,i,s,r[n+1],5,-165796510),s=y(s,f,c,i,r[n+6],9,-1069501632),i=y(i,s,f,c,r[n+11],14,643717713),c=y(c,i,s,f,r[n],20,-373897302),f=y(f,c,i,s,r[n+5],5,-701558691),s=y(s,f,c,i,r[n+10],9,38016083),i=y(i,s,f,c,r[n+15],14,-660478335),c=y(c,i,s,f,r[n+4],20,-405537848),f=y(f,c,i,s,r[n+9],5,568446438),s=y(s,f,c,i,r[n+14],9,-1019803690),i=y(i,s,f,c,r[n+3],14,-187363961),c=y(c,i,s,f,r[n+8],20,1163531501),f=y(f,c,i,s,r[n+13],5,-1444681467),s=y(s,f,c,i,r[n+2],9,-51403784),i=y(i,s,f,c,r[n+7],14,1735328473),c=y(c,i,s,f,r[n+12],20,-1926607734),f=h(f,c,i,s,r[n+5],4,-378558),s=h(s,f,c,i,r[n+8],11,-2022574463),i=h(i,s,f,c,r[n+11],16,1839030562),c=h(c,i,s,f,r[n+14],23,-35309556),f=h(f,c,i,s,r[n+1],4,-1530992060),s=h(s,f,c,i,r[n+4],11,1272893353),i=h(i,s,f,c,r[n+7],16,-155497632),c=h(c,i,s,f,r[n+10],23,-1094730640),f=h(f,c,i,s,r[n+13],4,681279174),s=h(s,f,c,i,r[n],11,-358537222),i=h(i,s,f,c,r[n+3],16,-722521979),c=h(c,i,s,f,r[n+6],23,76029189),f=h(f,c,i,s,r[n+9],4,-640364487),s=h(s,f,c,i,r[n+12],11,-421815835),i=h(i,s,f,c,r[n+15],16,530742520),c=h(c,i,s,f,r[n+2],23,-995338651),f=g(f,c,i,s,r[n],6,-198630844),s=g(s,f,c,i,r[n+7],10,1126891415),i=g(i,s,f,c,r[n+14],15,-1416354905),c=g(c,i,s,f,r[n+5],21,-57434055),f=g(f,c,i,s,r[n+12],6,1700485571),s=g(s,f,c,i,r[n+3],10,-1894986606),i=g(i,s,f,c,r[n+10],15,-1051523),c=g(c,i,s,f,r[n+1],21,-2054922799),f=g(f,c,i,s,r[n+8],6,1873313359),s=g(s,f,c,i,r[n+15],10,-30611744),i=g(i,s,f,c,r[n+6],15,-1560198380),c=g(c,i,s,f,r[n+13],21,1309151649),f=g(f,c,i,s,r[n+4],6,-145523070),s=g(s,f,c,i,r[n+11],10,-1120210379),i=g(i,s,f,c,r[n+2],15,718787259),c=g(c,i,s,f,r[n+9],21,-343485551),f=l(f,t),c=l(c,o),i=l(i,a),s=l(s,u);return[f,c,i,s]}(function(r){var e,n=[];for(n[(r.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var t=8*r.length;for(e=0;e<t;e+=8)n[e>>5]|=(255&r[e/8])<<e%32;return n}(r),8*r.length))}));function b(r,e,n,t){switch(r){case 0:return e&n^~e&t;case 1:return e^n^t;case 2:return e&n^e&t^n&t;case 3:return e^n^t}}function A(r,e){return r<<e|r>>>32-e}var w=v("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=new Array(t.length);for(var o=0;o<t.length;o++)r[o]=t.charCodeAt(o)}r.push(128);var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u);for(o=0;o<u;o++){f[o]=new Array(16);for(var c=0;c<16;c++)f[o][c]=r[64*o+4*c]<<24|r[64*o+4*c+1]<<16|r[64*o+4*c+2]<<8|r[64*o+4*c+3]}for(f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295,o=0;o<u;o++){for(var i=new Array(80),s=0;s<16;s++)i[s]=f[o][s];for(s=16;s<80;s++)i[s]=A(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var v=n[0],l=n[1],d=n[2],p=n[3],y=n[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=A(v,5)+b(h,l,d,p)+y+e[h]+i[s]>>>0;y=p,p=d,d=A(l,30)>>>0,l=v,v=g}n[0]=n[0]+v>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+d>>>0,n[3]=n[3]+p>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.v1=function(r,e,n){var u=e&&n||0,f=e||[],v=(r=r||{}).node||o,l=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==l){var d=r.random||(r.rng||t)();null==v&&(v=o=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==l&&(l=a=16383&(d[6]<<8|d[7]))}var p=void 0!==r.msecs?r.msecs:(new Date).getTime(),y=void 0!==r.nsecs?r.nsecs:s+1,h=p-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(l=l+1&16383),(h<0||p>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=p,s=y,a=l;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=p/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=l>>>8|128,f[u++]=255&l;for(var b=0;b<6;++b)f[u+b]=v[b];return e||c(f)},r.v3=m,r.v4=function(r,e,n){var o=e&&n||0;"string"==typeof r&&(e="binary"===r?new Array(16):null,r=null);var a=(r=r||{}).random||(r.rng||t)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var u=0;u<16;++u)e[o+u]=a[u];return e||c(a)},r.v5=w,Object.defineProperty(r,"__esModule",{value:!0})}));
1
+ !function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((r=r||self).uuid={})}(this,(function(r){"use strict";var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function t(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(e)}for(var o,a,u=[],f=0;f<256;++f)u[f]=(f+256).toString(16).substr(1);function c(r,n){var e=n||0,t=u;return[t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]]].join("")}var i=0,s=0;function v(r,n,e){var t=function(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var n=new Array(r.length),e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n}(r)),"string"==typeof t&&(t=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=e(t.concat(r));if(f[6]=15&f[6]|n,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)};try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function d(r,n){var e=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(e>>16)<<16|65535&e}function l(r,n,e,t,o,a){return d((u=d(d(n,r),d(t,a)))<<(f=o)|u>>>32-f,e);var u,f}function p(r,n,e,t,o,a,u){return l(n&e|~n&t,r,n,o,a,u)}function y(r,n,e,t,o,a,u){return l(n&t|e&~t,r,n,o,a,u)}function h(r,n,e,t,o,a,u){return l(n^e^t,r,n,o,a,u)}function g(r,n,e,t,o,a,u){return l(e^(n|~t),r,n,o,a,u)}var m=v("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Array(n.length);for(var e=0;e<n.length;e++)r[e]=n.charCodeAt(e)}return function(r){var n,e,t,o=[],a=32*r.length;for(n=0;n<a;n+=8)e=r[n>>5]>>>n%32&255,t=parseInt("0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e),16),o.push(t);return o}(function(r,n){var e,t,o,a,u;r[n>>5]|=128<<n%32,r[14+(n+64>>>9<<4)]=n;var f=1732584193,c=-271733879,i=-1732584194,s=271733878;for(e=0;e<r.length;e+=16)t=f,o=c,a=i,u=s,f=p(f,c,i,s,r[e],7,-680876936),s=p(s,f,c,i,r[e+1],12,-389564586),i=p(i,s,f,c,r[e+2],17,606105819),c=p(c,i,s,f,r[e+3],22,-1044525330),f=p(f,c,i,s,r[e+4],7,-176418897),s=p(s,f,c,i,r[e+5],12,1200080426),i=p(i,s,f,c,r[e+6],17,-1473231341),c=p(c,i,s,f,r[e+7],22,-45705983),f=p(f,c,i,s,r[e+8],7,1770035416),s=p(s,f,c,i,r[e+9],12,-1958414417),i=p(i,s,f,c,r[e+10],17,-42063),c=p(c,i,s,f,r[e+11],22,-1990404162),f=p(f,c,i,s,r[e+12],7,1804603682),s=p(s,f,c,i,r[e+13],12,-40341101),i=p(i,s,f,c,r[e+14],17,-1502002290),c=p(c,i,s,f,r[e+15],22,1236535329),f=y(f,c,i,s,r[e+1],5,-165796510),s=y(s,f,c,i,r[e+6],9,-1069501632),i=y(i,s,f,c,r[e+11],14,643717713),c=y(c,i,s,f,r[e],20,-373897302),f=y(f,c,i,s,r[e+5],5,-701558691),s=y(s,f,c,i,r[e+10],9,38016083),i=y(i,s,f,c,r[e+15],14,-660478335),c=y(c,i,s,f,r[e+4],20,-405537848),f=y(f,c,i,s,r[e+9],5,568446438),s=y(s,f,c,i,r[e+14],9,-1019803690),i=y(i,s,f,c,r[e+3],14,-187363961),c=y(c,i,s,f,r[e+8],20,1163531501),f=y(f,c,i,s,r[e+13],5,-1444681467),s=y(s,f,c,i,r[e+2],9,-51403784),i=y(i,s,f,c,r[e+7],14,1735328473),c=y(c,i,s,f,r[e+12],20,-1926607734),f=h(f,c,i,s,r[e+5],4,-378558),s=h(s,f,c,i,r[e+8],11,-2022574463),i=h(i,s,f,c,r[e+11],16,1839030562),c=h(c,i,s,f,r[e+14],23,-35309556),f=h(f,c,i,s,r[e+1],4,-1530992060),s=h(s,f,c,i,r[e+4],11,1272893353),i=h(i,s,f,c,r[e+7],16,-155497632),c=h(c,i,s,f,r[e+10],23,-1094730640),f=h(f,c,i,s,r[e+13],4,681279174),s=h(s,f,c,i,r[e],11,-358537222),i=h(i,s,f,c,r[e+3],16,-722521979),c=h(c,i,s,f,r[e+6],23,76029189),f=h(f,c,i,s,r[e+9],4,-640364487),s=h(s,f,c,i,r[e+12],11,-421815835),i=h(i,s,f,c,r[e+15],16,530742520),c=h(c,i,s,f,r[e+2],23,-995338651),f=g(f,c,i,s,r[e],6,-198630844),s=g(s,f,c,i,r[e+7],10,1126891415),i=g(i,s,f,c,r[e+14],15,-1416354905),c=g(c,i,s,f,r[e+5],21,-57434055),f=g(f,c,i,s,r[e+12],6,1700485571),s=g(s,f,c,i,r[e+3],10,-1894986606),i=g(i,s,f,c,r[e+10],15,-1051523),c=g(c,i,s,f,r[e+1],21,-2054922799),f=g(f,c,i,s,r[e+8],6,1873313359),s=g(s,f,c,i,r[e+15],10,-30611744),i=g(i,s,f,c,r[e+6],15,-1560198380),c=g(c,i,s,f,r[e+13],21,1309151649),f=g(f,c,i,s,r[e+4],6,-145523070),s=g(s,f,c,i,r[e+11],10,-1120210379),i=g(i,s,f,c,r[e+2],15,718787259),c=g(c,i,s,f,r[e+9],21,-343485551),f=d(f,t),c=d(c,o),i=d(i,a),s=d(s,u);return[f,c,i,s]}(function(r){var n,e=[];for(e[(r.length>>2)-1]=void 0,n=0;n<e.length;n+=1)e[n]=0;var t=8*r.length;for(n=0;n<t;n+=8)e[n>>5]|=(255&r[n/8])<<n%32;return e}(r),8*r.length))}));function b(r,n,e,t){switch(r){case 0:return n&e^~n&t;case 1:return n^e^t;case 2:return n&e^n&t^e&t;case 3:return n^e^t}}function A(r,n){return r<<n|r>>>32-n}var w=v("v5",80,(function(r){var n=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=new Array(t.length);for(var o=0;o<t.length;o++)r[o]=t.charCodeAt(o)}r.push(128);var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u);for(o=0;o<u;o++){f[o]=new Array(16);for(var c=0;c<16;c++)f[o][c]=r[64*o+4*c]<<24|r[64*o+4*c+1]<<16|r[64*o+4*c+2]<<8|r[64*o+4*c+3]}for(f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295,o=0;o<u;o++){for(var i=new Array(80),s=0;s<16;s++)i[s]=f[o][s];for(s=16;s<80;s++)i[s]=A(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var v=e[0],d=e[1],l=e[2],p=e[3],y=e[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=A(v,5)+b(h,d,l,p)+y+n[h]+i[s]>>>0;y=p,p=l,l=A(d,30)>>>0,d=v,v=g}e[0]=e[0]+v>>>0,e[1]=e[1]+d>>>0,e[2]=e[2]+l>>>0,e[3]=e[3]+p>>>0,e[4]=e[4]+y>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}));r.v1=function(r,n,e){var u=n&&e||0,f=n||[],v=(r=r||{}).node||o,d=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==d){var l=r.random||(r.rng||t)();null==v&&(v=o=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==d&&(d=a=16383&(l[6]<<8|l[7]))}var p=void 0!==r.msecs?r.msecs:(new Date).getTime(),y=void 0!==r.nsecs?r.nsecs:s+1,h=p-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(d=d+1&16383),(h<0||p>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=p,s=y,a=d;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=p/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=d>>>8|128,f[u++]=255&d;for(var b=0;b<6;++b)f[u+b]=v[b];return n||c(f)},r.v3=m,r.v4=function(r,n,e){var o=n&&e||0;"string"==typeof r&&(n="binary"===r?new Array(16):null,r=null);var a=(r=r||{}).random||(r.rng||t)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var u=0;u<16;++u)n[o+u]=a[u];return n||c(a)},r.v5=w,Object.defineProperty(r,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),o=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}for(var n,r,s=[],u=0;u<256;++u)s[u]=(u+256).toString(16).substr(1);var i=0,d=0;return function(e,o,u){var f=o&&u||0,a=o||[],l=(e=e||{}).node||n,c=void 0!==e.clockseq?e.clockseq:r;if(null==l||null==c){var p=e.random||(e.rng||t)();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==c&&(c=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:d+1,y=v-i+(m-d)/1e4;if(y<0&&void 0===e.clockseq&&(c=c+1&16383),(y<0||v>i)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=v,d=m,r=c;var g=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;a[f++]=g>>>24&255,a[f++]=g>>>16&255,a[f++]=g>>>8&255,a[f++]=255&g;var h=v/4294967296*1e4&268435455;a[f++]=h>>>8&255,a[f++]=255&h,a[f++]=h>>>24&15|16,a[f++]=h>>>16&255,a[f++]=c>>>8|128,a[f++]=255&c;for(var w=0;w<6;++w)a[f+w]=l[w];return o||function(e,o){var t=o||0,n=s;return[n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]]].join("")}(a)}}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function n(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}for(var t,r,u=[],s=0;s<256;++s)u[s]=(s+256).toString(16).substr(1);var i=0,d=0;return function(e,o,s){var a=o&&s||0,c=o||[],f=(e=e||{}).node||t,p=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==p){var l=e.random||(e.rng||n)();null==f&&(f=t=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==p&&(p=r=16383&(l[6]<<8|l[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:d+1,y=m-i+(v-d)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||m>i)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=m,d=v,r=p;var g=(1e4*(268435455&(m+=122192928e5))+v)%4294967296;c[a++]=g>>>24&255,c[a++]=g>>>16&255,c[a++]=g>>>8&255,c[a++]=255&g;var h=m/4294967296*1e4&268435455;c[a++]=h>>>8&255,c[a++]=255&h,c[a++]=h>>>24&15|16,c[a++]=h>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var w=0;w<6;++w)c[a+w]=f[w];return o||function(e,o){var n=o||0,t=u;return[t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]]].join("")}(c)}}));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).uuidv4=t()}(this,(function(){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),t=new Uint8Array(16);function n(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);return function(e,t,r){var u=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var f=0;f<16;++f)t[u+f]=s[f];return t||function(e,t){var n=t||0,r=o;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}(s)}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function n(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);return function(t,e,r){var u=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var i=(t=t||{}).random||(t.rng||n)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var d=0;d<16;++d)e[u+d]=i[d];return e||function(t,e){var n=e||0,r=o;return[r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]]].join("")}(i)}}));
package/dist/v1.js CHANGED
@@ -104,5 +104,4 @@ function v1(options, buf, offset) {
104
104
  }
105
105
 
106
106
  var _default = v1;
107
- exports.default = _default;
108
- module.exports = exports.default;
107
+ exports.default = _default;
package/dist/v3.js CHANGED
@@ -13,5 +13,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
 
14
14
  const v3 = (0, _v.default)('v3', 0x30, _md.default);
15
15
  var _default = v3;
16
- exports.default = _default;
17
- module.exports = exports.default;
16
+ exports.default = _default;
package/dist/v4.js CHANGED
@@ -37,5 +37,4 @@ function v4(options, buf, offset) {
37
37
  }
38
38
 
39
39
  var _default = v4;
40
- exports.default = _default;
41
- module.exports = exports.default;
40
+ exports.default = _default;
package/dist/v5.js CHANGED
@@ -13,5 +13,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
 
14
14
  const v5 = (0, _v.default)('v5', 0x50, _sha.default);
15
15
  var _default = v5;
16
- exports.default = _default;
17
- module.exports = exports.default;
16
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uuid",
3
- "version": "7.0.2-beta.0",
3
+ "version": "8.0.0",
4
4
  "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
5
  "commitlint": {
6
6
  "extends": [
@@ -14,11 +14,15 @@
14
14
  ],
15
15
  "license": "MIT",
16
16
  "bin": {
17
- "uuid": "dist/bin/uuid"
17
+ "uuid": "./dist/bin/uuid"
18
18
  },
19
19
  "sideEffects": false,
20
- "main": "dist/index.js",
21
- "module": "dist/esm-node/index.js",
20
+ "main": "./dist/index.js",
21
+ "exports": {
22
+ "require": "./dist/index.js",
23
+ "import": "./wrapper.mjs"
24
+ },
25
+ "module": "./dist/esm-node/index.js",
22
26
  "browser": {
23
27
  "./dist/md5.js": "./dist/md5-browser.js",
24
28
  "./dist/rng.js": "./dist/rng-browser.js",
@@ -31,57 +35,60 @@
31
35
  "LICENSE.md",
32
36
  "README.md",
33
37
  "dist",
34
- "v1.js",
35
- "v3.js",
36
- "v4.js",
37
- "v5.js"
38
+ "wrapper.mjs"
38
39
  ],
39
40
  "devDependencies": {
40
41
  "@babel/cli": "7.8.4",
41
- "@babel/core": "7.8.4",
42
- "@babel/preset-env": "7.8.4",
42
+ "@babel/core": "7.9.0",
43
+ "@babel/preset-env": "7.9.5",
43
44
  "@commitlint/cli": "8.3.5",
44
45
  "@commitlint/config-conventional": "8.3.4",
45
- "@rollup/plugin-node-resolve": "7.1.1",
46
- "babel-eslint": "10.0.3",
47
- "babel-plugin-add-module-exports": "1.0.2",
48
- "browserstack-local": "1.4.5",
49
- "bundlewatch": "0.2.5",
46
+ "@rollup/plugin-node-resolve": "7.1.3",
47
+ "@wdio/browserstack-service": "6.0.12",
48
+ "@wdio/cli": "6.0.15",
49
+ "@wdio/jasmine-framework": "6.0.15",
50
+ "@wdio/local-runner": "6.0.15",
51
+ "@wdio/spec-reporter": "6.0.14",
52
+ "@wdio/static-server-service": "6.0.13",
53
+ "@wdio/sync": "6.0.15",
54
+ "babel-eslint": "10.1.0",
55
+ "bundlewatch": "0.2.6",
50
56
  "eslint": "6.8.0",
51
- "eslint-config-prettier": "6.10.0",
52
- "eslint-plugin-prettier": "3.1.2",
53
- "esm": "3.2.25",
54
- "http-server": "0.12.1",
55
- "husky": "3.0.9",
56
- "jest": "25.1.0",
57
- "lint-staged": "10.0.7",
57
+ "eslint-config-prettier": "6.10.1",
58
+ "eslint-plugin-prettier": "3.1.3",
59
+ "husky": "4.2.5",
60
+ "jest": "25.3.0",
61
+ "lint-staged": "10.1.3",
58
62
  "npm-run-all": "4.1.5",
59
- "prettier": "1.19.1",
60
- "rollup": "1.31.1",
61
- "rollup-plugin-terser": "5.2.0",
63
+ "prettier": "2.0.4",
64
+ "rollup": "2.6.1",
65
+ "rollup-plugin-terser": "5.3.0",
62
66
  "runmd": "1.3.2",
63
- "selenium-webdriver": "3.6.0",
64
67
  "standard-version": "7.1.0"
65
68
  },
66
69
  "scripts": {
67
- "examples:browser-webpack:build": "cd examples/browser-webpack && npm install && npm run build",
68
- "examples:browser-rollup:build": "cd examples/browser-rollup && npm install && npm run build",
69
- "examples:browser-esmodules:build": "cd examples/browser-esmodules && npm install && npm run build",
70
+ "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
71
+ "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
72
+ "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
73
+ "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
70
74
  "lint": "npm run eslint:check && npm run prettier:check",
71
75
  "eslint:check": "eslint src/ test/ examples/ *.js",
72
76
  "eslint:fix": "eslint --fix src/ test/ examples/ *.js",
73
- "pretest": "npm run build",
77
+ "pretest": "[ -n $CI ] || npm run build",
74
78
  "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
75
- "pretest:browser": "npm run build && npm-run-all --parallel examples:**",
76
- "test:browser": "BABEL_ENV=commonjs jest --forceExit --verbose test/browser/${BROWSER:-}*",
79
+ "pretest:browser": "npm run build && npm-run-all --parallel examples:browser:**",
80
+ "test:browser": "wdio run ./wdio.conf.js",
81
+ "pretest:node": "npm run build",
82
+ "test:node": "npm-run-all --parallel examples:node:**",
83
+ "test:pack": "./scripts/testpack.sh",
77
84
  "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
78
85
  "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
79
- "ci": "npm run lint && npm run test && npm run prettier:check && npm run docs:diff && npm run bundlewatch",
80
- "bundlewatch": "( node --version | grep -vq 'v12' ) || ( npm run pretest:browser && CI_REPO_OWNER=uuidjs CI_REPO_NAME=uuid CI_COMMIT_SHA=$GITHUB_SHA CI_BRANCH=${GITHUB_REF##refs/heads/} bundlewatch --config bundlewatch.config.json )",
86
+ "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
81
87
  "md": "runmd --watch --output=README.md README_js.md",
82
88
  "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
83
- "docs:diff": "( node --version | grep -vq 'v12' ) || ( npm run docs && git diff --quiet README.md )",
89
+ "docs:diff": "npm run docs && git diff --quiet README.md",
84
90
  "build": "./scripts/build.sh",
91
+ "prepack": "npm run build",
85
92
  "release": "standard-version --no-verify"
86
93
  },
87
94
  "repository": {
@@ -104,8 +111,7 @@
104
111
  },
105
112
  "standard-version": {
106
113
  "scripts": {
107
- "postchangelog": "prettier --write CHANGELOG.md",
108
- "postcommit": "npm run build"
114
+ "postchangelog": "prettier --write CHANGELOG.md"
109
115
  }
110
116
  }
111
117
  }
package/wrapper.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import uuid from './dist/index.js';
2
+ export const v1 = uuid.v1;
3
+ export const v3 = uuid.v3;
4
+ export const v4 = uuid.v4;
5
+ export const v5 = uuid.v5;
package/v1.js DELETED
@@ -1,8 +0,0 @@
1
- const util = require('util');
2
-
3
- const v1 = require('./dist/v1.js');
4
-
5
- module.exports = util.deprecate(
6
- v1,
7
- "Deep requiring like `const uuidv1 = require('uuid/v1');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
8
- );
package/v3.js DELETED
@@ -1,8 +0,0 @@
1
- const util = require('util');
2
-
3
- const v3 = require('./dist/v3.js');
4
-
5
- module.exports = util.deprecate(
6
- v3,
7
- "Deep requiring like `const uuidv3 = require('uuid/v3');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
8
- );
package/v4.js DELETED
@@ -1,8 +0,0 @@
1
- const util = require('util');
2
-
3
- const v4 = require('./dist/v4.js');
4
-
5
- module.exports = util.deprecate(
6
- v4,
7
- "Deep requiring like `const uuidv4 = require('uuid/v4');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
8
- );
package/v5.js DELETED
@@ -1,8 +0,0 @@
1
- const util = require('util');
2
-
3
- const v5 = require('./dist/v5.js');
4
-
5
- module.exports = util.deprecate(
6
- v5,
7
- "Deep requiring like `const uuidv5 = require('uuid/v5');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
8
- );