@serkonda7/ts-result 1.0.2 โ†’ 1.0.4

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.
package/README.md CHANGED
@@ -50,6 +50,33 @@ const port = unwrap(portResult)
50
50
  ```
51
51
 
52
52
 
53
+ ## ๐Ÿงน Linter Configuration
54
+ To avoid exception-based control flow, configure your linter to disallow `throw` statements in application code.
55
+
56
+ ### Biome example configuration
57
+ ```gritql
58
+ // no-throw.grit
59
+
60
+ language js (typescript, jsx);
61
+
62
+ `throw $expr` as $throw where {
63
+ register_diagnostic(
64
+ span = $throw,
65
+ message = "Use Result 'return err(...)' instead of `throw`"
66
+ )
67
+ }
68
+ ```
69
+
70
+ ```jsonc
71
+ // biome.jsonc
72
+
73
+ {
74
+ // ...
75
+ "plugins": ["./no-throw.grit"]
76
+ }
77
+ ```
78
+
79
+
53
80
  ## ๐Ÿ“œ License
54
81
  This repo is licensed under the [MIT License](LICENSE.txt).
55
82
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@serkonda7/ts-result",
3
3
  "description": "Minimalistic Result type for TypeScript.",
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "license": "MIT",
6
6
  "author": "serkonda7",
7
7
  "homepage": "https://github.com/serkonda7/ts-result",
@@ -15,15 +15,16 @@
15
15
  "keywords": ["result", "typescript", "error-handling"],
16
16
  "type": "module",
17
17
  "main": "dist/result.js",
18
- "types": "dist/result.d.ts",
19
- "files": ["dist/"],
18
+ "types": "dist/src/result.d.ts",
19
+ "files": ["dist"],
20
20
  "scripts": {
21
21
  "lint": "biome check --write",
22
22
  "lint:ci": "biome ci",
23
- "check": "tsgo --noEmit",
23
+ "check": "tsgo -p tsconfig.check.json",
24
24
  "test": "bun test",
25
25
  "build": "tsgo && bun run scripts/build.ts",
26
- "prepack": "bun run build"
26
+ "prepack": "bun run build",
27
+ "pack": "bun pm pack --filename ts-result.tgz"
27
28
  },
28
29
  "engines": {
29
30
  "node": ">=22"
@@ -31,8 +32,8 @@
31
32
  "packageManager": "bun@1.3.11",
32
33
  "dependencies": {},
33
34
  "devDependencies": {
34
- "@biomejs/biome": "2.4.10",
35
+ "@biomejs/biome": "2.4.11",
35
36
  "@types/bun": "~1.3.11",
36
- "@typescript/native-preview": "~7.0.0-dev.20260325.1"
37
+ "@typescript/native-preview": "~7.0.0-dev.20260411.1"
37
38
  }
38
39
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};