4 Commits

Author SHA1 Message Date
YunYouJun
a60d5f37ed chore: release v1.1.3 2023-07-30 18:45:26 +08:00
YunYouJun
9cb0ca3c44 fix(test): fake indexedDB 2023-07-30 18:44:40 +08:00
YunYouJun
fffd6e398c chore: show pkg version in footer 2023-07-30 18:37:21 +08:00
YunYouJun
492513098a chore: bumpp 2023-07-30 18:33:36 +08:00
8 changed files with 78 additions and 7 deletions

View File

@@ -3,9 +3,8 @@ name: Docker Image
on:
push:
branches: [main]
pull_request:
branches: [main]
tags:
- 'v*'
jobs:
build:

View File

@@ -9,6 +9,7 @@
- 网站链接:[cook.yunyoujun.cn](https://cook.yunyoujun.cn)
- 备用:[cook.yyj.moe](https://cook.yyj.moe)
- 开发版:[cook.yunle.app](https://cook.yunle.app)
### 小程序版本

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { isClient } from '@vueuse/core'
import pkg from '~/package.json'
const displayICP = ref(true)
@@ -17,7 +18,7 @@ const buildDate = (new Date(Number.parseInt(now) * 1000)).toLocaleDateString()
<div p="4 t-2" class="flex flex-col items-center justify-center" text="sm">
<div v-if="commitSha && buildDate" mb-2>
<span>
当前版本{{ buildDate }}:
当前版本 v{{ pkg.version }}{{ buildDate }}:
</span>
<span>
<a border="b-1 dashed" :href="`https://github.com/YunYouJun/cook/commit/${commitSha}`" target="_blank" alt="Cook | GitHub Commit">

View File

@@ -1,9 +1,10 @@
import { acceptHMRUpdate, defineStore } from 'pinia'
import { useStorage } from '@vueuse/core'
import { computed, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { useGtm } from '@gtm-support/vue-gtm'
import type { RecipeItem } from 'types'
import type { StuffItem } from '../../data/food'
import { db } from '../../utils/db'
const namespace = 'cook'

View File

@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.1.2",
"version": "1.1.3",
"packageManager": "pnpm@8.6.10",
"engines": {
"node": ">=14"
@@ -16,7 +16,7 @@
"lint": "eslint .",
"postinstall": "nuxi prepare && npm run convert",
"preview-https": "serve dist",
"release": "bumpp --commit --push --tag",
"release": "bumpp",
"test": "vitest",
"typecheck": "vue-tsc --noEmit"
},
@@ -49,6 +49,7 @@
"cross-env": "^7.0.3",
"dexie": "^3.2.4",
"eslint": "^8.46.0",
"fake-indexeddb": "^4.0.2",
"jsdom": "^22.1.0",
"nuxt": "^3.6.5",
"pinia": "^2.1.6",

63
pnpm-lock.yaml generated
View File

@@ -85,6 +85,9 @@ devDependencies:
eslint:
specifier: ^8.46.0
version: 8.46.0
fake-indexeddb:
specifier: ^4.0.2
version: 4.0.2
jsdom:
specifier: ^22.1.0
version: 22.1.0
@@ -4286,6 +4289,11 @@ packages:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
/base64-arraybuffer-es6@0.7.0:
resolution: {integrity: sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw==}
engines: {node: '>=6.0.0'}
dev: true
/base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
dev: true
@@ -5211,6 +5219,12 @@ packages:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
dev: true
/domexception@1.0.1:
resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==}
dependencies:
webidl-conversions: 4.0.2
dev: true
/domexception@4.0.0:
resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==}
engines: {node: '>=12'}
@@ -5983,6 +5997,12 @@ packages:
ufo: 1.2.0
dev: true
/fake-indexeddb@4.0.2:
resolution: {integrity: sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw==}
dependencies:
realistic-structured-clone: 3.0.0
dev: true
/fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true
@@ -9672,6 +9692,14 @@ packages:
dependencies:
picomatch: 2.3.1
/realistic-structured-clone@3.0.0:
resolution: {integrity: sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q==}
dependencies:
domexception: 1.0.1
typeson: 6.1.0
typeson-registry: 1.0.0-alpha.39
dev: true
/recast@0.23.3:
resolution: {integrity: sha512-HbCVFh2ANP6a09nzD4lx7XthsxMOJWKX5pIcUwtLrmeEIl3I0DwjCoVXDE0Aobk+7k/mS3H50FK4iuYArpcT6Q==}
engines: {node: '>= 4'}
@@ -10778,6 +10806,13 @@ packages:
punycode: 2.3.0
dev: true
/tr46@2.1.0:
resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==}
engines: {node: '>=8'}
dependencies:
punycode: 2.3.0
dev: true
/tr46@4.1.1:
resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==}
engines: {node: '>=14'}
@@ -10928,6 +10963,20 @@ packages:
hasBin: true
dev: true
/typeson-registry@1.0.0-alpha.39:
resolution: {integrity: sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw==}
engines: {node: '>=10.0.0'}
dependencies:
base64-arraybuffer-es6: 0.7.0
typeson: 6.1.0
whatwg-url: 8.7.0
dev: true
/typeson@6.1.0:
resolution: {integrity: sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA==}
engines: {node: '>=0.1.14'}
dev: true
/ufo@1.2.0:
resolution: {integrity: sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg==}
dev: true
@@ -11860,6 +11909,11 @@ packages:
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
dev: true
/webidl-conversions@6.1.0:
resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==}
engines: {node: '>=10.4'}
dev: true
/webidl-conversions@7.0.0:
resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==}
engines: {node: '>=12'}
@@ -11949,6 +12003,15 @@ packages:
webidl-conversions: 4.0.2
dev: true
/whatwg-url@8.7.0:
resolution: {integrity: sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==}
engines: {node: '>=10'}
dependencies:
lodash: 4.17.21
tr46: 2.1.0
webidl-conversions: 6.1.0
dev: true
/which-boxed-primitive@1.0.2:
resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
dependencies:

3
test/setup.ts Normal file
View File

@@ -0,0 +1,3 @@
import indexeddb from 'fake-indexeddb'
globalThis.indexedDB = indexeddb

View File

@@ -7,5 +7,7 @@ export default defineConfig({
deps: {
inline: ['@vue', '@vueuse', 'vue-demi'],
},
setupFiles: ['test/setup.ts'],
},
})