mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function useElementScriptTrigger (...args: unknown[]) {
|
export function useScriptTriggerElement (...args: unknown[]) {
|
||||||
renderStubMessage('useElementScriptTrigger')
|
renderStubMessage('useScriptTriggerElement')
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function useConsentScriptTrigger (...args: unknown[]) {
|
export function useScriptTriggerConsent (...args: unknown[]) {
|
||||||
renderStubMessage('useConsentScriptTrigger')
|
renderStubMessage('useScriptTriggerConsent')
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function useAnalyticsPageEvent (...args: unknown[]) {
|
export function useScriptEventPage (...args: unknown[]) {
|
||||||
renderStubMessage('useAnalyticsPageEvent')
|
renderStubMessage('useScriptEventPage')
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
@ -117,9 +117,9 @@ const granularAppPresets: InlinePreset[] = [
|
|||||||
|
|
||||||
export const scriptsStubsPreset = {
|
export const scriptsStubsPreset = {
|
||||||
imports: [
|
imports: [
|
||||||
'useConsentScriptTrigger',
|
'useScriptTriggerConsent',
|
||||||
'useAnalyticsPageEvent',
|
'useScriptEventPage',
|
||||||
'useElementScriptTrigger',
|
'useScriptTriggerElement',
|
||||||
'useScript',
|
'useScript',
|
||||||
'useScriptGoogleAnalytics',
|
'useScriptGoogleAnalytics',
|
||||||
'useScriptPlausibleAnalytics',
|
'useScriptPlausibleAnalytics',
|
||||||
|
@ -200,9 +200,9 @@ describe('imports:nuxt/scripts', () => {
|
|||||||
const scripts = scriptRegistry().map(s => s.import?.name).filter(Boolean)
|
const scripts = scriptRegistry().map(s => s.import?.name).filter(Boolean)
|
||||||
const globalScripts = new Set([
|
const globalScripts = new Set([
|
||||||
'useScript',
|
'useScript',
|
||||||
'useAnalyticsPageEvent',
|
'useScriptEventPage',
|
||||||
'useElementScriptTrigger',
|
'useScriptTriggerElement',
|
||||||
'useConsentScriptTrigger',
|
'useScriptTriggerConsent',
|
||||||
// registered separately
|
// registered separately
|
||||||
'useScriptGoogleTagManager',
|
'useScriptGoogleTagManager',
|
||||||
'useScriptGoogleAnalytics',
|
'useScriptGoogleAnalytics',
|
||||||
|
Loading…
Reference in New Issue
Block a user