Upgrade UUID module. (#682)

This commit is contained in:
Caleb 2017-10-18 11:02:16 -06:00 committed by Shawn Erquhart
parent 7dd8ca13c4
commit 024c43a8c8
4 changed files with 9 additions and 9 deletions

View File

@ -184,7 +184,7 @@
"unified": "^6.1.4",
"unist-builder": "^1.0.2",
"unist-util-visit-parents": "^1.1.1",
"uuid": "^2.0.3",
"uuid": "^3.1.0",
"whatwg-fetch": "^1.0.0"
},
"optionalDependencies": {

View File

@ -1,4 +1,4 @@
import uuid from 'uuid';
import uuid from 'uuid/v4';
import { actions as notifActions } from 'redux-notifications';
import { serializeValues } from '../lib/serializeEntryValues';
import { closeEntry } from './editor';
@ -230,7 +230,7 @@ export function persistUnpublishedEntry(collection, existingUnpublishedEntry) {
if (!entryDraft.get('fieldsErrors').isEmpty()) return Promise.resolve();
const backend = currentBackend(state.config);
const transactionID = uuid.v4();
const transactionID = uuid();
const assetProxies = entryDraft.get('mediaFiles').map(path => getAsset(state, path));
const entry = entryDraft.get('entry');
@ -269,7 +269,7 @@ export function updateUnpublishedEntryStatus(collection, slug, oldStatus, newSta
return (dispatch, getState) => {
const state = getState();
const backend = currentBackend(state.config);
const transactionID = uuid.v4();
const transactionID = uuid();
dispatch(unpublishedEntryStatusChangeRequest(collection, slug, oldStatus, newStatus, transactionID));
backend.updateUnpublishedEntryStatus(collection, slug, newStatus)
.then(() => {
@ -285,7 +285,7 @@ export function deleteUnpublishedEntry(collection, slug) {
return (dispatch, getState) => {
const state = getState();
const backend = currentBackend(state.config);
const transactionID = uuid.v4();
const transactionID = uuid();
dispatch(unpublishedEntryPublishRequest(collection, slug, transactionID));
backend.deleteUnpublishedEntry(collection, slug)
.then(() => {
@ -306,7 +306,7 @@ export function publishUnpublishedEntry(collection, slug) {
return (dispatch, getState) => {
const state = getState();
const backend = currentBackend(state.config);
const transactionID = uuid.v4();
const transactionID = uuid();
dispatch(unpublishedEntryPublishRequest(collection, slug, transactionID));
backend.publishUnpublishedEntry(collection, slug)
.then(() => {

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Autosuggest from 'react-autosuggest';
import uuid from 'uuid';
import uuid from 'uuid/v4';
import { Map } from 'immutable';
import { connect } from 'react-redux';
import { debounce } from 'lodash';
@ -30,7 +30,7 @@ class RelationControl extends Component {
constructor(props, ctx) {
super(props, ctx);
this.controlID = uuid.v4();
this.controlID = uuid();
this.didInitialSearch = false;
}

View File

@ -9429,7 +9429,7 @@ utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
uuid@^2.0.1, uuid@^2.0.2, uuid@^2.0.3:
uuid@^2.0.1, uuid@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"