solidity-extract-imports
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -13,5 +13,5 @@ 'use strict' | ||
{ '*': 3, '/': 4 }, | ||
{ '*': 5 }, | ||
{ '\n': 1 }, | ||
{ '*': 5 }, | ||
{ '/': 1, default: 4 }, | ||
{ '/': 1, default: 3 }, | ||
{ '"': 1, '\\': 7 }, | ||
@@ -18,0 +18,0 @@ { default: 6 }, |
{ | ||
"name": "solidity-extract-imports", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A simple tool to extract imports from Solidity source files", | ||
@@ -12,4 +12,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"mocha": "^5.2.0" | ||
"got": "^8.3.1", | ||
"mocha": "^5.2.0", | ||
"solidity-parser-antlr": "^0.2.11" | ||
} | ||
} |
26
test.js
@@ -122,2 +122,28 @@ 'use strict' | ||
}); | ||
it('handles line comments before the imports', function () { | ||
var test = ` | ||
// hello world | ||
import "./abc.sol" as x; | ||
` | ||
assert.deepEqual(extract(test), ['./abc.sol']) | ||
}) | ||
it('handles block comments before the imports', function () { | ||
var test = ` | ||
/* hello world */ | ||
import "./abc.sol" as x; | ||
` | ||
assert.deepEqual(extract(test), ['./abc.sol']) | ||
}) | ||
it('handles multi-line block comments before the imports', function () { | ||
var test = ` | ||
/* hello | ||
* world | ||
*/ | ||
import "./abc.sol" as x; | ||
` | ||
assert.deepEqual(extract(test), ['./abc.sol']) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10675
6
299
3
2