uuid 7.0.2 → 8.1.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 +59 -0
- package/LICENSE.md +1 -1
- package/README.md +59 -26
- package/dist/bytesToUuid.js +8 -8
- package/dist/esm-browser/bytesToUuid.js +4 -3
- package/dist/esm-browser/md5.js +24 -27
- package/dist/esm-browser/rng.js +2 -3
- package/dist/esm-browser/sha1.js +19 -17
- package/dist/esm-browser/v1.js +2 -2
- package/dist/esm-browser/v35.js +17 -10
- package/dist/esm-browser/v4.js +9 -7
- package/dist/esm-node/bytesToUuid.js +7 -6
- package/dist/esm-node/rng.js +2 -1
- package/dist/esm-node/v1.js +16 -16
- package/dist/esm-node/v35.js +22 -15
- package/dist/esm-node/v4.js +10 -8
- package/dist/md5-browser.js +40 -42
- package/dist/md5.js +1 -2
- package/dist/rng-browser.js +3 -5
- package/dist/rng.js +4 -4
- package/dist/sha1-browser.js +32 -27
- package/dist/sha1.js +1 -2
- package/dist/umd/uuid.min.js +1 -1
- package/dist/umd/uuidv1.min.js +1 -1
- package/dist/umd/uuidv3.min.js +1 -1
- package/dist/umd/uuidv4.min.js +1 -1
- package/dist/umd/uuidv5.min.js +1 -1
- package/dist/uuid-bin.js +22 -18
- package/dist/v1.js +17 -18
- package/dist/v3.js +1 -2
- package/dist/v35.js +22 -15
- package/dist/v4.js +11 -10
- package/dist/v5.js +1 -2
- package/package.json +53 -37
- package/wrapper.mjs +5 -0
- package/v1.js +0 -8
- package/v3.js +0 -8
- package/v4.js +0 -8
- package/v5.js +0 -8
package/dist/umd/uuidv5.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).uuidv5=e()}(this,(function(){"use strict";for(var r=[],e=0;e<256;++e)r
|
|
1
|
+
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).uuidv5=e()}(this,(function(){"use strict";for(var r=[],e=0;e<256;++e)r.push((e+256).toString(16).substr(1));function n(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 t(r,e){return r<<e|r>>>32-e}return function(e,n,t){function a(e,a,o,f){var u=o&&f||0;if("string"==typeof e&&(e=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n<r.length;++n)e.push(r.charCodeAt(n));return e}(e)),"string"==typeof a&&(a=function(r){var e=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){e.push(parseInt(r,16))})),e}(a)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(a)||16!==a.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=t(a.concat(e));if(c[6]=15&c[6]|n,c[8]=63&c[8]|128,o)for(var i=0;i<16;++i)o[u+i]=c[i];return o||function(e,n){var t=n||0,a=r;return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(c)}try{a.name=e}catch(r){}return a.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",a.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",a}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var o=unescape(encodeURIComponent(r));r=[];for(var f=0;f<o.length;++f)r.push(o.charCodeAt(f))}r.push(128);for(var u=r.length/4+2,c=Math.ceil(u/16),i=new Array(c),s=0;s<c;++s){for(var p=new Uint32Array(16),d=0;d<16;++d)p[d]=r[64*s+4*d]<<24|r[64*s+4*d+1]<<16|r[64*s+4*d+2]<<8|r[64*s+4*d+3];i[s]=p}i[c-1][14]=8*(r.length-1)/Math.pow(2,32),i[c-1][14]=Math.floor(i[c-1][14]),i[c-1][15]=8*(r.length-1)&4294967295;for(var h=0;h<c;++h){for(var v=new Uint32Array(80),y=0;y<16;++y)v[y]=i[h][y];for(var l=16;l<80;++l)v[l]=t(v[l-3]^v[l-8]^v[l-14]^v[l-16],1);for(var b=a[0],g=a[1],A=a[2],m=a[3],w=a[4],C=0;C<80;++C){var U=Math.floor(C/20),M=t(b,5)+n(U,g,A,m)+w+e[U]+v[C]>>>0;w=m,m=A,A=t(g,30)>>>0,g=b,b=M}a[0]=a[0]+b>>>0,a[1]=a[1]+g>>>0,a[2]=a[2]+A>>>0,a[3]=a[3]+m>>>0,a[4]=a[4]+w>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}))}));
|
package/dist/uuid-bin.js
CHANGED
|
@@ -23,14 +23,14 @@ function usage() {
|
|
|
23
23
|
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
27
|
|
|
28
28
|
if (args.indexOf('--help') >= 0) {
|
|
29
29
|
usage();
|
|
30
30
|
process.exit(0);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
const version = args.shift() || 'v4';
|
|
34
34
|
|
|
35
35
|
switch (version) {
|
|
36
36
|
case 'v1':
|
|
@@ -38,28 +38,32 @@ switch (version) {
|
|
|
38
38
|
break;
|
|
39
39
|
|
|
40
40
|
case 'v3':
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
{
|
|
42
|
+
const name = args.shift();
|
|
43
|
+
let namespace = args.shift();
|
|
44
|
+
(0, _assert.default)(name != null, 'v3 name not specified');
|
|
45
|
+
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
|
|
46
|
+
if (namespace === 'URL') namespace = _v2.default.URL;
|
|
47
|
+
if (namespace === 'DNS') namespace = _v2.default.DNS;
|
|
48
|
+
console.log((0, _v2.default)(name, namespace));
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
49
51
|
|
|
50
52
|
case 'v4':
|
|
51
53
|
console.log((0, _v3.default)());
|
|
52
54
|
break;
|
|
53
55
|
|
|
54
56
|
case 'v5':
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
{
|
|
58
|
+
const name = args.shift();
|
|
59
|
+
let namespace = args.shift();
|
|
60
|
+
(0, _assert.default)(name != null, 'v5 name not specified');
|
|
61
|
+
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
|
|
62
|
+
if (namespace === 'URL') namespace = _v4.default.URL;
|
|
63
|
+
if (namespace === 'DNS') namespace = _v4.default.DNS;
|
|
64
|
+
console.log((0, _v4.default)(name, namespace));
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
63
67
|
|
|
64
68
|
default:
|
|
65
69
|
usage();
|
package/dist/v1.js
CHANGED
|
@@ -15,25 +15,25 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
//
|
|
16
16
|
// Inspired by https://github.com/LiosK/UUID.js
|
|
17
17
|
// and http://docs.python.org/library/uuid.html
|
|
18
|
-
|
|
18
|
+
let _nodeId;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
let _clockseq; // Previous uuid creation time
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
let _lastMSecs = 0;
|
|
24
|
+
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
25
25
|
|
|
26
26
|
function v1(options, buf, offset) {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
let i = buf && offset || 0;
|
|
28
|
+
const b = buf || [];
|
|
29
29
|
options = options || {};
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
let node = options.node || _nodeId;
|
|
31
|
+
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
32
32
|
// specified. We do this lazily to minimize issues related to insufficient
|
|
33
33
|
// system entropy. See #189
|
|
34
34
|
|
|
35
35
|
if (node == null || clockseq == null) {
|
|
36
|
-
|
|
36
|
+
const seedBytes = options.random || (options.rng || _rng.default)();
|
|
37
37
|
|
|
38
38
|
if (node == null) {
|
|
39
39
|
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
@@ -50,12 +50,12 @@ function v1(options, buf, offset) {
|
|
|
50
50
|
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
54
54
|
// cycle to simulate higher resolution clock
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
59
59
|
|
|
60
60
|
if (dt < 0 && options.clockseq === undefined) {
|
|
61
61
|
clockseq = clockseq + 1 & 0x3fff;
|
|
@@ -78,13 +78,13 @@ function v1(options, buf, offset) {
|
|
|
78
78
|
|
|
79
79
|
msecs += 12219292800000; // `time_low`
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
82
82
|
b[i++] = tl >>> 24 & 0xff;
|
|
83
83
|
b[i++] = tl >>> 16 & 0xff;
|
|
84
84
|
b[i++] = tl >>> 8 & 0xff;
|
|
85
85
|
b[i++] = tl & 0xff; // `time_mid`
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
88
88
|
b[i++] = tmh >>> 8 & 0xff;
|
|
89
89
|
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
90
90
|
|
|
@@ -96,13 +96,12 @@ function v1(options, buf, offset) {
|
|
|
96
96
|
|
|
97
97
|
b[i++] = clockseq & 0xff; // `node`
|
|
98
98
|
|
|
99
|
-
for (
|
|
99
|
+
for (let n = 0; n < 6; ++n) {
|
|
100
100
|
b[i + n] = node[n];
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
return buf
|
|
103
|
+
return buf || (0, _bytesToUuid.default)(b);
|
|
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
package/dist/v35.js
CHANGED
|
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
12
12
|
|
|
13
13
|
function uuidToBytes(uuid) {
|
|
14
14
|
// Note: We assume we're being passed a valid uuid string
|
|
15
|
-
|
|
15
|
+
const bytes = [];
|
|
16
16
|
uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {
|
|
17
17
|
bytes.push(parseInt(hex, 16));
|
|
18
18
|
});
|
|
@@ -22,10 +22,10 @@ function uuidToBytes(uuid) {
|
|
|
22
22
|
function stringToBytes(str) {
|
|
23
23
|
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
const bytes = [];
|
|
26
26
|
|
|
27
|
-
for (
|
|
28
|
-
bytes
|
|
27
|
+
for (let i = 0; i < str.length; ++i) {
|
|
28
|
+
bytes.push(str.charCodeAt(i));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return bytes;
|
|
@@ -37,29 +37,36 @@ const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
|
37
37
|
exports.URL = URL;
|
|
38
38
|
|
|
39
39
|
function _default(name, version, hashfunc) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (typeof value
|
|
43
|
-
if (typeof namespace
|
|
44
|
-
|
|
45
|
-
if (!Array.isArray(
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
function generateUUID(value, namespace, buf, offset) {
|
|
41
|
+
const off = buf && offset || 0;
|
|
42
|
+
if (typeof value === 'string') value = stringToBytes(value);
|
|
43
|
+
if (typeof namespace === 'string') namespace = uuidToBytes(namespace);
|
|
44
|
+
|
|
45
|
+
if (!Array.isArray(value)) {
|
|
46
|
+
throw TypeError('value must be an array of bytes');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!Array.isArray(namespace) || namespace.length !== 16) {
|
|
50
|
+
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
|
|
51
|
+
} // Per 4.3
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
const bytes = hashfunc(namespace.concat(value));
|
|
48
55
|
bytes[6] = bytes[6] & 0x0f | version;
|
|
49
56
|
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
50
57
|
|
|
51
58
|
if (buf) {
|
|
52
|
-
for (
|
|
59
|
+
for (let idx = 0; idx < 16; ++idx) {
|
|
53
60
|
buf[off + idx] = bytes[idx];
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
return buf || (0, _bytesToUuid.default)(bytes);
|
|
58
|
-
}
|
|
65
|
+
} // Function#name is not settable on some platforms (#270)
|
|
59
66
|
|
|
60
67
|
|
|
61
68
|
try {
|
|
62
|
-
generateUUID.name = name;
|
|
69
|
+
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
63
70
|
} catch (err) {} // For CommonJS default export support
|
|
64
71
|
|
|
65
72
|
|
package/dist/v4.js
CHANGED
|
@@ -12,30 +12,31 @@ var _bytesToUuid = _interopRequireDefault(require("./bytesToUuid.js"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
function v4(options, buf, offset) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (typeof options == 'string') {
|
|
18
|
-
buf = options === 'binary' ? new Array(16) : null;
|
|
15
|
+
if (typeof options === 'string') {
|
|
16
|
+
buf = options === 'binary' ? new Uint8Array(16) : null;
|
|
19
17
|
options = null;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
options = options || {};
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
28
26
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
29
27
|
|
|
30
28
|
if (buf) {
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const start = offset || 0;
|
|
30
|
+
|
|
31
|
+
for (let i = 0; i < 16; ++i) {
|
|
32
|
+
buf[start + i] = rnds[i];
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
return buf;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
return
|
|
38
|
+
return (0, _bytesToUuid.default)(rnds);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
var _default = v4;
|
|
40
|
-
exports.default = _default;
|
|
41
|
-
module.exports = exports.default;
|
|
42
|
+
exports.default = _default;
|
package/dist/v5.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uuid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
|
5
5
|
"commitlint": {
|
|
6
6
|
"extends": [
|
|
@@ -14,11 +14,18 @@
|
|
|
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
|
-
"
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
".": {
|
|
24
|
+
"require": "./dist/index.js",
|
|
25
|
+
"import": "./wrapper.mjs"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"module": "./dist/esm-node/index.js",
|
|
22
29
|
"browser": {
|
|
23
30
|
"./dist/md5.js": "./dist/md5-browser.js",
|
|
24
31
|
"./dist/rng.js": "./dist/rng-browser.js",
|
|
@@ -31,57 +38,67 @@
|
|
|
31
38
|
"LICENSE.md",
|
|
32
39
|
"README.md",
|
|
33
40
|
"dist",
|
|
34
|
-
"
|
|
35
|
-
"v3.js",
|
|
36
|
-
"v4.js",
|
|
37
|
-
"v5.js"
|
|
41
|
+
"wrapper.mjs"
|
|
38
42
|
],
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"@babel/cli": "7.8.4",
|
|
41
|
-
"@babel/core": "7.
|
|
42
|
-
"@babel/preset-env": "7.
|
|
45
|
+
"@babel/core": "7.9.0",
|
|
46
|
+
"@babel/preset-env": "7.9.5",
|
|
43
47
|
"@commitlint/cli": "8.3.5",
|
|
44
48
|
"@commitlint/config-conventional": "8.3.4",
|
|
45
|
-
"@rollup/plugin-node-resolve": "7.1.
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
49
|
+
"@rollup/plugin-node-resolve": "7.1.3",
|
|
50
|
+
"@wdio/browserstack-service": "6.0.12",
|
|
51
|
+
"@wdio/cli": "6.0.15",
|
|
52
|
+
"@wdio/jasmine-framework": "6.0.15",
|
|
53
|
+
"@wdio/local-runner": "6.0.15",
|
|
54
|
+
"@wdio/spec-reporter": "6.0.14",
|
|
55
|
+
"@wdio/static-server-service": "6.0.13",
|
|
56
|
+
"@wdio/sync": "6.0.15",
|
|
57
|
+
"babel-eslint": "10.1.0",
|
|
58
|
+
"bundlewatch": "0.2.6",
|
|
50
59
|
"eslint": "6.8.0",
|
|
51
|
-
"eslint-config-prettier": "6.10.
|
|
52
|
-
"eslint-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
60
|
+
"eslint-config-prettier": "6.10.1",
|
|
61
|
+
"eslint-config-standard": "14.1.1",
|
|
62
|
+
"eslint-plugin-import": "2.20.2",
|
|
63
|
+
"eslint-plugin-node": "11.1.0",
|
|
64
|
+
"eslint-plugin-prettier": "3.1.3",
|
|
65
|
+
"eslint-plugin-promise": "4.2.1",
|
|
66
|
+
"eslint-plugin-standard": "4.0.1",
|
|
67
|
+
"husky": "4.2.5",
|
|
68
|
+
"jest": "25.3.0",
|
|
69
|
+
"lint-staged": "10.1.3",
|
|
58
70
|
"npm-run-all": "4.1.5",
|
|
59
|
-
"prettier": "
|
|
60
|
-
"rollup": "
|
|
61
|
-
"rollup-plugin-terser": "5.
|
|
71
|
+
"prettier": "2.0.4",
|
|
72
|
+
"rollup": "2.6.1",
|
|
73
|
+
"rollup-plugin-terser": "5.3.0",
|
|
62
74
|
"runmd": "1.3.2",
|
|
63
|
-
"selenium-webdriver": "3.6.0",
|
|
64
75
|
"standard-version": "7.1.0"
|
|
65
76
|
},
|
|
66
77
|
"scripts": {
|
|
67
|
-
"examples:browser
|
|
68
|
-
"examples:browser
|
|
69
|
-
"examples:
|
|
78
|
+
"examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
|
|
79
|
+
"examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
|
|
80
|
+
"examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
|
|
81
|
+
"examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
|
|
70
82
|
"lint": "npm run eslint:check && npm run prettier:check",
|
|
71
83
|
"eslint:check": "eslint src/ test/ examples/ *.js",
|
|
72
84
|
"eslint:fix": "eslint --fix src/ test/ examples/ *.js",
|
|
73
|
-
"pretest": "npm run build",
|
|
85
|
+
"pretest": "[ -n $CI ] || npm run build",
|
|
74
86
|
"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": "
|
|
87
|
+
"pretest:browser": "npm run build && npm-run-all --parallel examples:browser:**",
|
|
88
|
+
"test:browser": "wdio run ./wdio.conf.js",
|
|
89
|
+
"pretest:node": "npm run build",
|
|
90
|
+
"test:node": "npm-run-all --parallel examples:node:**",
|
|
91
|
+
"test:pack": "./scripts/testpack.sh",
|
|
92
|
+
"pretest:benchmark": "npm run build",
|
|
93
|
+
"test:benchmark": "cd examples/benchmark && npm install && npm test",
|
|
77
94
|
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
|
|
78
95
|
"prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
|
|
79
|
-
"
|
|
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 )",
|
|
96
|
+
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
81
97
|
"md": "runmd --watch --output=README.md README_js.md",
|
|
82
98
|
"docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
|
|
83
|
-
"docs:diff": "
|
|
99
|
+
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
84
100
|
"build": "./scripts/build.sh",
|
|
101
|
+
"prepack": "npm run build",
|
|
85
102
|
"release": "standard-version --no-verify"
|
|
86
103
|
},
|
|
87
104
|
"repository": {
|
|
@@ -104,8 +121,7 @@
|
|
|
104
121
|
},
|
|
105
122
|
"standard-version": {
|
|
106
123
|
"scripts": {
|
|
107
|
-
"postchangelog": "prettier --write CHANGELOG.md"
|
|
108
|
-
"postcommit": "npm run build"
|
|
124
|
+
"postchangelog": "prettier --write CHANGELOG.md"
|
|
109
125
|
}
|
|
110
126
|
}
|
|
111
127
|
}
|
package/wrapper.mjs
ADDED
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
|
-
);
|