Skip to content

Commit

Permalink
feat: upgrade deps (#3614)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 5, 2023
1 parent 0e04aa4 commit fccf2e4
Show file tree
Hide file tree
Showing 165 changed files with 3,737 additions and 3,384 deletions.
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -6,7 +6,7 @@ Thanks for being interested in contributing to this project!
>
> As the VueUse audience continues to grow, we have been inundated with an overwhelming number of feature requests and pull requests. As a result, maintaining the project has become increasingly challenging and has stretched our capacity to its limits. As such, in the near future, we may need to slow down our acceptance of new features and prioritize the stability and quality of existing functions. **Please note that new features for VueUse may not be accepted at this time.** If you have any new ideas, we suggest that you first incorporate them into your own codebase, iterate on them to suit your needs, and assess their generalizability. If you strongly believe that your ideas are beneficial to the community, you may submit a pull request along with your use cases, and we would be happy to review and discuss them. Thank you for your understanding.
## Development
## Development

### Setup

Expand Down Expand Up @@ -45,7 +45,7 @@ There are some notes for adding new functions

New add-ons are greatly welcome!

- Create a new folder under `packages/`, name it as your add-on name.
- Create a new folder under `packages/`, name it as your add-on name.
- Add add-on details in `scripts/packages.ts`
- Create `README.md` under that folder.
- Add functions as you would do to the core package.
Expand Down Expand Up @@ -90,7 +90,7 @@ export default useMyFunction

for `index.md` the first sentence will be displayed as the short intro in the function list, so try to keep it brief and clear.

```md
```markdown
# useMyFunction

This will be the intro. The detail descriptions...
Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -86,16 +86,17 @@ npm i @vueuse/core

### CDN

```html
```vue
<script src="https://unpkg.com/@vueuse/shared"></script>
<script src="https://unpkg.com/@vueuse/core"></script>
```

It will be exposed to global as `window.VueUse`

## 🪴 Project Activity

![Alt](https://repobeats.axiom.co/api/embed/a406ba7461a6a087dbdb14d4395046c948d44c51.svg "Repobeats analytics image")
![Alt](https://repobeats.axiom.co/api/embed/a406ba7461a6a087dbdb14d4395046c948d44c51.svg 'Repobeats analytics image')

## 🧱 Contribute

Expand Down
8 changes: 6 additions & 2 deletions eslint.config.js
Expand Up @@ -21,6 +21,7 @@ const restricted = [

export default antfu(
{
formatters: true,
ignores: [
'patches',
'playgrounds',
Expand Down Expand Up @@ -84,8 +85,8 @@ export default antfu(
{
files: [
'**/*.md',
'**/*.md/**/*.[jt]s',
'**/*.md/**/*.vue',
'**/*.md/*.[jt]s',
'**/*.md/*.vue',
'**/demo.vue',
'**/demo.client.vue',
'**/*.test.ts',
Expand All @@ -97,6 +98,9 @@ export default antfu(
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'vue/no-unused-vars': 'off',
'vue/no-unused-refs': 'off',
'vue/require-v-for-key': 'off',
'ts/no-unused-vars': 'off',
'ts/no-redeclare': 'off',
'unused-imports/no-unused-vars': 'off',
Expand Down
23 changes: 11 additions & 12 deletions netlify.toml
@@ -1,19 +1,18 @@
[build.environment]
NODE_OPTIONS = "--max_old_space_size=4096"
NODE_VERSION = "18"
NODE_OPTIONS = "--max_old_space_size=4096"
NODE_VERSION = "18"

[build]
publish = "packages/.vitepress/dist"
command = "pnpm run install-fonts && pnpm run docs:build"
publish = "packages/.vitepress/dist"
command = "pnpm run install-fonts && pnpm run docs:build"

[[redirects]]
from = "https://vueuse.js.org/*"
to = "https://vueuse.org/:splat"
status = 301
force = true
from = "https://vueuse.js.org/*"
to = "https://vueuse.org/:splat"
status = 301
force = true

[[redirects]]
from = "/*"
to = "/index.html"
status = 200

from = "/*"
to = "/index.html"
status = 200
73 changes: 37 additions & 36 deletions package.json
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "10.6.1",
"private": true,
"packageManager": "pnpm@8.10.2",
"packageManager": "pnpm@8.11.0",
"description": "Collection of essential Vue Composition Utilities",
"author": "Anthony Fu<https://github.com/antfu>",
"license": "MIT",
Expand Down Expand Up @@ -36,75 +36,75 @@
"watch": "esno scripts/build-run.ts --watch"
},
"devDependencies": {
"@antfu/eslint-config": "^1.1.0",
"@antfu/ni": "^0.21.8",
"@iconify/json": "^2.2.139",
"@antfu/eslint-config": "^2.3.3",
"@antfu/ni": "^0.21.12",
"@iconify/json": "^2.2.152",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-replace": "^5.0.5",
"@type-challenges/utils": "^0.1.1",
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/md5": "^2.3.5",
"@types/node": "^20.9.0",
"@types/node": "^20.10.3",
"@types/remove-markdown": "^0.3.4",
"@types/semver": "^7.5.5",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6",
"@vue/compiler-sfc": "^3.3.8",
"@vue/test-utils": "^2.4.1",
"@types/semver": "^7.5.6",
"@vitest/coverage-v8": "^1.0.1",
"@vitest/ui": "^1.0.1",
"@vue/compiler-sfc": "^3.3.10",
"@vue/test-utils": "^2.4.3",
"@vueuse/core": "workspace:*",
"@vueuse/integrations": "workspace:*",
"@vueuse/math": "workspace:*",
"@vueuse/rxjs": "workspace:*",
"@vueuse/shared": "workspace:*",
"axios": "^1.6.1",
"axios": "^1.6.2",
"bumpp": "^9.2.0",
"consola": "^3.2.3",
"esbuild-register": "^3.5.0",
"eslint": "8.51.0",
"eslint-plugin-antfu": "1.0.0-beta.10",
"esno": "^0.17.0",
"eslint": "^8.55.0",
"eslint-plugin-format": "^0.1.0",
"esno": "^4.0.0",
"export-size": "^0.7.0",
"fake-indexeddb": "^5.0.1",
"fast-glob": "^3.3.2",
"firebase": "^10.6.0",
"fs-extra": "^11.1.1",
"firebase": "^10.7.0",
"fs-extra": "^11.2.0",
"fuse.js": "^7.0.0",
"google-font-installer": "^1.2.0",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"jsdom": "^22.1.0",
"lint-staged": "^15.0.2",
"jsdom": "^23.0.1",
"lint-staged": "^15.2.0",
"markdown-table": "^3.0.3",
"md5": "^2.3.0",
"msw": "1.0.1",
"node-fetch": "^3.3.2",
"node-fetch-native": "^1.4.1",
"ofetch": "^1.3.3",
"pnpm": "^8.10.2",
"postcss": "^8.4.31",
"pnpm": "^8.11.0",
"postcss": "^8.4.32",
"postcss-nested": "^6.0.1",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"prism-theme-vars": "^0.2.4",
"remove-markdown": "^0.5.0",
"rimraf": "^5.0.5",
"rollup": "^4.3.0",
"rollup": "^4.6.1",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-pure": "^0.2.1",
"sharp": "0.32.6",
"simple-git": "^3.20.0",
"simple-git": "^3.21.0",
"simple-git-hooks": "^2.9.0",
"taze": "^0.12.0",
"typescript": "5.2.2",
"unocss": "^0.57.3",
"unplugin-icons": "^0.17.3",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
"vite-plugin-inspect": "^0.7.42",
"vite-plugin-pwa": "^0.16.7",
"vitepress": "1.0.0-rc.4",
"vitest": "^0.34.6",
"taze": "^0.13.0",
"typescript": "^5.3.2",
"unocss": "^0.58.0",
"unplugin-icons": "^0.18.1",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.5",
"vite-plugin-inspect": "^0.8.1",
"vite-plugin-pwa": "^0.17.3",
"vitepress": "^1.0.0-rc.31",
"vitest": "^1.0.1",
"vue": "^3.3.8",
"vue2": "npm:vue@^2.7.14"
},
Expand All @@ -113,9 +113,10 @@
"electron"
],
"overrides": {
"magic-string": "^0.30.3",
"sourcemap-codec": "npm:@jridgewell/sourcemap-codec@^1.4.15",
"vue-demi": "0.14.6"
"magic-string": "^0.30.5",
"rollup": "^4.6.1",
"vite": "^5.0.5",
"vue-demi": "^0.14.6"
}
},
"simple-git-hooks": {
Expand Down
3 changes: 3 additions & 0 deletions packages/.vitepress/plugins/markdownTransform.ts
Expand Up @@ -100,6 +100,9 @@ export async function getFunctionMarkdown(pkg: string, name: string) {
const demoPath = ['demo.vue', 'demo.client.vue'].find(i => fs.existsSync(join(dirname, i)))
const types = await getTypeDefinition(pkg, name)

if (!types)
console.warn(`No types found for ${pkg}/${name}`)

let typingSection = ''

if (types) {
Expand Down
5 changes: 4 additions & 1 deletion packages/.vitepress/theme/components/CourseLink.vue
Expand Up @@ -5,7 +5,10 @@ defineProps<{
</script>

<template>
<a :href="href" target="_blank" bg-green:10 px4 py3 rounded-md block mt2 flex items-center gap2>
<a
:href="href" target="_blank"
bg-green:10 px4 py3 rounded-md block mt2 flex items-center gap2 decoration-none
>
<div i-carbon:play-filled flex-none text-lg />
<slot />
</a>
Expand Down
7 changes: 4 additions & 3 deletions packages/.vitepress/theme/components/FunctionBadge.vue
Expand Up @@ -34,12 +34,13 @@ const link = computed(() => {
:class="fn.deprecated ? 'op80 saturate-0' : ''"
>
<a
v-bind="link" bg="gray-400/5" p="x-1.5 y-0.5" class="rounded items-center" flex="inline gap-1 none" my-auto
v-bind="link"
my-auto
:class="fn.deprecated ? 'line-through !decoration-solid' : ''"
>
<span v-html="styledName(fn.name)" />
<i v-if="fn.external" i-carbon-launch class="opacity-80 text-xs" />
<code v-html="styledName(fn.name)" />
</a>
<i v-if="fn.external" i-carbon-launch class="opacity-50 text-0.7rem" />
<span op50>-</span>
<span class="whitespace-wrap" v-html="renderMarkdown(fn.description)" />
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/.vitepress/theme/components/FunctionInfo.vue
Expand Up @@ -5,11 +5,12 @@ import { functions } from '@vueuse/metadata'
import exportSizes from '../../../export-size.json'
const props = defineProps<{ fn: string }>()
const info = computed(() => functions.find(i => i.name === props.fn))
const info = computed(() => functions.find(i => i.name === props.fn)!)
const lastUpdated = useTimeAgo(new Date(info.value?.lastUpdated || 0))
const link = computed(() => `/functions\#category=${encodeURIComponent(info.value!.category!)}`)
const exportSize = exportSizes[info.value!.name as keyof typeof exportSizes]
function getFunctionLink(fn: string) {
const info = functions.find(i => i.name === fn)
return info?.docs?.replace(/https?:\/\/vueuse\.org\//g, '/')
Expand Down
2 changes: 1 addition & 1 deletion packages/.vitepress/theme/components/FunctionsList.vue
Expand Up @@ -141,7 +141,7 @@ function toggleSort(method: string) {
<input v-model="search" class="w-full" type="text" role="search" placeholder="Search...">
</div>
<div h="1px" bg="$vp-c-divider" m="b-4" />
<div flex="~ col" gap="2" class="relative" p="t-5">
<div flex="~ col gap-3" class="relative" p="t-5">
<div v-if="hasFilters" class="transition mb-2 opacity-60 absolute -top-3 right-0 z-10">
<button class="select-button flex gap-1 items-center !px-2 !py-1" @click="resetFilters()">
<i i-carbon-filter-remove />
Expand Down
12 changes: 7 additions & 5 deletions packages/.vitepress/theme/styles/demo.css
Expand Up @@ -20,7 +20,9 @@

@media (min-width: 720px) {
.demo {
--width: calc(100vw - var(--sidebar-width) - var(--scrollbar-width)) !important;
--width: calc(
100vw - var(--sidebar-width) - var(--scrollbar-width)
) !important;
--content-width: min(48rem, var(--width)) !important;
--margin-left: calc(
calc(calc(var(--content-width) - var(--width)) / 2) - 1.5rem
Expand All @@ -36,7 +38,7 @@

.demo {
p {
margin: 0.5rem 0 ;
margin: 0.5rem 0;
}

button {
Expand Down Expand Up @@ -93,7 +95,6 @@
opacity: 0.8;
}


textarea {
display: block;
min-width: 20rem;
Expand All @@ -112,7 +113,9 @@
background: var(--vp-c-bg-soft);
}

input[type='text'], input[type='search'], input[type='number'] {
input[type='text'],
input[type='search'],
input[type='number'] {
display: block;
font-size: 0.9rem;
padding: 0.5em 1em 0.4em 1em;
Expand Down Expand Up @@ -188,7 +191,6 @@
}
}


html.dark .demo {
.resizer {
background: #222;
Expand Down

0 comments on commit fccf2e4

Please sign in to comment.