* 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

@ -1,54 +1,41 @@
{ {
"name": "@fluencelabs/fluence", "name": "@fluencelabs/fluence",
"version": "0.9.14", "version": "0.9.14",
"description": "JS SDK for the Fluence network", "description": "JS SDK for the Fluence network",
"main": "./dist/index.js", "main": "./dist/index.js",
"typings": "./dist/index.d.ts", "typings": "./dist/index.d.ts",
"scripts": { "scripts": {
"test": "jest --watch", "test": "jest --watch",
"test:all": "jest", "test:all": "jest",
"test:unit": "jest --testPathPattern=src/__test__/unit", "test:unit": "jest --testPathPattern=src/__test__/unit",
"test:integration": "jest --testPathPattern=src/__test__/integration", "test:integration": "jest --testPathPattern=src/__test__/integration",
"build": "tsc", "build": "tsc"
"build:webpack": "webpack --mode production" },
}, "repository": "https://github.com/fluencelabs/fluence-js",
"repository": "https://github.com/fluencelabs/fluence-js", "author": "Fluence Labs",
"author": "Fluence Labs", "license": "Apache-2.0",
"license": "Apache-2.0", "dependencies": {
"dependencies": { "@fluencelabs/aquamarine-interpreter": "0.7.9",
"@fluencelabs/aquamarine-interpreter": "0.7.9", "async": "3.2.0",
"async": "3.2.0", "base64-js": "1.3.1",
"base64-js": "1.3.1", "bs58": "4.0.1",
"bs58": "4.0.1", "cids": "0.8.1",
"cids": "0.8.1", "it-length-prefixed": "3.0.1",
"it-length-prefixed": "3.0.1", "it-pipe": "1.1.0",
"it-pipe": "1.1.0", "libp2p": "0.30.10",
"libp2p": "0.30.10", "libp2p-crypto": "0.19.0",
"libp2p-crypto": "^0.19.0", "libp2p-mplex": "0.10.2",
"libp2p-mplex": "0.10.2", "libp2p-noise": "2.0.5",
"libp2p-noise": "2.0.5", "libp2p-websockets": "0.15.3",
"libp2p-websockets": "0.15.3", "loglevel": "1.7.0",
"loglevel": "1.7.0", "multiaddr": "8.1.2",
"multiaddr": "^8.1.2", "peer-id": "0.14.3",
"peer-id": "0.14.3", "uuid": "8.3.0"
"uuid": "8.3.0" },
}, "devDependencies": {
"devDependencies": { "@types/jest": "^26.0.22",
"@babel/core": "^7.12.10", "jest": "^26.6.3",
"@babel/preset-env": "^7.12.11", "ts-jest": "^26.5.4",
"@babel/preset-typescript": "^7.12.7", "typescript": "^3.9.5"
"@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",
"jest": "^26.6.3",
"text-encoding": "^0.7.0",
"ts-jest": "^26.5.0",
"ts-loader": "7.0.5",
"typescript": "^3.9.5"
}
} }

View File

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