diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index eb54aa4f3..3f8922952 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -50,64 +50,6 @@ jobs: echo "Prettier version: $(npx prettier --version)" echo "Platform: $(uname -a)" - - name: Show formatting differences for all files - run: | - echo "Running prettier check to find unformatted files..." - # Capture prettier output without colors - npx prettier --no-color --check . > /tmp/prettier_output.txt 2>&1 || true - - echo "Full prettier output:" - cat /tmp/prettier_output.txt - echo "" - - # Debug: show raw bytes of the output - echo "Raw output (showing first 500 bytes):" - head -c 500 /tmp/prettier_output.txt | hexdump -C - echo "" - - # Extract files that need formatting (try multiple patterns) - echo "Trying different grep patterns:" - echo "Pattern 1 - looking for [warn]:" - grep '\[warn\]' /tmp/prettier_output.txt || echo "No matches for [warn]" - echo "Pattern 2 - looking for warn:" - grep 'warn' /tmp/prettier_output.txt || echo "No matches for warn" - echo "Pattern 3 - lines containing file extensions:" - grep -E '\.(ts|tsx|js|jsx|yml|yaml|json)' /tmp/prettier_output.txt || echo "No file extensions found" - - # Try to extract filenames more robustly - UNFORMATTED_FILES=$(grep '\[warn\]' /tmp/prettier_output.txt | sed 's/.*\[warn\][[:space:]]*//' || true) - - if [ -z "$UNFORMATTED_FILES" ]; then - echo "No files found in [warn] messages. Trying alternative extraction..." - # Alternative: look for lines that look like file paths - UNFORMATTED_FILES=$(grep -E '^[^\[]*\.(ts|tsx|js|jsx|yml|yaml|json)' /tmp/prettier_output.txt || true) - fi - - if [ -n "$UNFORMATTED_FILES" ]; then - echo "Files that need formatting:" - echo "$UNFORMATTED_FILES" - echo "" - echo "Showing diffs for each file:" - echo "$UNFORMATTED_FILES" | while IFS= read -r file; do - # Clean up the filename (remove any remaining brackets or whitespace) - clean_file=$(echo "$file" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//') - if [ -n "$clean_file" ] && [ -f "$clean_file" ]; then - echo "======================================" - echo "Diff for: $clean_file" - echo "======================================" - # Create formatted version - npx prettier --no-color "$clean_file" > "/tmp/formatted_$(basename "$clean_file")" - # Show diff - diff -u "$clean_file" "/tmp/formatted_$(basename "$clean_file")" || true - echo "" - else - echo "File not found or empty: '$clean_file'" - fi - done - else - echo "Still no files found. This might indicate a parsing issue." - fi - - name: Check code formatting run: npm run format:check diff --git a/src/telemetry/posthogService.ts b/src/telemetry/posthogService.ts index bfbef6ec8..ef66bfc69 100644 --- a/src/telemetry/posthogService.ts +++ b/src/telemetry/posthogService.ts @@ -1,11 +1,11 @@ import os from "node:os"; -import * as node_machine_id from 'node-machine-id'; +import * as node_machine_id from "node-machine-id"; import type { PostHog as PostHogType } from "posthog-node"; -import { loadAuthConfig, isAuthenticatedConfig } from "../auth/workos.js"; +import { isAuthenticatedConfig, loadAuthConfig } from "../auth/workos.js"; - export class PosthogService { +export class PosthogService { private os: string | undefined; private uniqueId: string;