Skip to content

v3.3.0: Add utilities; adjust lint rules; upgrade dependencies

Choose a tag to compare

@nchevsky nchevsky released this 26 Mar 16:23

🌎 External changes

  • ⚠️ Turn on lint rule @typescript-eslint/no-invalid-void-type.
  • ⚠️ Turn on new option named on lint rule import-x/order, requiring that named imports be ordered following the same rules as import statements.
  • Add utility functions:
    • escapeForRegExp(): Escapes RegExp-unsafe characters in a given string for use in a regular expression.
    • objectEntries(): Fully typed implementation of Object.entries() with literal key inference.
    • objectKeys(): Fully typed implementation of Object.keys() with literal key inference.
    • omit(): Removes unwanted keys from a given object.
  • Add utility types:
    • KeysOfObjectUnion<>: Extracts all keys of an object union.
    • PickAsOptional<>: Variant of Pick<> that marks the requested keys as nullable.
    • PickAsRequired<>: Variant of Pick<> that marks the requested keys as non-nullable.
    • ValuesOfObjectUnion<>: Extracts all values of an object union.
  • Change keys of the Dictionary type from string to PropertyKey.
  • Exempt mocks and tests from lint rule react-hooks/rules-of-hooks.
  • Exempt mocks from lint rules @typescript-eslint/no-empty-function, @typescript-eslint/no-unsafe-assignment, class-methods-use-this.
  • Relax the Vitest peer dependency to v2+.

🏠 Internal changes

  • Upgrade dependencies.