fix(core): update
This commit is contained in:
parent
2dfa96bbc5
commit
fafd9867ad
@ -37,18 +37,6 @@ snyk:
|
|||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# 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:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
|
819
package-lock.json
generated
819
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -20,18 +20,18 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.1.3",
|
||||||
"@gitzone/tsrun": "^1.1.13",
|
"@gitzone/tsrun": "^1.1.17",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.18",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.7",
|
||||||
"@types/node": "^10.12.10",
|
"@types/node": "^10.12.12",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^5.11.0",
|
||||||
"tslint-config-prettier": "^1.16.0"
|
"tslint-config-prettier": "^1.17.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.2",
|
"@pushrocks/smartdelay": "^2.0.2",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@pushrocks/smartrx": "^2.0.2",
|
"@pushrocks/smartrx": "^2.0.3",
|
||||||
"@pushrocks/smarttime": "^3.0.5",
|
"@pushrocks/smarttime": "^3.0.5",
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
|
@ -4,7 +4,7 @@ import * as lik from '../ts/index';
|
|||||||
let testInterestmap: lik.InterestMap<number, number>;
|
let testInterestmap: lik.InterestMap<number, number>;
|
||||||
|
|
||||||
tap.test('should create an interestmap', async () => {
|
tap.test('should create an interestmap', async () => {
|
||||||
testInterestmap = new lik.InterestMap((numberArg) => {
|
testInterestmap = new lik.InterestMap(numberArg => {
|
||||||
return numberArg.toString();
|
return numberArg.toString();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './lik.plugins';
|
import * as plugins from './lik.plugins';
|
||||||
|
|
||||||
import { InterestMap, IInterestComparisonFunc} from './lik.interestmap';
|
import { InterestMap, IInterestComparisonFunc } from './lik.interestmap';
|
||||||
|
|
||||||
export class Interest<DTInterestId, DTInterestFullfillment> {
|
export class Interest<DTInterestId, DTInterestFullfillment> {
|
||||||
private interestMapRef: InterestMap<DTInterestId, DTInterestFullfillment>;
|
private interestMapRef: InterestMap<DTInterestId, DTInterestFullfillment>;
|
||||||
@ -21,7 +21,9 @@ export class Interest<DTInterestId, DTInterestFullfillment> {
|
|||||||
return this.comparisonFunc(this.originalInterest);
|
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;
|
public interestFullfilled = this.interestDeferred.promise;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,8 +7,6 @@ import { Interest } from './lik.interestmap.interest';
|
|||||||
|
|
||||||
export type IInterestComparisonFunc<T> = (objectArg: T) => string;
|
export type IInterestComparisonFunc<T> = (objectArg: T) => string;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class InterestMap<DTInterestId, DTInterestFullfillment> {
|
export class InterestMap<DTInterestId, DTInterestFullfillment> {
|
||||||
/**
|
/**
|
||||||
* stores interests that are currently fullfilled by the cache
|
* stores interests that are currently fullfilled by the cache
|
||||||
@ -95,12 +93,11 @@ export class InterestMap<DTInterestId, DTInterestFullfillment> {
|
|||||||
* inform lost interest
|
* inform lost interest
|
||||||
* @param interestId
|
* @param interestId
|
||||||
*/
|
*/
|
||||||
public informLostInterest (interestId: DTInterestId) {
|
public informLostInterest(interestId: DTInterestId) {
|
||||||
const wantedInterest = this.findInterest(interestId);
|
const wantedInterest = this.findInterest(interestId);
|
||||||
if (wantedInterest) {
|
if (wantedInterest) {
|
||||||
wantedInterest.markLost();
|
wantedInterest.markLost();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,12 +14,7 @@ import * as smartpromise from '@pushrocks/smartpromise';
|
|||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@pushrocks/smartrx';
|
||||||
import * as smarttime from '@pushrocks/smarttime';
|
import * as smarttime from '@pushrocks/smarttime';
|
||||||
|
|
||||||
export {
|
export { smartdelay, smartpromise, smartrx, smarttime };
|
||||||
smartdelay,
|
|
||||||
smartpromise,
|
|
||||||
smartrx,
|
|
||||||
smarttime
|
|
||||||
};
|
|
||||||
|
|
||||||
// ==============
|
// ==============
|
||||||
// third party
|
// third party
|
||||||
|
Loading…
Reference in New Issue
Block a user