mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-29 01:22:56 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d912c03eb0 | ||
|
|
a638f5447b | ||
|
|
cecf95aa46 |
@@ -1,3 +1,7 @@
|
||||
# [0.64.0](https://gitlab.com/openstapps/core/compare/v0.63.0...v0.64.0) (2022-03-21)
|
||||
|
||||
|
||||
|
||||
# [0.63.0](https://gitlab.com/openstapps/core/compare/v0.62.0...v0.63.0) (2022-01-24)
|
||||
|
||||
|
||||
|
||||
594
package-lock.json
generated
594
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/core",
|
||||
"version": "0.64.0",
|
||||
"version": "0.65.0",
|
||||
"description": "StAppsCore - Generalized model of data",
|
||||
"keywords": [
|
||||
"Model",
|
||||
@@ -45,16 +45,16 @@
|
||||
"Wieland Schöbl"
|
||||
],
|
||||
"dependencies": {
|
||||
"@openstapps/core-tools": "0.29.0",
|
||||
"@openstapps/core-tools": "0.30.0",
|
||||
"@types/geojson": "1.0.6",
|
||||
"@types/json-patch": "0.0.30",
|
||||
"@types/json-schema": "7.0.10",
|
||||
"@types/json-schema": "7.0.11",
|
||||
"@types/node": "14.18.3",
|
||||
"fast-clone": "1.5.13",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"http-status-codes": "2.2.0",
|
||||
"json-patch": "0.7.0",
|
||||
"json-schema": "0.4.0",
|
||||
"rfdc": "1.3.0",
|
||||
"ts-optchain": "0.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -63,7 +63,7 @@
|
||||
"@openstapps/logger": "0.8.0",
|
||||
"@testdeck/mocha": "0.2.0",
|
||||
"@types/chai": "4.3.0",
|
||||
"@types/lodash": "4.14.180",
|
||||
"@types/lodash": "4.14.181",
|
||||
"@types/mocha": "9.1.0",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"chai": "4.3.6",
|
||||
@@ -77,7 +77,7 @@
|
||||
"surge": "0.23.1",
|
||||
"ts-node": "10.7.0",
|
||||
"tslint": "6.1.3",
|
||||
"typedoc": "0.21.6",
|
||||
"typedoc": "0.22.13",
|
||||
"typescript": "4.3.5"
|
||||
},
|
||||
"nyc": {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import clone = require('fast-clone');
|
||||
import equal = require('fast-deep-equal/es6');
|
||||
import clone = require('rfdc');
|
||||
import {Defined, TSOCType} from 'ts-optchain';
|
||||
import {SCLanguageCode} from './general/i18n';
|
||||
import {isThing} from './guards';
|
||||
@@ -234,7 +234,7 @@ export class SCThingTranslator {
|
||||
return cachedInstance as T;
|
||||
}
|
||||
}
|
||||
const translatedInstance = this.translateThingInPlaceDestructively(clone(thing));
|
||||
const translatedInstance = this.translateThingInPlaceDestructively(clone()(thing));
|
||||
delete translatedInstance.translations;
|
||||
this.cache.putObject(translatedInstance);
|
||||
this.sourceCache.putObject(thing);
|
||||
@@ -267,7 +267,7 @@ export class SCThingTranslator {
|
||||
return this.deeptranslate((objTranslatedFromCache as any)[key]);
|
||||
}
|
||||
}
|
||||
const objTranslated = this.translateThingInPlaceDestructively(clone(obj));
|
||||
const objTranslated = this.translateThingInPlaceDestructively(clone()(obj));
|
||||
this.cache.putObject(objTranslated);
|
||||
this.sourceCache.putObject(thing);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {expect} from 'chai';
|
||||
import clone = require('fast-clone');
|
||||
import clone from 'rfdc';
|
||||
import {slow, suite, test, timeout} from '@testdeck/mocha';
|
||||
import {SCThingOriginType, SCThingType, SCThingRemoteOrigin} from '../src/things/abstract/thing';
|
||||
import {SCBuildingWithoutReferences} from '../src/things/building';
|
||||
@@ -264,7 +264,7 @@ export class TranslationSpecInplace {
|
||||
@test
|
||||
public reaccessWithChangedSourceOmitsLRUCache() {
|
||||
const translatorDE = new SCThingTranslator('de');
|
||||
const dishCopy = clone(dish);
|
||||
const dishCopy = clone()(dish);
|
||||
const translatedDish = translatorDE.translatedAccess(dish);
|
||||
const distructivelyTranslatedDish = translatorDE.translate(dish);
|
||||
|
||||
@@ -330,7 +330,7 @@ export class MetaTranslationSpec {
|
||||
|
||||
@test
|
||||
public thingWithoutMetaClass() {
|
||||
const dishCopy = clone(dish);
|
||||
const dishCopy = clone()(dish);
|
||||
const typeNonExistant = eval("(x) => x + 'typeNonExistant';");
|
||||
// this will assign a non existant SCThingType to dishCopy
|
||||
dishCopy.type = typeNonExistant();
|
||||
|
||||
Reference in New Issue
Block a user