Change8

Migrating to Remix assert@0.3.0

Version assert@0.3.0 introduces 2 breaking changes. This guide details how to update your code.

Released: 6/5/2026

2
Breaking Changes
2
Migration Steps
7
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

@remix-run/assertassert.okassert.throwsassert.rejectsassert.doesNotThrowassert.doesNotRejectassert.partialDeepEqual

Breaking Changes

Issue #1

Assertion failures now expose Node-style `code` and `generatedMessage` fields, which may break consumers relying on the previous error structure.

Issue #2

Core assertion APIs now throw custom `Error` message objects directly instead of potentially throwing strings or other types, which may break consumers expecting specific error types.

Migration Steps

  1. 1
    Review code that inspects error objects thrown by assertions to account for the new `code` and `generatedMessage` fields.
  2. 2
    Review code that catches assertion errors to expect custom `Error` message objects instead of potentially other types.

Release Summary

The `@remix-run/assert` module has been updated to align more closely with Node's `node:assert/strict`, introducing changes to error structures and improving deep equality checks.

Need More Details?

View the full release notes and all changes for Remix assert@0.3.0.

View Full Changelog