aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-cov')
-rw-r--r--packages/sol-cov/CHANGELOG.json9
-rw-r--r--packages/sol-cov/CHANGELOG.md4
-rw-r--r--packages/sol-cov/package.json16
-rw-r--r--packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts4
-rw-r--r--packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts4
-rw-r--r--packages/sol-cov/src/ast_visitor.ts14
-rw-r--r--packages/sol-cov/src/coverage_subprovider.ts2
-rw-r--r--packages/sol-cov/src/get_source_range_snippet.ts2
-rw-r--r--packages/sol-cov/src/profiler_subprovider.ts2
-rw-r--r--packages/sol-cov/src/revert_trace_subprovider.ts4
-rw-r--r--packages/sol-cov/src/trace_collection_subprovider.ts6
-rw-r--r--packages/sol-cov/src/trace_collector.ts8
12 files changed, 44 insertions, 31 deletions
diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json
index 8a622162f..038ba5654 100644
--- a/packages/sol-cov/CHANGELOG.json
+++ b/packages/sol-cov/CHANGELOG.json
@@ -77,6 +77,15 @@
]
},
{
+ "timestamp": 1531919263,
+ "version": "0.1.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.1.2",
"changes": [
diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md
index 0ed77253e..d7621c23d 100644
--- a/packages/sol-cov/CHANGELOG.md
+++ b/packages/sol-cov/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.1.3 - _July 18, 2018_
+
+ * Dependencies updated
+
## v0.1.2 - _July 9, 2018_
* Dependencies updated
diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json
index 8553da7a4..abd70c929 100644
--- a/packages/sol-cov/package.json
+++ b/packages/sol-cov/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/sol-cov",
- "version": "0.1.2",
+ "version": "0.1.3",
"engines": {
"node": ">=6.12"
},
@@ -50,12 +50,12 @@
},
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
"dependencies": {
- "@0xproject/sol-compiler": "^0.5.3",
- "@0xproject/subproviders": "^0.10.5",
- "@0xproject/typescript-typings": "^0.4.2",
- "@0xproject/utils": "^0.7.2",
- "@0xproject/web3-wrapper": "^0.7.2",
- "@0xproject/dev-utils": "^0.4.5",
+ "@0xproject/sol-compiler": "^0.5.4",
+ "@0xproject/subproviders": "^0.10.6",
+ "@0xproject/typescript-typings": "^0.4.3",
+ "@0xproject/utils": "^0.7.3",
+ "@0xproject/web3-wrapper": "^0.7.3",
+ "@0xproject/dev-utils": "^0.4.6",
"ethereum-types": "^0.0.2",
"ethereumjs-util": "^5.1.1",
"glob": "^7.1.2",
@@ -86,7 +86,7 @@
"nyc": "^11.0.1",
"shx": "^0.2.2",
"sinon": "^4.0.0",
- "tslint": "5.8.0",
+ "tslint": "5.11.0",
"typedoc": "0xProject/typedoc",
"typescript": "2.7.1"
},
diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts
index 220a9f98c..8e03bf7fd 100644
--- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts
+++ b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts
@@ -12,8 +12,8 @@ import { AbstractArtifactAdapter } from './abstract_artifact_adapter';
const CONFIG_FILE = 'compiler.json';
export class SolCompilerArtifactAdapter extends AbstractArtifactAdapter {
- private _artifactsPath: string;
- private _sourcesPath: string;
+ private readonly _artifactsPath: string;
+ private readonly _sourcesPath: string;
constructor(artifactsPath?: string, sourcesPath?: string) {
super();
const config: CompilerOptions = fs.existsSync(CONFIG_FILE)
diff --git a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts
index 53449e5e1..53b77aed5 100644
--- a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts
+++ b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts
@@ -7,8 +7,8 @@ import { AbstractArtifactAdapter } from './abstract_artifact_adapter';
import { SolCompilerArtifactAdapter } from './sol_compiler_artifact_adapter';
export class TruffleArtifactAdapter extends AbstractArtifactAdapter {
- private _solcVersion: string;
- private _sourcesPath: string;
+ private readonly _solcVersion: string;
+ private readonly _sourcesPath: string;
constructor(sourcesPath: string, solcVersion: string) {
super();
this._solcVersion = solcVersion;
diff --git a/packages/sol-cov/src/ast_visitor.ts b/packages/sol-cov/src/ast_visitor.ts
index a6bca4704..e55cdf6ec 100644
--- a/packages/sol-cov/src/ast_visitor.ts
+++ b/packages/sol-cov/src/ast_visitor.ts
@@ -18,15 +18,15 @@ enum BranchType {
export class ASTVisitor {
private _entryId = 0;
- private _fnMap: FnMap = {};
- private _branchMap: BranchMap = {};
- private _modifiersStatementIds: number[] = [];
- private _statementMap: StatementMap = {};
- private _locationByOffset: LocationByOffset;
- private _ignoreRangesBeginningAt: number[];
+ private readonly _fnMap: FnMap = {};
+ private readonly _branchMap: BranchMap = {};
+ private readonly _modifiersStatementIds: number[] = [];
+ private readonly _statementMap: StatementMap = {};
+ private readonly _locationByOffset: LocationByOffset;
+ private readonly _ignoreRangesBeginningAt: number[];
// keep track of contract/function ranges that are to be ignored
// so we can also ignore any children nodes within the contract/function
- private _ignoreRangesWithin: Array<[number, number]> = [];
+ private readonly _ignoreRangesWithin: Array<[number, number]> = [];
constructor(locationByOffset: LocationByOffset, ignoreRangesBeginningAt: number[] = []) {
this._locationByOffset = locationByOffset;
this._ignoreRangesBeginningAt = ignoreRangesBeginningAt;
diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-cov/src/coverage_subprovider.ts
index 45843bc96..9667e891c 100644
--- a/packages/sol-cov/src/coverage_subprovider.ts
+++ b/packages/sol-cov/src/coverage_subprovider.ts
@@ -23,7 +23,7 @@ import { utils } from './utils';
* It's used to compute your code coverage while running solidity tests.
*/
export class CoverageSubprovider extends TraceInfoSubprovider {
- private _coverageCollector: TraceCollector;
+ private readonly _coverageCollector: TraceCollector;
/**
* Instantiates a CoverageSubprovider instance
* @param artifactAdapter Adapter for used artifacts format (0x, truffle, giveth, etc.)
diff --git a/packages/sol-cov/src/get_source_range_snippet.ts b/packages/sol-cov/src/get_source_range_snippet.ts
index 30d6ec802..bea17beae 100644
--- a/packages/sol-cov/src/get_source_range_snippet.ts
+++ b/packages/sol-cov/src/get_source_range_snippet.ts
@@ -38,7 +38,7 @@ export function getSourceRangeSnippet(sourceRange: SourceRange, sourceCode: stri
// A visitor which collects ASTInfo for most nodes in the AST.
class ASTInfoVisitor {
- private _astInfos: ASTInfo[] = [];
+ private readonly _astInfos: ASTInfo[] = [];
public getASTInfoForRange(sourceRange: SourceRange): ASTInfo | null {
// HACK(albrow): Sometimes the source range doesn't exactly match that
// of astInfo. To work around that we try with a +/-1 offset on
diff --git a/packages/sol-cov/src/profiler_subprovider.ts b/packages/sol-cov/src/profiler_subprovider.ts
index 9f98da524..ae9351f17 100644
--- a/packages/sol-cov/src/profiler_subprovider.ts
+++ b/packages/sol-cov/src/profiler_subprovider.ts
@@ -12,7 +12,7 @@ import { utils } from './utils';
* ProfilerSubprovider is used to profile Solidity code while running tests.
*/
export class ProfilerSubprovider extends TraceInfoSubprovider {
- private _profilerCollector: TraceCollector;
+ private readonly _profilerCollector: TraceCollector;
/**
* Instantiates a ProfilerSubprovider instance
* @param artifactAdapter Adapter for used artifacts format (0x, truffle, giveth, etc.)
diff --git a/packages/sol-cov/src/revert_trace_subprovider.ts b/packages/sol-cov/src/revert_trace_subprovider.ts
index fed305bd3..6ccf59653 100644
--- a/packages/sol-cov/src/revert_trace_subprovider.ts
+++ b/packages/sol-cov/src/revert_trace_subprovider.ts
@@ -18,8 +18,8 @@ import { utils } from './utils';
export class RevertTraceSubprovider extends TraceCollectionSubprovider {
// Lock is used to not accept normal transactions while doing call/snapshot magic because they'll be reverted later otherwise
private _contractsData!: ContractData[];
- private _artifactAdapter: AbstractArtifactAdapter;
- private _logger: Logger;
+ private readonly _artifactAdapter: AbstractArtifactAdapter;
+ private readonly _logger: Logger;
/**
* Instantiates a RevertTraceSubprovider instance
diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-cov/src/trace_collection_subprovider.ts
index 9866472b9..b530b59db 100644
--- a/packages/sol-cov/src/trace_collection_subprovider.ts
+++ b/packages/sol-cov/src/trace_collection_subprovider.ts
@@ -32,10 +32,10 @@ export interface TraceCollectionSubproviderConfig {
export abstract class TraceCollectionSubprovider extends Subprovider {
protected _web3Wrapper!: Web3Wrapper;
// Lock is used to not accept normal transactions while doing call/snapshot magic because they'll be reverted later otherwise
- private _lock = new Lock();
- private _defaultFromAddress: string;
+ private readonly _lock = new Lock();
+ private readonly _defaultFromAddress: string;
private _isEnabled = true;
- private _config: TraceCollectionSubproviderConfig;
+ private readonly _config: TraceCollectionSubproviderConfig;
/**
* Instantiates a TraceCollectionSubprovider instance
* @param defaultFromAddress default from address to use when sending transactions
diff --git a/packages/sol-cov/src/trace_collector.ts b/packages/sol-cov/src/trace_collector.ts
index 1b458edec..3e2ae3516 100644
--- a/packages/sol-cov/src/trace_collector.ts
+++ b/packages/sol-cov/src/trace_collector.ts
@@ -33,11 +33,11 @@ export type SingleFileSubtraceHandler = (
* TraceCollector is used by CoverageSubprovider to compute code coverage based on collected trace data.
*/
export class TraceCollector {
- private _artifactAdapter: AbstractArtifactAdapter;
- private _logger: Logger;
+ private readonly _artifactAdapter: AbstractArtifactAdapter;
+ private readonly _logger: Logger;
private _contractsData!: ContractData[];
- private _collector = new Collector();
- private _singleFileSubtraceHandler: SingleFileSubtraceHandler;
+ private readonly _collector = new Collector();
+ private readonly _singleFileSubtraceHandler: SingleFileSubtraceHandler;
/**
* Instantiates a TraceCollector instance