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

[Snyk] Upgrade nuxt from 3.12.4 to 3.15.0 #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nerdy-tech-com-gitub
Copy link
Owner

@nerdy-tech-com-gitub nerdy-tech-com-gitub commented Jan 24, 2025

snyk-top-banner

Snyk has created this PR to upgrade nuxt from 3.12.4 to 3.15.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 7 versions ahead of your current version.

  • The recommended version was released a month ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Uncontrolled resource consumption
SNYK-JS-BRACES-6838727
137 Proof of Concept
high severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-CROSSSPAWN-8303230
137 Proof of Concept
high severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-ES5EXT-6095076
137 Proof of Concept
high severity Inefficient Regular Expression Complexity
SNYK-JS-MICROMATCH-6838728
137 No Known Exploit
medium severity Information Exposure
SNYK-JS-VITE-8023174
137 Proof of Concept
medium severity Improper Input Validation
SNYK-JS-NANOID-8492085
137 No Known Exploit
medium severity Improper Input Validation
SNYK-JS-NANOID-8492085
137 No Known Exploit
medium severity Cross-site Scripting (XSS)
SNYK-JS-ROLLUP-8073097
137 Proof of Concept
low severity Cross-site Scripting (XSS)
SNYK-JS-VITE-8022916
137 Proof of Concept
low severity Cross-site Scripting
SNYK-JS-SEND-7926862
137 No Known Exploit
low severity Cross-site Scripting
SNYK-JS-SERVESTATIC-7926865
137 No Known Exploit
Release notes
Package name: nuxt
  • 3.15.0 - 2024-12-24

    👀 Highlights

    ❄️ Snowfall!

    Happy holidays! You'll notice when you start Nuxt that (if you're in the Northern Hemisphere) there's some snow on the loading screen (#29871).

    ⚡️ Vite 6 included

    Nuxt v3.15 includes Vite 6 for the first time. Although this is a major version, we expect that this won't be a breaking change for Nuxt users (see full migration guide). However, please take care if you have dependencies that rely on a particular Vite version.

    One of the most significant changes with Vite 6 is the new Environment API, which we hope to use in conjunction with Nitro to improve the server dev environment. Watch this space!

    You can read the full list of changes in the Vite 6 changelog.

    🪵 Chromium devtools improvements

    We talk a lot about the Nuxt DevTools, but v3.15 ships with better integration in dev mode for Chromium-based browser devtools.

    We now use the Chrome DevTools extensibility API to add support for printing nuxt hook timings in the browser devtools performance panel.

    CleanShot 2024-11-14 at 15 05 22@2x

    🗺️ Navigation mode for callOnce

    callOnce is a built-in Nuxt composable for running code only once. For example, if the code runs on the server it won't run again on the client. But sometimes you do want code to run on every navigation - just avoid the initial server/client double load. For this, there's a new mode: 'navigation' option that will run the code only once per navigation. (See #30260 for more info.)

    await callOnce(() => counter.value++, { mode: 'navigation' })

    🥵 HMR for templates, pages + page metadata

    We now implement hot module reloading for Nuxt's virtual files (like routes, plugins, generated files) as well as for the content of page metadata (within a definePageMeta macro) (#30113).

    This should mean you have a faster experience in development, as well as not needing to reload the page when making changes to your routes.

    📋 Page meta enhancements

    We now support extracting extra page meta keys (likely used by module authors) via experimental.extraPageMetaExtractionKeys (#30015). This enables module authors to use this information at build time, in the pages:resolved hook.

    We also now support local functions in definePageMeta (#30241). This means you can do something like this:

    function validateIdParam(route) {
    return !!(route.params.id && !isNaN(Number(route.params.id)))
    }

    definePageMeta({
    validate: validateIdParam,
    })

    🔥 Performance improvements

    We now preload the app manifest in the browser if it will be used when hydrating the app (#30017).

    We'll also tree shake vue-router's hash mode history out of your bundle if we can - specifically, if you haven't customised your app/router.options.ts (#30297).

    🐣 v4 updates

    A few more changes shipped for the new defaults for v4, including only inlining styles by default for Vue components (#30305).

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    npx nuxi@latest upgrade --force

    This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.

    👉 Changelog

    compare changes

    🚀 Enhancements

    • deps: Update dependency vite to v6 (3.x) (#30044)
    • kit: Allow module default options to be async (#29980)
    • nuxt: Add new types to vue preset (#29819)
    • nuxt: Experimental extraPageMetaExtractionKeys (#30015)
    • nuxt,schema: Allow setting serialisable vue app config (#28873)
    • nuxt: Print nuxt hook timings in browser devtools (#29922)
    • nuxt: Support vue directive auto-imports within unimport (#29818)
    • schema: Add snow effect on loading screen in winter (#29871)
    • nuxt: Support local functions in definePageMeta (#30241)
    • nuxt: Add mode: 'navigation' to callOnce (#30260)

    🔥 Performance

    • nuxt: Preload app manifest (#30017)
    • nuxt: Use static hashMode option (#30297)
    • vite: Use vite to clear screen (#30315)
    • schema: Only inline styles for vue components (#30305)
    • nuxt: Remove useId from composable key plugin (#30328)

    🩹 Fixes

    • nuxt: Check if nuxt link observer is null (#30038)
    • nuxt: Unref the default value of asyncData when clearing (#30041)
    • kit: Re-export addServerTemplate (a02af2348)
    • Remove unused dependencies and tidy project (#30043)
    • vite: Add back some dev-bundler dependencies (976024f16)
    • nuxt: Do not persist extraExtractionKeys on runtime route.meta (ae9f42f4a)
    • nuxt: Allow array/object style value for head components (#29999)
    • nuxt: Tidy up remnants of previous useId implementation (40f437d25)
    • kit,nuxt: Provide buildDir to normalizeTemplate (#30115)
    • kit: Add better logging for non-resolved modules (#30116)
    • nuxt: Correct return type of useRequestFetch (#30117)
    • nuxt,vite: Hmr for templates, pages + page metadata (#30113)
    • nuxt: Use nitropack rather than nitro import (2d5b53b23)
    • kit: Use resolved module paths for transpile + modulesDir (#30136)
    • Update engines.node to match dependencies (#30139)
    • schema: Allow routerOptions.history to return null (#30192)
    • nuxt: Render client page directly when not hydrating (#30061)
    • nuxt: Use useId for island client component teleport id (#30151)
    • nuxt: De-default async layout components (#30203)
    • nuxt: Correct types for nuxt and nuxt/app (#30148)
    • nuxt,schema: Allow showing spa loader til after hydration (#29776)
    • nuxt: Remove whitespace around spa loading template (070bd103c)
    • nuxt: Hoist environment types (#30230)
    • schema: Hoist nitro runtime types (73761dade)
    • nuxt: Ensure getRouteRules works with nitro signature (#30277)
    • nuxt: Respect replace in middleware with navigateTo (#30283)
    • nuxt: Update import paths for nitropack (f220314a5)
    • nuxt: Don't use <RouterLink> for links starting with # (#30190)
    • vite: Ignore optimising #app-manifest (ec613e533)
    • nuxt: Use useId for client-fallback component uid (#30314)
    • schema: Gate inline style change behind v4 check (ceac86e34)
    • nuxt: Do not resolve deep imports for @ vitest/ (4171a1076)
    • kit: Initialize tsconfig paths in addTemplate if undefined (#30348)
    • nuxt: Treat client useAsyncData calls as async boundaries (#30343)
    • nuxt: Initialise import.meta.hot.data (b1cf5781d)

    💅 Refactors

    • Move composable-keys plugin into nuxt core (#30029)
    • nuxt: Simplify and improve core plugins that parse ast (#30088)
    • nuxt: Prefix all core modules with nuxt: (#30028)

    📖 Documentation

    • Remove extra new line in frontmatter (#30031)
    • Text capitalization for titles (#30054)
    • Mention that type checking can happen in dev (#30012)
    • Fix typos in punctuation (#30006)
    • Remove duplicate information about preprocessor variables (#30002)
    • Format text case for consistency (#30073)
    • Add a section about event.waitUntil (#29583)
    • Improve wording (#30106)
    • Update configuration files format (#30087)
    • Update links to vite.dev (#30111)
    • Fix incorrect vite docs link (#30112)
    • Add note about using bun runtime (#30019)
    • Add giget limitation in nuxt layers documentation (#30122)
    • Correct vite link (#30135)
    • Add nuxi upgrade channel flag (#30184)
    • Add note about awaiting useLazyFetch (#30171)
    • Add missing comma in upgrade doc code sample (#30189)
    • Added options and option definitions for sourcemap (#30201)
    • Add shared directory documentation (#29816)
    • Document vite.css.preprocessorMaxWorkers (eb1ba017c)
    • Handle zero-length string (cf74b4c98)
    • Update nitro links + fix link checking (#30228)
    • Add a note about compatibilityVersion feature flag (#30274)
    • Update auto-imports to advertise the scan feature (#30292)
    • Update nuxi command pages (#30199)
    • Update migration documentation for inlineStyles (2660bffbc)
    • Add bluesky link (#30322)
    • Add recipe for session and authentication (#27287)
    • Fix filename for prerendering page (#30333)
    • Add spacing (#30331)

    🏡 Chore

    ✅ Tests

    • Add additional attw test for built packages (#30206)
    • Improve assertions for spa loading tests (80bd2d2ec)
    • Bump bundle size snapshot (d545f9e96)
    • Try to improve spa preloader tests (08219a502)
    • Ensure dev server is loaded before running tests (f66cf928e)

    🤖 CI

    • Ignore dev-dependencies for engines.node (e366a6feb)
    • Analyse github actions with codeql (#30293)
    • Exclude file that codeql cannot analyse (7e03b08a6)

    ❤️ Contributors

  • 3.14.1592 - 2024-11-19

    3.14.1592 is the next patch release.

    👉 Changelog

    compare changes

    🩹 Fixes

    • rspack: Update webpackbar with support for rspack (#29823)
    • nuxt: Assign default name to component without setup (#29869)
    • kit: Use dst to deduplicate templates when adding them (#29895)
    • nuxt: Handle empty plugin files (d44408e87)
    • vite: Use resolved nuxt template dst to invalidate modules (6cd3352de)
    • nuxt: Return null map for empty plugin metadata (302a66da9)
    • kit: Resolve module paths before appending subpaths (#29955)
    • nuxt: Recompile templates on change events (#29954)
    • nuxt: Do not include <NuxtWelcome> when building (#29956)
    • nuxt: Allow scanning metadata from 2+ files at same path (#29969)
    • nuxt: Do not disallow importing nitro dependencies (#29975)

    💅 Refactors

    • nuxt: Define layouts as async vue components (#29957)

    📖 Documentation

    • Update custom environment example (e3759ad55)
    • Update minimal example (7973f5ed4)
    • Add tip about islands directory (#29913)
    • Fix typo in composable name (#29910)
    • Rename @ nuxt/auth to @ nuxt/auth-utils in roadmap (#29906)
    • Capitalize text (#29938)
    • Improve clarity in seo meta example (#29930)
    • Update getting started to include WebStorm (#29845)

    🏡 Chore

    • Remove unused imports and update eslint config (#29876)

    ✅ Tests

    🤖 CI

    ❤️ Contributors

  • 3.14.159 - 2024-11-06

    3.14.159 is a hotfix release to address regressions in v3.14.

    We're leaning into the π theme - future patch releases of this minor version will just continue adding digits. (Sorry for any inconvenience! 😆)

    👉 Changelog

    compare changes

    🩹 Fixes

    • nuxt: Update nitropack preset directory (#29780)
    • kit: Fall back to meta version if there's no module.json (#29793)
    • kit: Use mlly to resolve module paths to avoid cjs fallback (#29799)
    • webpack,rspack: Add adapter for webpack-dev-middleware (#29806)
    • nuxt: Remove null-byte prefix for virtual files (#29809)
    • kit: Convert module path to file url before reading meta (fb833ac64)

    📖 Documentation

    • Capitalize titles (#29768)
    • Fix rou3 link in nitro.js (#29775)
    • Fix tip formatting (#29792)
    • Add link to h3 blogpost (#29794)
    • Remove outdated cloudflare tip (auto minify deprecated) (#29812)

    🏡 Chore

    • nuxt: Remove redundant type (#29810)

    ❤️ Contributors

  • 3.14.0 - 2024-11-04

    3.14.0 is the next minor release.

    👀 Highlights

    Behind the scenes, a lot has been going on in preparation for the release of Nuxt v4 (particularly on the unjs side with preparations for Nitro v3!)

    ⚡️ Faster starts powered by jiti

    Loading the nuxt config file, as well as modules and other build-time code, is now powered by jiti v2. You can see more about the release in the jiti v2 release notes, but one of the most important pieces is native node esm import (where possible), which should mean a faster start. ✨

    📂 Shared folder for code and types shared with client/server

    You should never import Vue app code in your nitro code (or the other way around). But this has meant a friction point when it comes to sharing types or utilities that don't rely on the nitro/vue contexts.

    For this, we have a new shared/ folder (#28682). You can't import Vue or nitro code into files in this folder, but it produces auto-imports you can consume throughout the rest of your app.

    If needed you can use the new #shared alias which points to this folder.

    The shared folder is alongside your server/ folder. (If you're using compatibilityVersion: 4, this means it's not inside your app/ folder.)

    🦀 rspack builder

    We're excited to announce a new first-class Nuxt builder for rspack. It's still experimental but we've refactored the internal Nuxt virtual file system to use unplugin to make this possible.

    Let us know if you like it - and feel free to raise any issues you experience with it.

    👉 To try it out, you can use this starter - or just install @ nuxt/rspack-builder and set builder: 'rspack' in your nuxt config file.

    ✨ New composables

    We have new useResponseHeader and useRuntimeHook composables (#27131 and #29741).

    🔧 New module utilities

    We now have a new addServerTemplate utility (#29320) for adding virtual files for access inside nitro runtime routes.

    🚧 v4 changes

    We've merged some changes which only take effect with compatibilityVersion: 4, but which you can opt-into earlier.

    1. previously, if you had a component like ~/components/App/Header.vue this would be visible in your devtools as <Header>. From v4 we ensure this is <AppHeader>, but it's opt-in to avoid breaking any manual <KeepAlive> you might have implemented. (#28745).

    2. Nuxt scans page metadata from your files, before calling pages:extend. But this has led to some confusing behaviour, as pages added at this point do not end up having their page metadata respected. So we now do not scan metadata before calling pages:extend. Instead, we have a new pages:resolved hook, which is called after pages:extend, after all pages have been augmented with their metadata. I'd recommend opting into this by setting experimental.scanPageMeta to after-resolve, as it solves a number of bugs.

    🗺️ Roadmap to v3.15

    They didn't quite make it in time for v3.14 but for the next minor release you can expect (among other things):

    • auto-imported directives from modules (#29203)
    • 'isolated' page renders (#29366)
    • delayed hydration (#26468)

    ✅ Upgrading

    As usual, our recommendation for upgrading is to run:

    npx nuxi@latest upgrade --force

    This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.

    👉 Changelog

    compare changes

    🚀 Enhancements

    • deps: Upgrade to latest version of jiti (#27995)
    • kit,nuxt,vite,webpack: Reimplement cjs utils using jiti (#29073)
    • nuxt: Normalise component names to match nuxt pattern (#28745)
    • kit,schema: Add addServerTemplate utility (#29320)
    • nuxt: Add useResponseHeader composable (#27131)
    • rspack,webpack: Add rspack builder (#29142)
    • nuxt,schema: pages:resolved hook + scan meta post extend (#28861)
    • nuxt: Allow enabling route props in definePageMeta (#29586)
    • schema,nuxt: Add shared/ folder and #shared alias (#28682)
    • nuxt: Allow chunk error or manifest update -> reload (

Snyk has created this PR to upgrade nuxt from 3.12.4 to 3.15.0.

See this package in npm:
nuxt

See this project in Snyk:
https://app.snyk.io/org/nerds-github/project/d13fd520-df96-4b88-87f8-38a6d7c57850?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

sourcery-ai bot commented Jan 24, 2025

Reviewer's Guide by Sourcery

This pull request upgrades the nuxt dependency from version 3.12.4 to 3.15.0. This upgrade includes several bug fixes, performance improvements, and new features.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Nuxt dependency upgraded
  • Updated nuxt dependency from 3.12.4 to 3.15.0
examples/user-management/nuxt3-user-management/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

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.

2 participants