fix(core): update

This commit is contained in:
Philipp Kunz 2018-12-11 01:36:14 +01:00
parent 2dfa96bbc5
commit fafd9867ad
7 changed files with 526 additions and 341 deletions

View File

@ -37,18 +37,6 @@ snyk:
# ====================
# test stage
# ====================
testLEGACY:
stage: test
script:
- npmci npm prepare
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS:
stage: test

819
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,18 +20,18 @@
},
"homepage": "https://gitlab.com/pushrocks/lik#README",
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tsrun": "^1.1.13",
"@gitzone/tstest": "^1.0.15",
"@gitzone/tsbuild": "^2.1.3",
"@gitzone/tsrun": "^1.1.17",
"@gitzone/tstest": "^1.0.18",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.10",
"@types/node": "^10.12.12",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.16.0"
"tslint-config-prettier": "^1.17.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^2.0.2",
"@pushrocks/smartpromise": "^2.0.5",
"@pushrocks/smartrx": "^2.0.2",
"@pushrocks/smartrx": "^2.0.3",
"@pushrocks/smarttime": "^3.0.5",
"@types/minimatch": "^3.0.3",
"minimatch": "^3.0.4",

View File

@ -4,7 +4,7 @@ import * as lik from '../ts/index';
let testInterestmap: lik.InterestMap<number, number>;
tap.test('should create an interestmap', async () => {
testInterestmap = new lik.InterestMap((numberArg) => {
testInterestmap = new lik.InterestMap(numberArg => {
return numberArg.toString();
});
});

View File

@ -1,6 +1,6 @@
import * as plugins from './lik.plugins';
import { InterestMap, IInterestComparisonFunc} from './lik.interestmap';
import { InterestMap, IInterestComparisonFunc } from './lik.interestmap';
export class Interest<DTInterestId, DTInterestFullfillment> {
private interestMapRef: InterestMap<DTInterestId, DTInterestFullfillment>;
@ -21,7 +21,9 @@ export class Interest<DTInterestId, DTInterestFullfillment> {
return this.comparisonFunc(this.originalInterest);
}
private interestDeferred: plugins.smartpromise.Deferred<DTInterestFullfillment> = new plugins.smartpromise.Deferred();
private interestDeferred: plugins.smartpromise.Deferred<
DTInterestFullfillment
> = new plugins.smartpromise.Deferred();
public interestFullfilled = this.interestDeferred.promise;
/**
@ -73,4 +75,4 @@ export class Interest<DTInterestId, DTInterestFullfillment> {
public renew() {
this.destructionTimer.reset();
}
}
}

View File

@ -7,8 +7,6 @@ import { Interest } from './lik.interestmap.interest';
export type IInterestComparisonFunc<T> = (objectArg: T) => string;
export class InterestMap<DTInterestId, DTInterestFullfillment> {
/**
* stores interests that are currently fullfilled by the cache
@ -93,14 +91,13 @@ export class InterestMap<DTInterestId, DTInterestFullfillment> {
/**
* inform lost interest
* @param interestId
* @param interestId
*/
public informLostInterest (interestId: DTInterestId) {
public informLostInterest(interestId: DTInterestId) {
const wantedInterest = this.findInterest(interestId);
if (wantedInterest) {
wantedInterest.markLost();
}
}
/**

View File

@ -14,12 +14,7 @@ import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrx from '@pushrocks/smartrx';
import * as smarttime from '@pushrocks/smarttime';
export {
smartdelay,
smartpromise,
smartrx,
smarttime
};
export { smartdelay, smartpromise, smartrx, smarttime };
// ==============
// third party