Skip to content

Releases: neefrehman/make-matrix

v2.3.0

16 Oct 20:00

Choose a tag to compare

2.3.0 (2022-10-16)

Features

  • dual esm & cjs support by building with tsup (12b5987)

v2.2.0

30 Jul 17:34

Choose a tag to compare

2.2.0 (2022-07-30)

Bug Fixes

  • types: fixes regression that caused a dynamic dimensions array (of type number[]) to throw a type error (6921cd4)

Features

  • types: return types are no longer widened to their primitives, so more strict matrices can be created, e.g. (0 | 1)[][] (fe86ca4)

Improvements

  • types: improve DX by using Branded types to not expose the complexity of internal types via intellisense (d703c2)

v2.1.5

26 Jul 14:17

Choose a tag to compare

2.1.5 (2022-07-26)

Performance Improvements

  • restructures parent and child responsibilities, to narrow the internal function's set of concerns, reduce the count of some checks, and reduce bundle size (#17) (90cd625)
  • drops custom integer validation in favour of inbuilt js array length checks (#17) (90cd625)

v2.1.4

25 Jul 16:27

Choose a tag to compare

2.1.4 (2022-07-25)

Performance Improvements

  • bundle size: decrease bundle size (5285787)

Bug Fixes

  • output: fix tsc output structure (c7ef884)

v2.1.2

30 Jun 09:18

Choose a tag to compare

2.1.2 (2022-06-30)

Bug Fixes

types: avoid compiler error with dynamic dimensions (ec7a3b6)

When a Matrix is created without knowing its exact size or number of dimensions, such as when creating one dynamically, it's impossible recursively construct a type for it. Previously, the typescript compiler would have thrown a type instantiation is excessively deep... error, which the user would have had to use a // @ts-ignore comment for, and even then the return type would resolve to any.

Now, we short circuit the Matrix type to resolve to any[] in these cases, to stop the typescript compiler throwing the error and to provide some level of type safety:

// previously:
const createDynamicMatrix = (dimensions: number[]) => makeMatrix(dimensions);  // 🚨 error: Type instantiation is excessively deep and possibly infinite

// now:
const createDynamicMatrix = (dimensions: number[]) => makeMatrix(dimensions); // any[]

types: include internal types in build output (f0d33a9)

v2.1.0

16 Jun 15:44

Choose a tag to compare

2.1.0 (2022-06-16)

Features

  • validation: more helpful error message for non-integer values (babf580)

v2.0.0

16 Jun 13:28

Choose a tag to compare

2.0.0 (2022-06-16)

Build System

  • javascript output: changes javascript output from es5 to es6 (bb1262c)

BREAKING CHANGES

  • javascript output: support for pre-es6 runtimes has been dropped. As a result, make-matrix will no longer work without es6 support or a build tool that will handle transpilation. This has led to a ~13% reduction in bundle size of the package.

v1.3.1

09 Apr 17:54

Choose a tag to compare

1.3.1 (2021-04-09)

Bug Fixes

  • exports: add makeMatrix as named export as well as default (42ef18a)

v1.3.0

08 Apr 16:55
1e1c16d

Choose a tag to compare

1.3.0 (2021-04-08)

Features

  • typescript: updates Matrix type to handle any dimensionality level (ffa5fbf), closes #2

v1.2.2

09 Dec 12:33

Choose a tag to compare

1.2.2 (2020-12-09)

Bug Fixes

  • typescript: fix vector types for safer returns (04a9736)