@waves/ride-js
Advanced tools
Comparing version 2.1.3-beta.1 to 2.1.4
{ | ||
"name": "@waves/ride-js", | ||
"version": "2.1.3-beta.1", | ||
"version": "2.1.4", | ||
"description": "Js compiler for Ride - Waves smart contract language.", | ||
@@ -9,3 +9,3 @@ "main": "src/index.js", | ||
"build": "./node_modules/.bin/webpack --config webpack.config.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "mocha", | ||
"prepublishOnly": "npm run build", | ||
@@ -12,0 +12,0 @@ "getNewCompiler": "sh scripts/getNewCompiler.sh" |
@@ -23,2 +23,2 @@ # Ride-js | ||
### Tasks | ||
* `npm run build` builds minified version that can be included as script tag. Add RideJS variable to global scope | ||
* `npm run build` builds minified version that can be included as script tag. Add RideJS variable to global scope |
@@ -1,2 +0,2 @@ | ||
export interface ICompilationResult { | ||
export interface ICompilationResult { | ||
result: { | ||
@@ -83,8 +83,19 @@ ast: object | ||
export function compile(code: string, estimatorVersion: number, needCompaction?: boolean, removeUnusedCode?: boolean, libraries?: Record<string, string>): ICompilationResult | ICompilationError; | ||
//todo разобраться в акой версии компилятора импорту рыботают | ||
export function compile( | ||
code: string, | ||
estimatorVersion?: number, | ||
needCompaction?: boolean, | ||
removeUnusedCode?: boolean, | ||
): ICompilationResult | ICompilationError; | ||
export function parseAndCompile( | ||
code: string, | ||
estimatorVersion?: number, | ||
needCompaction?: boolean, | ||
removeUnusedCode?: boolean, | ||
): IParseAndCompileResult | ICompilationError; | ||
export function flattenCompilationResult(compiled: ICompilationResult | ICompilationError): IFlattenedCompilationResult | ||
export function parseAndCompile(code: string, estimatorVersion: number, needCompaction?: boolean, removeUnusedCode?: boolean, libraries?: Record<string, string>): IParseAndCompileResult | ICompilationError; | ||
export function scriptInfo(code: string): IScriptInfo | ICompilationError; | ||
@@ -237,9 +248,5 @@ | ||
export type TArgument = { argName: IName, type: TArgumentType } | ||
export type TArgumentType = { typeName: IName, typeParam?: ITypeParam } | ||
export type TArgument = { argName: IName, typeList: TArgumentType[] } | ||
export type TArgumentType = { typeName: IName, typeParam?: any } | ||
export interface ITypeParam extends IPos { | ||
value: {isUnion: boolean, typeList: TArgumentType[]} | ||
} | ||
export interface IFunctionCall extends IExprNode { | ||
@@ -327,2 +334,2 @@ type: 'FUNCTION_CALL' | ||
| IMatch | ||
| IRef | ||
| IRef |
@@ -6,3 +6,3 @@ require('./interop'); | ||
function wrappedCompile(code, estimatorVersion = 3, needCompaction = false, removeUnusedCode = false, libraries = {}) { | ||
function wrappedCompile(code, estimatorVersion = 2, needCompaction, removeUnusedCode) { | ||
if (typeof code !== 'string') { | ||
@@ -14,3 +14,3 @@ return { | ||
try { | ||
const result = scalaJsCompiler.compile(code, estimatorVersion, needCompaction, removeUnusedCode, libraries); | ||
const result = scalaJsCompiler.compile(code, estimatorVersion, needCompaction, removeUnusedCode); | ||
if (result.error) { | ||
@@ -103,2 +103,2 @@ try { | ||
global.RideJS = api; | ||
module.exports = api; | ||
module.exports = api; |
Sorry, the diff of this file is too big to display
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
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
26339
0
6393143
23