Skip to content

Conversation

@ryota-murakami
Copy link
Collaborator

Summary

Updated all dependencies to their latest versions using pnpm update --latest.

Major Updates

  • TypeScript: 5.8.3 → 5.9.3
  • Vitest: 3.2.4 → 4.0.4 (all @vitest/* packages)
  • eslint-config-ts-prefixer: 3.0.4 → 4.0.0

Minor/Patch Updates

  • ESLint: 9.31.0 → 9.38.0
  • Playwright: 1.53.1 → 1.56.1
  • Turbo: 2.5.5 → 2.5.8
  • And various other dependencies

Breaking Changes Fixed

✅ Removed coverage.all from all vitest.config.ts files (Vitest 4.0 breaking change)
✅ Updated @vitest/browser provider to function-based API
✅ Added @vitest/browser-playwright package
✅ Fixed import ordering

Local Validation Results

  • TypeScript compilation: PASS (all packages)
  • Linting: PASS (all packages)
  • ⚠️ Test suite: 462/521 tests passing

Known Issues

59 test failures in getImageRect.test.ts related to Image constructor in test environment. This appears to be a Vitest 4.0 + happy-dom compatibility issue that needs investigation.

Test Plan

  • Verify CI passes for all packages
  • Check if test failures reproduce in CI
  • Investigate and fix Image constructor test failures if they block CI
  • Validate all packages build successfully

Updated all dependencies using `pnpm update --latest`:

Major version updates:
- TypeScript: 5.8.3 → 5.9.3
- Vitest: 3.2.4 → 4.0.4 (and all @vitest/* packages)
- eslint-config-ts-prefixer: 3.0.4 → 4.0.0

Minor/patch updates:
- ESLint: 9.31.0 → 9.38.0
- Playwright: 1.53.1 → 1.56.1
- Turbo: 2.5.5 → 2.5.8
- Various other dependencies

Breaking changes fixed:
- Removed `coverage.all` from vitest.config.ts files (Vitest 4.0 breaking change)
- Updated @vitest/browser provider to function-based API
- Added @vitest/browser-playwright package
- Fixed import ordering in vitest.browser.config.ts

Validation status:
- ✅ TypeScript compilation passes
- ✅ Linting passes
- ⚠️  Test suite: 462/521 tests passing (59 failures in browser environment Image constructor tests - Vitest 4.0 + happy-dom compatibility issue to be investigated)
…constructor mocks

Vitest 4.0 enforces proper constructor semantics when mocks are called with the 'new' keyword.
Arrow functions cannot be used as constructors because they lack the [[Construct]] internal method.

This change replaces all vi.fn(() => mockObject) patterns with vi.fn(function() { return mockObject })
in test files where the mocks are used as constructors.

Affected files:
- packages/browser/getBase64Image.test.js (FileReader constructor mock)
- packages/browser/getImageRect.test.ts (Image constructor mocks in 3 locations)
- packages/node/jwt/jwt-token-generator-tester.test.js (TokenGenerator constructor mock)

This resolves 85 test failures (59 in browser package, 26 in node package) related to
"TypeError: () => ... is not a constructor" errors.

All tests now pass: 2124 tests passing across 5 packages.

Related to Vitest 4.0 migration (commit 864712f).
@ryota-murakami ryota-murakami merged commit e8f2a42 into main Oct 29, 2025
5 checks passed
@ryota-murakami ryota-murakami deleted the chore/update-all-dependencies branch October 29, 2025 11:27
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