slang-ts 0.1.1 → 0.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/CHANGELOG.md +53 -0
- package/README.md +189 -602
- package/dist/index.d.ts +303 -25
- package/dist/index.js +2 -2
- package/package.json +16 -4
- package/skill/SKILL.md +164 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Everything notable in `slang-ts`, grouped by area. No release diary — just what's here.
|
|
4
|
+
|
|
5
|
+
## Results and flow
|
|
6
|
+
|
|
7
|
+
- `Ok(value, message?)` keeps an optional success message on the result, like text you want to show
|
|
8
|
+
the user. Results without one have no `message` property.
|
|
9
|
+
- `SafeTry` unwraps Option and Atom values into one result. A Result never nests inside another
|
|
10
|
+
Result, and plain object properties and array elements stay unchanged.
|
|
11
|
+
|
|
12
|
+
## Collections and data
|
|
13
|
+
|
|
14
|
+
- `list`: strict indexed collections with `get`, `take`, `skip`, `range`, `chunk`, `count`, and
|
|
15
|
+
`prune`.
|
|
16
|
+
- `struct`: safe record access, `pick`/`omit`/`merge` shaping, and `countBy`/`keyBy` grouping.
|
|
17
|
+
- `sets`: membership and set algebra for arrays, iterables, Maps (keys), and object keys.
|
|
18
|
+
- `Ok.iterate`: lazy `map`, `filter`, `flatMap`, `take`, `drop`, `chunk`, `reduce`, `count`, and
|
|
19
|
+
`toArray` on a successful `Result`.
|
|
20
|
+
- `memoized`: argument-based caching that matches objects by identity, and removal of rejected
|
|
21
|
+
Promises.
|
|
22
|
+
|
|
23
|
+
## Async and lifecycle
|
|
24
|
+
|
|
25
|
+
- `SuperPromise`: promises with wait, retry, timeout, cancel, and `Ok`/`Err` settlement.
|
|
26
|
+
- `SuperRunner`: run `SuperPromise`s in sequence, in parallel, or as a race.
|
|
27
|
+
- `taskGroup`: shared concurrency and start spacing for `SuperPromise`s, with retries waiting for
|
|
28
|
+
a new slot.
|
|
29
|
+
- `Signal`: a trigger that fires once and stays fired.
|
|
30
|
+
- `Channel`: an in-process publish/subscribe bus.
|
|
31
|
+
|
|
32
|
+
## Small utilities
|
|
33
|
+
|
|
34
|
+
- `createStepper`: bounded step history with named steps, undo, and explicit `prev` handling.
|
|
35
|
+
- `println` respects the environment: `setEnvironment("production")` turns it into a no-op, and
|
|
36
|
+
`{ printFn }` routes output through an existing logger.
|
|
37
|
+
|
|
38
|
+
## Typing and packaging
|
|
39
|
+
|
|
40
|
+
- `list`, `struct`, and `sets` keep their element, row, and key types; `get` fallbacks widen the
|
|
41
|
+
result type correctly.
|
|
42
|
+
- Bundled declarations work with strict NodeNext consumers, so importing the package no longer
|
|
43
|
+
exposes invalid declaration paths.
|
|
44
|
+
- The bundled entry is marked side-effectful so the `.to()` converters register reliably after
|
|
45
|
+
bundling.
|
|
46
|
+
- `npm publish` runs `bun run export` first (tests, type check, then build), so the package always
|
|
47
|
+
ships a fresh build.
|
|
48
|
+
- tsdown and TypeScript 7 build the JavaScript and bundled types together.
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
- A shorter README tour, per-utility reference pages, and plain-TypeScript contrasts for the
|
|
53
|
+
utilities that replace real boilerplate.
|