resultar 3.0.0-alpha.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -22,8 +22,8 @@ Use it when expected failures should be impossible to miss:
22
22
  code.
23
23
  - Ignored `Result` values can be reported by a type-aware no-discard check.
24
24
 
25
- Resultar began as an initial fork of `neverthrow`. The v3 alpha line keeps the explicit wrapper
26
- model, then leans into Resultar-specific tagged errors, strict service-boundary types, TypeScript 6
25
+ Resultar began as an initial fork of `neverthrow`. The v3 line keeps the explicit wrapper model,
26
+ then leans into Resultar-specific tagged errors, strict service-boundary types, TypeScript 6
27
27
  support, and ESM-only packaging.
28
28
 
29
29
  ## Install
@@ -579,20 +579,25 @@ Add a lint-like script:
579
579
  }
580
580
  ```
581
581
 
582
- This fails:
582
+ These fail in the default `must-use` mode:
583
583
 
584
584
  ```ts
585
585
  saveUser(input)
586
+ const result = saveUser(input)
586
587
  ```
587
588
 
588
589
  These are intentional:
589
590
 
590
591
  ```ts
591
- const result = saveUser(input)
592
592
  return saveUser(input)
593
593
  void saveUser(input)
594
+ saveUser(input).match(handleSaved, handleError)
594
595
  ```
595
596
 
597
+ The default mode is neverthrow-style `must-use`: it also reports assigned `Result` values that are
598
+ only passed around and never consumed with `match`, `unwrapOr`, `_unsafeUnwrap`, `isOk`, `isErr`,
599
+ returned, or explicitly discarded. Use `--mode direct` for the lower-noise expression-only check.
600
+
596
601
  For editor diagnostics, enable the TypeScript language-service plugin:
597
602
 
598
603
  ```json
@@ -645,9 +650,9 @@ TypeScript and then Resultar no-discard validation.
645
650
  | Throw intentionally at a final edge | `unwrapOrThrow()` |
646
651
  | Default intentionally at a final edge | `unwrapOr(defaultValue)` |
647
652
 
648
- ## Version 3 Alpha Notes
653
+ ## Version 3 Notes
649
654
 
650
- `3.0.0-alpha.1` is a semver-major prerelease:
655
+ `3.0.0` is a semver-major release:
651
656
 
652
657
  - `no-discard` tooling moved out of the runtime package and into dedicated packages.
653
658
  - TypeScript peer support is now `>=6.0.0`.
@@ -667,17 +672,18 @@ and `tryResultAsync` in new code and docs.
667
672
 
668
673
  ## Documentation
669
674
 
670
- This README is the project entry point. For a full guide with larger examples and the complete API
671
- map, see [DOCUMENTATION.md](DOCUMENTATION.md).
675
+ This README is the runtime package entry point. For a full guide with larger examples and the
676
+ complete API map, see the repository documentation.
672
677
 
673
678
  More focused material:
674
679
 
675
- - [Type-safe error handling article, English](articles/en/type-safe.md)
676
- - [Artigo sobre tratamento de erros type-safe, Portuguese](articles/pt/type-safe.md)
677
- - [resultar-lint package guide](packages/resultar-lint/README.md)
678
- - [resultar-tsgo package guide](packages/resultar-tsgo/README.md)
680
+ - [Full guide](https://github.com/inaiat/resultar/blob/main/DOCUMENTATION.md)
681
+ - [Type-safe error handling article, English](https://github.com/inaiat/resultar/blob/main/articles/en/type-safe.md)
682
+ - [Artigo sobre tratamento de erros type-safe, Portuguese](https://github.com/inaiat/resultar/blob/main/articles/pt/type-safe.md)
683
+ - [resultar-lint package guide](https://github.com/inaiat/resultar/blob/main/packages/resultar-lint/README.md)
684
+ - [resultar-tsgo package guide](https://github.com/inaiat/resultar/blob/main/packages/resultar-tsgo/README.md)
679
685
 
680
- ## Workspace
686
+ ## Repository
681
687
 
682
688
  This repository is a pnpm workspace:
683
689
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resultar",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0",
4
4
  "description": "Result pattern for TypeScript",
5
5
  "keywords": [
6
6
  "error-handling",