fix(test): remove duplicate taskToIssuePayload import#36
Merged
Conversation
`test/issues-coverage.test.ts` imports `taskToIssuePayload` twice: once at the top of the file, once mid-file (line 74) alongside `generateIssuePreview`. The current esbuild/vitest combination silently tolerates the duplicate, but stricter versions reject it as a parse error (`Identifier 'taskToIssuePayload' has already been declared`). This already blocks the open Dependabot dev-dependencies bump (#28), and would block any future major version of esbuild, vitest, or @vitest/coverage-v8. Fix: consolidate to a single top-of-file import that includes `generateIssuePreview`, and drop the redundant mid-file import. No behavior change ā same symbols, same tests still passing (11/11 in the affected file; 985/985 overall). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
test/issues-coverage.test.tsimportstaskToIssuePayloadtwice ā once at the top of the file, once mid-file alongsidegenerateIssuePreview:The current esbuild/vitest pinned in
maintolerates this silently. Stricter versions reject it as a parse error:This already blocks the open Dependabot dev-dependencies bump (#28), where the new esbuild/vitest combo surfaces it as a hard CI failure on Node 22. Will also block any future major bump of esbuild, vitest, or
@vitest/coverage-v8.What changes
Consolidate to a single top-of-file import that includes
generateIssuePreview. Drop the redundant mid-file import.Validation
No behavior change ā same symbols are imported from the same module, just deduplicated.
Follow-up
Once this lands, I'll trigger a Dependabot rebase on #28 (dev-deps bump). With this fix in place, the bump should go from
FAILUREtoCLEAN.