Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 3, 2023
1 parent f495d96 commit 7bb0144
Show file tree
Hide file tree
Showing 20 changed files with 1,598 additions and 1,753 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Expand Up @@ -35,4 +35,3 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_OPTIONS: --max-old-space-size=6144

1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ dist
index.json
indexes.json
node_modules
cache
packages/*/LICENSE
packages/contributing.md
packages/core/README.md
Expand Down
83 changes: 41 additions & 42 deletions package.json
Expand Up @@ -35,83 +35,82 @@
"watch": "esno scripts/build.ts --watch"
},
"devDependencies": {
"@antfu/eslint-config": "^0.29.4",
"@antfu/ni": "^0.18.5",
"@iconify/json": "^2.1.134",
"@rollup/plugin-json": "^5.0.1",
"@rollup/plugin-replace": "^5.0.1",
"@antfu/eslint-config": "^0.34.0",
"@antfu/ni": "^0.18.8",
"@iconify/json": "^2.2.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-replace": "^5.0.2",
"@type-challenges/utils": "^0.1.1",
"@types/fs-extra": "^9.0.13",
"@types/js-yaml": "^4.0.5",
"@types/md5": "^2.3.2",
"@types/node": "^18.11.9",
"@types/prettier": "^2.7.1",
"@types/node": "^18.11.18",
"@types/prettier": "^2.7.2",
"@types/semver": "^7.3.13",
"@types/sharp": "^0.31.0",
"@vitest/coverage-c8": "^0.25.1",
"@vitest/ui": "^0.25.1",
"@vue/compiler-sfc": "^3.2.41",
"@vue/test-utils": "^2.2.1",
"@types/sharp": "^0.31.1",
"@vitest/coverage-c8": "^0.26.3",
"@vitest/ui": "^0.26.3",
"@vue/compiler-sfc": "^3.2.45",
"@vue/test-utils": "^2.2.6",
"@vueuse/core": "workspace:*",
"@vueuse/integrations": "workspace:*",
"@vueuse/math": "workspace:*",
"@vueuse/rxjs": "workspace:*",
"@vueuse/shared": "workspace:*",
"axios": "^1.1.3",
"axios": "^1.2.2",
"bumpp": "^8.2.1",
"consola": "^2.15.3",
"cross-env": "^7.0.3",
"esbuild-register": "^3.3.3",
"eslint": "^8.27.0",
"esbuild-register": "^3.4.2",
"eslint": "^8.31.0",
"esno": "^0.16.3",
"export-size": "^0.5.2",
"fake-indexeddb": "^4.0.0",
"fake-indexeddb": "^4.0.1",
"fast-glob": "^3.2.12",
"firebase": "^9.13.0",
"fs-extra": "^10.1.0",
"firebase": "^9.15.0",
"fs-extra": "^11.1.0",
"fuse.js": "^6.6.2",
"google-font-installer": "^1.2.0",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"jsdom": "^20.0.2",
"lint-staged": "^13.0.3",
"markdown-table": "^3.0.2",
"jsdom": "^20.0.3",
"lint-staged": "^13.1.0",
"markdown-table": "^3.0.3",
"md5": "^2.3.0",
"msw": "^0.48.0",
"node-fetch": "^3.2.10",
"msw": "^0.49.2",
"node-fetch": "^3.3.0",
"ohmyfetch": "^0.4.21",
"pnpm": "^7.14.2",
"postcss": "^8.4.18",
"pnpm": "^7.21.0",
"postcss": "^8.4.20",
"postcss-nested": "^6.0.0",
"prettier": "^2.7.1",
"prettier": "^2.8.1",
"prism-theme-vars": "^0.2.4",
"remove-markdown": "^0.5.0",
"rimraf": "^3.0.2",
"rollup": "^3.2.5",
"rollup-plugin-dts": "^5.0.0",
"rollup": "^3.9.1",
"rollup-plugin-dts": "^5.1.0",
"rollup-plugin-esbuild": "^5.0.0",
"sharp": "^0.31.2",
"simple-git": "^3.14.1",
"sharp": "^0.31.3",
"simple-git": "^3.15.1",
"simple-git-hooks": "^2.8.1",
"typescript": "4.8.4",
"unocss": "^0.46.3",
"unplugin-icons": "^0.14.13",
"unplugin-vue-components": "^0.22.9",
"vite": "^3.2.3",
"vite-plugin-inspect": "^0.7.7",
"vite-plugin-pwa": "^0.13.3",
"vitepress": "^1.0.0-alpha.28",
"vitest": "^0.25.1",
"vue": "^3.2.41",
"typescript": "4.9.4",
"unocss": "^0.48.0",
"unplugin-icons": "^0.14.15",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.0.4",
"vite-plugin-inspect": "^0.7.12",
"vite-plugin-pwa": "^0.14.1",
"vitepress": "^1.0.0-alpha.35",
"vitest": "^0.26.3",
"vue": "^3.2.45",
"vue2": "npm:vue@^2.7.10"
},
"pnpm": {
"neverBuiltDependencies": [
"electron"
],
"overrides": {
"vue-demi": "0.13.11",
"vite": "^3.1.6"
"vue-demi": "0.13.11"
}
},
"simple-git-hooks": {
Expand Down
1 change: 0 additions & 1 deletion packages/.vitepress/config.ts
Expand Up @@ -196,4 +196,3 @@ function getFunctionsSideBar() {

return links
}

1 change: 0 additions & 1 deletion packages/core/onKeyStroke/index.md
Expand Up @@ -34,7 +34,6 @@ onKeyStroke(true, (e) => {
onKeyStroke((e) => {
e.preventDefault()
})

```

### Custom Event Target
Expand Down
4 changes: 3 additions & 1 deletion packages/core/useDisplayMedia/index.ts
Expand Up @@ -35,7 +35,9 @@ export function useDisplayMedia(options: UseDisplayMediaOptions = {}) {
const { navigator = defaultNavigator } = options
const isSupported = useSupported(() => navigator?.mediaDevices?.getDisplayMedia)

const constraint: DisplayMediaStreamConstraints = { audio, video }
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore Type mismatch in different version of TS
const constraint: MediaStreamConstraints = { audio, video }

const stream: Ref<MediaStream | undefined> = shallowRef()

Expand Down
12 changes: 9 additions & 3 deletions packages/core/useEventListener/index.md
Expand Up @@ -11,7 +11,9 @@ Use EventListener with ease. Register using [addEventListener](https://developer
```js
import { useEventListener } from '@vueuse/core'

useEventListener(document, 'visibilitychange', (evt) => { console.log(evt) })
useEventListener(document, 'visibilitychange', (evt) => {
console.log(evt)
})
```

You can also pass a ref as the event target, `useEventListener` will unregister the previous event and register the new one when you change the target.
Expand All @@ -20,7 +22,9 @@ You can also pass a ref as the event target, `useEventListener` will unregister
import { useEventListener } from '@vueuse/core'

const element = ref<HTMLDivElement>()
useEventListener(element, 'keydown', (e) => { console.log(e.key) })
useEventListener(element, 'keydown', (e) => {
console.log(e.key)
})
```

```html
Expand All @@ -35,7 +39,9 @@ You can also call the returned to unregister the listener.
```ts
import { useEventListener } from '@vueuse/core'

const cleanup = useEventListener(document, 'keydown', (e) => { console.log(e.key) })
const cleanup = useEventListener(document, 'keydown', (e) => {
console.log(e.key)
})

cleanup() // This will unregister the listener.
```
9 changes: 8 additions & 1 deletion packages/core/useFetch/index.ts
Expand Up @@ -402,7 +402,14 @@ export function useFetch<T>(url: MaybeComputedRef<string>, ...args: any[]): UseF
}

let isCanceled = false
const context: BeforeFetchContext = { url: resolveUnref(url), options: { ...defaultFetchOptions, ...fetchOptions }, cancel: () => { isCanceled = true } }
const context: BeforeFetchContext = {
url: resolveUnref(url),
options: {
...defaultFetchOptions,
...fetchOptions,
},
cancel: () => { isCanceled = true },
}

if (options.beforeFetch)
Object.assign(context, await options.beforeFetch(context))
Expand Down
8 changes: 7 additions & 1 deletion packages/core/useFocus/index.ts
Expand Up @@ -47,7 +47,13 @@ export function useFocus(target: MaybeElementRef, options: UseFocusOptions = {})
},
})

watch(targetElement, () => { focused.value = initialValue }, { immediate: true, flush: 'post' })
watch(
targetElement,
() => {
focused.value = initialValue
},
{ immediate: true, flush: 'post' },
)

return { focused }
}
5 changes: 4 additions & 1 deletion packages/core/useMagicKeys/index.ts
Expand Up @@ -81,7 +81,10 @@ export function useMagicKeys(options: UseMagicKeysOptions<boolean> = {}): any {
onEventFired = noop,
} = options
const current = reactive(new Set<string>())
const obj = { toJSON() { return {} }, current }
const obj = {
toJSON() { return {} },
current,
}
const refs: Record<string, any> = useReactive ? reactive(obj) : obj
const metaDeps = new Set<string>()
const usedKeys = new Set<string>()
Expand Down
2 changes: 1 addition & 1 deletion packages/core/useVirtualList/component.ts
Expand Up @@ -35,7 +35,7 @@ export const UseVirtualList = defineComponent<UseVirtualListProps>({

const { list, containerProps, wrapperProps, scrollTo } = useVirtualList(listRef, props.options)
expose({ scrollTo })

typeof containerProps.style === 'object' && !Array.isArray(containerProps.style) && (containerProps.style.height = props.height || '300px')

return () => h('div',
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/package.json
Expand Up @@ -155,10 +155,10 @@
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0",
"async-validator": "^4.2.5",
"axios": "^1.1.3",
"axios": "^1.2.2",
"change-case": "^4.1.2",
"drauu": "^0.3.2",
"focus-trap": "^7.0.0",
"focus-trap": "^7.2.0",
"fuse.js": "^6.6.2",
"idb-keyval": "^6.2.0",
"jwt-decode": "^3.1.2",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Expand Up @@ -45,6 +45,6 @@
},
"devDependencies": {
"@nuxt/schema": "^3.0.0",
"unimport": "^0.7.0"
"unimport": "^1.1.0"
}
}
4 changes: 3 additions & 1 deletion packages/rxjs/useSubject/demo.vue
Expand Up @@ -11,7 +11,9 @@ onMounted(() => {
watch(count, value => console.info('from watcher:', value))
const subscription = countSubject.subscribe(value => console.info('from subscriber: ', value))
tryOnScopeDispose(() => { subscription.unsubscribe() })
tryOnScopeDispose(() => {
subscription.unsubscribe()
})
})
</script>

Expand Down
4 changes: 3 additions & 1 deletion packages/rxjs/useSubject/index.ts
Expand Up @@ -22,7 +22,9 @@ export function useSubject<H>(subject: Subject<H>, options?: UseSubjectOptions)
error: options?.onError,
})

watch(value, (nextValue) => { subject.next(nextValue) })
watch(value, (nextValue) => {
subject.next(nextValue)
})

tryOnScopeDispose(() => {
subscription.unsubscribe()
Expand Down
1 change: 0 additions & 1 deletion packages/shared/resolveRef/index.ts
Expand Up @@ -13,4 +13,3 @@ export function resolveRef<T>(r: MaybeComputedRef<T>) {
? computed<T>(r as any)
: ref(r)
}

2 changes: 1 addition & 1 deletion packages/shared/utils/index.ts
Expand Up @@ -92,7 +92,7 @@ export function increaseWithUnit(target: string | number, delta: number): string
*
* @category Object
*/
export function objectPick<O, T extends keyof O>(obj: O, keys: T[], omitUndefined = false) {
export function objectPick<O extends object, T extends keyof O>(obj: O, keys: T[], omitUndefined = false) {
return keys.reduce((n, k) => {
if (k in obj) {
if (!omitUndefined || obj[k] !== undefined)
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/vite/package.json
Expand Up @@ -6,10 +6,10 @@
"serve": "vite preview"
},
"dependencies": {
"vue": "^3.2.41"
"vue": "^3.2.45"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.2.0",
"vite": "^3.2.3"
"@vitejs/plugin-vue": "^4.0.0",
"vite": "^4.0.4"
}
}

0 comments on commit 7bb0144

Please sign in to comment.