Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@waves/ride-js

Package Overview
Dependencies
Maintainers
15
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/ride-js - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2-beta.1

14

package.json
{
"name": "@waves/ride-js",
"version": "2.2.1",
"description": "Js compiler v1.4.6 for Ride - Waves smart contract language.",
"version": "2.2.2-beta.1",
"description": "Js compiler for Ride - Waves smart contract language.",
"main": "src/index.js",

@@ -9,3 +9,3 @@ "typings": "src/index.d.ts",

"build": "./node_modules/.bin/webpack --config webpack.config.js",
"test": "jest",
"test": "echo \"Error: no test specified\" && exit 1",
"prepublishOnly": "npm run build",

@@ -37,11 +37,6 @@ "getNewCompiler": "sh scripts/getNewCompiler.sh"

"devDependencies": {
"@types/jest": "^23.3.14",
"chai": "^4.2.0",
"copy-webpack-plugin": "^4.5.2",
"ts-jest": "^24.0.2",
"jest": "^24.0.2",
"ts-node": "^7.0.1",
"typed-ts-events": "^1.1.1",
"mocha": "^5.2.0",
"webpack": "^4.16.0",
"typescript": "^3.7.2",
"webpack-cli": "^3.0.8",

@@ -51,3 +46,2 @@ "webpack-closure-compiler": "^2.1.6"

"dependencies": {
"@jest/globals": "^27.5.1",
"@waves/ts-lib-crypto": "^1.4.3",

@@ -54,0 +48,0 @@ "axios": "^0.19.0"

@@ -11,14 +11,6 @@ # Ride-js

sbt langJS/fullOptJS
sbt replJS/fullOptJS
```
* From `waves` project copy ```./lang/js/target/lang-opt.js``` to ```./src``` of `ride-js`
* From `waves` project copy ```./repl/js/target/repl-opt.js``` to ```./src``` of `ride-js`
# Workaround
If there is error with compiling try
```sbt
sbt clean && sbt lang/clean
```
### 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

@@ -11,3 +11,2 @@ export interface ICompilationResult {

userFunctionsComplexity?: Record<string, number>
stateCallsComplexities?: Record<string, number>
}

@@ -68,3 +67,3 @@ }

contentType: number,
scriptType: number,
scriptType: number
imports: string[]

@@ -85,20 +84,8 @@ }

export function compile(
code: string,
estimatorVersion?: number,
needCompaction?: boolean,
removeUnusedCode?: boolean,
libraries?: Record<string, string>
): ICompilationResult | ICompilationError;
export function compile(code: string, estimatorVersion?: number, libraries?: Record<string, string>): ICompilationResult | ICompilationError;
export function parseAndCompile(
code: string,
estimatorVersion?: number,
needCompaction?: boolean,
removeUnusedCode?: boolean,
libraries?: Record<string, string>
): IParseAndCompileResult | ICompilationError;
export function flattenCompilationResult(compiled: ICompilationResult | ICompilationError): IFlattenedCompilationResult
export function parseAndCompile(code: string, estimatorVersion?: number, lastInsertedCharPos?: number | undefined): IParseAndCompileResult | ICompilationError;
export function scriptInfo(code: string): IScriptInfo | ICompilationError;

@@ -227,3 +214,3 @@

decList: (ILet | IFunc)[]
annFuncList: IAnnotatedFunc//todo fix
annFuncList: IAnnotatedFunc[]
}

@@ -239,4 +226,2 @@

type: 'ANNOTATION',
posStart: 80,
posEnd: 143,
name: IName,

@@ -250,8 +235,13 @@ argList: IName[]

expr: TExpr
argList: TArgument[],
argList: TArgument[]
body: IBlock | IFunctionCall
}
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 {

@@ -258,0 +248,0 @@ type: 'FUNCTION_CALL'

require('./interop');
const crypto = require('@waves/ts-lib-crypto');
const scalaJsCompiler = require('./lang-opt.js');
const replJs = require('./repl-opt.js');
function wrappedCompile(code, estimatorVersion = 3, needCompaction = false, removeUnusedCode = false, libraries = {}) {
function wrappedCompile(code, estimatorVersion = 2) {
if (typeof code !== 'string') {

@@ -13,3 +12,3 @@ return {

try {
const result = scalaJsCompiler.compile(code, estimatorVersion, needCompaction, removeUnusedCode, libraries);
const result = scalaJsCompiler.compile(code, estimatorVersion);
if (result.error) {

@@ -23,3 +22,10 @@ try {

const bytes = new Uint8Array(result.result);
const {ast, complexity, verifierComplexity, callableComplexities, userFunctionComplexities, globalVariableComplexities, stateCallsComplexities} = result;
const {
ast,
complexity,
verifierComplexity,
callableComplexities,
userFunctionComplexities,
globalVariableComplexities
} = result;
return {

@@ -35,4 +41,3 @@ result: {

userFunctionComplexities,
globalVariableComplexities,
stateCallsComplexities
globalVariableComplexities
}

@@ -51,4 +56,4 @@ }

const repl = (opts != null)
? replJs.repl(new replJs.NodeConnectionSettings(opts.nodeUrl, opts.chainId.charCodeAt(0), opts.address))
: replJs.repl();
? scalaJsCompiler.repl(new scalaJsCompiler.NodeConnectionSettings(opts.nodeUrl, opts.chainId.charCodeAt(0), opts.address))
: scalaJsCompiler.repl();

@@ -58,3 +63,3 @@ const wrapReconfigure = (repl) => {

return (opts) => {
const settings = new replJs.NodeConnectionSettings(opts.nodeUrl, opts.chainId.charCodeAt(0), opts.address);
const settings = new scalaJsCompiler.NodeConnectionSettings(opts.nodeUrl, opts.chainId.charCodeAt(0), opts.address);
const newRepl = reconfigureFn(settings);

@@ -61,0 +66,0 @@ newRepl.reconfigure = wrapReconfigure(newRepl);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc