@waiting/shared-types-dev
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 2.4.0 | ||
* @version 2.5.0 | ||
* @author waiting | ||
@@ -17,4 +17,4 @@ * @license MIT | ||
var tsMorph = require('ts-morph'); | ||
var sharedCore = require('@waiting/shared-core'); | ||
var ts = require('typescript'); | ||
var sharedCore = require('@waiting/shared-core'); | ||
var sourceMapSupport = require('source-map-support'); | ||
@@ -33,4 +33,4 @@ | ||
// incremental: true, | ||
module: ts__default['default'].ModuleKind.ES2015, | ||
moduleResolution: ts__default['default'].ModuleResolutionKind.NodeJs, | ||
module: tsMorph.ts.ModuleKind.ES2015, | ||
moduleResolution: tsMorph.ts.ModuleResolutionKind.NodeJs, | ||
newLine: 1, | ||
@@ -44,3 +44,3 @@ noUnusedLocals: false, | ||
strict: true, | ||
target: ts__default['default'].ScriptTarget.ESNext, | ||
target: 99, | ||
lib: ['lib.esnext.full.d.ts'], | ||
@@ -173,3 +173,7 @@ }; | ||
const file = options.sourceFile; | ||
const expressions = file.getDescendantsOfKind(ts__default['default'].SyntaxKind.CallExpression); | ||
let expressions = file.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression); | ||
if (expressions.length === 0) { | ||
// ts.SyntaxKind.CallExpression may 203 or 204.... | ||
expressions = file.getDescendantsOfKind(203); | ||
} | ||
const ret = expressions.find((node) => { | ||
@@ -198,3 +202,3 @@ const start = node.getStart(); | ||
} | ||
const pNode = express.getParentIfKind(ts__default['default'].SyntaxKind.VariableDeclaration); | ||
const pNode = express.getParentIfKind(tsMorph.ts.SyntaxKind.VariableDeclaration); | ||
if (pNode) { | ||
@@ -812,3 +816,3 @@ const varname = pNode.getName(); | ||
} | ||
const [funcId] = express.getDescendantsOfKind(ts__default['default'].SyntaxKind.Identifier); | ||
const [funcId] = express.getDescendantsOfKind(tsMorph.SyntaxKind.Identifier); | ||
if (!funcId) { | ||
@@ -815,0 +819,0 @@ throw new Error('Retrieve function identifier failed. You should pass parameter needle'); |
/* eslint-disable max-len */ | ||
import { SyntaxKind } from 'ts-morph'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
@@ -98,3 +99,3 @@ import ts from 'typescript'; | ||
} | ||
const [funcId] = express.getDescendantsOfKind(ts.SyntaxKind.Identifier); | ||
const [funcId] = express.getDescendantsOfKind(SyntaxKind.Identifier); | ||
if (!funcId) { | ||
@@ -101,0 +102,0 @@ throw new Error('Retrieve function identifier failed. You should pass parameter needle'); |
@@ -1,3 +0,2 @@ | ||
import { SourceFile, Node, CallExpression, TypeNode, ProjectOptions, Type } from 'ts-morph'; | ||
import ts from 'typescript'; | ||
import { SourceFile, Node, CallExpression, TypeNode, ProjectOptions, Type, ts } from 'ts-morph'; | ||
import { CallerInfo } from '../callstack/index'; | ||
@@ -4,0 +3,0 @@ export declare function createSourceFile(sourcePath: string, options?: ProjectOptions): SourceFile; |
@@ -1,4 +0,2 @@ | ||
import { Project, SyntaxKind, } from 'ts-morph'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import ts from 'typescript'; | ||
import { Project, SyntaxKind, ts, } from 'ts-morph'; | ||
export function createSourceFile(sourcePath, options) { | ||
@@ -21,3 +19,3 @@ const defaultCompilerOptions = { | ||
strict: true, | ||
target: ts.ScriptTarget.ESNext, | ||
target: 99, | ||
lib: ['lib.esnext.full.d.ts'], | ||
@@ -151,3 +149,7 @@ }; | ||
const file = options.sourceFile; | ||
const expressions = file.getDescendantsOfKind(ts.SyntaxKind.CallExpression); | ||
let expressions = file.getDescendantsOfKind(SyntaxKind.CallExpression); | ||
if (expressions.length === 0) { | ||
// ts.SyntaxKind.CallExpression may 203 or 204.... | ||
expressions = file.getDescendantsOfKind(203); | ||
} | ||
const ret = expressions.find((node) => { | ||
@@ -154,0 +156,0 @@ const start = node.getStart(); |
{ | ||
"name": "@waiting/shared-types-dev", | ||
"author": "waiting", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "shared typescript types devel", | ||
@@ -29,4 +29,4 @@ "private": false, | ||
"@types/source-map-support": "*", | ||
"@waiting/shared-core": "9", | ||
"@waiting/shared-types": "9", | ||
"@waiting/shared-core": "10", | ||
"@waiting/shared-types": "10", | ||
"rxjs": "7", | ||
@@ -96,3 +96,3 @@ "source-map-support": "*", | ||
}, | ||
"gitHead": "96fab4e1ca2674dea4052a083eb97df530d99be7" | ||
"gitHead": "e6b561436baef41b531644af08f614f1da2392f2" | ||
} |
/* eslint-disable max-len */ | ||
import { SyntaxKind } from 'ts-morph' | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
@@ -160,3 +161,3 @@ import ts from 'typescript' | ||
} | ||
const [funcId] = express.getDescendantsOfKind(ts.SyntaxKind.Identifier) | ||
const [funcId] = express.getDescendantsOfKind(SyntaxKind.Identifier) | ||
if (! funcId) { | ||
@@ -163,0 +164,0 @@ throw new Error('Retrieve function identifier failed. You should pass parameter needle') |
@@ -10,5 +10,6 @@ import { | ||
Type, | ||
ts, | ||
} from 'ts-morph' | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import ts from 'typescript' | ||
// import ts from 'typescript' | ||
@@ -39,3 +40,3 @@ import { CallerInfo } from '../callstack/index' | ||
strict: true, | ||
target: ts.ScriptTarget.ESNext, | ||
target: 99, | ||
lib: ['lib.esnext.full.d.ts'], | ||
@@ -247,3 +248,7 @@ } | ||
const file = options.sourceFile | ||
const expressions = file.getDescendantsOfKind(ts.SyntaxKind.CallExpression) | ||
let expressions = file.getDescendantsOfKind(SyntaxKind.CallExpression) | ||
if (expressions.length === 0) { | ||
// ts.SyntaxKind.CallExpression may 203 or 204.... | ||
expressions = file.getDescendantsOfKind(203) | ||
} | ||
const ret = expressions.find((node) => { | ||
@@ -250,0 +255,0 @@ const start = node.getStart() |
Sorry, the diff of this file is not supported yet
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
140712
103
3125
+ Added@waiting/shared-core@10.1.0(transitive)
+ Added@waiting/shared-types@10.1.0(transitive)
+ Addedtypescript@4.2.4(transitive)
- Removed@waiting/shared-core@9.2.0(transitive)
- Removed@waiting/shared-types@9.2.0(transitive)
Updated@waiting/shared-core@10
Updated@waiting/shared-types@10