ts-serializable 3.3.0 → 3.5.0
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/dist/classes/Serializable.d.ts +1 -1
- package/dist/classes/Serializable.js +2 -2
- package/dist/decorators/JsonObject.js +1 -0
- package/dist/naming-strategies/CamelCaseNamingStrategy.js +1 -0
- package/dist/naming-strategies/KebabCaseNamingStrategy.js +1 -0
- package/dist/naming-strategies/PascalCaseNamingStrategy.js +1 -0
- package/dist/naming-strategies/SnakeCaseNamingStrategy.js +1 -0
- package/package.json +16 -16
|
@@ -135,7 +135,7 @@ export class Serializable {
|
|
|
135
135
|
console.error(`${this.constructor.name}.fromJSON: json.${prop} ${message}:`, jsonValue);
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Deserialize one property
|
|
139
139
|
*
|
|
140
140
|
* @private
|
|
141
141
|
* @param {object} object
|
|
@@ -145,7 +145,7 @@ export class Serializable {
|
|
|
145
145
|
* @returns {(Object | null | void)}
|
|
146
146
|
* @memberof Serializable
|
|
147
147
|
*/
|
|
148
|
-
// eslint-disable-next-line
|
|
148
|
+
// eslint-disable-next-line max-params
|
|
149
149
|
deserializeProperty(prop, acceptedTypes, jsonValue, settings) {
|
|
150
150
|
for (const acceptedType of acceptedTypes) { // Type Symbol is not a property
|
|
151
151
|
if ( // Null
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-serializable",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"author": "Eugene Labutin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/LabEG/Serializable#readme",
|
|
7
|
-
"description": "Serialization and
|
|
7
|
+
"description": "Serialization and deserialization for classes",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"typings": "./dist/index.d.ts",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
"lint-staged": {
|
|
19
19
|
"./(src|tests)/**/*.(ts|tsx|js|jsx)": [
|
|
20
|
-
"eslint --fix
|
|
20
|
+
"eslint --fix"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"lint": "eslint --fix
|
|
24
|
+
"lint": "eslint --fix ./src/ ./tests/",
|
|
25
25
|
"test": "mocha",
|
|
26
26
|
"build": "tsc --project tsconfig.build.json && node ./dist/index.js",
|
|
27
27
|
"prepublishOnly": "npm run lint && npm run build && npm run test",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"reflect-metadata": ">=0.1.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@commitlint/cli": "^19.
|
|
36
|
-
"@commitlint/config-conventional": "^19.
|
|
37
|
-
"@favware/cliff-jumper": "^
|
|
38
|
-
"@labeg/code-style": "^
|
|
39
|
-
"@types/chai": "^5.0.
|
|
40
|
-
"@types/mocha": "^10.0.
|
|
41
|
-
"chai": "^5.1.
|
|
42
|
-
"husky": "^9.1.
|
|
43
|
-
"lint-staged": "^15.
|
|
44
|
-
"mocha": "^
|
|
35
|
+
"@commitlint/cli": "^19.6.1",
|
|
36
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
37
|
+
"@favware/cliff-jumper": "^5.0.0",
|
|
38
|
+
"@labeg/code-style": "^5.5.0",
|
|
39
|
+
"@types/chai": "^5.0.1",
|
|
40
|
+
"@types/mocha": "^10.0.10",
|
|
41
|
+
"chai": "^5.1.2",
|
|
42
|
+
"husky": "^9.1.7",
|
|
43
|
+
"lint-staged": "^15.3.0",
|
|
44
|
+
"mocha": "^11.0.1",
|
|
45
45
|
"reflect-metadata": "^0.2.2",
|
|
46
46
|
"ts-node": "^10.9.2",
|
|
47
|
-
"tsx": "^4.19.
|
|
48
|
-
"typescript": "^5.
|
|
47
|
+
"tsx": "^4.19.2",
|
|
48
|
+
"typescript": "^5.7.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"serialization",
|