{"id":50860550,"url":"https://github.com/levrik/vitest-circular-mock-issue","last_synced_at":"2026-06-14T21:02:38.836Z","repository":{"id":352803648,"uuid":"1216693016","full_name":"levrik/vitest-circular-mock-issue","owner":"levrik","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-21T06:48:42.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T08:35:51.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levrik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T06:32:56.000Z","updated_at":"2026-04-21T06:48:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/levrik/vitest-circular-mock-issue","commit_stats":null,"previous_names":["levrik/vitest-circular-mock-issue"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/levrik/vitest-circular-mock-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levrik%2Fvitest-circular-mock-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levrik%2Fvitest-circular-mock-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levrik%2Fvitest-circular-mock-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levrik%2Fvitest-circular-mock-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levrik","download_url":"https://codeload.github.com/levrik/vitest-circular-mock-issue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levrik%2Fvitest-circular-mock-issue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34337551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-14T21:02:38.013Z","updated_at":"2026-06-14T21:02:38.813Z","avatar_url":"https://github.com/levrik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal repro: `vi.mock` broken by circular import + setup file\n\nSingle-package reproduction. No external dependencies beyond `vitest`.\n\n## File structure\n\n```\nsrc/\n  core.ts           ← imported by setup; optionally re-exports from ./feature (toggle)\n  feature/\n    index.ts        ← re-exports api + process (what core points to circularly)\n    api.ts          ← imports from ../core  ← the module being mocked\n    process.ts      ← imports getData from ./api  ← the consumer\n    api.test.ts     ← vi.mock('./api')\nvitest/\n  setup.mts         ← import { fetchAndProcess } '../src/core'\n  vitest.unit.config.ts\n```\n\n## Toggle\n\n**`src/core.ts`** — comment/uncomment one line:\n\n```ts\n// Uncomment to reproduce:\n// export { fetchAndProcess } from './feature/index';\n```\n\nRun: `npm run test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevrik%2Fvitest-circular-mock-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevrik%2Fvitest-circular-mock-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevrik%2Fvitest-circular-mock-issue/lists"}