@thi.ng/soa 0.4.56 → 0.4.58
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 +8 -1
- package/README.md +1 -1
- package/api.d.ts +2 -2
- package/package.json +11 -11
- package/serialize.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-08-04T10:58:19Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,13 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [0.4.58](https://github.com/thi-ng/umbrella/tree/@thi.ng/soa@0.4.58) (2023-08-04)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update `identity` usage in various pkgs ([b6db053](https://github.com/thi-ng/umbrella/commit/b6db053))
|
|
17
|
+
- minor type updates ([5a5a813](https://github.com/thi-ng/umbrella/commit/5a5a813))
|
|
18
|
+
|
|
12
19
|
## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/soa@0.4.0) (2021-11-17)
|
|
13
20
|
|
|
14
21
|
#### 🚀 Features
|
package/README.md
CHANGED
package/api.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export type SOASpecs<K extends string> = Record<K, Partial<SOAAttribSpec>>;
|
|
|
49
49
|
*/
|
|
50
50
|
export type SOATuple<K extends string, V> = Record<K, V>;
|
|
51
51
|
export interface SerializerPair<T> {
|
|
52
|
-
decode:
|
|
53
|
-
encode:
|
|
52
|
+
decode: Fn<ReadonlyVec, T>;
|
|
53
|
+
encode: Fn<T, ReadonlyVec>;
|
|
54
54
|
}
|
|
55
55
|
export type SerializerSpecs = Record<string, SerializerPair<any>>;
|
|
56
56
|
export type SerializedType<T extends SerializerSpecs, K extends keyof T> = ReturnType<T[K]["decode"]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/soa",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.58",
|
|
4
4
|
"description": "SOA & AOS memory mapped structured views with optional & extensible serialization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/binary": "^3.3.
|
|
39
|
-
"@thi.ng/errors": "^2.
|
|
40
|
-
"@thi.ng/transducers-binary": "^2.1.
|
|
41
|
-
"@thi.ng/vectors": "^7.7.
|
|
37
|
+
"@thi.ng/api": "^8.9.0",
|
|
38
|
+
"@thi.ng/binary": "^3.3.28",
|
|
39
|
+
"@thi.ng/errors": "^2.3.0",
|
|
40
|
+
"@thi.ng/transducers-binary": "^2.1.52",
|
|
41
|
+
"@thi.ng/vectors": "^7.7.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@microsoft/api-extractor": "^7.
|
|
45
|
-
"@thi.ng/equiv": "^2.1.
|
|
46
|
-
"@thi.ng/testament": "^0.3.
|
|
44
|
+
"@microsoft/api-extractor": "^7.36.3",
|
|
45
|
+
"@thi.ng/equiv": "^2.1.25",
|
|
46
|
+
"@thi.ng/testament": "^0.3.18",
|
|
47
47
|
"rimraf": "^5.0.1",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
49
|
"typedoc": "^0.24.8",
|
|
50
|
-
"typescript": "^5.1.
|
|
50
|
+
"typescript": "^5.1.6"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"acceleration",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"status": "alpha",
|
|
106
106
|
"year": 2019
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "9fa3f7f8169efa30e3c71b43c82f77393581c3b5\n"
|
|
109
109
|
}
|
package/serialize.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { identity } from "@thi.ng/api/fn";
|
|
1
2
|
import { assert } from "@thi.ng/errors/assert";
|
|
2
3
|
import { utf8Decode, utf8Encode } from "@thi.ng/transducers-binary/utf8";
|
|
3
4
|
/**
|
|
4
5
|
* Identity serializer pair (no op).
|
|
5
6
|
*/
|
|
6
7
|
export const ident = {
|
|
7
|
-
decode:
|
|
8
|
-
encode:
|
|
8
|
+
decode: identity,
|
|
9
|
+
encode: identity,
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Serializer pair for scalars.
|