Skip to content

Commit f2b1e6b

Browse files
committed
Update release
1 parent 1ba4505 commit f2b1e6b

11 files changed

+62
-50
lines changed

release/compiler.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use strict";
2-
var path = require('path');
3-
var input_1 = require('./input');
4-
var host_1 = require('./host');
5-
var reporter_1 = require('./reporter');
6-
var utils = require('./utils');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var path = require("path");
4+
var input_1 = require("./input");
5+
var host_1 = require("./host");
6+
var reporter_1 = require("./reporter");
7+
var utils = require("./utils");
78
/**
89
* Compiles a whole project, with full type checking
910
*/

release/host.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
2-
var utils = require('./utils');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var utils = require("./utils");
34
var Host = (function () {
45
function Host(typescript, currentDirectory, input, options) {
56
var _this = this;

release/input.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
"use strict";
2-
var path = require('path');
3-
var utils = require('./utils');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var path = require("path");
4+
var utils = require("./utils");
5+
var FileChangeState;
46
(function (FileChangeState) {
57
FileChangeState[FileChangeState["New"] = 0] = "New";
68
FileChangeState[FileChangeState["Equal"] = 1] = "Equal";
79
FileChangeState[FileChangeState["Modified"] = 2] = "Modified";
810
FileChangeState[FileChangeState["Deleted"] = 3] = "Deleted";
911
FileChangeState[FileChangeState["NotFound"] = 4] = "NotFound";
10-
})(exports.FileChangeState || (exports.FileChangeState = {}));
11-
var FileChangeState = exports.FileChangeState;
12+
})(FileChangeState = exports.FileChangeState || (exports.FileChangeState = {}));
13+
var FileKind;
1214
(function (FileKind) {
1315
FileKind[FileKind["Source"] = 0] = "Source";
1416
FileKind[FileKind["Config"] = 1] = "Config";
15-
})(exports.FileKind || (exports.FileKind = {}));
16-
var FileKind = exports.FileKind;
17+
})(FileKind = exports.FileKind || (exports.FileKind = {}));
1718
var File;
1819
(function (File) {
1920
function fromContent(fileName, content) {

release/main.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as ts from 'typescript';
22
import * as _project from './project';
33
import * as _reporter from './reporter';
4-
declare function compile(): compile.CompileStream;
54
declare function compile(proj: _project.Project, theReporter?: _reporter.Reporter): compile.CompileStream;
65
declare function compile(settings: compile.Settings, theReporter?: _reporter.Reporter): compile.CompileStream;
6+
declare function compile(): compile.CompileStream;
77
declare module compile {
88
interface Settings {
99
out?: string;
@@ -42,8 +42,8 @@ declare module compile {
4242
type Project = _project.Project;
4343
type CompileStream = _project.ICompileStream;
4444
export import reporter = _reporter;
45-
function createProject(settings?: Settings): any;
46-
function createProject(tsConfigFileName: string, settings?: Settings): any;
45+
function createProject(tsConfigFileName: string, settings?: Settings): Project;
46+
function createProject(settings?: Settings): Project;
4747
function filter(...args: any[]): void;
4848
}
4949
export = compile;

release/main.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use strict";
2-
var fs = require('fs');
3-
var path = require('path');
4-
var _project = require('./project');
5-
var utils = require('./utils');
6-
var _reporter = require('./reporter');
2+
var fs = require("fs");
3+
var path = require("path");
4+
var _project = require("./project");
5+
var utils = require("./utils");
6+
var _reporter = require("./reporter");
77
function compile(param, theReporter) {
88
if (arguments.length >= 3) {
99
utils.deprecate("Reporter are now passed as the second argument", "remove the second argument", "Filters have been removed as of gulp-typescript 3.0.\nThe reporter is now passed as the second argument instead of the third argument.");
@@ -73,7 +73,6 @@ function getCompilerOptions(settings, projectPath, configFileName) {
7373
result.options.suppressOutputPathCheck = true;
7474
return result.options;
7575
}
76-
var compile;
7776
(function (compile) {
7877
compile.reporter = _reporter;
7978
function createProject(fileNameOrSettings, settings) {
@@ -118,7 +117,7 @@ var compile;
118117
function filter() {
119118
var args = [];
120119
for (var _i = 0; _i < arguments.length; _i++) {
121-
args[_i - 0] = arguments[_i];
120+
args[_i] = arguments[_i];
122121
}
123122
utils.deprecate('ts.filter() is deprecated', 'soon you can use tsProject.resolve()', 'Filters have been removed as of gulp-typescript 3.0.\nSoon tsProject.resolve() will be available as an alternative.\nSee https://github.com/ivogabe/gulp-typescript/issues/190.');
124123
}

release/output.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"use strict";
2-
var path = require('path');
3-
var sourceMap = require('source-map');
4-
var gutil = require('gulp-util');
5-
var utils = require('./utils');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var path = require("path");
4+
var sourceMap = require("source-map");
5+
var gutil = require("gulp-util");
6+
var utils = require("./utils");
67
var Output = (function () {
78
function Output(_project, streamFull, streamJs, streamDts) {
89
this.project = _project;

release/project.js

+27-20
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
"use strict";
2-
var __extends = (this && this.__extends) || function (d, b) {
3-
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
4-
function __() { this.constructor = d; }
5-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6-
};
7-
var stream = require('stream');
8-
var vfs = require('vinyl-fs');
9-
var path = require('path');
10-
var gutil = require('gulp-util');
11-
var utils = require('./utils');
12-
var reporter_1 = require('./reporter');
13-
var input_1 = require('./input');
14-
var output_1 = require('./output');
15-
var compiler_1 = require('./compiler');
2+
var __extends = (this && this.__extends) || (function () {
3+
var extendStatics = Object.setPrototypeOf ||
4+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6+
return function (d, b) {
7+
extendStatics(d, b);
8+
function __() { this.constructor = d; }
9+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10+
};
11+
})();
12+
Object.defineProperty(exports, "__esModule", { value: true });
13+
var stream = require("stream");
14+
var vfs = require("vinyl-fs");
15+
var path = require("path");
16+
var gutil = require("gulp-util");
17+
var utils = require("./utils");
18+
var reporter_1 = require("./reporter");
19+
var input_1 = require("./input");
20+
var output_1 = require("./output");
21+
var compiler_1 = require("./compiler");
1622
function setupProject(projectDirectory, config, options, typescript) {
1723
var input = new input_1.FileCache(typescript, options);
1824
var compiler = options.isolatedModules ? new compiler_1.FileCompiler() : new compiler_1.ProjectCompiler();
@@ -89,12 +95,13 @@ function src() {
8995
var CompileStream = (function (_super) {
9096
__extends(CompileStream, _super);
9197
function CompileStream(project) {
92-
_super.call(this, { objectMode: true });
93-
this.js = new CompileOutputStream();
94-
this.dts = new CompileOutputStream();
95-
this.project = project;
98+
var _this = _super.call(this, { objectMode: true }) || this;
99+
_this.js = new CompileOutputStream();
100+
_this.dts = new CompileOutputStream();
101+
_this.project = project;
96102
// Prevent "Unhandled stream error in pipe" when a compilation error occurs.
97-
this.on('error', function () { });
103+
_this.on('error', function () { });
104+
return _this;
98105
}
99106
CompileStream.prototype._write = function (file, encoding, cb) {
100107
if (cb === void 0) { cb = function (err) { }; }
@@ -130,7 +137,7 @@ var CompileStream = (function (_super) {
130137
var CompileOutputStream = (function (_super) {
131138
__extends(CompileOutputStream, _super);
132139
function CompileOutputStream() {
133-
_super.call(this, { objectMode: true });
140+
return _super.call(this, { objectMode: true }) || this;
134141
}
135142
CompileOutputStream.prototype._read = function () {
136143
};

release/reporter.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="node" />
21
import * as ts from 'typescript';
32
import { VinylFile } from './types';
43
export interface TypeScriptError extends Error {

release/reporter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
2-
var gutil = require('gulp-util');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var gutil = require("gulp-util");
34
function emptyCompilationResult() {
45
return {
56
transpileErrors: 0,

release/types.js

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

release/utils.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
2-
var path = require('path');
3-
var gutil = require('gulp-util');
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var path = require("path");
4+
var gutil = require("gulp-util");
45
function forwardSlashes(fileName) {
56
return fileName.replace(/\\/g, '/');
67
}

0 commit comments

Comments
 (0)