Skip to content

Commit

Permalink
feat: optimize bundle (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Chopin <[email protected]>
  • Loading branch information
farnabaz and atinux authored Jun 11, 2024
1 parent d4133a9 commit 39aca91
Show file tree
Hide file tree
Showing 89 changed files with 3,275 additions and 1,444 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

- name: Install dependencies
run: pnpm install

- name: prepare
run: pnpm dev:prepare

- name: Lint (code)
run: pnpm lint --fix
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
- name: Prepare environment
run: pnpm dev:prepare

# - name: Run test suite
# run: pnpm test
- name: Run test suite
run: pnpm test

- name: Release Nightly
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
3 changes: 3 additions & 0 deletions docs/content/1.docs/2.storage/3.blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ async function onFileSelect({ target }: Event) {
::field{name="multiple" type="boolean"}
Whether to allow multiple files to be uploaded. Defaults to `true`.
::
::field{name="prefix" type="string"}
The prefix to use for the blob pathname.
::
::
::
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@vueuse/core": "^10.10.0",
"@vueuse/nuxt": "^10.10.0",
"medium-zoom": "^1.1.0",
"nuxt": "^3.11.2",
"nuxt": "^3.12.1",
"nuxt-cloudflare-analytics": "^1.0.8",
"nuxt-og-image": "^3.0.0-rc.53",
"three": "^0.164.1",
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"release": "npm run lint && npm run test && changelogen --release && npm publish && git push --follow-tags",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest run",
"test": "vitest run --test-timeout=20000",
"test:watch": "vitest watch"
},
"dependencies": {
"@cloudflare/workers-types": "^4.20240605.0",
"@nuxt/devtools-kit": "^1.3.3",
"@nuxt/kit": "^3.11.2",
"@nuxt/kit": "^3.12.1",
"@uploadthing/mime-types": "^0.2.10",
"citty": "^0.1.6",
"confbox": "^0.1.7",
Expand All @@ -59,16 +59,17 @@
"devDependencies": {
"@nuxt/devtools": "^1.3.3",
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.7.0",
"@nuxt/schema": "^3.11.2",
"@nuxt/module-builder": "^0.7.1",
"@nuxt/schema": "^3.12.1",
"@nuxt/test-utils": "^3.13.1",
"@types/node": "^20.14.2",
"changelogen": "^0.5.5",
"eslint": "^9.4.0",
"nuxt": "^3.11.2",
"happy-dom": "^14.12.0",
"nuxt": "^3.12.1",
"typescript": "^5.4.5",
"vitest": "^1.6.0",
"wrangler": "^3.60.0"
"wrangler": "^3.60.2"
},
"resolutions": {
"@nuxt/ui": "2.15.2"
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions playground/pages/blob.vue → playground/app/pages/blob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const loadingProgress = ref<number | undefined>(undefined)
const newFilesValue = ref<File[]>([])
const uploadRef = ref<HTMLInputElement>()
const folded = ref(false)
const prefixes = ref([])
const prefixes = ref<string[]>([])
const limit = ref(5)
const prefix = computed(() => prefixes.value?.[prefixes.value.length - 1])
Expand Down Expand Up @@ -153,7 +153,7 @@ async function deleteFile(pathname: string) {
<div class="flex">
<UButtonGroup class="flex-1">
<UInput
:model-value="newFilesValue?.map((file) => file.name).join(', ')"
:model-value="newFilesValue?.map((file: File) => file.name).join(', ')"
name="fileValue"
disabled
class="flex-1"
Expand All @@ -174,7 +174,7 @@ async function deleteFile(pathname: string) {
<UButton
label="Select file(s)"
color="gray"
@click="uploadRef.click()"
@click="uploadRef?.click()"
/>
</UButtonGroup>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import module from '../src/module'

export default defineNuxtConfig({
future: { compatibilityVersion: 4 },
devtools: { enabled: true },
modules: [
'@nuxt/ui',
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@nuxt/ui": "^2.16.0",
"@nuxthub/core": "latest",
"drizzle-orm": "^0.30.10",
"nuxt": "^3.11.2"
"nuxt": "^3.12.1"
},
"devDependencies": {
"@nuxt/devtools": "latest"
Expand Down
2 changes: 1 addition & 1 deletion playground/server/api/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default eventHandler(async () => {
// db.prepare('select * from todos where id = ?1').bind(1),
// ])

return await db.exec('CREATE TABLE IF NOT EXISTS frameworks (id INTEGER PRIMARY KEY, name TEXT NOT NULL, year INTEGER NOT NULL DEFAULT 0)')
// return await db.exec('CREATE TABLE IF NOT EXISTS frameworks (id INTEGER PRIMARY KEY, name TEXT NOT NULL, year INTEGER NOT NULL DEFAULT 0)')

// return useProjectDatabase(projectUrl).all(sql`SELECT * from todos``)
// return {}
Expand Down
2,409 changes: 1,808 additions & 601 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading

0 comments on commit 39aca91

Please sign in to comment.