mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
fix(nuxt): update renamed stub composables from nuxt/scripts
(#28449)
This commit is contained in:
parent
1a7dceeb82
commit
6eefc98e49
@ -18,18 +18,18 @@ export function useScript<T extends Record<string | symbol, any>> (input: UseScr
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function useElementScriptTrigger (...args: unknown[]) {
|
||||
renderStubMessage('useElementScriptTrigger')
|
||||
export function useScriptTriggerElement (...args: unknown[]) {
|
||||
renderStubMessage('useScriptTriggerElement')
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function useConsentScriptTrigger (...args: unknown[]) {
|
||||
renderStubMessage('useConsentScriptTrigger')
|
||||
export function useScriptTriggerConsent (...args: unknown[]) {
|
||||
renderStubMessage('useScriptTriggerConsent')
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function useAnalyticsPageEvent (...args: unknown[]) {
|
||||
renderStubMessage('useAnalyticsPageEvent')
|
||||
export function useScriptEventPage (...args: unknown[]) {
|
||||
renderStubMessage('useScriptEventPage')
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
@ -117,9 +117,9 @@ const granularAppPresets: InlinePreset[] = [
|
||||
|
||||
export const scriptsStubsPreset = {
|
||||
imports: [
|
||||
'useConsentScriptTrigger',
|
||||
'useAnalyticsPageEvent',
|
||||
'useElementScriptTrigger',
|
||||
'useScriptTriggerConsent',
|
||||
'useScriptEventPage',
|
||||
'useScriptTriggerElement',
|
||||
'useScript',
|
||||
'useScriptGoogleAnalytics',
|
||||
'useScriptPlausibleAnalytics',
|
||||
|
@ -200,9 +200,9 @@ describe('imports:nuxt/scripts', () => {
|
||||
const scripts = scriptRegistry().map(s => s.import?.name).filter(Boolean)
|
||||
const globalScripts = new Set([
|
||||
'useScript',
|
||||
'useAnalyticsPageEvent',
|
||||
'useElementScriptTrigger',
|
||||
'useConsentScriptTrigger',
|
||||
'useScriptEventPage',
|
||||
'useScriptTriggerElement',
|
||||
'useScriptTriggerConsent',
|
||||
// registered separately
|
||||
'useScriptGoogleTagManager',
|
||||
'useScriptGoogleAnalytics',
|
||||
|
Loading…
Reference in New Issue
Block a user