Skip to content

Commit 6899c0f

Browse files
authored
refactor: Bump uuid to 9.0.0 (#1718)
1 parent 23b8810 commit 6899c0f

File tree

5 files changed

+32
-13
lines changed

5 files changed

+32
-13
lines changed

integration/test/ParseUserTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const assert = require('assert');
44
const Parse = require('../../node');
5-
const uuidv4 = require('uuid/v4');
5+
const { v4: uuidv4 } = require('uuid');
66
const { twitterAuthData } = require('./helper');
77

88
class CustomUser extends Parse.User {

package-lock.json

Lines changed: 27 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@babel/runtime": "7.20.13",
3434
"idb-keyval": "6.0.3",
3535
"react-native-crypto-js": "1.0.0",
36-
"uuid": "3.4.0",
36+
"uuid": "9.0.0",
3737
"ws": "8.6.0",
3838
"xmlhttprequest": "1.8.0"
3939
},

src/__tests__/weapp-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const mockWeChat = require('./test_helpers/mockWeChat');
1919

2020
global.wx = mockWeChat;
2121

22-
jest.mock('uuid/v4', () => {
22+
jest.mock('uuid', () => {
2323
return () => 0;
2424
});
2525

src/uuid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ if (process.env.PARSE_BUILD === 'weapp') {
1616
return s.join('');
1717
};
1818
} else {
19-
uuid = require('uuid/v4');
19+
const { v4 } = require('uuid');
20+
uuid = v4;
2021
}
2122

2223
module.exports = uuid;

0 commit comments

Comments
 (0)