New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

true-myth

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

true-myth - npm Package Versions

23
8

8.5.0

Diff

Changelog

Source

8.5.0 (2025-01-25)

Adds a powerful Task.withRetries utility for retrying tasks, along with a new module, true-myth/task/delay, which provides a bunch of useful strategies for retries. See the docs for more details, and thanks to @alfierivera for [suggesting it][discussion]!

(:rocket: Enhancement)
  • #939 [backport] Task: add a new withRetries function (@chriskrycho)
(:house: Internal)
Committers: 1
chriskrycho
published 8.4.0 •

Changelog

Source

8.4.0 (2025-01-11)

Highlight: adds auto-curried, module-scope versions of all the Task instance methods like map and andThen and more. Hot on the heels of 8.3.0, with what we think is probably the last set of features for this release!

(:rocket: Enhancement)
(:memo: Documentation)
(:house: Internal)
Committers: 1
chriskrycho
published 8.3.0 •

Changelog

Source

8.3.0 (2025-01-10)

Highlights:

  • All the missing Task combinators that weren’t part of v8.3.0: all, allSettled, any, race, as well as fancy new timer and timeout functions.
  • New safe functions in the Result and Task modules, for transforming a throwing function into one you can call safely and get a Result or Task instead.
  • Module-scope versions of all the major Task constructors.
  • A new name for the wrapReturn function in the Maybe module, safe, to match the same function in the Result and Task modules

This release also introduces some deprecations to tackle some mistakes we (read: @chriskrycho) made in the initial release of Task in v8.2.0.

[!NOTE] We will be releasing v9.0.0 very soon, removing those deprecations and updating our TypeScript support matrix. However, we expect 8.3 to be stable enough that you could stay on it without issues—potentially for years. If there are any showstopper bugs, we will of course backport a fix for them, but there shouldn’t be any!

(:rocket: Enhancement)
(:memo: Documentation)
(:house: Internal)
(:wastebasket: Deprecation)
  • #909 Maybe: rename wrapReturn to safe (@chriskrycho)
  • #908 Task: deprecate Task.try, Task.tryOr, and Task.tryOrElse (@chriskrycho)
  • #913 Task: deprecate static fromResult, fromPromise, and fromUnsafePromise
Committers: 2
chriskrycho
published 8.2.0 •

Changelog

Source

8.2.0 (2025-01-03)

Finally—finally!—True Myth get a Task type! A Task<T, E> is like a Promise<Result<T, E>>. In fact, under the hood, it is exactly a Promise<Result<T, E>>, but in general you do not need to think about that layering. Instead, you get a nice type-safe API for fallible async operations. (It’s what Promise should have been!)

:rocket: Enhancement
:memo: Documentation
  • #890 docs: improve rendering of the fancy variant shenanigans with @class (@chriskrycho)
:house: Internal
Committers: 1
chriskrycho
published 8.2.0-beta.1 •

Changelog

Source

8.2.0-beta.1 (2024-12-31)

Beta release with Task, so folks can easily test it out!

:bug: Bug Fix
  • #887 Result: correct the implementation of static err constructor (@chriskrycho)
:memo: Documentation
:house: Internal
Committers: 1
chriskrycho
published 8.1.0 •

Changelog

Source

8.1.0 (2024-12-04)

The big feature: a new module just for test support, with two functions in it: unwrap and unwrapErr. You can now write this:

import { expect, test } from 'vitest'; // or your testing library of choice

import Maybe from 'true-myth/maybe';
import Result from 'true-myth/result';
import { unwrap, unwrapErr } from 'true-myth/test-helpers';

import { producesMaybe, producesResult } from 'my-library';

test('using this new helper', () => {
  expect(unwrap(producesMaybe())).toBe(true);
  expect(unwrap(producesResult('valid'))).toBe('cool');
  expect(unwrapErr(producesResult('invalid')).toBe('oh teh noes');
});

See [the docs][docs] for more!

:rocket: Enhancement
:memo: Documentation
:house: Internal
Committers: 2
chriskrycho
published 8.0.1 •

Changelog

Source

8.0.1 (2024-08-22)

:bug: Bug Fix
  • #811 fix: do not set sourceRoot in tsconfigs (@chriskrycho) – this should make source maps resolve correctly!
Committers: 1
chriskrycho
published 8.0.0 •

Changelog

Source

8.0.0 (2024-08-11)

This is a pretty small “breaking” release: it makes a change so True Myth is more type safe than it was before, specifically when constructing known-Ok or known-Err types with Result.ok and Result.err. In earlier versions, if you wrote Result.ok(123), the type would be Result<number, unknown>. New contributor @auvred pointed out that in that case, we know there is never an error type, though, so we can use [the never type][never]. This is breaking in that you may have to explicitly annotate some types where you did not before, because of [the assignability rules][assignability] for unknown and never (cf. [this playground][play]).

Net, very little of your code should have to change, but where it does, it will be safer than it was before! Thanks to @auvred for the improvement!

:boom: Breaking Change
  • #789 fix: set error type in Result.ok and ok type in Result.err to never by default (@auvred)
:rocket: Enhancement
  • #789 fix: set error type in Result.ok and ok type in Result.err to never by default (@auvred)
:memo: Documentation
Committers: 2
chriskrycho
published 7.4.0 •

Changelog

Source

7.4.0 (2024-07-10)

:rocket: Enhancement
:memo: Documentation
Committers: 2
chriskrycho
published 7.3.0 •

Changelog

Source

7.3.0 (2024-05-26)

:rocket: Enhancement
Committers: 1
23
8
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc