Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uuid 2.x -> 3.x #998

Merged
merged 1 commit into from Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
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
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