@@ -372,13 +372,52 @@ jobs:
372372 echo "affected=${AFFECTED}"
373373 echo "affected=${AFFECTED}" >> $GITHUB_OUTPUT
374374
375+ - name : Debug @clerk/shared before build (custom/generic tests only)
376+ if : ${{ steps.task-status.outputs.affected == '1' && (matrix.test-name == 'custom' || matrix.test-name == 'generic') }}
377+ run : |
378+ echo "=== Checking if @clerk/shared needs rebuild ==="
379+ pnpm turbo build --filter=@clerk/shared --dry-run=json | jq '.tasks[] | select(.package == "@clerk/shared") | {package, cache}'
380+ echo ""
381+ echo "=== @clerk/shared package.json version ==="
382+ cat packages/shared/package.json | grep '"version"'
383+ echo ""
384+ echo "=== @clerk/shared source file exists? ==="
385+ ls -lh packages/shared/src/loadClerkUiScript.ts
386+ echo ""
387+ echo "=== @clerk/shared dist/runtime files (before build) ==="
388+ ls -lh packages/shared/dist/runtime/loadClerk* 2>/dev/null || echo "No loadClerk* files found"
389+ echo ""
390+
375391 - name : Verdaccio
376392 if : ${{ steps.task-status.outputs.affected == '1' }}
377393 uses : ./.github/actions/verdaccio
378394 with :
379395 publish-cmd : |
380396 if [ "$(pnpm config get registry)" = "https://registry.npmjs.org/" ]; then echo 'Error: Using default registry' && exit 1; else pnpm turbo build $TURBO_ARGS --only && pnpm changeset publish --no-git-tag; fi
381397
398+ - name : Debug @clerk/shared after Verdaccio publish (custom/generic tests only)
399+ if : ${{ steps.task-status.outputs.affected == '1' && (matrix.test-name == 'custom' || matrix.test-name == 'generic') }}
400+ run : |
401+ echo "=== @clerk/shared dist/runtime files (after build) ==="
402+ ls -lh packages/shared/dist/runtime/loadClerk* || echo "No loadClerk* files found"
403+ echo ""
404+ echo "=== Checking published package in Verdaccio ==="
405+ pnpm view @clerk/shared version || echo "Package not found in Verdaccio"
406+ pnpm view @clerk/shared dist.tarball || true
407+ echo ""
408+ echo "=== Installing and inspecting published @clerk/shared from Verdaccio ==="
409+ mkdir -p /tmp/verdaccio-debug
410+ cd /tmp/verdaccio-debug
411+ echo '{"name":"verdaccio-debug","version":"1.0.0"}' > package.json
412+ pnpm add @clerk/shared
413+ echo ""
414+ echo "=== Installed package.json version ==="
415+ cat node_modules/@clerk/shared/package.json | grep '"version"'
416+ echo ""
417+ echo "=== Installed dist/runtime files ==="
418+ ls -lh node_modules/@clerk/shared/dist/runtime/loadClerk* 2>/dev/null || echo "No loadClerk* files in installed package"
419+ echo ""
420+
382421 - name : Edit .npmrc [link-workspace-packages=false]
383422 run : sed -i -E 's/link-workspace-packages=(deep|true)/link-workspace-packages=false/' .npmrc
384423
@@ -435,6 +474,21 @@ jobs:
435474 working-directory : ./integration/certs
436475 run : ls -la && pwd
437476
477+ - name : Debug installed packages in /integration (custom/generic tests only)
478+ if : ${{ steps.task-status.outputs.affected == '1' && (matrix.test-name == 'custom' || matrix.test-name == 'generic') }}
479+ working-directory : ./integration
480+ run : |
481+ echo "=== Installed @clerk/shared in /integration ==="
482+ pnpm list @clerk/shared --depth=0 || echo "@clerk/shared not directly installed"
483+ if [ -d "node_modules/@clerk/shared" ]; then
484+ echo ""
485+ echo "=== @clerk/shared version in node_modules ==="
486+ cat node_modules/@clerk/shared/package.json | grep '"version"'
487+ echo ""
488+ echo "=== @clerk/shared dist files in node_modules ==="
489+ ls -lh node_modules/@clerk/shared/dist/runtime/loadClerk* || echo "No loadClerk* files found"
490+ fi
491+
438492 - name : Run Integration Tests
439493 if : ${{ steps.task-status.outputs.affected == '1' }}
440494 id : integration-tests
@@ -452,6 +506,50 @@ jobs:
452506 MAILSAC_API_KEY : ${{ secrets.MAILSAC_API_KEY }}
453507 NODE_EXTRA_CA_CERTS : ${{ github.workspace }}/integration/certs/rootCA.pem
454508
509+ - name : Debug @clerk/shared in E2E test app (custom/generic tests only)
510+ if : ${{ always() && (matrix.test-name == 'custom' || matrix.test-name == 'generic') }}
511+ run : |
512+ echo "=== Looking for E2E test app directories ==="
513+ # Find the most recent custom-flows or react.vite app directory
514+ TEST_APP_DIR=""
515+ if [ "${{ matrix.test-name }}" = "custom" ]; then
516+ TEST_APP_DIR=$(find /tmp -maxdepth 1 -name "custom-flows-react-vite*" -type d 2>/dev/null | head -1)
517+ else
518+ TEST_APP_DIR=$(find /tmp -maxdepth 1 -name "react.vite*" -o -name "next.appRouter*" 2>/dev/null | head -1)
519+ fi
520+
521+ if [ -n "$TEST_APP_DIR" ]; then
522+ echo "Found test app directory: $TEST_APP_DIR"
523+ echo ""
524+
525+ if [ -f "$TEST_APP_DIR/package.json" ]; then
526+ echo "=== Test app package.json dependencies ==="
527+ cat "$TEST_APP_DIR/package.json" | grep -A10 '"dependencies"'
528+ echo ""
529+ fi
530+
531+ if [ -d "$TEST_APP_DIR/node_modules/@clerk/shared" ]; then
532+ echo "=== @clerk/shared version in test app ==="
533+ cat "$TEST_APP_DIR/node_modules/@clerk/shared/package.json" | grep '"version"'
534+ echo ""
535+ echo "=== @clerk/shared loadClerk* files in test app ==="
536+ ls -lh "$TEST_APP_DIR/node_modules/@clerk/shared/dist/runtime/loadClerk"* 2>/dev/null || echo "No loadClerk* files found"
537+ echo ""
538+ else
539+ echo "@clerk/shared not found in test app node_modules"
540+ fi
541+
542+ if [ -d "$TEST_APP_DIR/node_modules/@clerk/react" ]; then
543+ echo "=== @clerk/react version in test app ==="
544+ cat "$TEST_APP_DIR/node_modules/@clerk/react/package.json" | grep '"version"'
545+ echo ""
546+ fi
547+ else
548+ echo "No test app directory found in /tmp"
549+ echo "Listing /tmp directories:"
550+ ls -ld /tmp/*flows* /tmp/*react* /tmp/*next* 2>/dev/null | head -10 || echo "No matching directories"
551+ fi
552+
455553 - name : Upload test-results
456554 if : ${{ cancelled() || failure() }}
457555 uses : actions/upload-artifact@v4
0 commit comments