Releases: nuxt/scripts
v0.7.0
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
- Harlan (@harlan-zw)
- Harlan Wilton (@harlan-zw)
- Lars Salling (@lsalling)
v0.6.6
🩹 Fixes
- tpc: Update TPC and fix GA (#186)
💅 Refactors
- Avoid module declaration augmentations (b27d4ee)
🏡 Chore
- Public release -> beta (debf873)
- Update import path for devtools port (#190)
- Bump deps (05f085e)
- Broken linting (3c46cff)
- Broken typechecking and linting (9285284)
- Bump deps (ea17d69)
✅ Tests
- E2e integration tests for ga and gtm (#189)
❤️ Contributors
- Harlan (@harlan-zw)
- Julien Huang (@huang-julien)
- Arash (@arashsheyda)
v0.6.5
🚀 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
intoscriptOptions
(#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
- Julien Huang [email protected]
- Harlan [email protected]
- Jules Hery
- Gangan
- Mick Lawitzke [email protected]
- Jonty Brook [email protected]
- Roman Nuritdinov [email protected]
v0.6.4
🚀 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
- Harlan (@harlan-zw)
- Harlan Wilton (@harlan-zw)
- Julien Huang (@huang-julien)
v0.6.3
🩹 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
- Harlan (@harlan-zw)
- Julien Huang (@huang-julien)
v0.6.2
v0.6.1
v0.6.0
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 configglobals
to object (#127)ScriptIntercom
(fa5ab56)useScriptCrisp
andScriptCrisp
(#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
preferready
event (d32e0d8)- Consistent component
error
event emits (c9d2b3e) ⚠️ RenameuseElementScriptTrigger
,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 }
toimport 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 configglobals
to object (#127)⚠️ ScriptLemonSqueezy
(#130)⚠️ ScriptCarbonAds
preferready
event (d32e0d8)⚠️ RenameuseElementScriptTrigger
,useConsentScriptTrigger
,useAnalyticsPageEvent
(038d891)
❤️ Contributors
- Harlan (@harlan-zw)
- Harlan Wilton (@harlan-zw)
- Julien Huang (@huang-julien)
- Gangan (@shinGangan)
- RoiLeo [email protected]
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