From b23853b92f988f77ad1e370399443e15e46aba64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 13:55:33 +0200 Subject: [PATCH 01/11] docs: use VitePress `VPTeamMembers` component --- docs/.vitepress/components/HomePage.vue | 9 +- docs/.vitepress/components/TeamMember.vue | 59 -------- docs/.vitepress/contributors.ts | 91 ++++++----- docs/.vitepress/style/vars.css | 13 +- docs/package.json | 2 +- pnpm-lock.yaml | 176 ++++++++-------------- 6 files changed, 133 insertions(+), 217 deletions(-) delete mode 100644 docs/.vitepress/components/TeamMember.vue diff --git a/docs/.vitepress/components/HomePage.vue b/docs/.vitepress/components/HomePage.vue index 4d2e7dc6ae99..b803ce0e630a 100644 --- a/docs/.vitepress/components/HomePage.vue +++ b/docs/.vitepress/components/HomePage.vue @@ -1,4 +1,5 @@ @@ -10,13 +11,7 @@ import { teamMembers } from '../contributors'

Meet The Team

-
- -
+

Contributors

diff --git a/docs/.vitepress/components/TeamMember.vue b/docs/.vitepress/components/TeamMember.vue deleted file mode 100644 index cd9ecbd49292..000000000000 --- a/docs/.vitepress/components/TeamMember.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - diff --git a/docs/.vitepress/contributors.ts b/docs/.vitepress/contributors.ts index de04ea4c5199..1d509f2f6fe1 100644 --- a/docs/.vitepress/contributors.ts +++ b/docs/.vitepress/contributors.ts @@ -5,13 +5,19 @@ export interface Contributor { avatar: string } +export interface SocialEntry { + icon: string + link: string +} + export interface CoreTeam { avatar: string name: string - github: string - twitter?: string - sponsors?: boolean - description: string + sponsor?: string + title?: string + org?: string + desc?: string + links?: SocialEntry[] } const contributorsAvatars: Record = {} @@ -24,61 +30,74 @@ export const contributors = (contributorNames as string[]).reduce((acc, name) => return acc }, [] as Contributor[]) +const createLinks = (entries: string[][]): SocialEntry[] => { + return entries.reduce((acc, e) => { + for (let i = 0; i < e.length; i += 2) { + switch (e[i]) { + case 'github': + acc.push({ icon: e[i], link: `https://github.com/${e[i + 1]}` }) + break + case 'twitter': + acc.push({ icon: e[i], link: `https://twitter.com/${e[i + 1]}` }) + break + } + } + return acc + }, new Array()) +} + export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.antfu, name: 'Anthony Fu', - github: 'antfu', - twitter: 'antfu7', - sponsors: true, - description: 'A fanatical open sourceror
Core team member of Vite & Vue
Working at NuxtLabs', - }, - { - avatar: contributorsAvatars['patak-dev'], - name: 'Patak', - github: 'patak-dev', - twitter: 'patak_dev', - sponsors: true, - description: 'A collaborative being
Core team member of Vite
Team member of Vue', + links: createLinks([['github', 'antfu'], ['twitter', 'antfu7']]), + sponsor: 'https://github.com/sponsors/antfu', + title: 'A fanatical open sourceror, working', + org: 'NuxtLabs', + desc: 'Core team member of Vite & Vue & Vitest', }, { avatar: contributorsAvatars['sheremet-va'], name: 'Vladimir', - github: 'sheremet-va', - twitter: 'sheremet_va', - sponsors: false, - description: 'An open source fullstack developer', + links: createLinks([['github', 'sheremet-va'], ['twitter', 'sheremet_va']]), + title: 'An open source fullstack developer', + desc: 'Core team member of Vitest', + }, + { + avatar: contributorsAvatars['patak-dev'], + name: 'Patak', + links: createLinks([['github', 'patak-dev'], ['twitter', 'patak_dev']]), + sponsor: 'https://github.com/sponsors/dev', + title: 'A collaborative being, working', + org: 'StackBlitz', + desc: 'Core team member of Vite & Vue & Vitest', }, { avatar: contributorsAvatars.Aslemammad, name: 'Mohammad Bagher', - github: 'Aslemammad', - twitter: 'asleMammadam', - sponsors: false, - description: 'An open source developer
Team member of Poimandres and Vike', + links: createLinks([['github', 'Aslemammad'], ['twitter', 'asleMammadam']]), + title: 'An open source developer', + desc: 'Team member of Poimandres & Vike', }, { avatar: contributorsAvatars.Demivan, name: 'Ivan Demchuk', - github: 'Demivan', - twitter: 'IvanDemchuk', - sponsors: false, - description: 'A tech lead, fullstack developer
Author of fluent-vue', + links: createLinks([['github', 'Demivan'], ['twitter', 'IvanDemchuk']]), + title: 'A tech lead, fullstack developer', + desc: 'Author of fluent-vue', }, { avatar: contributorsAvatars.userquin, name: 'Joaquín Sánchez', - github: 'userquin', - twitter: 'userquin', - sponsors: false, - description: 'A fullstack and android developer
Vite\'s fanatical follower', + links: createLinks([['github', 'userquin'], ['twitter', 'userquin']]), + title: 'A fullstack and android developer', + desc: 'Vite\'s fanatical follower', }, { avatar: contributorsAvatars.zxch3n, name: 'Zixuan Chen', - github: 'zxch3n', - twitter: 'zxch3n', - sponsors: false, - description: 'A fullstack developer
Creating tools for collaboration', + links: createLinks([['github', 'zxch3n'], ['twitter', 'zxch3n']]), + title: 'A fullstack developer', + desc: 'Creating tools for collaboration', }, ] diff --git a/docs/.vitepress/style/vars.css b/docs/.vitepress/style/vars.css index 8463e9257cdc..9552c8b04179 100644 --- a/docs/.vitepress/style/vars.css +++ b/docs/.vitepress/style/vars.css @@ -11,14 +11,23 @@ --vp-c-brand-darker: #52730d; --vp-c-text-code: #5d6f5d; --vp-code-block-bg: rgba(125,125,125,0.04); - --vp-custom-block-tip-text: rgb(18, 181, 157); - --vp-custom-block-tip-border: rgba(18, 181, 157, 0.5); + /* fix TIP on light: the default one is too light (2 in contrast) */ + --vp-custom-block-tip-text: rgb(12, 124, 108); + --vp-custom-block-tip-border: rgba(12, 124, 108, 0.5); --vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1); + /* fix contrast on gray cards: used by --vp-c-text-2 */ + --vp-c-text-light-2: rgba(56 56 56 / 70%); } .dark { --vp-code-block-bg: rgba(0,0,0,0.2); --vp-c-text-code: #c0cec0; + /* fix TIP: check the same above (these are the defaults) */ + --vp-custom-block-tip-text: rgb(18, 181, 157); + --vp-custom-block-tip-border: rgba(18, 181, 157, 0.5); + --vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1); + /* fix contrast on gray cards: check the same above (this is the default) */ + --vp-c-text-dark-2: rgba(235, 235, 235, 0.60); } /** diff --git a/docs/package.json b/docs/package.json index 809465c75a87..08be222f6891 100644 --- a/docs/package.json +++ b/docs/package.json @@ -23,7 +23,7 @@ "unocss": "^0.39.3", "unplugin-vue-components": "^0.19.6", "vite-plugin-pwa": "^0.12.0", - "vitepress": "^1.0.0-alpha.2", + "vitepress": "^1.0.0-alpha.4", "workbox-window": "^6.5.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9edd404c6508..b0db24781e72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,7 +94,7 @@ importers: unocss: ^0.39.3 unplugin-vue-components: ^0.19.6 vite-plugin-pwa: ^0.12.0 - vitepress: ^1.0.0-alpha.2 + vitepress: ^1.0.0-alpha.4 vue: ^3.2.37 workbox-window: ^6.5.3 dependencies: @@ -109,9 +109,9 @@ importers: fast-glob: 3.2.11 https-localhost: 4.7.1 unocss: 0.39.3_vite@2.9.10 - unplugin-vue-components: 0.19.6_vite@2.9.10+vue@3.2.37 + unplugin-vue-components: 0.19.6_hd26raqwpnm7hl4c5jnifs3the vite-plugin-pwa: 0.12.0_vite@2.9.10 - vitepress: 1.0.0-alpha.2 + vitepress: 1.0.0-alpha.4_ohobp6rpsmerwlq5ipwfh5yigy workbox-window: 6.5.3 examples/basic: @@ -176,7 +176,7 @@ importers: vitest: workspace:* zustand: 4.0.0-rc.1 dependencies: - '@vueuse/integrations': 8.5.0_axios@0.26.1 + '@vueuse/integrations': 8.5.0_axios@0.26.1+vue@3.2.37 axios: 0.26.1 tinyspy: 0.3.2 devDependencies: @@ -198,7 +198,7 @@ importers: typescript: 4.6.3 vitest: workspace:* dependencies: - next: 12.1.5_zpnidt7m3osuk7shl3s4oenomq + next: 12.1.5_ezdxe4hg7n3pawg24sxf3xmgta react: 18.0.0 react-dom: 18.0.0_react@18.0.0 devDependencies: @@ -258,15 +258,15 @@ importers: vite: ^2.9.10 vitest: workspace:* dependencies: - react: 16.14.0 - react-dom: 16.14.0_react@16.14.0 + react: 17.0.2 + react-dom: 17.0.2_react@17.0.2 devDependencies: '@types/react': 17.0.45 '@types/react-dom': 17.0.17 '@vitejs/plugin-react': 1.3.1 '@vitest/ui': link:../../packages/ui enzyme: 3.11.0 - enzyme-adapter-react-16: 1.15.6_j6bpv5pizkyfppcg2tmva6pmii + enzyme-adapter-react-16: 1.15.6_7ltvq4e2railvf5uya4ffxpe2a vite: 2.9.10 vitest: link:../../packages/vitest @@ -294,14 +294,14 @@ importers: dependencies: '@emotion/react': 11.9.0_3dj5wppwohj5ocihzt4m54mr2a '@emotion/styled': 11.8.1_3zgpe2oef7sbs566rsy6a7qm7i - '@mui/lab': 5.0.0-alpha.86_xjii3a7ufdwggkrf6imrcribfm + '@mui/lab': 5.0.0-alpha.87_xjii3a7ufdwggkrf6imrcribfm '@mui/material': 5.8.3_rikzftoujo3cmwul4lespwcm6i history: 5.3.0 notistack: 2.0.5_ozyq7dscrvuimqma7xstouyo4e react: 17.0.2 react-dom: 17.0.2_react@17.0.2 react-router-dom: 6.3.0_sfoxds7t5ydpegc3knd667wn6m - recharts: 2.1.10_sfoxds7t5ydpegc3knd667wn6m + recharts: 2.1.10_oxfzelaz5ynxsop2v2nu2h2m64 swr: 1.3.0_react@17.0.2 devDependencies: '@testing-library/jest-dom': 5.16.4 @@ -1270,7 +1270,7 @@ packages: resolution: {integrity: sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.2 + '@babel/types': 7.18.4 '@jridgewell/gen-mapping': 0.3.1 jsesc: 2.5.2 @@ -3030,14 +3030,15 @@ packages: resolution: {integrity: sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA==} dev: true - /@docsearch/js/3.1.0: + /@docsearch/js/3.1.0_ohobp6rpsmerwlq5ipwfh5yigy: resolution: {integrity: sha512-5XSK+xbP0hcTIp54MECqxkWLs6kf7Ug4nWdxWNtx8cUpLiFNFnKXDxCb35wnyNpjukmrx7Q9DkO5tFFsmNVxng==} dependencies: '@docsearch/react': 3.1.0_ohobp6rpsmerwlq5ipwfh5yigy - '@types/react': 18.0.9 preact: 10.7.2 - react: 18.1.0 - react-dom: 18.1.0_react@18.1.0 + transitivePeerDependencies: + - '@types/react' + - react + - react-dom dev: true /@docsearch/react/3.1.0_ohobp6rpsmerwlq5ipwfh5yigy: @@ -3160,8 +3161,6 @@ packages: '@emotion/weak-memoize': 0.2.5 hoist-non-react-statics: 3.3.2 react: 17.0.2 - transitivePeerDependencies: - - supports-color dev: false /@emotion/serialize/0.11.16: @@ -3239,8 +3238,6 @@ packages: '@emotion/serialize': 1.0.3 '@emotion/utils': 1.1.0 react: 17.0.2 - transitivePeerDependencies: - - supports-color dev: false /@emotion/stylis/0.8.5: @@ -3757,8 +3754,8 @@ packages: react-is: 17.0.2 dev: false - /@mui/base/5.0.0-alpha.85_sfoxds7t5ydpegc3knd667wn6m: - resolution: {integrity: sha512-ONlQJOmQrxmR+pYF9AqH69FOG4ofwzVzNltwb2xKAQIW3VbsNZahcHIpzhFd70W6EIU+QHzB9TzamSM+Fg/U7w==} + /@mui/base/5.0.0-alpha.86_sfoxds7t5ydpegc3knd667wn6m: + resolution: {integrity: sha512-0vi/Nni1mizrgrzKeyksEjw5JVSrgT8Vr2NhxzFtYxqpMgtdSrBvcmcuzBf9kE/ECMPbgpSIcqv0nLbLZUYkOQ==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -3780,8 +3777,8 @@ packages: react-is: 17.0.2 dev: false - /@mui/lab/5.0.0-alpha.86_xjii3a7ufdwggkrf6imrcribfm: - resolution: {integrity: sha512-5dx9/vHldiE5KFu99YUtEGKyUgwTiq8wM+IhEnNKkU+YjEMULVYV+mgS9nvnf6laKtgqy2hOE4JivqRPIuOGdA==} + /@mui/lab/5.0.0-alpha.87_xjii3a7ufdwggkrf6imrcribfm: + resolution: {integrity: sha512-Zuth3wdX5wSpn1aMJsnJqX1lRiNTUcUs7HaCQI1AufbuE+84Drl5c5kANLtb6VOEGoThqvbINpne+oGGoJuqwA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -3813,11 +3810,11 @@ packages: '@babel/runtime': 7.17.9 '@emotion/react': 11.9.0_3dj5wppwohj5ocihzt4m54mr2a '@emotion/styled': 11.8.1_3zgpe2oef7sbs566rsy6a7qm7i - '@mui/base': 5.0.0-alpha.85_sfoxds7t5ydpegc3knd667wn6m + '@mui/base': 5.0.0-alpha.86_sfoxds7t5ydpegc3knd667wn6m '@mui/material': 5.8.3_rikzftoujo3cmwul4lespwcm6i - '@mui/system': 5.8.4_bgqmsvm4hz6izcmpcwescmz73y + '@mui/system': 5.8.5_bgqmsvm4hz6izcmpcwescmz73y '@mui/utils': 5.8.4_react@17.0.2 - '@mui/x-date-pickers': 5.0.0-alpha.1_lnmlihwa6lemxszvjvdd3tv6sy + '@mui/x-date-pickers': 5.0.0-alpha.1_4app2jldh5bx4balclxn7wcw7i clsx: 1.1.1 date-fns: 2.28.0 prop-types: 15.8.1 @@ -3929,8 +3926,8 @@ packages: react: 17.0.2 dev: false - /@mui/system/5.8.4_bgqmsvm4hz6izcmpcwescmz73y: - resolution: {integrity: sha512-eeYZXlOn4p+tYwqqDlci6wW4knJ68aGx5A24YU9ubYZ5o0IwveoNP3LC9sHAMxigk/mUTqL4bpSMJ2HbTn2aQg==} + /@mui/system/5.8.5_bgqmsvm4hz6izcmpcwescmz73y: + resolution: {integrity: sha512-1bhITHp5sX/CVEf1QwtBWvW+kNnH+GU7lKz0CeAL1RyH9dWvoL9Yt/+i/L8hJ6jVZB/7Au2F6MsyDPt8V1jfdA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -4004,7 +4001,7 @@ packages: react-is: 17.0.2 dev: false - /@mui/x-date-pickers/5.0.0-alpha.1_lnmlihwa6lemxszvjvdd3tv6sy: + /@mui/x-date-pickers/5.0.0-alpha.1_4app2jldh5bx4balclxn7wcw7i: resolution: {integrity: sha512-dLPkRiIn2Gr0momblxiOnIwrxn4SijVix+8e08mwAGWhiWcmWep1O9XTRDpZsjB0kjHYCf+kZjlRX4dxnj2acg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4031,7 +4028,7 @@ packages: '@date-io/luxon': 2.13.1 '@date-io/moment': 2.13.1 '@mui/material': 5.8.3_rikzftoujo3cmwul4lespwcm6i - '@mui/system': 5.8.4_bgqmsvm4hz6izcmpcwescmz73y + '@mui/system': 5.8.5_bgqmsvm4hz6izcmpcwescmz73y '@mui/utils': 5.8.4_react@17.0.2 clsx: 1.1.1 date-fns: 2.28.0 @@ -6341,7 +6338,7 @@ packages: dev: true /@types/form-data/0.0.33: - resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} + resolution: {integrity: sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=} dependencies: '@types/node': 17.0.40 dev: true @@ -7457,7 +7454,7 @@ packages: vue: 3.2.37 vue-demi: 0.12.5_vue@3.2.37 - /@vueuse/integrations/8.5.0_axios@0.26.1: + /@vueuse/integrations/8.5.0_axios@0.26.1+vue@3.2.37: resolution: {integrity: sha512-tZNYg5T07OacF1x4evGoRZK1BMU0ge7MqF4tzR3eJLD0EPiq4jd6+HUzCloPtMZ14wNPwaP1B8xYUyYxucPJ3w==} peerDependencies: axios: '*' @@ -7492,10 +7489,10 @@ packages: '@vueuse/core': 8.5.0_vue@3.2.37 '@vueuse/shared': 8.5.0_vue@3.2.37 axios: 0.26.1 - vue: 3.2.37 vue-demi: 0.12.5_vue@3.2.37 transitivePeerDependencies: - '@vue/composition-api' + - vue dev: false /@vueuse/metadata/8.5.0: @@ -7805,7 +7802,7 @@ packages: symbol.prototype.description: 1.0.5 dev: true - /airbnb-prop-types/2.16.0_react@16.14.0: + /airbnb-prop-types/2.16.0_react@17.0.2: resolution: {integrity: sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==} peerDependencies: react: ^0.14 || ^15.0.0 || ^16.0.0-alpha @@ -7818,7 +7815,7 @@ packages: object.entries: 1.1.5 prop-types: 15.8.1 prop-types-exact: 1.2.0 - react: 16.14.0 + react: 17.0.2 react-is: 16.13.1 dev: true @@ -8816,7 +8813,7 @@ packages: dev: true /bytes/3.0.0: - resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} + resolution: {integrity: sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=} engines: {node: '>= 0.8'} dev: true @@ -9443,7 +9440,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} /concat-stream/1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} @@ -10836,7 +10833,7 @@ packages: dev: true /ee-first/1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true /ejs/3.1.7: @@ -10942,7 +10939,7 @@ packages: engines: {node: '>=0.12'} dev: true - /enzyme-adapter-react-16/1.15.6_j6bpv5pizkyfppcg2tmva6pmii: + /enzyme-adapter-react-16/1.15.6_7ltvq4e2railvf5uya4ffxpe2a: resolution: {integrity: sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==} peerDependencies: enzyme: ^3.0.0 @@ -10950,31 +10947,31 @@ packages: react-dom: ^16.0.0-0 dependencies: enzyme: 3.11.0 - enzyme-adapter-utils: 1.14.0_react@16.14.0 + enzyme-adapter-utils: 1.14.0_react@17.0.2 enzyme-shallow-equal: 1.0.4 has: 1.0.3 object.assign: 4.1.2 object.values: 1.1.5 prop-types: 15.8.1 - react: 16.14.0 - react-dom: 16.14.0_react@16.14.0 + react: 17.0.2 + react-dom: 17.0.2_react@17.0.2 react-is: 16.13.1 - react-test-renderer: 16.14.0_react@16.14.0 + react-test-renderer: 16.14.0_react@17.0.2 semver: 5.7.1 dev: true - /enzyme-adapter-utils/1.14.0_react@16.14.0: + /enzyme-adapter-utils/1.14.0_react@17.0.2: resolution: {integrity: sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==} peerDependencies: react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 dependencies: - airbnb-prop-types: 2.16.0_react@16.14.0 + airbnb-prop-types: 2.16.0_react@17.0.2 function.prototype.name: 1.1.5 has: 1.0.3 object.assign: 4.1.2 object.fromentries: 2.0.5 prop-types: 15.8.1 - react: 16.14.0 + react: 17.0.2 semver: 5.7.1 dev: true @@ -15812,7 +15809,7 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: true - /next/12.1.5_zpnidt7m3osuk7shl3s4oenomq: + /next/12.1.5_ezdxe4hg7n3pawg24sxf3xmgta: resolution: {integrity: sha512-YGHDpyfgCfnT5GZObsKepmRnne7Kzp7nGrac07dikhutWQug7hHg85/+sPJ4ZW5Q2pDkb+n0FnmLkmd44htIJQ==} engines: {node: '>=12.22.0'} hasBin: true @@ -15835,7 +15832,7 @@ packages: postcss: 8.4.5 react: 18.0.0 react-dom: 18.0.0_react@18.0.0 - styled-jsx: 5.0.1_react@18.0.0 + styled-jsx: 5.0.1_uyynoipo3v3vrfv6si7tyrw7ku optionalDependencies: '@next/swc-android-arm-eabi': 12.1.5 '@next/swc-android-arm64': 12.1.5 @@ -17311,17 +17308,6 @@ packages: - supports-color dev: true - /react-dom/16.14.0_react@16.14.0: - resolution: {integrity: sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==} - peerDependencies: - react: ^16.14.0 - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - prop-types: 15.8.1 - react: 16.14.0 - scheduler: 0.19.1 - /react-dom/17.0.2_react@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} peerDependencies: @@ -17499,14 +17485,14 @@ packages: refractor: 3.6.0 dev: true - /react-test-renderer/16.14.0_react@16.14.0: + /react-test-renderer/16.14.0_react@17.0.2: resolution: {integrity: sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==} peerDependencies: react: ^16.14.0 dependencies: object-assign: 4.1.1 prop-types: 15.8.1 - react: 16.14.0 + react: 17.0.2 react-is: 16.13.1 scheduler: 0.19.1 dev: true @@ -17551,14 +17537,6 @@ packages: react-dom: 17.0.2_react@17.0.2 dev: false - /react/16.14.0: - resolution: {integrity: sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - prop-types: 15.8.1 - /react/17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} engines: {node: '>=0.10.0'} @@ -17672,7 +17650,7 @@ packages: decimal.js-light: 2.5.1 dev: false - /recharts/2.1.10_sfoxds7t5ydpegc3knd667wn6m: + /recharts/2.1.10_oxfzelaz5ynxsop2v2nu2h2m64: resolution: {integrity: sha512-me6c8m2Gs88X/nuM2gDSTDIhpSLNMbiTrlE4Cu53hjZNegT3g3xLlTrbYSAQuBCFWuWJAZXCmEuMr6AwizLyaA==} engines: {node: '>=12'} peerDependencies: @@ -17685,7 +17663,6 @@ packages: d3-shape: 2.1.0 eventemitter3: 4.0.7 lodash: 4.17.21 - prop-types: 15.8.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 react-is: 16.13.1 @@ -17693,6 +17670,8 @@ packages: react-smooth: 2.0.0_oxfzelaz5ynxsop2v2nu2h2m64 recharts-scale: 0.4.5 reduce-css-calc: 2.1.8 + transitivePeerDependencies: + - prop-types dev: false /redent/1.0.0: @@ -18238,6 +18217,7 @@ packages: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 + dev: true /scheduler/0.20.2: resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} @@ -19163,7 +19143,7 @@ packages: inline-style-parser: 0.1.1 dev: true - /styled-jsx/5.0.1_react@18.0.0: + /styled-jsx/5.0.1_uyynoipo3v3vrfv6si7tyrw7ku: resolution: {integrity: sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -19176,6 +19156,7 @@ packages: babel-plugin-macros: optional: true dependencies: + '@babel/core': 7.18.2 react: 18.0.0 dev: false @@ -19790,7 +19771,7 @@ packages: dev: true /typedarray/0.0.6: - resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true /typescript/2.9.2: @@ -20203,38 +20184,6 @@ packages: - webpack dev: true - /unplugin-vue-components/0.19.6_vite@2.9.10+vue@3.2.37: - resolution: {integrity: sha512-APvrJ9Hpid1MLT0G4PWerMJgARhNw6dzz0pcCwCxaO2DR7VyvDacMqjOQNC6ukq7FSw3wzD8VH+9i3EFXwkGmw==} - engines: {node: '>=14'} - peerDependencies: - '@babel/parser': ^7.15.8 - '@babel/traverse': ^7.15.4 - vue: 2 || 3 - peerDependenciesMeta: - '@babel/parser': - optional: true - '@babel/traverse': - optional: true - dependencies: - '@antfu/utils': 0.5.2 - '@rollup/pluginutils': 4.2.1 - chokidar: 3.5.3 - debug: 4.3.4 - fast-glob: 3.2.11 - local-pkg: 0.4.1 - magic-string: 0.26.2 - minimatch: 5.0.1 - resolve: 1.22.0 - unplugin: 0.6.3_vite@2.9.10 - vue: 3.2.37 - transitivePeerDependencies: - - esbuild - - rollup - - supports-color - - vite - - webpack - dev: true - /unplugin-vue2-script-setup/0.10.2_2bloa65zsoqadlob4lncrwg3um: resolution: {integrity: sha512-m886AZIZCXMiAbTbOPQEk+MqmtHBX3dENheFXjcHSRetwBsD0KVDBteQVD5XrSBzDdQKeKw6IU4dV+2eGcLJ0A==} peerDependencies: @@ -20437,7 +20386,7 @@ packages: dev: true /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true /util.promisify/1.0.0: @@ -20464,7 +20413,7 @@ packages: dev: true /utils-merge/1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} engines: {node: '>= 0.4.0'} dev: true @@ -20757,13 +20706,13 @@ packages: optionalDependencies: fsevents: 2.3.2 - /vitepress/1.0.0-alpha.2: - resolution: {integrity: sha512-twSsmx2DI/3XgZZ8KLyRAH8RgK2Zj4kJx/kwhZhimwndYqQDrtcIaAcuV+P3FKukZ+cYtm9yt9qohz631jKx4A==} + /vitepress/1.0.0-alpha.4_ohobp6rpsmerwlq5ipwfh5yigy: + resolution: {integrity: sha512-bOAA4KW6vYGlkbcrPLZLTKWTgXVroObU+o9xj9EENyEl6yg26WWvfN7DGA4BftjdM5O8nR93Z5khPQ3W/tFE7Q==} engines: {node: '>=14.6.0'} hasBin: true dependencies: '@docsearch/css': 3.1.0 - '@docsearch/js': 3.1.0 + '@docsearch/js': 3.1.0_ohobp6rpsmerwlq5ipwfh5yigy '@vitejs/plugin-vue': 2.3.3_vite@2.9.10+vue@3.2.37 '@vue/devtools-api': 6.1.4 '@vueuse/core': 8.7.4_vue@3.2.37 @@ -20772,8 +20721,11 @@ packages: vite: 2.9.10 vue: 3.2.37 transitivePeerDependencies: + - '@types/react' - '@vue/composition-api' - less + - react + - react-dom - sass - stylus dev: true @@ -20945,7 +20897,7 @@ packages: dev: true /webidl-conversions/3.0.1: - resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} /webidl-conversions/4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} @@ -21109,7 +21061,7 @@ packages: dev: true /whatwg-url/5.0.0: - resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=} + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 From d021e68d9ec3a51ed3cab9aa57f04746bde1dcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 14:08:29 +0200 Subject: [PATCH 02/11] chore: fix `patak-dev` sponsors link --- docs/.vitepress/contributors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/contributors.ts b/docs/.vitepress/contributors.ts index 1d509f2f6fe1..f610b61b7ef3 100644 --- a/docs/.vitepress/contributors.ts +++ b/docs/.vitepress/contributors.ts @@ -67,7 +67,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars['patak-dev'], name: 'Patak', links: createLinks([['github', 'patak-dev'], ['twitter', 'patak_dev']]), - sponsor: 'https://github.com/sponsors/dev', + sponsor: 'https://github.com/sponsors/patak-dev', title: 'A collaborative being, working', org: 'StackBlitz', desc: 'Core team member of Vite & Vue & Vitest', From cf6fc42779efe32f8ea9d4187a8b86ddb1b9b480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 14:54:00 +0200 Subject: [PATCH 03/11] chore: add container around `VPTeamMembers` and make it responsive --- docs/.vitepress/components/HomePage.vue | 4 +++- docs/.vitepress/contributors.ts | 4 ++-- docs/.vitepress/style/main.css | 27 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/.vitepress/components/HomePage.vue b/docs/.vitepress/components/HomePage.vue index b803ce0e630a..22eae54943e1 100644 --- a/docs/.vitepress/components/HomePage.vue +++ b/docs/.vitepress/components/HomePage.vue @@ -11,7 +11,9 @@ import { teamMembers } from '../contributors'

Meet The Team

- +
+ +

Contributors

diff --git a/docs/.vitepress/contributors.ts b/docs/.vitepress/contributors.ts index f610b61b7ef3..ff448ac30b3f 100644 --- a/docs/.vitepress/contributors.ts +++ b/docs/.vitepress/contributors.ts @@ -54,7 +54,7 @@ export const teamMembers: CoreTeam[] = [ sponsor: 'https://github.com/sponsors/antfu', title: 'A fanatical open sourceror, working', org: 'NuxtLabs', - desc: 'Core team member of Vite & Vue & Vitest', + desc: 'Core team member of Vite & Vue', }, { avatar: contributorsAvatars['sheremet-va'], @@ -70,7 +70,7 @@ export const teamMembers: CoreTeam[] = [ sponsor: 'https://github.com/sponsors/patak-dev', title: 'A collaborative being, working', org: 'StackBlitz', - desc: 'Core team member of Vite & Vue & Vitest', + desc: 'Core team member of Vite & Vue', }, { avatar: contributorsAvatars.Aslemammad, diff --git a/docs/.vitepress/style/main.css b/docs/.vitepress/style/main.css index 55c046351b2f..2113a3ad4d9b 100644 --- a/docs/.vitepress/style/main.css +++ b/docs/.vitepress/style/main.css @@ -30,4 +30,31 @@ img.resizable-img { height: unset; } +/* fix height ~ 2 lines of text: 3 or more cards per row */ +.VPTeamMembersItem.small .profile .data .affiliation { + min-height: 3rem; +} +.VPTeamMembersItem.small .profile .data .desc { + min-height: 3rem; +} + +@media (max-width: 612px) { + /* fix height ~ 3 lines of text: 2 cards per row */ + .VPTeamMembersItem.small .profile .data .affiliation { + min-height: 4rem; + } + .VPTeamMembersItem.small .profile .data .desc { + min-height: 4rem; + } +} +@media (max-width: 568px) { + /* fix height: one card per row */ + .VPTeamMembersItem.small .profile .data .affiliation { + min-height: unset; + } + .VPTeamMembersItem.small .profile .data .desc { + min-height: unset; + } +} + From 571e223aac9b4a9cc79f6ea5a0007ac57b920c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 15:09:24 +0200 Subject: [PATCH 04/11] chore: update components.d.ts, still includes `TeamMember` --- docs/.vitepress/components.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/.vitepress/components.d.ts b/docs/.vitepress/components.d.ts index 98b1ea18716e..3ebc6d3315c1 100644 --- a/docs/.vitepress/components.d.ts +++ b/docs/.vitepress/components.d.ts @@ -11,7 +11,6 @@ declare module '@vue/runtime-core' { ListItem: typeof import('./components/ListItem.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - TeamMember: typeof import('./components/TeamMember.vue')['default'] } } From 696516758422232021ea8b28c0508f72575d8de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 15:23:37 +0200 Subject: [PATCH 05/11] chore: add styles for 3 cards per row with 3 lines of text --- docs/.vitepress/style/main.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/style/main.css b/docs/.vitepress/style/main.css index 2113a3ad4d9b..9a8b684eba01 100644 --- a/docs/.vitepress/style/main.css +++ b/docs/.vitepress/style/main.css @@ -38,8 +38,17 @@ img.resizable-img { min-height: 3rem; } +/* fix height ~ 3 lines of text: 3 cards per row */ +@media (min-width: 815px) and (max-width: 875px) { + .VPTeamMembersItem.small .profile .data .affiliation { + min-height: 4rem; + } + .VPTeamMembersItem.small .profile .data .desc { + min-height: 4rem; + } +} +/* fix height ~ 3 lines of text: 2 cards per row */ @media (max-width: 612px) { - /* fix height ~ 3 lines of text: 2 cards per row */ .VPTeamMembersItem.small .profile .data .affiliation { min-height: 4rem; } @@ -47,8 +56,8 @@ img.resizable-img { min-height: 4rem; } } +/* fix height: one card per row */ @media (max-width: 568px) { - /* fix height: one card per row */ .VPTeamMembersItem.small .profile .data .affiliation { min-height: unset; } From 54581fe8fb9861fcec2e88e5b17259fc33e2f303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sat, 25 Jun 2022 15:35:30 +0200 Subject: [PATCH 06/11] chore: add styles for 4 cards per row with 3 lines of text --- docs/.vitepress/style/main.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/.vitepress/style/main.css b/docs/.vitepress/style/main.css index 9a8b684eba01..91eac95f9752 100644 --- a/docs/.vitepress/style/main.css +++ b/docs/.vitepress/style/main.css @@ -38,6 +38,15 @@ img.resizable-img { min-height: 3rem; } +/* fix height ~ 3 lines of text: 4 cards per row */ +@media (min-width: 1064px) and (max-width: 1143px) { + .VPTeamMembersItem.small .profile .data .affiliation { + min-height: 4rem; + } + .VPTeamMembersItem.small .profile .data .desc { + min-height: 4rem; + } +} /* fix height ~ 3 lines of text: 3 cards per row */ @media (min-width: 815px) and (max-width: 875px) { .VPTeamMembersItem.small .profile .data .affiliation { From ae39d3ae0f82d942736bfb507795bccf3a722984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sun, 26 Jun 2022 11:35:51 +0200 Subject: [PATCH 07/11] chore: add build docs without prefetching avatars --- docs/package.json | 2 ++ pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/package.json b/docs/package.json index 08be222f6891..7d83cc8289a2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -4,8 +4,10 @@ "scripts": { "dev": "vitepress --port 3333 --open", "build": "nr prefetch && vitepress build", + "build-no-prefetch": "vitepress build", "serve": "vitepress serve", "preview-https": "pnpm run build && serve .vitepress/dist", + "preview-https-no-prefecth": "pnpm run build-no-prefetch && serve .vitepress/dist", "prefetch": "esno .vitepress/scripts/fetch-avatars.ts" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb0df92459a6..9c8a751d6c10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,7 +94,7 @@ importers: unocss: ^0.39.3 unplugin-vue-components: ^0.19.6 vite-plugin-pwa: ^0.12.0 - vitepress: ^1.0.0-alpha.2 + vitepress: ^1.0.0-alpha.4 vue: ^3.2.37 workbox-window: ^6.5.3 dependencies: @@ -111,7 +111,7 @@ importers: unocss: 0.39.3_vite@2.9.12 unplugin-vue-components: 0.19.6_otqemb7qluv7nqo3rdkhuopmwy vite-plugin-pwa: 0.12.0_vite@2.9.12 - vitepress: 1.0.0-alpha.2_ohobp6rpsmerwlq5ipwfh5yigy + vitepress: 1.0.0-alpha.4_ohobp6rpsmerwlq5ipwfh5yigy workbox-window: 6.5.3 examples/basic: @@ -162,7 +162,7 @@ importers: lit: 2.2.5 devDependencies: '@vitest/ui': link:../../packages/ui - happy-dom: 5.3.1 + happy-dom: 5.3.2 vite: 2.9.12 vitest: link:../../packages/vitest @@ -1270,7 +1270,7 @@ packages: resolution: {integrity: sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.2 + '@babel/types': 7.18.4 '@jridgewell/gen-mapping': 0.3.1 jsesc: 2.5.2 @@ -9440,7 +9440,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} /concat-stream/1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} @@ -10833,7 +10833,7 @@ packages: dev: true /ee-first/1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} dev: true /ejs/3.1.7: @@ -12821,8 +12821,8 @@ packages: - encoding dev: true - /happy-dom/5.3.1: - resolution: {integrity: sha512-zVb0VUIK73lMZR4e9ntaEQSRTf8/Rrz9MlO2VQMOn68aZAC3qoMPS/81Rkfva4vMR+bKXDqkeHiw7HumvvBmag==} + /happy-dom/5.3.2: + resolution: {integrity: sha512-TVTS1wGeSi3oCi0gqBA97DvsvS5nOuB2GTSdQlvxQ/JgntDjXHbf/xj1VMXenLomGjm9Keu0IW5ExBXHhoE8zQ==} dependencies: css.escape: 1.5.1 he: 1.2.0 @@ -20386,7 +20386,7 @@ packages: dev: true /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true /util.promisify/1.0.0: @@ -20413,7 +20413,7 @@ packages: dev: true /utils-merge/1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} engines: {node: '>= 0.4.0'} dev: true @@ -20706,8 +20706,8 @@ packages: optionalDependencies: fsevents: 2.3.2 - /vitepress/1.0.0-alpha.2_ohobp6rpsmerwlq5ipwfh5yigy: - resolution: {integrity: sha512-twSsmx2DI/3XgZZ8KLyRAH8RgK2Zj4kJx/kwhZhimwndYqQDrtcIaAcuV+P3FKukZ+cYtm9yt9qohz631jKx4A==} + /vitepress/1.0.0-alpha.4_ohobp6rpsmerwlq5ipwfh5yigy: + resolution: {integrity: sha512-bOAA4KW6vYGlkbcrPLZLTKWTgXVroObU+o9xj9EENyEl6yg26WWvfN7DGA4BftjdM5O8nR93Z5khPQ3W/tFE7Q==} engines: {node: '>=14.6.0'} hasBin: true dependencies: From b4694422df6ec5f633893ffc094ad30ffd9a89a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sun, 26 Jun 2022 11:56:31 +0200 Subject: [PATCH 08/11] chore: fix pwa --- bench/package.json | 6 +- bench/pnpm-lock.yaml | 100 +++++++++---------- docs/.vitepress/contributors.ts | 9 ++ docs/.vitepress/scripts/assets.ts | 13 --- docs/.vitepress/scripts/build-pwa.ts | 15 +++ docs/package.json | 6 +- docs/vite.config.ts | 141 ++++++++++++-------------- package.json | 3 +- packages/vitest/LICENSE.md | 7 -- pnpm-lock.yaml | 143 ++++++++++++++++++--------- 10 files changed, 237 insertions(+), 206 deletions(-) create mode 100644 docs/.vitepress/scripts/build-pwa.ts diff --git a/bench/package.json b/bench/package.json index 1295a22c65e9..a3c99faa0285 100644 --- a/bench/package.json +++ b/bench/package.json @@ -2,8 +2,8 @@ "type": "module", "private": true, "scripts": { - "bench": "esno src/index.ts", - "bench:ci": "esno src/github.ts" + "bench": "esmo src/index.ts", + "bench:ci": "esmo src/github.ts" }, "devDependencies": { "@actions/core": "^1.9.0", @@ -12,7 +12,7 @@ "@happy-dom/jest-environment": "^4.1.0", "@types/benchmark": "^2.1.1", "benchmark": "^2.1.4", - "esno": "^0.16.3", + "esno": "^0.14.1", "execa": "^6.1.0", "fs-extra": "^10.1.0", "markdown-table": "^3.0.2", diff --git a/bench/pnpm-lock.yaml b/bench/pnpm-lock.yaml index e2a6574dfb17..7fe8531e2ba1 100644 --- a/bench/pnpm-lock.yaml +++ b/bench/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.3 +lockfileVersion: 5.4 importers: @@ -10,7 +10,7 @@ importers: '@happy-dom/jest-environment': ^4.1.0 '@types/benchmark': ^2.1.1 benchmark: ^2.1.4 - esno: ^0.16.3 + esno: ^0.14.1 execa: ^6.1.0 fs-extra: ^10.1.0 markdown-table: ^3.0.2 @@ -23,7 +23,7 @@ importers: '@happy-dom/jest-environment': 4.1.0 '@types/benchmark': 2.1.1 benchmark: 2.1.4 - esno: 0.16.3 + esno: 0.14.1 execa: 6.1.0 fs-extra: 10.1.0 markdown-table: 3.0.2 @@ -91,7 +91,7 @@ importers: rollup: 2.75.7 splitpanes: 3.1.1 unocss: 0.39.3 - unplugin-auto-import: 0.8.8_@vueuse+core@8.7.4+rollup@2.75.7 + unplugin-auto-import: 0.8.8_iyh6i64y6me7sbel5qmrgx6wcy unplugin-vue-components: 0.19.6_rollup@2.75.7+vue@3.2.37 vite-plugin-pages: 0.24.2 vue: 3.2.37 @@ -161,7 +161,7 @@ importers: rollup: ^2.75.7 source-map-js: ^1.0.2 strip-ansi: ^7.0.1 - tinypool: ^0.1.3 + tinypool: ^0.2.1 tinyspy: ^0.3.3 typescript: ^4.7.4 vite: ^2.9.12 @@ -174,7 +174,7 @@ importers: chai: 4.3.6 debug: 4.3.4 local-pkg: 0.4.1 - tinypool: 0.1.3 + tinypool: 0.2.1 tinyspy: 0.3.3 vite: 2.9.12 devDependencies: @@ -258,11 +258,11 @@ importers: '@babel/preset-typescript': 7.17.12_@babel+core@7.18.2 '@vitejs/plugin-vue': 2.3.3_vue@3.2.37 '@vue/test-utils': 2.0.0_vue@3.2.37 - '@vue/vue3-jest': 27.0.0_42b0e14dfb61dea67ae002fa755ed344 + '@vue/vue3-jest': 27.0.0_ikyoctp3mhpkm6xaal5hkxwtiq babel-jest: 27.5.1_@babel+core@7.18.2 jest: 27.5.1 jsdom: 19.0.0 - ts-jest: 27.1.5_1de59f92b0ede13b4eb51662edd6ef98 + ts-jest: 27.1.5_dxsz7evq5xqtwtvvczro3vxpta vue: 3.2.37 packages: @@ -1789,27 +1789,6 @@ packages: - supports-color dev: true - /@esbuild-kit/cjs-loader/2.0.1: - resolution: {integrity: sha512-KmE8XouKm6m05jPIsf5CTIZZ4171GHd+PUts1mtti2tzoiD228qCRjpkCwg540c3fMUweKupO+PIpkJ9+Z7vPg==} - dependencies: - '@esbuild-kit/core-utils': 1.3.1 - get-tsconfig: 3.2.0 - dev: true - - /@esbuild-kit/core-utils/1.3.1: - resolution: {integrity: sha512-QXWJKf3mEIs+jgUCrY2YWJ2cr9e9asRYRwDhxit+wkCaQbSfV6fCCgs8KjRsrkIdMBcWsjbWnFKfwZ9kjILPrw==} - dependencies: - esbuild: 0.14.38 - source-map-support: 0.5.21 - dev: true - - /@esbuild-kit/esm-loader/2.1.5: - resolution: {integrity: sha512-G0HZSh53dXOb42xR14zEASXtVWFNX2itREVPnh6BWU2PcApbSzFEIUpknotpybuu6QupuW9sS9hVVpJjuyZlSw==} - dependencies: - '@esbuild-kit/core-utils': 1.3.1 - get-tsconfig: 3.2.0 - dev: true - /@faker-js/faker/7.3.0: resolution: {integrity: sha512-1W0PZezq2rxlAssoWemi9gFRD8IQxvf0FPL5Km3TOmGHFG7ib0TbFBJ0yC7D/1NsxunjNTK6WjUXV8ao/mKZ5w==} engines: {node: '>=14.0.0', npm: '>=6.0.0'} @@ -2786,7 +2765,7 @@ packages: vue: 3.2.37 dev: true - /@vue/vue3-jest/27.0.0_42b0e14dfb61dea67ae002fa755ed344: + /@vue/vue3-jest/27.0.0_ikyoctp3mhpkm6xaal5hkxwtiq: resolution: {integrity: sha512-VL61CgZBoQqayXfzlZJHHpZuX4lsT8dmdZMJzADhdAJjKu26JBpypHr/2ppevxItljPiuALQW4MKhhCXZRXnLg==} peerDependencies: '@babel/core': 7.x @@ -2809,7 +2788,7 @@ packages: css-tree: 2.1.0 jest: 27.5.1 source-map: 0.5.6 - ts-jest: 27.1.5_1de59f92b0ede13b4eb51662edd6ef98 + ts-jest: 27.1.5_dxsz7evq5xqtwtvvczro3vxpta tsconfig: 7.0.0 vue: 3.2.37 transitivePeerDependencies: @@ -3273,6 +3252,12 @@ packages: ieee754: 1.2.1 dev: true + /builtins/4.1.0: + resolution: {integrity: sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==} + dependencies: + semver: 7.3.5 + dev: true + /c8/7.11.3: resolution: {integrity: sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==} engines: {node: '>=10.12.0'} @@ -4289,6 +4274,12 @@ packages: dev: true optional: true + /esbuild-node-loader/0.6.5: + resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==} + dependencies: + esbuild: 0.14.38 + dev: true + /esbuild-openbsd-64/0.14.27: resolution: {integrity: sha512-xwSje6qIZaDHXWoPpIgvL+7fC6WeubHHv18tusLYMwL+Z6bEa4Pbfs5IWDtQdHkArtfxEkIZz77944z8MgDxGw==} engines: {node: '>=12'} @@ -4307,6 +4298,14 @@ packages: dev: true optional: true + /esbuild-register/3.3.3_esbuild@0.14.38: + resolution: {integrity: sha512-eFHOkutgIMJY5gc8LUp/7c+LLlDqzNi9T6AwCZ2WKKl3HmT+5ef3ZRyPPxDOynInML0fgaC50yszPKfPnjC0NQ==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + esbuild: 0.14.38 + dev: true + /esbuild-sunos-64/0.14.27: resolution: {integrity: sha512-/nBVpWIDjYiyMhuqIqbXXsxBc58cBVH9uztAOIfWShStxq9BNBik92oPQPJ57nzWXRNKQUEFWr4Q98utDWz7jg==} engines: {node: '>=12'} @@ -4468,11 +4467,15 @@ packages: source-map: 0.6.1 dev: true - /esno/0.16.3: - resolution: {integrity: sha512-6slSBEV1lMKcX13DBifvnDFpNno5WXhw4j/ff7RI0y51BZiDqEe5dNhhjhIQ3iCOQuzsm2MbVzmwqbN78BBhPg==} + /esno/0.14.1: + resolution: {integrity: sha512-yDFYw6dGUjCT1qKsdG7WOc/RzIh/qwxUEVZ+ohCltaxBxEFMNqeqbQL9xjRl6Yvdwrfc5OCjUA9JbFmuu/8BKg==} hasBin: true dependencies: - tsx: 3.4.2 + cross-spawn: 7.0.3 + esbuild: 0.14.38 + esbuild-node-loader: 0.6.5 + esbuild-register: 3.3.3_esbuild@0.14.38 + import-meta-resolve: 1.1.1 dev: true /esprima-extract-comments/1.1.0: @@ -4834,10 +4837,6 @@ packages: get-intrinsic: 1.1.1 dev: true - /get-tsconfig/3.2.0: - resolution: {integrity: sha512-PChG1QIKJKpzrgR/wRhX5TWMKqH1cIHViJYDk0cjXhpwXFHIGGJiL5TXu/frupyetjXXxeDInWbP4vhvhHSBkg==} - dev: true - /getos/3.2.1: resolution: {integrity: sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==} dependencies: @@ -5068,6 +5067,12 @@ packages: resolve-cwd: 3.0.0 dev: true + /import-meta-resolve/1.1.1: + resolution: {integrity: sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==} + dependencies: + builtins: 4.1.0 + dev: true + /imurmurhash/0.1.4: resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} engines: {node: '>=0.8.19'} @@ -7196,8 +7201,8 @@ packages: resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=} dev: true - /tinypool/0.1.3: - resolution: {integrity: sha512-2IfcQh7CP46XGWGGbdyO4pjcKqsmVqFAPcXfPxcPXmOWt9cYkTP9HcDmGgsfijYoAEc4z9qcpM/BaBz46Y9/CQ==} + /tinypool/0.2.1: + resolution: {integrity: sha512-HFU5ZYVq3wBfhSaf8qdqGsneaqXm0FgJQpoUlJbVdHpRLzm77IneKAD3RjzJWZvIv0YpPB9S7LUW53f6BE6ZSg==} engines: {node: '>=14.0.0'} dev: false @@ -7272,7 +7277,7 @@ packages: resolution: {integrity: sha512-2RpGIE0YVW6blKY756MP74czemC9x4XThhNCxq0A14Owm3ac8tZvigPbpZyZZQSyfOc7Qba5kG5xKBq74ihZfA==} dev: true - /ts-jest/27.1.5_1de59f92b0ede13b4eb51662edd6ef98: + /ts-jest/27.1.5_dxsz7evq5xqtwtvvczro3vxpta: resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -7319,17 +7324,6 @@ packages: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} dev: true - /tsx/3.4.2: - resolution: {integrity: sha512-Rd1gm2noOUiVynF+VFxo4bVBNbzS6haWKWtlQ0bEfCLLEqm+GG3R98D3Rqk6foQ3NnJk6JAWOx1ragwcAPj4Lg==} - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': 2.0.1 - '@esbuild-kit/core-utils': 1.3.1 - '@esbuild-kit/esm-loader': 2.1.5 - optionalDependencies: - fsevents: 2.3.2 - dev: true - /tunnel-agent/0.6.0: resolution: {integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=} dependencies: @@ -7494,7 +7488,7 @@ packages: - vite dev: true - /unplugin-auto-import/0.8.8_@vueuse+core@8.7.4+rollup@2.75.7: + /unplugin-auto-import/0.8.8_iyh6i64y6me7sbel5qmrgx6wcy: resolution: {integrity: sha512-cVZ79zMR1v4VCZ9emFTUnltmazCc2B4hObyVrxJdlgJ2sK8qub6JfjFt38rCF6MVEddkHiWCU6wZR1qbdqe+ig==} engines: {node: '>=14'} peerDependencies: diff --git a/docs/.vitepress/contributors.ts b/docs/.vitepress/contributors.ts index ff448ac30b3f..42fee79f8eba 100644 --- a/docs/.vitepress/contributors.ts +++ b/docs/.vitepress/contributors.ts @@ -13,6 +13,8 @@ export interface SocialEntry { export interface CoreTeam { avatar: string name: string + // required to download avatars from GitHub + github: string sponsor?: string title?: string org?: string @@ -50,6 +52,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.antfu, name: 'Anthony Fu', + github: 'antfu', links: createLinks([['github', 'antfu'], ['twitter', 'antfu7']]), sponsor: 'https://github.com/sponsors/antfu', title: 'A fanatical open sourceror, working', @@ -59,6 +62,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars['sheremet-va'], name: 'Vladimir', + github: 'sheremet-va', links: createLinks([['github', 'sheremet-va'], ['twitter', 'sheremet_va']]), title: 'An open source fullstack developer', desc: 'Core team member of Vitest', @@ -66,6 +70,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars['patak-dev'], name: 'Patak', + github: 'patak-dev', links: createLinks([['github', 'patak-dev'], ['twitter', 'patak_dev']]), sponsor: 'https://github.com/sponsors/patak-dev', title: 'A collaborative being, working', @@ -75,6 +80,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.Aslemammad, name: 'Mohammad Bagher', + github: 'Aslemammad', links: createLinks([['github', 'Aslemammad'], ['twitter', 'asleMammadam']]), title: 'An open source developer', desc: 'Team member of Poimandres & Vike', @@ -82,6 +88,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.Demivan, name: 'Ivan Demchuk', + github: 'Demivan', links: createLinks([['github', 'Demivan'], ['twitter', 'IvanDemchuk']]), title: 'A tech lead, fullstack developer', desc: 'Author of fluent-vue', @@ -89,6 +96,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.userquin, name: 'Joaquín Sánchez', + github: 'userquin', links: createLinks([['github', 'userquin'], ['twitter', 'userquin']]), title: 'A fullstack and android developer', desc: 'Vite\'s fanatical follower', @@ -96,6 +104,7 @@ export const teamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.zxch3n, name: 'Zixuan Chen', + github: 'zxch3n', links: createLinks([['github', 'zxch3n'], ['twitter', 'zxch3n']]), title: 'A fullstack developer', desc: 'Creating tools for collaboration', diff --git a/docs/.vitepress/scripts/assets.ts b/docs/.vitepress/scripts/assets.ts index 2daca50f7d9d..ffc6a913ec20 100644 --- a/docs/.vitepress/scripts/assets.ts +++ b/docs/.vitepress/scripts/assets.ts @@ -67,19 +67,6 @@ ${prefetchImg} ) } - // TODO: dark/light theme, don't remove yet - // html = html.replace( - // '', - // '\t\n', - // ) - html = html.replace( /aria-hidden="true"/gi, 'tabindex="-1" aria-hidden="true"', diff --git a/docs/.vitepress/scripts/build-pwa.ts b/docs/.vitepress/scripts/build-pwa.ts new file mode 100644 index 000000000000..0a0fc34d649e --- /dev/null +++ b/docs/.vitepress/scripts/build-pwa.ts @@ -0,0 +1,15 @@ +import { resolveConfig } from 'vite' +import type { VitePluginPWAAPI } from 'vite-plugin-pwa' +import { optimizePages } from './assets' + +const rebuildPwa = async () => { + const config = await resolveConfig({}, 'build', 'production') + // when `vite-plugin-pwa` is presented, use it to regenerate SW after rendering + const pwaPlugin: VitePluginPWAAPI = config.plugins.find(i => i.name === 'vite-plugin-pwa')?.api + const pwa = pwaPlugin && !pwaPlugin.disabled + await optimizePages(pwa) + if (pwa) + await pwaPlugin.generateSW() +} + +rebuildPwa() diff --git a/docs/package.json b/docs/package.json index 7d83cc8289a2..1206098061e1 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,8 +3,8 @@ "private": true, "scripts": { "dev": "vitepress --port 3333 --open", - "build": "nr prefetch && vitepress build", - "build-no-prefetch": "vitepress build", + "build": "nr prefetch && vitepress build && esno .vitepress/scripts/build-pwa.ts", + "build-no-prefetch": "vitepress build && esno .vitepress/scripts/build-pwa.ts", "serve": "vitepress serve", "preview-https": "pnpm run build && serve .vitepress/dist", "preview-https-no-prefecth": "pnpm run build-no-prefetch && serve .vitepress/dist", @@ -19,7 +19,7 @@ "@types/node": "^17.0.35", "@unocss/reset": "^0.39.3", "@vitejs/plugin-vue": "^2.3.3", - "esno": "^0.16.3", + "esno": "^0.14.1", "fast-glob": "^3.2.11", "https-localhost": "^4.7.1", "unocss": "^0.39.3", diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 6741a9a631a1..131360c81d88 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -5,7 +5,6 @@ import Components from 'unplugin-vue-components/vite' import Unocss from 'unocss/vite' import { presetAttributify, presetIcons, presetUno } from 'unocss' import { resolve } from 'pathe' -import type { VitePluginPWAAPI } from 'vite-plugin-pwa' import { VitePWA } from 'vite-plugin-pwa' import fg from 'fast-glob' import { @@ -15,72 +14,6 @@ import { vitestName, vitestShortName, } from './.vitepress/meta' -import { optimizePages } from './.vitepress/scripts/assets' - -const PWA = VitePWA({ - outDir: '.vitepress/dist', - registerType: 'autoUpdate', - // include all static assets under public/ - includeAssets: fg.sync('**/*.{png,svg,ico,txt}', { cwd: resolve(__dirname, 'public') }), - manifest: { - id: '/', - name: vitestName, - short_name: vitestShortName, - description: vitestDescription, - theme_color: '#ffffff', - icons: [ - { - src: 'pwa-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: 'pwa-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - { - src: 'logo.svg', - sizes: '165x165', - type: 'image/svg', - purpose: 'any maskable', - }, - ], - }, - workbox: { - navigateFallbackDenylist: [/^\/new$/], - runtimeCaching: [ - { - urlPattern: pwaFontsRegex, - handler: 'CacheFirst', - options: { - cacheName: 'google-fonts-cache', - expiration: { - maxEntries: 10, - maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days - }, - cacheableResponse: { - statuses: [0, 200], - }, - }, - }, - { - urlPattern: pwaFontStylesRegex, - handler: 'CacheFirst', - options: { - cacheName: 'gstatic-fonts-cache', - expiration: { - maxEntries: 10, - maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days - }, - cacheableResponse: { - statuses: [0, 200], - }, - }, - }, - ], - }, -}) export default defineConfig({ plugins: [ @@ -104,18 +37,70 @@ export default defineConfig({ ], }), IncludesPlugin(), - PWA, - { - name: 'pwa:post', - enforce: 'post', - async buildEnd() { - const pwaPlugin: VitePluginPWAAPI = PWA.find(i => i.name === 'vite-plugin-pwa')?.api - const pwa = pwaPlugin && !pwaPlugin.disabled - await optimizePages(pwa) - if (pwa) - await pwaPlugin.generateSW() + VitePWA({ + outDir: '.vitepress/dist', + registerType: 'autoUpdate', + // include all static assets under public/ + includeAssets: fg.sync('**/*.{png,svg,ico,txt}', { cwd: resolve(__dirname, 'public') }), + manifest: { + id: '/', + name: vitestName, + short_name: vitestShortName, + description: vitestDescription, + theme_color: '#ffffff', + icons: [ + { + src: 'pwa-192x192.png', + sizes: '192x192', + type: 'image/png', + }, + { + src: 'pwa-512x512.png', + sizes: '512x512', + type: 'image/png', + }, + { + src: 'logo.svg', + sizes: '165x165', + type: 'image/svg', + purpose: 'any maskable', + }, + ], }, - }, + workbox: { + navigateFallbackDenylist: [/^\/new$/], + runtimeCaching: [ + { + urlPattern: pwaFontsRegex, + handler: 'CacheFirst', + options: { + cacheName: 'google-fonts-cache', + expiration: { + maxEntries: 10, + maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days + }, + cacheableResponse: { + statuses: [0, 200], + }, + }, + }, + { + urlPattern: pwaFontStylesRegex, + handler: 'CacheFirst', + options: { + cacheName: 'gstatic-fonts-cache', + expiration: { + maxEntries: 10, + maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days + }, + cacheableResponse: { + statuses: [0, 200], + }, + }, + }, + ], + }, + }), ], }) diff --git a/package.json b/package.json index 59aecb4120a7..554a3ce27f50 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "docs:build": "pnpm -C docs run build", "docs:serve": "pnpm -C docs run serve", "docs:https": "pnpm -C docs run preview-https", + "docs:https-no-prefetch": "pnpm -C docs run preview-https-no-prefecth", "docs:examples": "esmo scripts/update-examples.ts", "docs:contributors": "esmo scripts/update-contributors.ts", "lint": "eslint .", @@ -44,7 +45,7 @@ "cross-env": "^7.0.3", "esbuild": "~0.14.47", "eslint": "^8.18.0", - "esno": "^0.16.3", + "esno": "^0.14.1", "fast-glob": "^3.2.11", "if-node-version": "^1.1.1", "lint-staged": "^12.5.0", diff --git a/packages/vitest/LICENSE.md b/packages/vitest/LICENSE.md index cfd44623b6d1..afb0b813f543 100644 --- a/packages/vitest/LICENSE.md +++ b/packages/vitest/LICENSE.md @@ -465,13 +465,6 @@ Repository: git://github.com/kpdecker/jsdiff.git --------------------------------------- -## eastasianwidth -License: MIT -By: Masaki Komagata -Repository: git://github.com/komagata/eastasianwidth.git - ---------------------------------------- - ## emoji-regex License: MIT By: Mathias Bynens diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c8a751d6c10..7b1234bf2cfc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: cross-env: ^7.0.3 esbuild: ^0.14.47 eslint: ^8.18.0 - esno: ^0.16.3 + esno: ^0.14.1 fast-glob: ^3.2.11 if-node-version: ^1.1.1 lint-staged: ^12.5.0 @@ -60,7 +60,7 @@ importers: cross-env: 7.0.3 esbuild: 0.14.47 eslint: 8.18.0 - esno: 0.16.3 + esno: 0.14.1 fast-glob: 3.2.11 if-node-version: 1.1.1 lint-staged: 12.5.0 @@ -88,7 +88,7 @@ importers: '@unocss/reset': ^0.39.3 '@vitejs/plugin-vue': ^2.3.3 '@vueuse/core': ^8.7.4 - esno: ^0.16.3 + esno: ^0.14.1 fast-glob: ^3.2.11 https-localhost: ^4.7.1 unocss: ^0.39.3 @@ -105,11 +105,11 @@ importers: '@types/node': 17.0.35 '@unocss/reset': 0.39.3 '@vitejs/plugin-vue': 2.3.3_vite@2.9.12+vue@3.2.37 - esno: 0.16.3 + esno: 0.14.1 fast-glob: 3.2.11 https-localhost: 4.7.1 unocss: 0.39.3_vite@2.9.12 - unplugin-vue-components: 0.19.6_otqemb7qluv7nqo3rdkhuopmwy + unplugin-vue-components: 0.19.6_7felabkkrfdt7dxozyactxvh24 vite-plugin-pwa: 0.12.0_vite@2.9.12 vitepress: 1.0.0-alpha.4_ohobp6rpsmerwlq5ipwfh5yigy workbox-window: 6.5.3 @@ -3258,27 +3258,6 @@ packages: /@emotion/weak-memoize/0.2.5: resolution: {integrity: sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==} - /@esbuild-kit/cjs-loader/2.0.1: - resolution: {integrity: sha512-KmE8XouKm6m05jPIsf5CTIZZ4171GHd+PUts1mtti2tzoiD228qCRjpkCwg540c3fMUweKupO+PIpkJ9+Z7vPg==} - dependencies: - '@esbuild-kit/core-utils': 1.3.0 - get-tsconfig: 3.0.1 - dev: true - - /@esbuild-kit/core-utils/1.3.0: - resolution: {integrity: sha512-c3N86nZAgU7soEbSCyLGVVf+9iz5fWw4ujK6e8KSDN3PuVFD6G9JVyLsNWvNoWLmNANb0YKxuhqdOLM4kAK66w==} - dependencies: - esbuild: 0.14.47 - dev: true - - /@esbuild-kit/esm-loader/2.1.4: - resolution: {integrity: sha512-acfzciUGugu1TV1QHJOAOe6F5miEjQLDYMWhoD4mVPFmwHA8Iwp5UCJidyruj67qp2ybu+Zc++7+th9VnYaZMA==} - dependencies: - '@esbuild-kit/core-utils': 1.3.0 - es-module-lexer: 0.10.5 - get-tsconfig: 3.0.1 - dev: true - /@eslint/eslintrc/1.3.0: resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8793,6 +8772,12 @@ packages: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} dev: true + /builtins/4.1.0: + resolution: {integrity: sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==} + dependencies: + semver: 7.3.7 + dev: true + /builtins/5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: @@ -11099,10 +11084,6 @@ packages: isarray: 2.0.5 dev: true - /es-module-lexer/0.10.5: - resolution: {integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==} - dev: true - /es-module-lexer/0.9.3: resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} dev: true @@ -11251,6 +11232,12 @@ packages: requiresBuild: true optional: true + /esbuild-node-loader/0.6.5: + resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==} + dependencies: + esbuild: 0.14.47 + dev: true + /esbuild-openbsd-64/0.14.47: resolution: {integrity: sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw==} engines: {node: '>=12'} @@ -11259,6 +11246,14 @@ packages: requiresBuild: true optional: true + /esbuild-register/3.3.3_esbuild@0.14.47: + resolution: {integrity: sha512-eFHOkutgIMJY5gc8LUp/7c+LLlDqzNi9T6AwCZ2WKKl3HmT+5ef3ZRyPPxDOynInML0fgaC50yszPKfPnjC0NQ==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + esbuild: 0.14.47 + dev: true + /esbuild-sunos-64/0.14.47: resolution: {integrity: sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ==} engines: {node: '>=12'} @@ -11690,11 +11685,15 @@ packages: - supports-color dev: true - /esno/0.16.3: - resolution: {integrity: sha512-6slSBEV1lMKcX13DBifvnDFpNno5WXhw4j/ff7RI0y51BZiDqEe5dNhhjhIQ3iCOQuzsm2MbVzmwqbN78BBhPg==} + /esno/0.14.1: + resolution: {integrity: sha512-yDFYw6dGUjCT1qKsdG7WOc/RzIh/qwxUEVZ+ohCltaxBxEFMNqeqbQL9xjRl6Yvdwrfc5OCjUA9JbFmuu/8BKg==} hasBin: true dependencies: - tsx: 3.4.2 + cross-spawn: 7.0.3 + esbuild: 0.14.47 + esbuild-node-loader: 0.6.5 + esbuild-register: 3.3.3_esbuild@0.14.47 + import-meta-resolve: 1.1.1 dev: true /espree/9.3.2: @@ -12613,10 +12612,6 @@ packages: get-intrinsic: 1.1.1 dev: true - /get-tsconfig/3.0.1: - resolution: {integrity: sha512-+m30eQjbcf3xMNdnacXH5IDAKUMbI7Mhbf3e1BHif1FzBlUhBzBlmOVc7kL4+kB035l8OCyBdI3dNXZ3of9HqA==} - dev: true - /get-value/2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} engines: {node: '>=0.10.0'} @@ -13337,6 +13332,12 @@ packages: resolve-cwd: 3.0.0 dev: true + /import-meta-resolve/1.1.1: + resolution: {integrity: sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==} + dependencies: + builtins: 4.1.0 + dev: true + /imurmurhash/0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -19683,17 +19684,6 @@ packages: typescript: 4.7.4 dev: true - /tsx/3.4.2: - resolution: {integrity: sha512-Rd1gm2noOUiVynF+VFxo4bVBNbzS6haWKWtlQ0bEfCLLEqm+GG3R98D3Rqk6foQ3NnJk6JAWOx1ragwcAPj4Lg==} - hasBin: true - dependencies: - '@esbuild-kit/cjs-loader': 2.0.1 - '@esbuild-kit/core-utils': 1.3.0 - '@esbuild-kit/esm-loader': 2.1.4 - optionalDependencies: - fsevents: 2.3.2 - dev: true - /tty-browserify/0.0.0: resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} dev: true @@ -20120,6 +20110,38 @@ packages: - webpack dev: true + /unplugin-vue-components/0.19.6_7felabkkrfdt7dxozyactxvh24: + resolution: {integrity: sha512-APvrJ9Hpid1MLT0G4PWerMJgARhNw6dzz0pcCwCxaO2DR7VyvDacMqjOQNC6ukq7FSw3wzD8VH+9i3EFXwkGmw==} + engines: {node: '>=14'} + peerDependencies: + '@babel/parser': ^7.15.8 + '@babel/traverse': ^7.15.4 + vue: 2 || 3 + peerDependenciesMeta: + '@babel/parser': + optional: true + '@babel/traverse': + optional: true + dependencies: + '@antfu/utils': 0.5.2 + '@rollup/pluginutils': 4.2.1 + chokidar: 3.5.3 + debug: 4.3.4 + fast-glob: 3.2.11 + local-pkg: 0.4.1 + magic-string: 0.26.2 + minimatch: 5.0.1 + resolve: 1.22.0 + unplugin: 0.6.3_4mifhig4dhgnrt67tg257xfjai + vue: 3.2.37 + transitivePeerDependencies: + - esbuild + - rollup + - supports-color + - vite + - webpack + dev: true + /unplugin-vue-components/0.19.6_otqemb7qluv7nqo3rdkhuopmwy: resolution: {integrity: sha512-APvrJ9Hpid1MLT0G4PWerMJgARhNw6dzz0pcCwCxaO2DR7VyvDacMqjOQNC6ukq7FSw3wzD8VH+9i3EFXwkGmw==} engines: {node: '>=14'} @@ -20239,6 +20261,31 @@ packages: webpack-virtual-modules: 0.4.3 dev: true + /unplugin/0.6.3_4mifhig4dhgnrt67tg257xfjai: + resolution: {integrity: sha512-CoW88FQfCW/yabVc4bLrjikN9HC8dEvMU4O7B6K2jsYMPK0l6iAnd9dpJwqGcmXJKRCU9vwSsy653qg+RK0G6A==} + peerDependencies: + esbuild: '>=0.13' + rollup: ^2.50.0 + vite: ^2.3.0 + webpack: 4 || 5 + peerDependenciesMeta: + esbuild: + optional: true + rollup: + optional: true + vite: + optional: true + webpack: + optional: true + dependencies: + chokidar: 3.5.3 + esbuild: 0.14.47 + rollup: 2.75.7 + vite: 2.9.12 + webpack-sources: 3.2.3 + webpack-virtual-modules: 0.4.3 + dev: true + /unplugin/0.6.3_rollup@2.75.7+vite@2.9.12: resolution: {integrity: sha512-CoW88FQfCW/yabVc4bLrjikN9HC8dEvMU4O7B6K2jsYMPK0l6iAnd9dpJwqGcmXJKRCU9vwSsy653qg+RK0G6A==} peerDependencies: From 8eeb21a64479912efbd7141d7a0616e2bc8a7ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sun, 26 Jun 2022 12:45:39 +0200 Subject: [PATCH 09/11] chore: change core team type, gh also used on prefetch module --- docs/.vitepress/contributors.ts | 41 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/docs/.vitepress/contributors.ts b/docs/.vitepress/contributors.ts index 42fee79f8eba..ec351623e44f 100644 --- a/docs/.vitepress/contributors.ts +++ b/docs/.vitepress/contributors.ts @@ -15,6 +15,7 @@ export interface CoreTeam { name: string // required to download avatars from GitHub github: string + twitter: string sponsor?: string title?: string org?: string @@ -32,28 +33,20 @@ export const contributors = (contributorNames as string[]).reduce((acc, name) => return acc }, [] as Contributor[]) -const createLinks = (entries: string[][]): SocialEntry[] => { - return entries.reduce((acc, e) => { - for (let i = 0; i < e.length; i += 2) { - switch (e[i]) { - case 'github': - acc.push({ icon: e[i], link: `https://github.com/${e[i + 1]}` }) - break - case 'twitter': - acc.push({ icon: e[i], link: `https://twitter.com/${e[i + 1]}` }) - break - } - } - return acc - }, new Array()) +const createLinks = (tm: CoreTeam): CoreTeam => { + tm.links = [ + { icon: 'github', link: `https://github.com/${tm.github}` }, + { icon: 'twitter', link: `https://twitter.com/${tm.twitter}` }, + ] + return tm } -export const teamMembers: CoreTeam[] = [ +const plainTeamMembers: CoreTeam[] = [ { avatar: contributorsAvatars.antfu, name: 'Anthony Fu', github: 'antfu', - links: createLinks([['github', 'antfu'], ['twitter', 'antfu7']]), + twitter: 'antfu7', sponsor: 'https://github.com/sponsors/antfu', title: 'A fanatical open sourceror, working', org: 'NuxtLabs', @@ -63,7 +56,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars['sheremet-va'], name: 'Vladimir', github: 'sheremet-va', - links: createLinks([['github', 'sheremet-va'], ['twitter', 'sheremet_va']]), + twitter: 'sheremet_va', title: 'An open source fullstack developer', desc: 'Core team member of Vitest', }, @@ -71,7 +64,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars['patak-dev'], name: 'Patak', github: 'patak-dev', - links: createLinks([['github', 'patak-dev'], ['twitter', 'patak_dev']]), + twitter: 'patak_dev', sponsor: 'https://github.com/sponsors/patak-dev', title: 'A collaborative being, working', org: 'StackBlitz', @@ -81,7 +74,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars.Aslemammad, name: 'Mohammad Bagher', github: 'Aslemammad', - links: createLinks([['github', 'Aslemammad'], ['twitter', 'asleMammadam']]), + twitter: 'asleMammadam', title: 'An open source developer', desc: 'Team member of Poimandres & Vike', }, @@ -89,7 +82,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars.Demivan, name: 'Ivan Demchuk', github: 'Demivan', - links: createLinks([['github', 'Demivan'], ['twitter', 'IvanDemchuk']]), + twitter: 'IvanDemchuk', title: 'A tech lead, fullstack developer', desc: 'Author of fluent-vue', }, @@ -97,7 +90,7 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars.userquin, name: 'Joaquín Sánchez', github: 'userquin', - links: createLinks([['github', 'userquin'], ['twitter', 'userquin']]), + twitter: 'userquin', title: 'A fullstack and android developer', desc: 'Vite\'s fanatical follower', }, @@ -105,8 +98,12 @@ export const teamMembers: CoreTeam[] = [ avatar: contributorsAvatars.zxch3n, name: 'Zixuan Chen', github: 'zxch3n', - links: createLinks([['github', 'zxch3n'], ['twitter', 'zxch3n']]), + twitter: 'zxch3n', title: 'A fullstack developer', desc: 'Creating tools for collaboration', }, ] + +const teamMembers = plainTeamMembers.map(tm => createLinks(tm)) + +export { teamMembers } From cc3e1af00cff47df3bdf5d64cbbbfd14a6eabeda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sun, 26 Jun 2022 14:08:07 +0200 Subject: [PATCH 10/11] chore: add pwa runtime caching for external images (UI/IDE) chore: add Inter fonts to the workbox cache (VitePress?) --- docs/.vitepress/meta.ts | 2 ++ docs/vite.config.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/.vitepress/meta.ts b/docs/.vitepress/meta.ts index eea342567a0e..617398b9d2b8 100644 --- a/docs/.vitepress/meta.ts +++ b/docs/.vitepress/meta.ts @@ -28,3 +28,5 @@ export const preconnectHomeLinks = [googleapis, gstatic] /* PWA runtime caching urlPattern regular expressions */ export const pwaFontsRegex = new RegExp(`^${googleapis}/.*`, 'i') export const pwaFontStylesRegex = new RegExp(`^${gstatic}/.*`, 'i') +// eslint-disable-next-line prefer-regex-literals +export const githubusercontentRegex = new RegExp('^https://((i.ibb.co)|((raw|user-images).githubusercontent.com))/.*', 'i') diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 131360c81d88..31ba5feac4f3 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -8,6 +8,7 @@ import { resolve } from 'pathe' import { VitePWA } from 'vite-plugin-pwa' import fg from 'fast-glob' import { + githubusercontentRegex, pwaFontStylesRegex, pwaFontsRegex, vitestDescription, @@ -69,6 +70,7 @@ export default defineConfig({ }, workbox: { navigateFallbackDenylist: [/^\/new$/], + globPatterns: ['**/*.{css,js,html,woff2}'], runtimeCaching: [ { urlPattern: pwaFontsRegex, @@ -98,6 +100,20 @@ export default defineConfig({ }, }, }, + { + urlPattern: githubusercontentRegex, + handler: 'CacheFirst', + options: { + cacheName: 'githubusercontent-images-cache', + expiration: { + maxEntries: 10, + maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days + }, + cacheableResponse: { + statuses: [0, 200], + }, + }, + }, ], }, }), From e3e956a07900bdd88de19a2ad6e7302ef4f6a954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez=20Jim=C3=A9nez?= Date: Sun, 26 Jun 2022 16:35:06 +0200 Subject: [PATCH 11/11] chore: patch `VPTeamMembersItem.vue` via plugin to remove `sponsor` classes --- docs/plugins/FixSponsorLink.ts | 229 +++++++++++++++++++++++++++++++++ docs/vite.config.ts | 2 + 2 files changed, 231 insertions(+) create mode 100644 docs/plugins/FixSponsorLink.ts diff --git a/docs/plugins/FixSponsorLink.ts b/docs/plugins/FixSponsorLink.ts new file mode 100644 index 000000000000..fc43d453bebb --- /dev/null +++ b/docs/plugins/FixSponsorLink.ts @@ -0,0 +1,229 @@ +import type { Plugin } from 'vite' + +export default function SponsorLinkFix(): Plugin { + return { + name: 'vitepress-sponsor-link-fix', + enforce: 'pre', + transform(code, id) { + if (id.includes('VPTeamMembersItem.vue') && !id.endsWith('.css')) { + return ` + + + + + +` + } + }, + } +} diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 31ba5feac4f3..5a389ac7d20e 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -15,6 +15,7 @@ import { vitestName, vitestShortName, } from './.vitepress/meta' +import SponsorLinkFix from './plugins/FixSponsorLink' export default defineConfig({ plugins: [ @@ -37,6 +38,7 @@ export default defineConfig({ }), ], }), + SponsorLinkFix(), IncludesPlugin(), VitePWA({ outDir: '.vitepress/dist',