fix(build,json): replace lodash.clonedeep with structuredClone and migrate package metadata to smartconfig
This commit is contained in:
+3
-3
@@ -163,7 +163,7 @@ export class Smartjson {
|
||||
// INSTANCE
|
||||
// ========
|
||||
|
||||
public saveableProperties: string[];
|
||||
public saveableProperties: string[] = [];
|
||||
|
||||
/**
|
||||
* folds a class into an object
|
||||
@@ -187,11 +187,11 @@ export class Smartjson {
|
||||
if (Array.isArray(val)) {
|
||||
return val.map((item) => foldValue(item));
|
||||
}
|
||||
return plugins.lodashCloneDeep(val);
|
||||
return structuredClone(val);
|
||||
};
|
||||
const props: string[] = (this as any).saveableProperties || [];
|
||||
for (const keyName of props) {
|
||||
const value = this[keyName];
|
||||
const value = (this as unknown as Record<string, unknown>)[keyName];
|
||||
result[keyName] = foldValue(value);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user