Skip to content

Commit

Permalink
feat(devtools): use api.now()
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Mar 10, 2022
1 parent 64fac12 commit 836ab86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/pinia/package.json
Expand Up @@ -76,7 +76,7 @@
"vue2": "npm:vue@2"
},
"dependencies": {
"@vue/devtools-api": "^6.0.6",
"@vue/devtools-api": "^6.0.13",
"vue-demi": "*"
},
"peerDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions packages/pinia/src/devtools/plugin.ts
Expand Up @@ -295,7 +295,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
api.addTimelineEvent({
layerId: MUTATIONS_LAYER_ID,
event: {
time: Date.now(),
time: api.now(),
title: '馃洬 ' + name,
subtitle: 'start',
data: {
Expand All @@ -312,7 +312,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
api.addTimelineEvent({
layerId: MUTATIONS_LAYER_ID,
event: {
time: Date.now(),
time: api.now(),
title: '馃洭 ' + name,
subtitle: 'end',
data: {
Expand All @@ -331,7 +331,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
api.addTimelineEvent({
layerId: MUTATIONS_LAYER_ID,
event: {
time: Date.now(),
time: api.now(),
logType: 'error',
title: '馃挜 ' + name,
subtitle: 'end',
Expand All @@ -357,7 +357,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
api.addTimelineEvent({
layerId: MUTATIONS_LAYER_ID,
event: {
time: Date.now(),
time: api.now(),
title: 'Change',
subtitle: name,
data: {
Expand All @@ -382,7 +382,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
// rootStore.state[store.id] = state

const eventData: TimelineEvent = {
time: Date.now(),
time: api.now(),
title: formatMutationType(type),
data: {
store: formatDisplay(store.$id),
Expand Down Expand Up @@ -427,7 +427,7 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
api.addTimelineEvent({
layerId: MUTATIONS_LAYER_ID,
event: {
time: Date.now(),
time: api.now(),
title: '馃敟 ' + store.$id,
subtitle: 'HMR update',
data: {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -2236,10 +2236,10 @@
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.21.1.tgz#f1410f53c42aa67fa3b01ca7bdba891f69d7bc97"
integrity sha512-FqC4s3pm35qGVeXRGOjTsRzlkJjrBLriDS9YXbflHLsfA9FrcKzIyWnLXoNm+/7930E8rRakXuAc2QkC50swAw==

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

"@vue/reactivity-transform@3.2.31":
version "3.2.31"
Expand Down

0 comments on commit 836ab86

Please sign in to comment.