git.iko.soy/rowtype-yoga/purescript-uuid
on main help sign in
Bump uuid from 3.4.0 to 8.3.0 (#19)

This bump removes a DeprecationWarning emitted by the new `uuid` npm package. It also removes the need to rely on the `uuid-validate` as this feature is now embedded in `uuid`. Closes #16.

commitd0cf179305d877440a2071d835a349b1d29dc764 authorStanislas Signoud <signez@stanisoft.net> dateThu 6 Aug 2020, 23:14 (6 years ago) parentded22e4
4 files changed+37−19
README.md+3−3 package-lock.json+11−8 package.json+5−2 src/Data/UUID.js+18−6
README.md+3−3
@@ -2,6 +2,6 @@
22
33[![Build Status](https://travis-ci.org/spicydonuts/purescript-uuid.svg?branch=master)](https://travis-ci.org/spicydonuts/purescript-uuid)
44
5−Wrapper for the `uuid` and `uuid-validate` npm packages.
6−These packages are not installed automatically, as they come from `npm`.
7−Install them with `npm install -S uuid uuid-validate`.
5+Wrapper for the `uuid` npm package.
6+This package are not installed automatically, as it comes from `npm`.
7+Install it with `npm install -S uuid`.
package-lock.json+11−8
@@ -2532,6 +2532,14 @@
25322532 "tough-cookie": "~2.4.3",
25332533 "tunnel-agent": "^0.6.0",
25342534 "uuid": "^3.3.2"
2535+ },
2536+ "dependencies": {
2537+ "uuid": {
2538+ "version": "3.4.0",
2539+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
2540+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
2541+ "dev": true
2542+ }
25352543 }
25362544 },
25372545 "resolve": {
@@ -3334,14 +3342,9 @@
33343342 "dev": true
33353343 },
33363344 "uuid": {
3337− "version": "3.4.0",
3338− "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
3339− "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
3340− },
3341− "uuid-validate": {
3342− "version": "0.0.3",
3343− "resolved": "https://registry.npmjs.org/uuid-validate/-/uuid-validate-0.0.3.tgz",
3344− "integrity": "sha512-Fykw5U4eZESbq739BeLvEBFRuJODfrlmjx5eJux7W817LjRaq4b7/i4t2zxQmhcX+fAj4nMfRdTzO4tmwLKn0w=="
3345+ "version": "8.3.0",
3346+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
3347+ "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
33453348 },
33463349 "verror": {
33473350 "version": "1.10.0",
package.json+5−2
@@ -13,9 +13,12 @@
1313 "keywords": [],
1414 "author": "",
1515 "license": "ISC",
16+ "repository": {
17+ "type": "git",
18+ "url": "https://github.com/spicydonuts/purescript-uuid"
19+ },
1620 "dependencies": {
17− "uuid": "^3.4.0",
18− "uuid-validate": "0.0.3"
21+ "uuid": "^8.3.0"
1922 },
2023 "devDependencies": {
2124 "bower": "^1.8.8",
src/Data/UUID.js+18−6
@@ -5,27 +5,39 @@
55var mkV3UUID = null;
66exports.getUUID3Impl = function (str) {
77 return function (namespace) {
8− if (mkV3UUID === null) mkV3UUID = require('uuid/v3');
8+ if (mkV3UUID === null) {
9+ var uuid = require('uuid');
10+ mkV3UUID = uuid.v3;
11+ }
912 return mkV3UUID(str, namespace);
1013 };
1114};
1215
1316var mkV4UUID = null;
1417exports.getUUIDImpl = function () {
15− if (mkV4UUID === null) mkV4UUID = require('uuid/v4');
18+ if (mkV4UUID === null) {
19+ var uuid = require('uuid');
20+ mkV4UUID = uuid.v4;
21+ }
1622 return mkV4UUID();
1723};
1824
1925var mkV5UUID = null;
2026exports.getUUID5Impl = function (str) {
2127 return function (namespace) {
22− if (mkV5UUID === null) mkV5UUID = require('uuid/v5');
28+ if (mkV5UUID === null) {
29+ var uuid = require('uuid');
30+ mkV5UUID = uuid.v5;
31+ }
2332 return mkV5UUID(str, namespace);
2433 };
2534};
2635
27−var validateV4UUID = null;
36+var validateUUID = null;
2837exports.validateV4UUID = function (str) {
29− if (validateV4UUID === null) validateV4UUID = require('uuid-validate');
30− return validateV4UUID(str, 4);
38+ if (validateUUID === null) {
39+ var uuid = require('uuid');
40+ validateUUID = uuid.validate;
41+ }
42+ return validateUUID(str);
3143};