Skip to content

Releases: nuxt/scripts

v0.7.0

20 Aug 14:39
Compare
Choose a tag to compare

Nuxt Scripts Is Officially Released 🎉

Read the official announcement.

In version 0.7.0 we move from a public preview to a beta release candidate for Nuxt Scripts.

In this update, the underlying useScript API from Unhead has had several deprecations, for what we feel is a more robust, intuitive way of interacting with your scripts. If you'd like to learn more about these deprecations, please read the deprecate implicit proxy and $script and safer lifecycle hooks onLoaded, onError PRs or consult the updated documentation.

Additionally, some major improvements have been made to the Google Maps facade component.

With this version onwards, you can expect improved stability, active maintenance and documentation improvements until we get to a stable release. New scripts will be limited during this time, however, feel free to Request a new registry script.

⚠️ Breaking Changes

  • Requires Unhead 1.10.0: You may need to run nuxi cleanup --force to upgrade.
  • <ScriptGoogleMaps> has had a major rework, please see (#191)
  • <ScriptVimeo> has had internal API changes, please see (#204)

🩹 Fixes

  • Registry scripts bundling with scriptOptions.bundle (0c7906e)
  • vimeo: ⚠️ Broken player, refactor props (#204)

❤️ Contributors

v0.6.6

06 Aug 16:13
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • tpc: Update TPC and fix GA (#186)

💅 Refactors

  • Avoid module declaration augmentations (b27d4ee)

🏡 Chore

✅ Tests

  • E2e integration tests for ga and gtm (#189)

❤️ Contributors

v0.6.5

30 Jul 13:00
09e3c2f
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • GA,GTM: Configurable dataLayer name (#163)

🩹 Fixes

  • Fix google analytics category (#156)
  • Use correct google analytics logo (#172)
  • TPC: Use proper script keys (c607d72)
  • TPC: Broken schema integration (ed115d8)
  • Disallow overriding registry key name (2eedd4a)
  • devtools: Support multiple of the same registry scripts (8794d74)
  • ScriptYouTubePlayer: Missing default slot (#180)
  • tpc: Support customizing dataLayer variable (09e3c2f)

📖 Documentation

  • Broken tutorial, put some use into scriptOptions (#155)
  • Fix typo in js-confetti guide (#162)
  • Fix typo in plausible analytics env var example (#161)
  • Mention third-party-capital and aurora for tpc composables (#159)
  • GoogleMaps: Added Places API to requirements of API key (#168)

🏡 Chore

  • Add tsconfig to scripts and remove unused ts-expect-error (#158)
  • Add issue template (669ed2a)
  • Push to discussion (3c88385)
  • Broken devtools when no scripts (c355da4)
  • ci: Add docs link in Issue template (#178)
  • github: Prefer no titles (97437c0)

❤️ Contributors

v0.6.4

15 Jul 06:30
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • Support manual script deduping (#148)

🩹 Fixes

  • tpc: Custom feature detection flags (#113)
  • Allow use with npm scripts (dfec3b4)
  • Support explicit scriptInput.src override (be2389f)
  • Safer top level await checks (#149)
  • Prefer module build-time tpc (#153)

💅 Refactors

  • tpc: Write only declaration files (#151)

❤️ Contributors

v0.6.3

11 Jul 09:17
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • tpc: Annotate return type of tpc composables (#141)
  • tpc: Directly push tpc composables into registry (#139)
  • tpc: Use mlly to resolve third-party-capital (#138)

❤️ Contributors

v0.6.2

06 Jul 14:28
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • Broken globals array config parsing (292bd8e)

❤️ Contributors

v0.6.1

06 Jul 11:21
Compare
Choose a tag to compare
v0.6.1

v0.6.0

06 Jul 11:11
Compare
Choose a tag to compare

compare changes

This release includes several breaking changes. It will most likely be the last release with major breaking changes, leading to a stable release and public announcement. Please see the migration guide at the bottom of the release notes if you've started using Nuxt Scripts in public preview.

🚀 New Facade Components

This release includes Facade components for Crisp, Intercom and Lemon Squeezy. These should provide an improvement to your web vitals.

You can learn more about these work on the new Facade Components documentation.

v0.6.0

🚀 Enhancements

  • Detect await $script.load() (#117)
  • ⚠️ Convert module config globals to object (#127)
  • ScriptIntercom (fa5ab56)
  • useScriptCrisp and ScriptCrisp (#128)
  • ⚠️ ScriptLemonSqueezy (#130)

🩹 Fixes

  • tpc: Respect script location and action field (#105)
  • docs: Matomo-analytics website url (#118)
  • Generate globals plugin correctly (1594f67)
  • Use object syntax to define NuxtConfigScriptRegistry (#124)
  • Avoid adding plugin if module is disabled (2e4df43)
  • Devtool UI improvements (a8bf500)
  • Make scripts accessible at nuxtApp.$scripts (a41347c)
  • Hook up UI props (993c123)
  • ⚠️ ScriptCarbonAds prefer ready event (d32e0d8)
  • Consistent component error event emits (c9d2b3e)
  • ⚠️ Rename useElementScriptTrigger, useConsentScriptTrigger, useAnalyticsPageEvent (038d891)
  • Properly support array triggers with useScriptTriggerElement (ade64a4)

💅 Refactors

  • tpc: Move tests to AST instead of code snapshots (#99)
  • Refactor import { type foo } to import type { foo } (#108)
  • tpc: Remove augmentWindowTypes (#119)

📖 Documentation

  • readme: Fix links in Next Steps (#102)
  • Add basic contribution guide (#109)
  • Refactor script setup lang="ts" (#116)
  • Fix contributing guide (#122)

⚠️ Breaking Changes

  • ⚠️ Convert module config globals to object (#127)
  • ⚠️ ScriptLemonSqueezy (#130)
  • ⚠️ ScriptCarbonAds prefer ready event (d32e0d8)
  • ⚠️ Rename useElementScriptTrigger, useConsentScriptTrigger, useAnalyticsPageEvent (038d891)

❤️ Contributors

Migration Guide

Object Globals Config

The globals config now must be provided as an object. This allows us to create an easy to reference id for accessing the script instance. Please see the updated global scripts docs.

export default defineNuxtConfig({
  scripts: {
-   globals: [/* ... */]
+   globals: {/* ... */]
  }
})

Composable renames

All of the Nuxt Scripts composables have been renamed for improved scope clarity.

  • useElementScriptTrigger -> useScriptTriggerElement
  • useConsentScriptTrigger -> useScriptTriggerConsent
  • useAnalyticsPageEvent -> useScriptEventPage

v0.5.1

12 Jun 03:48
Compare
Choose a tag to compare

compare changes

🩹 Fixes

❤️ Contributors

v0.5.0

12 Jun 03:06
Compare
Choose a tag to compare

compare changes

🩹 Fixes

❤️ Contributors