Skip to content

fix: resolve vitest module path resolution for #lib and #utils imports#147

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failed-workflow
Closed

fix: resolve vitest module path resolution for #lib and #utils imports#147
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failed-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 28, 2025

  • Analyze the failed workflow run
  • Apply Vitest 4 migration guide recommendations for module path resolution
  • Add missing directory-to-index mappings for subpath imports:
    • #lib/i18n, #lib/schedule, #lib/structures/data
    • #lib/moderation/actions, #lib/moderation/common, #lib/moderation/managers/loggers
    • #utils/resolvers
  • Add .ts extension to fallback path resolution for both #lib/* and #utils/* imports
  • Run tests to verify fix works (all 281 tests pass)
  • Run linting to fix any style issues

Note: The vite-tsconfig-paths plugin was evaluated but is not suitable for this project's subpath imports configuration. The explicit resolve.alias approach with customResolver follows the Vitest 4 migration guide's recommendation for handling complex alias patterns.

Original prompt

fix the failed workflow


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: RedStar071 <76824516+RedStar071@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failed workflow fix: resolve vitest module path resolution for #lib and #utils imports Nov 28, 2025
Copilot AI requested a review from RedStar071 November 28, 2025 22:37
@RedStar071
Copy link
Copy Markdown
Member

@copilot use the guide https://vitest.dev/guide/migration.html#vitest-4 for migration

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot use the guide https://vitest.dev/guide/migration.html#vitest-4 for migration

Applied the Vitest 4 migration guide recommendations. The config uses explicit resolve.alias with customResolver for handling Node.js subpath imports (the vite-tsconfig-paths plugin doesn't fully support subpath import conditions). All paths use absolute resolution via resolve() from node:path with proper .ts extension for fallback file imports. Commit b2a6e3b.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/wolfstar/wolfstar/node_modules/.pnpm/prisma@6.19.0_magicast@0.3.5_typescript@5.7.3/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.19.0&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-11-28T23:10:52Z&#34;,&#34;project_hash&#34;:&#34;fc198bae&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/wolfstar/wolfstar/node_modules/prisma/build/index.js&#34;,&#34;cli_path_hash&#34;:&#34;62ad (dns block)
  • https://api.github.com//advisories
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@RedStar071 RedStar071 closed this Nov 28, 2025
@RedStar071 RedStar071 deleted the copilot/fix-failed-workflow branch November 30, 2025 20:02
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