Skip to content

Commit

Permalink
chore: upgrade to composition api beta 16
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 10, 2020
1 parent ee4f682 commit 31a21a9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
"@types/memory-fs": "^0.3.2",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"@vue/composition-api": "1.0.0-beta.14",
"@vue/composition-api": "1.0.0-beta.16",
"@vue/test-utils": "^1.1.0",
"codecov": "^3.8.0",
"eslint": "^7.10.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-prettier": "^3.1.4",
Expand Down
13 changes: 7 additions & 6 deletions src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
onServerPrefetch,
reactive,
Ref,
set,
watch,
} from '@vue/composition-api'

Expand Down Expand Up @@ -90,7 +91,7 @@ export function useCache<T, K = null>(
status = 'initialised',
time = new Date().getTime(),
}: SetCacheOptions<T, K>) {
Vue.set(cache, key, [value, status, time, error])
set(cache, key, [value, status, time, error])
}

const serverInstance = getServerInstance()
Expand Down Expand Up @@ -128,11 +129,11 @@ export function useCache<T, K = null>(
}: SetCacheOptions<T, K>) {
if (!(key in cache)) initialiseCache({ key, value, status })

Vue.set(cache[key], 0, value)
Vue.set(cache[key], 1, status)
Vue.set(cache[key], 2, new Date().getTime())
Vue.set(cache[key], 3, error)
Vue.set(cache[key], 4, promise)
set(cache[key], 0, value)
set(cache[key], 1, status)
set(cache[key], 2, new Date().getTime())
set(cache[key], 3, error)
set(cache[key], 4, promise)
}

function fetch(query = unwrap(key), force?: boolean) {
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2423,14 +2423,14 @@ __metadata:
languageName: node
linkType: hard

"@vue/composition-api@npm:1.0.0-beta.14":
version: 1.0.0-beta.14
resolution: "@vue/composition-api@npm:1.0.0-beta.14"
"@vue/composition-api@npm:1.0.0-beta.16":
version: 1.0.0-beta.16
resolution: "@vue/composition-api@npm:1.0.0-beta.16"
dependencies:
tslib: ^2.0.1
peerDependencies:
vue: ">= 2.5 < 3"
checksum: 2a6bb7783f774aa26aa9ed825376365269704b06c062fb8f272e08a91fb2cd5ff5c2ecec39581aacb12151cd9187290655715ee1444dc389196073290358bb31
checksum: 8cd2a596fbfb760140d8e1d4fd7394b5aff7acb93fe550bee181c5da3358b6335bb819d0338e78a5be4a0493387e5e8b5a3d01ee93687d3ef9e987c69ec96daf
languageName: node
linkType: hard

Expand Down Expand Up @@ -4469,9 +4469,9 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:^7.10.0, eslint@npm:^7.5.0":
version: 7.10.0
resolution: "eslint@npm:7.10.0"
"eslint@npm:^7.11.0, eslint@npm:^7.5.0":
version: 7.11.0
resolution: "eslint@npm:7.11.0"
dependencies:
"@babel/code-frame": ^7.0.0
"@eslint/eslintrc": ^0.1.3
Expand All @@ -4483,7 +4483,7 @@ __metadata:
enquirer: ^2.3.5
eslint-scope: ^5.1.1
eslint-utils: ^2.1.0
eslint-visitor-keys: ^1.3.0
eslint-visitor-keys: ^2.0.0
espree: ^7.3.0
esquery: ^1.2.0
esutils: ^2.0.2
Expand Down Expand Up @@ -4512,7 +4512,7 @@ __metadata:
v8-compile-cache: ^2.0.3
bin:
eslint: bin/eslint.js
checksum: a136b9e01c956b97b1705517ecf71de082d7758b5871c97f4ca6a33a6f364f8be42a75f045ed74c3ae85e42e333269c4db5ad8b793f0ceeb10975726808a1514
checksum: 45ef6dc7b31684ca0f383ed9c6224e763197e1d49745542f4440e37286c947973388a6a7ebbf103eeee91ddb4af2652c5d22718f4130bfbbf4bd16a04103f82a
languageName: node
linkType: hard

Expand Down Expand Up @@ -10765,10 +10765,10 @@ typescript@^4.0.3:
"@types/memory-fs": ^0.3.2
"@typescript-eslint/eslint-plugin": ^4.4.0
"@typescript-eslint/parser": ^4.4.0
"@vue/composition-api": 1.0.0-beta.14
"@vue/composition-api": 1.0.0-beta.16
"@vue/test-utils": ^1.1.0
codecov: ^3.8.0
eslint: ^7.10.0
eslint: ^7.11.0
eslint-config-prettier: ^6.12.0
eslint-plugin-jest: ^24.1.0
eslint-plugin-prettier: ^3.1.4
Expand Down

0 comments on commit 31a21a9

Please sign in to comment.