Skip to content

v3.0.0: Add Vitest configuration; drop Jest; update lint rules, dependencies

Latest
Compare
Choose a tag to compare
@nchevsky nchevsky released this 12 Sep 22:07

⚠️ BREAKING CHANGES

  • Bump minimum versions of peer dependencies:
    • @typescript-eslint/eslint-plugin: 7.2 → 7.16
    • eslint-import-resolver-typescript: 3.6.1 → 3.6.2
    • eslint-plugin-ieslint-plugin-import-x: 2.29.1 → 4.2.1
    • eslint-plugin-react: None → 7.35 (optional)
    • eslint-plugin-react-hooks: None → any (optional)
    • typescript: 5.2 → 5.5
  • configuration:
    • babel: Remove Jest hacks (stripping file extensions from imports and transpiling ESM → CommonJS).
    • eslint:
      • Drop resolver eslint-import-resolver-babel-module.
      • Migrate import/* rules to import-x/*.
    • javascript: Remove in favor of typescript superset.
  • types:
    • Remove support for jest.MockedFunction from utility type ReplaceReturnType.

🌎 External changes

  • collections
    • SortedSet: Implement new ES6 methods difference(), intersection(), isDisjointFrom(), isSubsetOf(), isSupersetOf(), symmetricDifference(), and union().
  • configuration:
    • Add vitest export with Vitest configuration.
    • eslint:
      • Enable @typescript-eslint rules:
        • …/no-empty-object-type,
        • …/no-unnecessary-parameter-property-assignment,
        • …/no-unnecessary-type-parameters,
        • …/no-unsafe-function-type,
        • …/no-wrapper-object-types, and
        • …/use-unknown-in-catch-callback-variable.
      • Remove no-new rule exemption for tests.
    • eslint-react:
      • Enable rules react/jsx-closing-tag-location (with option line-aligned) and react/jsx-props-no-spread-multi.
      • Remove react/forbid-foreign-prop-types rule exemption for mocks and tests.
    • typescript: Change option include to '${configDir}/src' (from '/src'), eliminating the need to locally override the path in every downstream project.
  • utils:
    • Deprecate ExternallyControlledPromise in favor of ES2024's new Promise.withResolvers().

🏠 Internal changes

  • Abandon Jest in favor of Vitest.
  • Add to devDependencies packages that were previously only declared as peerDependencies.
  • Upgrade dependencies.