Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update nuxt to v3.9.3 and vue 3.4.15 #2543

Closed
wants to merge 25 commits into from

Conversation

userquin
Copy link
Member

@userquin userquin commented Jan 3, 2024

This PR also updates some nuxt modules to latest version, changed also configuration for new i18n module.

Right now it is not working, I guess some problem with vue-macros, the paginator watcher not triggering loadNext, adding immediate works but the browser hangs after a few seconds or when scrolling.

We also need to review nuxt security module, added a new patch (when this PR ready we can remove old patch).

Copy link

stackblitz bot commented Jan 3, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit f2722e1
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/65aeb9cf9b80420008ee20b4

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for elk-zone failed.

Name Link
🔨 Latest commit f2722e1
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/65aeb9cfff1d6c0008e6e5ca

# Conflicts:
#	composables/tiptap/shikiji-parser.ts
#	package.json
#	pnpm-lock.yaml
Copy link

socket-security bot commented Jan 3, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@antfu/eslint-config@0.43.1 Transitive: environment, eval, filesystem, network, shell, unsafe +248 65.2 MB antfu
npm/@antfu/ni@0.21.12 environment, filesystem, shell 0 465 kB antfu
npm/@iconify/utils@2.1.16 Transitive: environment, filesystem, shell, unsafe +23 771 kB cyberalien
npm/@nuxt-themes/docus@1.15.0 Transitive: environment, eval, filesystem, network, shell, unsafe +972 193 MB atinux
npm/@nuxt/test-utils@3.10.0 Transitive: environment, eval, filesystem, network, shell, unsafe +225 82.4 MB danielroe
npm/@nuxtjs/i18n@8.0.0 eval Transitive: environment, filesystem, network, shell, unsafe +226 77.9 MB rchl
npm/@pinia/nuxt@0.5.1 Transitive: environment, eval, filesystem, network, shell, unsafe +152 62.8 MB posva
npm/@unlazy/nuxt@0.10.4 Transitive: environment, filesystem, network, shell, unsafe +152 21.2 MB johannschopplich
npm/@unocss/nuxt@0.58.3 Transitive: environment, eval, filesystem, network, shell, unsafe +223 36 MB antfu
npm/@vue-macros/nuxt@1.9.21 Transitive: environment, eval, filesystem, network, shell, unsafe +753 136 MB sxzz
npm/@vueuse/core@10.7.2 environment, network Transitive: eval, filesystem, unsafe +28 49 MB antfu
npm/@vueuse/integrations@10.7.2 Transitive: environment, eval, filesystem, network, unsafe +33 50.8 MB antfu
npm/@vueuse/math@10.7.2 Transitive: environment, eval, filesystem, unsafe +26 47.4 MB antfu
npm/browser-fs-access@0.35.0 None 0 46.7 kB tomayac
npm/floating-vue@5.2.0 Transitive: environment, eval, filesystem, unsafe +27 47.6 MB akryum
npm/nuxt-security@1.0.1 Transitive: environment, filesystem, network, shell, unsafe +172 24.1 MB baroshem
npm/nuxt@3.9.3 Transitive: environment, eval, filesystem, network, shell, unsafe +1437 279 MB danielroe
npm/pinia@2.1.7 environment Transitive: eval, filesystem, unsafe +26 47.5 MB posva
npm/sharp@0.32.6 environment, filesystem, shell Transitive: network +50 2.07 MB lovell
npm/shikiji@0.9.19 Transitive: environment +1 8.43 MB antfu
npm/theme-colors@0.1.0 None 0 10.7 kB pi0
npm/theme-vitesse@0.7.5 None 0 147 kB antfu
npm/tsx@4.7.0 Transitive: environment, filesystem, network, shell, unsafe +3 643 kB hirokiosame
npm/typescript@5.3.3 None 0 32 MB typescript-bot
npm/vite-plugin-pwa@0.17.4 filesystem Transitive: environment, eval, network, shell, unsafe +329 47.5 MB userquin
npm/vitest@1.1.1 environment, eval Transitive: filesystem, network, shell, unsafe +70 18.4 MB oreanno
npm/vue-tsc@1.8.27 Transitive: environment, eval +27 39.9 MB johnsoncodehk
npm/vue@3.4.15 environment, eval Transitive: filesystem, unsafe +23 47 MB yyx990803

🚮 Removed packages: npm/@antfu/eslint-config@0.41.3, npm/@antfu/ni@0.21.8, npm/@iconify/utils@2.1.7, npm/@nuxt-themes/docus@1.14.6, npm/@nuxt/devtools@1.0.4, npm/@nuxt/test-utils@3.9.0-alpha.1, npm/@nuxtjs/i18n@8.0.0-beta.10, npm/@pinia/nuxt@0.4.11, npm/@unocss/nuxt@0.53.4, npm/@vue-macros/nuxt@1.6.0, npm/@vueuse/core@10.2.1, npm/@vueuse/integrations@10.2.1, npm/@vueuse/math@10.2.1, npm/@vueuse/nuxt@10.2.1, npm/browser-fs-access@0.34.1, npm/floating-vue@2.0.0-beta.24, npm/nuxt-security@0.13.1, npm/nuxt@3.8.2, npm/pinia@2.1.4, npm/sharp@0.32.5, npm/shikiji@0.9.9, npm/theme-colors@0.0.5, npm/theme-vitesse@0.7.2, npm/typescript@5.1.6, npm/unimport@3.6.0, npm/vite-plugin-pwa@0.16.4, npm/vitest@1.1.0, npm/vue-tsc@1.8.8

View full report↗︎

addEventListener: (type: string, listener: (evt: PageLifecycleEvent) => void) => void
get state(): PageLifecycleState
get pageWasDiscarded(): boolean
addUnsavedChanges: (id: symbol | any) => void
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not Symbol?

nuxt.config.ts Outdated
@@ -84,6 +89,17 @@ export default defineNuxtConfig({
build: {
target: 'esnext',
},
optimizeDeps: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks like a problem on the compile-time schedule, and probably a regression from Nuxt with the ability to create dependency between modules..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any change here is more likely a change in Vite (as we upgraded from Vite 4 -> Vite 5 in v3.9).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included the list for testing (testing with current main and this PR on my local), I need to remove all entries, we only need focus trap for client

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea to include most of these in the config. We're lazy loading a lot of dependencies and they aren't discovered by the scanner. Some will end up triggering a full-reload on cold start. We may merge a new strategy in Vite 5.1 that we can adopt and this will be even more important then (we will start getting warnings to add the deps to the config). See:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has anyone in the team tried running dev in a clean clone (main branch with Nuxt 3.8)? there are almost 10 page refresh even when scrolling on timeline

@patak-dev I'm going to activate Vite 5 { server: { fs: cachedChecks: true } } ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@userquin see nuxt/nuxt#24196 (comment), there were issues in Nuxt 3.8 preventing the optimized deps cache to be used (so every startup was a cold start). This should be fixed in 3.9 (I imagine also in newer patches for 3.8?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to include also the new floating-vue v5.0.0 :fingers_crossed:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patak-dev I don't see any improvement activating cachedChecks: true on my laptop (with or without optimized deps, just a few ms, in both cases removing the .cache folder):

# without cachedChecks: true
ℹ Vite server warmed up in 8133ms                                                                                                                     15:02:18
ℹ Vite client warmed up in 12612ms                                                                                                                    15:02:19
✔ Nitro built in 5417 ms

# with cachedChecks: true
ℹ Vite server warmed up in 8190ms                                                                                                                     15:03:23
ℹ Vite client warmed up in 12484ms                                                                                                                    15:03:24
✔ Nitro built in 5196 ms

@userquin userquin changed the title chore: update nuxt to v3.9.0 chore: update nuxt to v3.9.3 and vue 3.4.15 Jan 22, 2024
@userquin
Copy link
Member Author

Closing, as #2610 has now been merged.

@userquin userquin closed this Feb 24, 2024
@userquin userquin deleted the userquin/chore-nuxt-3.9.0 branch February 24, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants