Skip to content

Commit

Permalink
[Deps] Update uuid 2.x -> 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lencioni authored and ljharb committed Jun 21, 2017
1 parent 4871201 commit d34630e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"object.entries": "^1.0.4",
"object.values": "^1.0.4",
"prop-types": "^15.5.10",
"uuid": "^2.0.3"
"uuid": "^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
Expand Down
4 changes: 2 additions & 2 deletions src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import isEqual from 'lodash/isEqual';
import React from 'react';
import is from 'object-is';
import uuid from 'uuid';
import uuidv4 from 'uuid/v4';
import entries from 'object.entries';
import functionName from 'function.prototype.name';
import {
Expand Down Expand Up @@ -231,7 +231,7 @@ export function splitSelector(selector) {
// step 1: make a map of all quoted strings with a uuid
const quotedSegments = selector.split(/[^" ]+|("[^"]*")|.*/g)
.filter(Boolean)
.reduce((obj, match) => ({ ...obj, [match]: uuid.v4() }), {});
.reduce((obj, match) => ({ ...obj, [match]: uuidv4() }), {});

const splits = selector
// step 2: replace all quoted strings with the uuid, so we don't have to properly parse them
Expand Down

0 comments on commit d34630e

Please sign in to comment.