diff --git a/package.json b/package.json index 94094989..6cbbd751 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/actions/editorialWorkflow.js b/src/actions/editorialWorkflow.js index 78ce594a..9b0082fb 100644 --- a/src/actions/editorialWorkflow.js +++ b/src/actions/editorialWorkflow.js @@ -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(() => { diff --git a/src/components/Widgets/RelationControl.js b/src/components/Widgets/RelationControl.js index fc3a5e5f..1e2d0aaf 100644 --- a/src/components/Widgets/RelationControl.js +++ b/src/components/Widgets/RelationControl.js @@ -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; } diff --git a/yarn.lock b/yarn.lock index 27735f10..35196b82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"