* Fix assignment in `withInjectedVariables` 

* Pin all dependencies to exact version

* Remove unused deps
This commit is contained in:
Pavel 2021-04-08 13:55:33 +03:00 committed by GitHub
parent 5355eeb152
commit 15e645c2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 473 additions and 2409 deletions

2787
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,8 +9,7 @@
"test:all": "jest",
"test:unit": "jest --testPathPattern=src/__test__/unit",
"test:integration": "jest --testPathPattern=src/__test__/integration",
"build": "tsc",
"build:webpack": "webpack --mode production"
"build": "tsc"
},
"repository": "https://github.com/fluencelabs/fluence-js",
"author": "Fluence Labs",
@ -24,31 +23,19 @@
"it-length-prefixed": "3.0.1",
"it-pipe": "1.1.0",
"libp2p": "0.30.10",
"libp2p-crypto": "^0.19.0",
"libp2p-crypto": "0.19.0",
"libp2p-mplex": "0.10.2",
"libp2p-noise": "2.0.5",
"libp2p-websockets": "0.15.3",
"loglevel": "1.7.0",
"multiaddr": "^8.1.2",
"multiaddr": "8.1.2",
"peer-id": "0.14.3",
"uuid": "8.3.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@types/base64-js": "1.2.5",
"@types/bs58": "4.0.1",
"@types/jest": "^26.0.20",
"@types/uuid": "8.3.0",
"assert": "2.0.0",
"babel-jest": "^26.6.3",
"babel-plugin-replace-ts-export-assignment": "0.0.2",
"esm": "^3.2.25",
"@types/jest": "^26.0.22",
"jest": "^26.6.3",
"text-encoding": "^0.7.0",
"ts-jest": "^26.5.0",
"ts-loader": "7.0.5",
"ts-jest": "^26.5.4",
"typescript": "^3.9.5"
}
}

View File

@ -29,7 +29,7 @@ class ScriptBuilder {
private script: string;
private isXorInjected: boolean;
private shouldInjectRelay: boolean;
private variables?: string[];
private variables: string[] = [];
constructor() {
this.isXorInjected = false;
@ -42,7 +42,7 @@ class ScriptBuilder {
}
withInjectedVariables(fields: string[]): ScriptBuilder {
this.variables = fields;
this.variables = [...this.variables, ...fields];
return this;
}