@vicin/sigil 1.2.3 β 1.2.5
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 +16 -2
- package/README.md +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [1.2.
|
|
5
|
+
## [1.2.5] - 2026-02-10
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
9
|
- Documentation updates (README)
|
|
10
10
|
|
|
11
|
-
## [1.2.
|
|
11
|
+
## [1.2.4] - 2026-02-10
|
|
12
|
+
|
|
13
|
+
**Stable release**
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Documentation updates (README)
|
|
18
|
+
|
|
19
|
+
## [1.2.3] - 2026-02-10
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Documentation updates (README)
|
|
24
|
+
|
|
25
|
+
## [1.2.2] - 2026-02-10
|
|
12
26
|
|
|
13
27
|
### Changed
|
|
14
28
|
|
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@vicin/sigil) [](https://www.npmjs.com/package/@vicin/sigil) [](LICENSE)  [](https://github.com/ZiadTaha62/sigil/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
-
> π First stable release β v1.2! Happy coding!
|
|
6
|
-
> π **Changelog:** [CHANGELOG.md](./CHANGELOG.md)
|
|
5
|
+
> - π First stable release β v1.2! Happy coding! ππ»
|
|
6
|
+
> - π **Changelog:** [CHANGELOG.md](./CHANGELOG.md)
|
|
7
7
|
|
|
8
8
|
`Sigil` is a lightweight TypeScript library for creating nominal identity classes with compile-time branding and reliable runtime type checks. It organizes class identities across your codebase and gives you the power of **nominal typing**, **safe cross-bundle class checks**, and a **central registry** where each class constructor is stored under a unique label.
|
|
9
9
|
|
|
@@ -94,7 +94,7 @@ After opting into the `Sigil` contract, labels are passed to child classes to un
|
|
|
94
94
|
|
|
95
95
|
##### Decorator pattern
|
|
96
96
|
|
|
97
|
-
Apply a label with the `@WithSigil` decorator
|
|
97
|
+
Apply a label with the `@WithSigil` decorator:
|
|
98
98
|
|
|
99
99
|
```ts
|
|
100
100
|
import { Sigil, WithSigil } from '@vicin/sigil';
|
|
@@ -103,11 +103,9 @@ import { Sigil, WithSigil } from '@vicin/sigil';
|
|
|
103
103
|
class User extends Sigil {}
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
> Note: When extending an already sigilified class (for example `Sigil`), you must decorate the subclass or use the HOF helpers in DEV mode unless you configured the library otherwise.
|
|
107
|
-
|
|
108
106
|
##### HOF (Higher-Order Function) pattern
|
|
109
107
|
|
|
110
|
-
|
|
108
|
+
Apply a label using HOF as `withSigil` or `withSigilTyped`:
|
|
111
109
|
|
|
112
110
|
```ts
|
|
113
111
|
import { Sigil, withSigil } from '@vicin/sigil';
|
|
@@ -119,6 +117,8 @@ const user = new User();
|
|
|
119
117
|
console.log(User.SigilLabel); // "@myorg/mypkg.User"
|
|
120
118
|
```
|
|
121
119
|
|
|
120
|
+
> Note: When extending an already sigilified class (for example `Sigil`), you must decorate the subclass or use the HOF helpers in DEV mode unless you configured the library otherwise.
|
|
121
|
+
|
|
122
122
|
### Minimal βfirst-runβ example
|
|
123
123
|
|
|
124
124
|
```ts
|