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

gulp-tsb

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-tsb - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

26

lib/builder.js

@@ -25,3 +25,3 @@ 'use strict';

function createTypeScriptBuilder(config) {
var compilerOptions = createCompilerOptions(config), host = new LanguageServiceHost(compilerOptions), service = ts.createLanguageService(host, ts.createDocumentRegistry()), lastBuildVersion = Object.create(null), lastDtsHash = Object.create(null), userWantsDeclarations = compilerOptions.declaration, oldErrors = Object.create(null), headUsed = process.memoryUsage().heapUsed;
var compilerOptions = createCompilerOptions(config), host = new LanguageServiceHost(compilerOptions), service = ts.createLanguageService(host, ts.createDocumentRegistry()), lastBuildVersion = Object.create(null), lastDtsHash = Object.create(null), userWantsDeclarations = compilerOptions.declaration, oldErrors = Object.create(null), headUsed = process.memoryUsage().heapUsed, emitSourceMapsInStream = true;
// always emit declaraction files

@@ -54,2 +54,6 @@ host.getCompilationSettings().declaration = true;

function file(file) {
// support gulp-sourcemaps
if (file.sourceMap) {
emitSourceMapsInStream = false;
}
if (!file.contents) {

@@ -97,2 +101,5 @@ host.removeScriptSnapshot(file.path);

var file_1 = _a[_i];
if (!emitSourceMapsInStream && /\.js\.map$/.test(file_1.name)) {
continue;
}
if (/\.d\.ts$/.test(file_1.name)) {

@@ -107,7 +114,20 @@ signature = crypto.createHash('md5')

}
files.push(new Vinyl({
var vinyl = new Vinyl({
path: file_1.name,
contents: new Buffer(file_1.text),
base: !config._emitWithoutBasePath && baseFor(host.getScriptSnapshot(fileName))
}));
});
if (!emitSourceMapsInStream && /\.js$/.test(file_1.name)) {
var sourcemapFile = output.outputFiles.filter(function (f) { return /\.js\.map$/.test(f.name); })[0];
if (sourcemapFile) {
var extname = path.extname(vinyl.relative);
var basename = path.basename(vinyl.relative, extname);
var dirname = path.dirname(vinyl.relative);
var tsname = (dirname === '.' ? '' : dirname + '/') + basename + '.ts';
var sourceMap = JSON.parse(sourcemapFile.text);
sourceMap.sources[0] = tsname;
vinyl.sourceMap = sourceMap;
}
}
files.push(vinyl);
}

@@ -114,0 +134,0 @@ resolve({

2

package.json
{
"name": "gulp-tsb",
"version": "1.5.1",
"version": "1.5.2",
"author": "Johannes Rieken <johannes.rieken@gmail.com>",

@@ -5,0 +5,0 @@ "description": "A gulp plugin for very fast TypeScript compilation.",

Sorry, the diff of this file is not supported yet

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