Skip to content

Commit

Permalink
Upgrade to op-js 0.1.2, fix hovering references in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jodyheavener committed Jun 17, 2022
1 parent f7fc108 commit 3355ab8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
]
},
"dependencies": {
"@1password/op-js": "^0.1.1",
"@1password/op-js": "^0.1.2",
"json-to-ast": "^2.1.0",
"open": "^8.4.0",
"timeago.js": "^4.0.2",
Expand Down
5 changes: 5 additions & 0 deletions src/language-providers/hover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export async function provideHover(
return new Hover(markdownUnauthed, range);
}

// HACK / FIXME: In Windows the CLI cannot perform succesive commands too quickly,
// so we need to give it a second after the whoami call before looking up item details.
// This is an issue in the CLI, not the extension.
await new Promise((resolve) => setTimeout(resolve, 1000));

let metaData: ReferenceMetaData;
try {
metaData = await this.items.getReferenceMetadata(vault, item, field);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
stylelint "^14.0.0"
stylelint-scss "^4.0.0"

"@1password/op-js@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@1password/op-js/-/op-js-0.1.1.tgz#4efd142ee15aba76ef83f103c8c3e441214815aa"
integrity sha512-U99m0T7uMF9ccOQe2kByBlRc2dqzqrmeqx2jhndeJ0GgIWWgH5n9miBdpoCzfZCKZh7gMIY8XPLmWRFVgP8uOw==
"@1password/op-js@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@1password/op-js/-/op-js-0.1.2.tgz#0e5c745d2b1624411099cbf7184125ca46736cd6"
integrity sha512-QObuBFv4eEEPFgcY47b+AiIptUXIiiG+J2Z+8YcJkLBuPpjuhd0P1zG76HxJWOxekG+2ivTLks7YHzi+EtWpbA==
dependencies:
lookpath "^1.2.2"
semver "^7.3.6"
Expand Down

0 comments on commit 3355ab8

Please sign in to comment.