Skip to content

Conversation

@43081j
Copy link
Collaborator

@43081j 43081j commented Feb 3, 2026

This trips typescript up. The directory is compare, not Compare.

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 3, 2026 11:42am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 3, 2026 11:42am
npmx-lunaria Ignored Ignored Feb 3, 2026 11:42am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Four Nuxt test spec files were edited to change component import paths from ~/components/Compare/... to ~/components/compare/...: ComparisonGrid.spec.ts, FacetRow.spec.ts, FacetSelector.spec.ts, and PackageSelector.spec.ts. Only the import path casing was changed; no test logic, runtime behaviour, exported signatures, or other code was modified.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately describes the changeset, explaining that import paths are being corrected from 'Compare' to 'compare' to match the actual directory name.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jg/test-import-casing

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

import { describe, expect, it } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import ComparisonGrid from '~/components/Compare/ComparisonGrid.vue'
import ComparisonGrid from '~/components/compare/ComparisonGrid.vue'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the actual directory structure for compare components

echo "=== Checking for 'compare' directory (lowercase) ==="
fd -t d -i '^compare$' components 2>/dev/null || echo "No results"

echo ""
echo "=== Checking for 'Compare' directory (uppercase) ==="
fd -t d '^Compare$' components 2>/dev/null || echo "No results"

echo ""
echo "=== Listing all directories under components ==="
fd -t d . components --max-depth 2 2>/dev/null || echo "No components directory"

echo ""
echo "=== Looking for ComparisonGrid.vue file ==="
fd -t f 'ComparisonGrid.vue' 2>/dev/null || echo "No results"

echo ""
echo "=== Checking components directory exists ==="
if [ -d "components" ]; then
  ls -la components/ | head -20
else
  echo "components directory not found"
fi

Repository: npmx-dev/npmx.dev

Length of output: 427


🏁 Script executed:

#!/bin/bash
# Check the actual structure and alias configuration

echo "=== Looking for configuration files ==="
fd -t f 'nuxt\\.config\\.(ts|js)' . --max-depth 2
fd -t f 'tsconfig\\.json' . --max-depth 2

echo ""
echo "=== Show current app structure ==="
if [ -d "app" ]; then
  echo "Contents of app/:"
  ls -la app/ | head -15
fi

echo ""
echo "=== Verify the actual file path ==="
if [ -f "app/components/Compare/ComparisonGrid.vue" ]; then
  echo "✓ File exists at: app/components/Compare/ComparisonGrid.vue"
  head -5 app/components/Compare/ComparisonGrid.vue
fi

echo ""
echo "=== Check test file location and current imports ==="
if [ -f "test/nuxt/components/compare/ComparisonGrid.spec.ts" ]; then
  echo "Test file exists. First few lines:"
  head -10 test/nuxt/components/compare/ComparisonGrid.spec.ts
fi

Repository: npmx-dev/npmx.dev

Length of output: 1529


Correct the import path casing to match the actual directory name.

The component exists at app/components/Compare/ComparisonGrid.vue (with uppercase "Compare"), but the import uses lowercase compare. Change the import to:

import ComparisonGrid from '~/components/Compare/ComparisonGrid.vue'
🧰 Tools
🪛 GitHub Check: test

[failure] 3-3:
Cannot find module '~/components/compare/ComparisonGrid.vue' or its corresponding type declarations.

This trips typescript up. The directory is `compare`, not `Compare`.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

import { ref } from 'vue'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import PackageSelector from '~/components/Compare/PackageSelector.vue'
import PackageSelector from '~/components/compare/PackageSelector.vue'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the component file
fd -t f 'PackageSelector\.vue' . 2>/dev/null

# Find compare directories (case-insensitive search)
fd -t d 'compare' . 2>/dev/null | grep -E '(components|compare)'

# Check for Nuxt and TypeScript configuration
fd -t f -e 'nuxt.config.ts' -e 'nuxt.config.js' -e 'tsconfig.json' . 2>/dev/null

# Check if components directory exists and its contents
ls -la src/components/compare/ 2>/dev/null || ls -la components/compare/ 2>/dev/null || echo "No components/compare found"

Repository: npmx-dev/npmx.dev

Length of output: 191


🏁 Script executed:

#!/bin/bash
# Check directory structure at root
ls -la . | head -20

# List all top-level directories
find . -maxdepth 1 -type d | sort

Repository: npmx-dev/npmx.dev

Length of output: 1455


🏁 Script executed:

#!/bin/bash
# Check Nuxt config files
cat nuxt.config.ts 2>/dev/null | head -50

# Check tsconfig.json
cat tsconfig.json 2>/dev/null | grep -A 10 '"paths"' || echo "No paths found in tsconfig"

# Verify the exact directory casing
ls -la app/components/ | grep -i compare

Repository: npmx-dev/npmx.dev

Length of output: 1589


🏁 Script executed:

#!/bin/bash
# Check if there's an app.config.ts or similar
fd -t f 'nuxt.config\|app\.config' . 2>/dev/null | head -5

# Verify directory structure
tree -L 3 app/components/ 2>/dev/null || find app/components -maxdepth 3 -type f

Repository: npmx-dev/npmx.dev

Length of output: 2268


Correct import path to match directory casing.

The component directory is Compare (capital C), not compare. Change line 4 to:

import PackageSelector from '~/components/Compare/PackageSelector.vue'

On case-sensitive file systems (Linux CI), the current lowercase path fails to resolve the module.

🧰 Tools
🪛 GitHub Check: test

[failure] 4-4:
Cannot find module '~/components/compare/PackageSelector.vue' or its corresponding type declarations.

@43081j
Copy link
Collaborator Author

43081j commented Feb 3, 2026

closing

#814 has broken the repo for anyone on macos who had it cloned before that merged

not sure what advice to give yet, will chase up on discord

@43081j 43081j closed this Feb 3, 2026
@43081j 43081j deleted the jg/test-import-casing branch February 3, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants