Skip to content

Commit 65ec89f

Browse files
committed
feat: upgrade uuid
1 parent 0ba874e commit 65ec89f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@types/node": "^13.5.1",
5454
"@types/react": "^16.8.22",
5555
"@types/react-dom": "^16.8.4",
56-
"@types/uuid": "^3.4.6",
56+
"@types/uuid": "^8.3.1",
5757
"@typescript-eslint/eslint-plugin": "^4.4.1",
5858
"build-plugin-component": "^1.0.0",
5959
"chai": "^4.2.0",
@@ -111,6 +111,6 @@
111111
"@babel/runtime": "^7.6.2",
112112
"classnames": "^2.2.6",
113113
"eventemitter3": "^4.0.0",
114-
"uuid": "^3.4.0"
114+
"uuid": "^8.3.2"
115115
}
116116
}

src/utils/uploadPlaceholder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { v4 as uuid } from 'uuid';
12
import { UploadFunc } from '../share/var';
2-
import * as uuid from 'uuid/v4';
33
import getDecorated from './decorate';
44
import { isPromise } from './tool';
55

66
function getUploadPlaceholder(file: File, onImageUpload: UploadFunc) {
77
const placeholder = getDecorated('', 'image', {
8-
target: 'Uploading_' + uuid(),
8+
target: `Uploading_${uuid()}`,
99
imageUrl: '',
1010
}).text;
1111
const uploaded = new Promise((resolve: (url: string) => void) => {

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,10 +1922,10 @@
19221922
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
19231923
integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==
19241924

1925-
"@types/uuid@^3.4.6":
1926-
version "3.4.9"
1927-
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.9.tgz#fcf01997bbc9f7c09ae5f91383af076d466594e1"
1928-
integrity sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ==
1925+
"@types/uuid@^8.3.1":
1926+
version "8.3.1"
1927+
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f"
1928+
integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==
19291929

19301930
"@types/webpack-sources@*":
19311931
version "2.1.0"
@@ -14518,7 +14518,7 @@ uuid@^3.3.2, uuid@^3.3.3, uuid@^3.4.0:
1451814518
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
1451914519
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
1452014520

14521-
uuid@^8.3.0:
14521+
uuid@^8.3.0, uuid@^8.3.2:
1452214522
version "8.3.2"
1452314523
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
1452414524
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

0 commit comments

Comments
 (0)