Browse Source

Dependencies update

sanex3339 7 years ago
parent
commit
e10c83af97
4 changed files with 28 additions and 27 deletions
  1. 0 0
      dist/index.js
  2. 2 2
      package.json
  3. 20 19
      src/node/NodeAppender.ts
  4. 6 6
      yarn.lock

File diff suppressed because it is too large
+ 0 - 0
dist/index.js


+ 2 - 2
package.json

@@ -37,7 +37,7 @@
     "tslib": "1.8.1"
     "tslib": "1.8.1"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@types/chai": "4.0.10",
+    "@types/chai": "4.1.0",
     "@types/chance": "0.7.36",
     "@types/chance": "0.7.36",
     "@types/commander": "2.12.2",
     "@types/commander": "2.12.2",
     "@types/escodegen": "0.0.6",
     "@types/escodegen": "0.0.6",
@@ -47,7 +47,7 @@
     "@types/md5": "2.1.32",
     "@types/md5": "2.1.32",
     "@types/mkdirp": "0.5.2",
     "@types/mkdirp": "0.5.2",
     "@types/mocha": "2.2.46",
     "@types/mocha": "2.2.46",
-    "@types/node": "8.5.5",
+    "@types/node": "8.5.7",
     "@types/rimraf": "^2.0.2",
     "@types/rimraf": "^2.0.2",
     "@types/sinon": "4.1.2",
     "@types/sinon": "4.1.2",
     "@types/string-template": "1.0.2",
     "@types/string-template": "1.0.2",

+ 20 - 19
src/node/NodeAppender.ts

@@ -7,23 +7,6 @@ import { IStackTraceData } from '../interfaces/analyzers/stack-trace-analyzer/IS
 import { TNodeWithScope } from '../types/node/TNodeWithScope';
 import { TNodeWithScope } from '../types/node/TNodeWithScope';
 import { NodeGuards } from './NodeGuards';
 import { NodeGuards } from './NodeGuards';
 
 
-/**
- * This class appends node into a first deepest BlockStatement in order of function calls
- *
- * For example:
- *
- * function Foo () {
- *     var baz = function () {
- *
- *     }
- *
- *     baz();
- * }
- *
- * foo();
- *
- * Appends node into block statement of `baz` function expression.
- */
 export class NodeAppender {
 export class NodeAppender {
     /**
     /**
      * @param {TNodeWithScope} scopeNode
      * @param {TNodeWithScope} scopeNode
@@ -43,6 +26,22 @@ export class NodeAppender {
     }
     }
 
 
     /**
     /**
+     * Appends node into a first deepest BlockStatement in order of function calls
+     *
+     * For example:
+     *
+     * function Foo () {
+     *     var baz = function () {
+     *
+     *     }
+     *
+     *     baz();
+     * }
+     *
+     * foo();
+     *
+     * Appends node into block statement of `baz` function expression
+     *
      * @param {IStackTraceData[]} blockScopeStackTraceData
      * @param {IStackTraceData[]} blockScopeStackTraceData
      * @param {TNodeWithBlockScope} blockScopeNode
      * @param {TNodeWithBlockScope} blockScopeNode
      * @param {TStatement[]} nodeBodyStatements
      * @param {TStatement[]} nodeBodyStatements
@@ -175,9 +174,11 @@ export class NodeAppender {
     private static setScopeNodeStatements (scopeNode: TNodeWithScope, statements: TStatement[]): void {
     private static setScopeNodeStatements (scopeNode: TNodeWithScope, statements: TStatement[]): void {
         if (NodeGuards.isSwitchCaseNode(scopeNode)) {
         if (NodeGuards.isSwitchCaseNode(scopeNode)) {
             scopeNode.consequent = <ESTree.Statement[]>statements;
             scopeNode.consequent = <ESTree.Statement[]>statements;
-        } else {
-            scopeNode.body = statements;
+
+            return;
         }
         }
+
+        scopeNode.body = statements;
     }
     }
 
 
     /**
     /**

+ 6 - 6
yarn.lock

@@ -2,9 +2,9 @@
 # yarn lockfile v1
 # yarn lockfile v1
 
 
 
 
-"@types/chai@4.0.10":
-  version "4.0.10"
-  resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.10.tgz#0eb222c7353adde8e0980bea04165d4d3b6afef3"
+"@types/chai@4.1.0":
+  version "4.1.0"
+  resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.0.tgz#d9008fa4c06f6801f93396d121f0227cd4244ac6"
 
 
 "@types/[email protected]":
 "@types/[email protected]":
   version "0.7.36"
   version "0.7.36"
@@ -72,9 +72,9 @@
   version "8.0.53"
   version "8.0.53"
   resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.53.tgz#396b35af826fa66aad472c8cb7b8d5e277f4e6d8"
   resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.53.tgz#396b35af826fa66aad472c8cb7b8d5e277f4e6d8"
 
 
-"@types/[email protected].5":
-  version "8.5.5"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.5.tgz#6f9e8164ae1a55a9beb1d2571cfb7acf9d720c61"
+"@types/[email protected].7":
+  version "8.5.7"
+  resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.7.tgz#9c498c35af354dcfbca3790fb2e81129e93cf0e2"
 
 
 "@types/rimraf@^2.0.2":
 "@types/rimraf@^2.0.2":
   version "2.0.2"
   version "2.0.2"

Some files were not shown because too many files changed in this diff