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/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +248 65.2 MB antfu
npm/@antfu/[email protected] environment, filesystem, shell 0 465 kB antfu
npm/@iconify/[email protected] Transitive: environment, filesystem, shell, unsafe +23 771 kB cyberalien
npm/@nuxt-themes/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +972 193 MB atinux
npm/@nuxt/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +225 82.4 MB danielroe
npm/@nuxtjs/[email protected] eval Transitive: environment, filesystem, network, shell, unsafe +226 77.9 MB rchl
npm/@pinia/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +152 62.8 MB posva
npm/@unlazy/[email protected] Transitive: environment, filesystem, network, shell, unsafe +152 21.2 MB johannschopplich
npm/@unocss/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +223 36 MB antfu
npm/@vue-macros/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +753 136 MB sxzz
npm/@vueuse/[email protected] environment, network Transitive: eval, filesystem, unsafe +28 49 MB antfu
npm/@vueuse/[email protected] Transitive: environment, eval, filesystem, network, unsafe +33 50.8 MB antfu
npm/@vueuse/[email protected] Transitive: environment, eval, filesystem, unsafe +26 47.4 MB antfu
npm/[email protected] None 0 46.7 kB tomayac
npm/[email protected] Transitive: environment, eval, filesystem, unsafe +27 47.6 MB akryum
npm/[email protected] Transitive: environment, filesystem, network, shell, unsafe +172 24.1 MB baroshem
npm/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +1437 279 MB danielroe
npm/[email protected] environment Transitive: eval, filesystem, unsafe +26 47.5 MB posva
npm/[email protected] environment, filesystem, shell Transitive: network +50 2.07 MB lovell
npm/[email protected] Transitive: environment +1 8.43 MB antfu
npm/[email protected] None 0 10.7 kB pi0
npm/[email protected] None 0 147 kB antfu
npm/[email protected] Transitive: environment, filesystem, network, shell, unsafe +3 643 kB hirokiosame
npm/[email protected] None 0 32 MB typescript-bot
npm/[email protected] filesystem Transitive: environment, eval, network, shell, unsafe +329 47.5 MB userquin
npm/[email protected] environment, eval Transitive: filesystem, network, shell, unsafe +70 18.4 MB oreanno
npm/[email protected] Transitive: environment, eval +27 39.9 MB johnsoncodehk
npm/[email protected] environment, eval Transitive: filesystem, unsafe +23 47 MB yyx990803

🚮 Removed packages: npm/@antfu/[email protected], npm/@antfu/[email protected], npm/@iconify/[email protected], npm/@nuxt-themes/[email protected], npm/@nuxt/[email protected], npm/@nuxt/[email protected], npm/@nuxtjs/[email protected], npm/@pinia/[email protected], npm/@unocss/[email protected], npm/@vue-macros/[email protected], npm/@vueuse/[email protected], npm/@vueuse/[email protected], npm/@vueuse/[email protected], npm/@vueuse/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

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.

4 participants