Skip to content

Commit 836ab86

Browse files
committed
feat(devtools): use api.now()
1 parent 64fac12 commit 836ab86

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/pinia/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"vue2": "npm:vue@2"
7777
},
7878
"dependencies": {
79-
"@vue/devtools-api": "^6.0.6",
79+
"@vue/devtools-api": "^6.0.13",
8080
"vue-demi": "*"
8181
},
8282
"peerDependencies": {

packages/pinia/src/devtools/plugin.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
295295
api.addTimelineEvent({
296296
layerId: MUTATIONS_LAYER_ID,
297297
event: {
298-
time: Date.now(),
298+
time: api.now(),
299299
title: '🛫 ' + name,
300300
subtitle: 'start',
301301
data: {
@@ -312,7 +312,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
312312
api.addTimelineEvent({
313313
layerId: MUTATIONS_LAYER_ID,
314314
event: {
315-
time: Date.now(),
315+
time: api.now(),
316316
title: '🛬 ' + name,
317317
subtitle: 'end',
318318
data: {
@@ -331,7 +331,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
331331
api.addTimelineEvent({
332332
layerId: MUTATIONS_LAYER_ID,
333333
event: {
334-
time: Date.now(),
334+
time: api.now(),
335335
logType: 'error',
336336
title: '💥 ' + name,
337337
subtitle: 'end',
@@ -357,7 +357,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
357357
api.addTimelineEvent({
358358
layerId: MUTATIONS_LAYER_ID,
359359
event: {
360-
time: Date.now(),
360+
time: api.now(),
361361
title: 'Change',
362362
subtitle: name,
363363
data: {
@@ -382,7 +382,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
382382
// rootStore.state[store.id] = state
383383

384384
const eventData: TimelineEvent = {
385-
time: Date.now(),
385+
time: api.now(),
386386
title: formatMutationType(type),
387387
data: {
388388
store: formatDisplay(store.$id),
@@ -427,7 +427,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
427427
api.addTimelineEvent({
428428
layerId: MUTATIONS_LAYER_ID,
429429
event: {
430-
time: Date.now(),
430+
time: api.now(),
431431
title: '🔥 ' + store.$id,
432432
subtitle: 'HMR update',
433433
data: {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,10 +2236,10 @@
22362236
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.21.1.tgz#f1410f53c42aa67fa3b01ca7bdba891f69d7bc97"
22372237
integrity sha512-FqC4s3pm35qGVeXRGOjTsRzlkJjrBLriDS9YXbflHLsfA9FrcKzIyWnLXoNm+/7930E8rRakXuAc2QkC50swAw==
22382238

2239-
"@vue/devtools-api@^6.0.6":
2240-
version "6.0.12"
2241-
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.12.tgz#7b57cce215ae9f37a86984633b3aa3d595aa5b46"
2242-
integrity sha512-iO/4FIezHKXhiDBdKySCvJVh8/mZPxHpiQrTy+PXVqJZgpTPTdHy4q8GXulaY+UKEagdkBb0onxNQZ0LNiqVhw==
2239+
"@vue/devtools-api@^6.0.13":
2240+
version "6.0.13"
2241+
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.13.tgz#33f8debe2d0239903b6fc8af10ace45ed3a4fab1"
2242+
integrity sha512-T34EjcArVqzANedEZe2kXQ+AZsld2z1ptJlkOGm87+blk+s6udnP4ze/NYqV8lz1o9AIivimN0xxteLlWiWQdg==
22432243

22442244
22452245
version "3.2.31"

0 commit comments

Comments
 (0)