All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Generic error type parameter: You can now specify custom error types for both
attemptandattemptPromise- Both functions now accept two type parameters:
<T, E = Error> - The error type defaults to
Errorfor backward compatibility - Example:
attempt<User, ValidationError>(() => ...)
- Both functions now accept two type parameters:
- Package metadata:
sideEffects: falsefor better tree-shaking supportenginesfield specifying Node.js ^20.19.0 || >=22.12.0
- Major dependency upgrades:
- ESLint: 8.54.0 → 9.39.1 (migrated to flat config format)
- TypeScript: 5.3.2 → 5.9.3
- Vite: 5.0.2 → 7.2.2
- Vitest: 0.34.6 → 4.0.9
- Prettier: 2.8.8 → 3.6.2
- All other dev dependencies updated to latest versions
- Build tooling:
- Migrated ESLint configuration from
.eslintrc.jsontoeslint.config.js(flat config) - Updated package.json exports order (types before import/require)
- Replaced deprecated
@vitest/coverage-c8with@vitest/coverage-v8
- Migrated ESLint configuration from
- Package.json exports now list types first for better IDE support
- Type export improvements
- CJS package fixes
attemptAllPromisefunction (caused confusion, may be replaced with better implementation in future)