Skip to content

Commit eabf9a5

Browse files
snomiaoclaude
andcommitted
test: add intentional telemetry violation to test CI check
This commit intentionally adds GTM/GA code that should NOT be tree-shaken. The CI check should catch and fail this commit. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 97a038f commit eabf9a5

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { getFirebaseConfig } from '@/config/firebase'
1515
import '@/lib/litegraph/public/css/litegraph.css'
1616
import router from '@/router'
1717
import { useBootstrapStore } from '@/stores/bootstrapStore'
18+
import { initializeAnalytics } from './test-telemetry-violation'
1819

1920
import App from './App.vue'
2021
// Intentionally relative import to ensure the CSS is loaded in the right order (after litegraph.css)
@@ -93,4 +94,7 @@ app
9394
const bootstrapStore = useBootstrapStore(pinia)
9495
void bootstrapStore.startStoreBootstrap()
9596

97+
// TEST: Intentional violation to test CI
98+
initializeAnalytics()
99+
96100
app.mount('#vue-app')

src/test-telemetry-violation.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// TEST: This file intentionally violates telemetry tree-shaking
2+
// It will be caught by the CI check
3+
4+
declare global {
5+
interface Window {
6+
gtag: (command: string, ...args: any[]) => void
7+
}
8+
}
9+
10+
export function initializeAnalytics() {
11+
// This top-level import will NOT be tree-shaken
12+
const gtagId = 'googletagmanager.com/gtm.js?id=GTM-TEST123'
13+
14+
window.gtag('config', 'GA-TEST123')
15+
window.gtag('event', 'page_view')
16+
17+
console.warn('Analytics initialized:', gtagId)
18+
}

0 commit comments

Comments
 (0)