@waves/ride-js
Advanced tools
Comparing version 2.1.2 to 2.1.3-beta.1
{ | ||
"name": "@waves/ride-js", | ||
"version": "2.1.2", | ||
"version": "2.1.3-beta.1", | ||
"description": "Js compiler for Ride - Waves smart contract language.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -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,7 +83,7 @@ ast: object | ||
export function compile(code: string, estimatorVersion?: number): ICompilationResult | ICompilationError; | ||
export function compile(code: string, estimatorVersion: number, needCompaction?: boolean, removeUnusedCode?: boolean, libraries?: Record<string, string>): ICompilationResult | ICompilationError; | ||
export function flattenCompilationResult(compiled: ICompilationResult | ICompilationError): IFlattenedCompilationResult | ||
export function parseAndCompile(code: string, estimatorVersion?: number): IParseAndCompileResult | ICompilationError; | ||
export function parseAndCompile(code: string, estimatorVersion: number, needCompaction?: boolean, removeUnusedCode?: boolean, libraries?: Record<string, string>): IParseAndCompileResult | ICompilationError; | ||
@@ -237,5 +237,9 @@ export function scriptInfo(code: string): IScriptInfo | ICompilationError; | ||
export type TArgument = { argName: IName, typeList: TArgumentType[] } | ||
export type TArgumentType = { typeName: IName, typeParam?: any } | ||
export type TArgument = { argName: IName, type: TArgumentType } | ||
export type TArgumentType = { typeName: IName, typeParam?: ITypeParam } | ||
export interface ITypeParam extends IPos { | ||
value: {isUnion: boolean, typeList: TArgumentType[]} | ||
} | ||
export interface IFunctionCall extends IExprNode { | ||
@@ -323,2 +327,2 @@ type: 'FUNCTION_CALL' | ||
| IMatch | ||
| IRef | ||
| IRef |
@@ -6,3 +6,3 @@ require('./interop'); | ||
function wrappedCompile(code, estimatorVersion = 2) { | ||
function wrappedCompile(code, estimatorVersion = 3, needCompaction = false, removeUnusedCode = false, libraries = {}) { | ||
if (typeof code !== 'string') { | ||
@@ -14,3 +14,3 @@ return { | ||
try { | ||
const result = scalaJsCompiler.compile(code, estimatorVersion); | ||
const result = scalaJsCompiler.compile(code, estimatorVersion, needCompaction, removeUnusedCode, libraries); | ||
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6393274
26333
24
2