Comparing version 2.0.2 to 2.0.3
@@ -354,6 +354,6 @@ 'use strict'; | ||
var result = []; | ||
var defaultLibFileName = this.getDefaultLibFileName(this.getCompilationSettings()); | ||
var libLocation = this.getDefaultLibLocation(); | ||
for (var fileName in this._snapshots) { | ||
if (/\.tsx?/i.test(path.extname(fileName)) | ||
&& fileName !== defaultLibFileName) { | ||
&& normalize(path.dirname(fileName)) !== libLocation) { | ||
// only ts-files and not lib.d.ts-like files | ||
@@ -433,5 +433,8 @@ result.push(fileName); | ||
LanguageServiceHost.prototype.getDefaultLibFileName = function (options) { | ||
var libFile = options.target < ts.ScriptTarget.ES6 ? 'lib.d.ts' : 'lib.es6.d.ts'; | ||
return require.resolve("typescript/lib/" + libFile); | ||
return normalize(path.join(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options))); | ||
}; | ||
LanguageServiceHost.prototype.getDefaultLibLocation = function () { | ||
var typescriptInstall = require.resolve('typescript'); | ||
return normalize(path.dirname(typescriptInstall)); | ||
}; | ||
// ---- dependency management | ||
@@ -438,0 +441,0 @@ LanguageServiceHost.prototype.collectDependents = function (filename, target) { |
@@ -0,0 +0,0 @@ /// <reference path="../node_modules/typescript/lib/lib.es6.d.ts"/> |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
{ | ||
"name": "gulp-tsb", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"author": "Johannes Rieken <johannes.rieken@gmail.com>", | ||
@@ -31,7 +31,13 @@ "description": "A gulp plugin for very fast TypeScript compilation.", | ||
"mocha": "*", | ||
"typescript": "^2.0.3" | ||
"typescript": "^2.0.3", | ||
"@types/node": "*", | ||
"@types/chalk": "*", | ||
"@types/gulp-util": "*", | ||
"@types/mocha": "*", | ||
"@types/through": "*", | ||
"@types/vinyl": "*" | ||
}, | ||
"peerDependencies": { | ||
"typescript": "^2.0.3" | ||
"typescript": "^2.0.10" | ||
} | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
35754
746
2
9