diff --git a/contentcuration/contentcuration/frontend/shared/data/db.js b/contentcuration/contentcuration/frontend/shared/data/db.js index e537c54677..482180fcde 100644 --- a/contentcuration/contentcuration/frontend/shared/data/db.js +++ b/contentcuration/contentcuration/frontend/shared/data/db.js @@ -1,6 +1,6 @@ import Dexie from 'dexie'; import 'dexie-observable'; -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import { APP_ID } from './constants'; if (process.env.NODE_ENV !== 'production') { diff --git a/contentcuration/contentcuration/frontend/shared/data/resources.js b/contentcuration/contentcuration/frontend/shared/data/resources.js index f42864f2dc..5686301574 100644 --- a/contentcuration/contentcuration/frontend/shared/data/resources.js +++ b/contentcuration/contentcuration/frontend/shared/data/resources.js @@ -13,7 +13,7 @@ import sortBy from 'lodash/sortBy'; import uniq from 'lodash/uniq'; import uniqBy from 'lodash/uniqBy'; -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import { CHANGE_TYPES, CHANGES_TABLE, diff --git a/contentcuration/contentcuration/frontend/shared/mixins/draggable/base.js b/contentcuration/contentcuration/frontend/shared/mixins/draggable/base.js index e435ab448e..db3ac8d9a1 100644 --- a/contentcuration/contentcuration/frontend/shared/mixins/draggable/base.js +++ b/contentcuration/contentcuration/frontend/shared/mixins/draggable/base.js @@ -1,5 +1,5 @@ import { mapState } from 'vuex'; -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import { DraggableIdentityHelper } from 'shared/vuex/draggablePlugin/module/utils'; export default { diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/registerCustomMarkdownField.js b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/registerCustomMarkdownField.js index 5e1725b07f..250ae5b30f 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/registerCustomMarkdownField.js +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/registerCustomMarkdownField.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import vueCustomElement from 'vue-custom-element'; -import uuid from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; export default VueComponent => { const dashed = camel => camel.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase(); @@ -18,7 +18,7 @@ export default VueComponent => { // a hack to prevent squire from merging custom element spans // see here: https://github.com/nhn/tui.editor/blob/master/libs/squire/source/Node.js#L92-L101 - this.classList.add(`markdown-field-${uuid()}`); + this.classList.add(`markdown-field-${uuidv4()}`); // pass innerHTML of host element as the `markdown` property this.observer = new MutationObserver(mutations => { diff --git a/contentcuration/contentcuration/frontend/shared/vuex/indexedDBPlugin/index.spec.js b/contentcuration/contentcuration/frontend/shared/vuex/indexedDBPlugin/index.spec.js index 6af26e45fe..9c24b32b67 100644 --- a/contentcuration/contentcuration/frontend/shared/vuex/indexedDBPlugin/index.spec.js +++ b/contentcuration/contentcuration/frontend/shared/vuex/indexedDBPlugin/index.spec.js @@ -1,5 +1,5 @@ import { EventEmitter } from 'events'; -import uuidv4 from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import IndexedDBPlugin, { commitListener, dispatchListener, diff --git a/package.json b/package.json index a242dbeeb0..debf32ed22 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "spark-md5": "^3.0.0", "store2": "^2.14.2", "string-strip-html": "8.3.0", - "uuid": "^3.3.3", + "uuid": "^8.3.2", "vue": "^2.6.12", "vue-croppa": "^1.3.8", "vue-custom-element": "https://github.com/learningequality/vue-custom-element.git#master", diff --git a/yarn.lock b/yarn.lock index 21bf4d33e4..9707f40de6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12177,7 +12177,7 @@ utrie@^1.0.2: dependencies: base64-arraybuffer "^1.0.2" -uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==