superlib 1.2.0 → 1.2.1
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 +27 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# SuperLib
|
|
2
|
+
|
|
3
|
+
Missing standard library for TypeScript
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install superlib
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Features:
|
|
12
|
+
|
|
13
|
+
- `Task` primitive to orchestrate async work (retries, timeouts, concurrency etc.)
|
|
14
|
+
- `FileSystem` abstraction and InMemoryFileSystem to test FS interactions
|
|
15
|
+
- `ProcessContext` abstraction with env reader: `env.optionalBoolean("TEST", false)`
|
|
16
|
+
- Optional error handling with `Result` type
|
|
17
|
+
- And many, many smaller utils (`sleep`, `random`, `AbsolutePath` etc.)
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
- [github-stats](./packages/superlib/examples/github-stats/) - Fetches GitHub repository statistics using SuperLib's Task pipeline, SafeFetch, and FileSystem abstractions
|
|
22
|
+
|
|
23
|
+
### License
|
|
24
|
+
|
|
25
|
+
MIT
|
|
26
|
+
|
|
27
|
+
Special thanks to [davidhq](https://github.com/davidhq) for donating the npm's package name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A missing standard library for TypeScript, providing utilities for async orchestration, error handling, filesystem abstraction, and common patterns",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"async",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"url": "git+https://github.com/superlibdotdev/superlib.git"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"dist"
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
21
22
|
],
|
|
22
23
|
"type": "module",
|
|
23
24
|
"main": "./dist/index.js",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
|
-
"build": "tsc -p tsconfig.build.json && bun run scripts/fix-imports.ts",
|
|
54
|
+
"build": "tsc -p tsconfig.build.json && bun run scripts/fix-imports.ts && cp ../../README.md .",
|
|
54
55
|
"lint": "oxlint --type-aware --type-check --deny-warnings",
|
|
55
56
|
"lint:fix": "bun run lint --fix",
|
|
56
57
|
"test": "bun test",
|