diff --git a/core/package.json b/core/package.json index 85dd839d..4338d532 100644 --- a/core/package.json +++ b/core/package.json @@ -135,7 +135,7 @@ "uploadcare-widget-tab-effects": "1.6.0", "url": "0.11.0", "url-join": "5.0.0", - "uuid": "3.4.0", + "uuid": "9.0.0", "validate-color": "2.2.1", "vfile": "5.3.6", "vfile-message": "3.1.3", @@ -183,7 +183,7 @@ "@types/react-window": "1.8.5", "@types/styled-components": "5.1.26", "@types/url-join": "4.0.1", - "@types/uuid": "3.4.10", + "@types/uuid": "9.0.0", "@typescript-eslint/eslint-plugin": "5.45.0", "@typescript-eslint/parser": "5.45.0", "axios": "1.2.0", diff --git a/core/src/backends/test/implementation.ts b/core/src/backends/test/implementation.ts index 4c82a918..f2c3e999 100644 --- a/core/src/backends/test/implementation.ts +++ b/core/src/backends/test/implementation.ts @@ -3,7 +3,7 @@ import isError from 'lodash/isError'; import take from 'lodash/take'; import unset from 'lodash/unset'; import { extname } from 'path'; -import uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; import { basename, Cursor, CURSOR_COMPATIBILITY_SYMBOL } from '@staticcms/core/lib/util'; import AuthenticationPage from './AuthenticationPage'; diff --git a/core/src/constants/configSchema.tsx b/core/src/constants/configSchema.tsx index 700c96d8..9df59d9e 100644 --- a/core/src/constants/configSchema.tsx +++ b/core/src/constants/configSchema.tsx @@ -4,7 +4,7 @@ import uniqueItemProperties from 'ajv-keywords/dist/keywords/uniqueItemPropertie import instanceOf from 'ajv-keywords/dist/keywords/instanceof'; import prohibited from 'ajv-keywords/dist/keywords/prohibited'; import ajvErrors from 'ajv-errors'; -import uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; import { formatExtensions, frontmatterFormats, extensionFormatters } from '../formats/formats'; import { getWidgets } from '../lib/registry'; diff --git a/core/src/lib/auth/utils.ts b/core/src/lib/auth/utils.ts index 63a73c67..d3b0baa7 100644 --- a/core/src/lib/auth/utils.ts +++ b/core/src/lib/auth/utils.ts @@ -1,4 +1,4 @@ -import uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; export function createNonce() { const nonce = uuid(); diff --git a/core/src/lib/hooks/useMediaInsert.ts b/core/src/lib/hooks/useMediaInsert.ts index e2f9e910..58e1affe 100644 --- a/core/src/lib/hooks/useMediaInsert.ts +++ b/core/src/lib/hooks/useMediaInsert.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useMemo } from 'react'; -import uuid from 'uuid'; +import { v4 as uuid } from 'uuid'; import { selectMediaPath } from '@staticcms/core/reducers/mediaLibrary'; import { useAppDispatch, useAppSelector } from '@staticcms/core/store/hooks'; diff --git a/core/src/widgets/code/CodeControl.tsx b/core/src/widgets/code/CodeControl.tsx index baeab28d..1e63af96 100644 --- a/core/src/widgets/code/CodeControl.tsx +++ b/core/src/widgets/code/CodeControl.tsx @@ -2,7 +2,7 @@ import { styled } from '@mui/material/styles'; import { loadLanguage } from '@uiw/codemirror-extensions-langs'; import CodeMirror from '@uiw/react-codemirror'; import React, { useCallback, useMemo, useState } from 'react'; -import uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; import ObjectWidgetTopBar from '@staticcms/core/components/UI/ObjectWidgetTopBar'; import Outline from '@staticcms/core/components/UI/Outline'; diff --git a/core/src/widgets/file/withFileControl.tsx b/core/src/widgets/file/withFileControl.tsx index d75cc297..c4e1202e 100644 --- a/core/src/widgets/file/withFileControl.tsx +++ b/core/src/widgets/file/withFileControl.tsx @@ -6,7 +6,7 @@ import { styled } from '@mui/material/styles'; import { arrayMoveImmutable } from 'array-move'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { SortableContainer, SortableElement } from 'react-sortable-hoc'; -import uuid from 'uuid/v4'; +import { v4 as uuid } from 'uuid'; import ObjectWidgetTopBar from '@staticcms/core/components/UI/ObjectWidgetTopBar'; import Outline from '@staticcms/core/components/UI/Outline'; diff --git a/core/src/widgets/list/ListControl.tsx b/core/src/widgets/list/ListControl.tsx index 5c9a8101..818b6ef7 100644 --- a/core/src/widgets/list/ListControl.tsx +++ b/core/src/widgets/list/ListControl.tsx @@ -3,7 +3,7 @@ import { arrayMoveImmutable } from 'array-move'; import isEmpty from 'lodash/isEmpty'; import React, { useCallback, useMemo, useState } from 'react'; import { SortableContainer } from 'react-sortable-hoc'; -import uuid from 'uuid'; +import { v4 as uuid } from 'uuid'; import FieldLabel from '@staticcms/core/components/UI/FieldLabel'; import ObjectWidgetTopBar from '@staticcms/core/components/UI/ObjectWidgetTopBar'; diff --git a/core/yarn.lock b/core/yarn.lock index ce7ed6c7..ea88a82d 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -2946,10 +2946,10 @@ resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== -"@types/uuid@3.4.10": - version "3.4.10" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.10.tgz#637d3c8431f112edf6728ac9bdfadfe029540f48" - integrity sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A== +"@types/uuid@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.0.tgz#53ef263e5239728b56096b0a869595135b7952d2" + integrity sha512-kr90f+ERiQtKWMz5rP32ltJ/BtULDI5RVO0uavn1HQUOwjx0R1h0rnDYNL0CepF1zL5bSY6FISAfd9tOdDhU5Q== "@types/ws@^8.5.1": version "8.5.3" @@ -11655,10 +11655,10 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -uuid@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== uuid@^8.3.2: version "8.3.2"