chore: upgrade to Nuxt 3.1 (#1455)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
Anthony Fu 2023-01-31 04:07:17 +01:00 committed by GitHub
parent 80a4ec502e
commit 04404e0c0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 505 additions and 1136 deletions

View file

@ -9,7 +9,7 @@
"preview": "nuxi preview" "preview": "nuxi preview"
}, },
"devDependencies": { "devDependencies": {
"@nuxt-themes/docus": "^1.4.7", "@nuxt-themes/docus": "^1.6.1",
"nuxt": "^3.1.0" "nuxt": "^3.1.1"
} }
} }

View file

@ -55,7 +55,6 @@ export default defineNuxtPlugin(async () => {
const localCall = createCall(toNodeListener(h3App) as any) const localCall = createCall(toNodeListener(h3App) as any)
const localFetch = createLocalFetch(localCall, globalThis.fetch) const localFetch = createLocalFetch(localCall, globalThis.fetch)
// @ts-expect-error slight differences in api
globalThis.$fetch = createFetch({ globalThis.$fetch = createFetch({
// @ts-expect-error slight differences in api // @ts-expect-error slight differences in api
fetch: localFetch, fetch: localFetch,

View file

@ -76,6 +76,15 @@ export default defineNuxtConfig({
}, },
build: { build: {
target: 'esnext', target: 'esnext',
rollupOptions: {
output: {
manualChunks: (id) => {
// TODO: find and resolve issue in nuxt/vite/pwa
if (id.includes('.svg') || id.includes('entry'))
return 'entry'
},
},
},
}, },
plugins: [ plugins: [
Inspect(), Inspect(),

View file

@ -56,7 +56,7 @@
"masto": "^5.6.1", "masto": "^5.6.1",
"pinia": "^2.0.29", "pinia": "^2.0.29",
"shiki": "^0.12.1", "shiki": "^0.12.1",
"shiki-es": "^0.1.2", "shiki-es": "^0.2.0",
"slimeform": "^0.9.0", "slimeform": "^0.9.0",
"string-length": "^5.0.1", "string-length": "^5.0.1",
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log",
@ -88,8 +88,8 @@
"@types/js-yaml": "^4.0.5", "@types/js-yaml": "^4.0.5",
"@types/prettier": "^2.7.2", "@types/prettier": "^2.7.2",
"@types/wicg-file-system-access": "^2020.9.5", "@types/wicg-file-system-access": "^2020.9.5",
"@unocss/nuxt": "^0.48.5", "@unocss/nuxt": "^0.49.0",
"@vue-macros/nuxt": "^0.3.3", "@vue-macros/nuxt": "^0.3.7",
"@vueuse/math": "^9.11.1", "@vueuse/math": "^9.11.1",
"@vueuse/nuxt": "^9.11.1", "@vueuse/nuxt": "^9.11.1",
"bumpp": "^8.2.1", "bumpp": "^8.2.1",
@ -99,9 +99,8 @@
"esno": "^0.16.3", "esno": "^0.16.3",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"fs-extra": "^11.1.0", "fs-extra": "^11.1.0",
"jsdom": "^21.1.0",
"lint-staged": "^13.1.0", "lint-staged": "^13.1.0",
"nuxt": "3.0.0", "nuxt": "3.1.1",
"nuxt-security": "^0.10.1", "nuxt-security": "^0.10.1",
"nuxt-vitest": "^0.6.4", "nuxt-vitest": "^0.6.4",
"postcss-nested": "^6.0.0", "postcss-nested": "^6.0.0",
@ -125,7 +124,6 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"mlly": "1.1.0",
"@tiptap/extension-bubble-menu": "2.0.0-beta.204", "@tiptap/extension-bubble-menu": "2.0.0-beta.204",
"@tiptap/extension-floating-menu": "2.0.0-beta.204", "@tiptap/extension-floating-menu": "2.0.0-beta.204",
"@tiptap/core": "2.0.0-beta.204", "@tiptap/core": "2.0.0-beta.204",

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest' import { describe, expect, it } from 'vitest'
import { format } from 'prettier' import { format } from 'prettier'
import { render as renderTree } from 'ultrahtml' import { render as renderTree } from 'ultrahtml'
import type { ContentParseOptions } from '~~/composables/content-parse' import type { ContentParseOptions } from '~/composables/content-parse'
describe('html-parse', () => { describe('html-parse', () => {
it('empty', async () => { it('empty', async () => {

View file

@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest' import { describe, expect, it } from 'vitest'
import { matchLanguages } from '../../utils/language'
describe('language', () => { describe('language', () => {
it('match language', () => { it('match language', () => {