Explorar el Código

Remove BigNumber.js and bluebird

Lucas de Souza hace 6 años
padre
commit
44ed758cc7

+ 4 - 5
js/processor/ivprogProcessor.js

@@ -1,4 +1,3 @@
-import * as Promise from 'bluebird'
 import { Store } from './store/store';
 import { StoreObject } from './store/storeObject';
 import { StoreObjectArray } from './store/storeObjectArray';
@@ -222,7 +221,7 @@ export class IVProgProcessor {
   }
 
   executeFunctionCall (store, cmd) {
-    return new Promise.Promise((resolve, reject) => {
+    return new Promise((resolve, reject) => {
       const func = this.findFunction(cmd.id);
       this.runFunction(func, cmd.actualParameters, store)
         .then(sto => {
@@ -306,7 +305,7 @@ export class IVProgProcessor {
 
   executeDoWhile (store, cmd) {
     const outerRef = this;
-    return new Promise.Promise((resolve, reject) => {
+    return new Promise((resolve, reject) => {
       try {
         outerRef.loopTimers.push(Date.now());
         outerRef.context.push(Context.BREAKABLE);
@@ -352,7 +351,7 @@ export class IVProgProcessor {
 
   executeWhile (store, cmd) {
     const outerRef = this;
-    return new Promise.Promise((resolve, reject) => {
+    return new Promise((resolve, reject) => {
       try {
         outerRef.loopTimers.push(Date.now());
         outerRef.context.push(Context.BREAKABLE);
@@ -474,7 +473,7 @@ export class IVProgProcessor {
   }
 
   executeArrayIndexAssign (store, cmd) {
-    return new Promise.Promise((resolve, reject) => {
+    return new Promise((resolve, reject) => {
       const mustBeArray = store.applyStore(cmd.id);
       if(!(mustBeArray.type instanceof CompoundType)) {
         reject(new Error(cmd.id + " is not a vector/matrix"));

+ 0 - 1
js/processor/lib/arrays.js

@@ -1,4 +1,3 @@
-import * as Promise from 'bluebird';
 import { StoreObject } from '../store/storeObject';
 import * as Commands from './../../ast/commands';
 import { Types } from './../../typeSystem/types';

+ 0 - 1
js/processor/lib/lang.js

@@ -1,4 +1,3 @@
-import * as Promise from 'bluebird';
 import { StoreObject } from '../store/storeObject';
 import * as Commands from './../../ast/commands';
 import { Types } from './../../typeSystem/types';

+ 0 - 1
js/processor/lib/math.js

@@ -1,4 +1,3 @@
-import * as Promise from 'bluebird';
 import { StoreObject } from '../store/storeObject';
 import * as Commands from './../../ast/commands';
 import { Types } from './../../typeSystem/types';

+ 0 - 1
js/processor/lib/strings.js

@@ -1,4 +1,3 @@
-import * as Promise from 'bluebird';
 import { StoreObject } from '../store/storeObject';
 import * as Commands from './../../ast/commands';
 import { Types } from './../../typeSystem/types';

+ 2 - 6
package-lock.json

@@ -1401,11 +1401,6 @@
       "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
       "dev": true
     },
-    "bignumber.js": {
-      "version": "7.2.1",
-      "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz",
-      "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ=="
-    },
     "binary-extensions": {
       "version": "1.11.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
@@ -1421,7 +1416,8 @@
     "bluebird": {
       "version": "3.5.2",
       "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
-      "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg=="
+      "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==",
+      "dev": true
     },
     "bn.js": {
       "version": "4.11.8",

+ 0 - 2
package.json

@@ -46,8 +46,6 @@
   },
   "dependencies": {
     "antlr4": "^4.7.1",
-    "bignumber.js": "^7.2.1",
-    "bluebird": "^3.5.2",
     "decimal.js": "^10.0.1",
     "jquery": "^3.3.1",
     "line-i18n": "git+https://git.lcalion.com/LInE/line-i18n.git"