diff --git a/.gitmodules b/.gitmodules index 34fb8eee..975a4e5a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,3 +15,7 @@ path = typescript/2.7 url = https://github.com/Microsoft/TypeScript.git branch = release-2.7 +[submodule "typescript/3.4"] + path = typescript/3.4 + url = https://github.com/Microsoft/TypeScript + branch = release-3.4 diff --git a/gulpfile.js b/gulpfile.js index 7d2dec18..ee9cb669 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,7 +13,8 @@ const tsVersions = { dev: './typescript/dev', release23: './typescript/2.3', release27: './typescript/2.7', - release29: './typescript/2.9' + release29: './typescript/2.9', + release34: './typescript/3.4' }; function findTSDefinition(location) { @@ -96,6 +97,7 @@ const libs = [ ['2.7', require(tsVersions.release27)], ['2.3', require(tsVersions.release23)], ['2.9', require(tsVersions.release29)], + ['3.4', require(tsVersions.release34)], ['dev', require(tsVersions.dev)] ]; @@ -156,7 +158,7 @@ async function runExecTest(testName) { const testDir = path.posix.join('test', testName); return new Promise((resolve, reject) => { - childProcess.execFile("gulp", { + childProcess.exec("gulp", { cwd: testDir, }, (err) => { if (err) { diff --git a/lib/compiler.ts b/lib/compiler.ts index feab0f7f..fea01284 100644 --- a/lib/compiler.ts +++ b/lib/compiler.ts @@ -24,6 +24,8 @@ interface OutputFile { jsMapContent?: string; dtsContent?: string; dtsMapContent?: string; + buildinfoFileName?: string; + buildinfoContent?: string; } /** @@ -169,6 +171,10 @@ export class ProjectCompiler implements ICompiler { case 'map': file.jsMapContent = content; break; + case 'tsbuildinfo': + file.buildinfoFileName = fileName; + file.buildinfoContent = content; + break; } } private emit(result: CompilationResult, preEmitDiagnostics: ReadonlyArray, callback: ts.WriteFileCallback) { @@ -193,7 +199,7 @@ export class ProjectCompiler implements ICompiler { this.project.output.diagnostic(error); } } - private emitFile({ file, jsFileName, dtsFileName, dtsMapFileName, jsContent, dtsContent, dtsMapContent, jsMapContent }: OutputFile, currentDirectory: string) { + private emitFile({ file, jsFileName, dtsFileName, dtsMapFileName, jsContent, dtsContent, dtsMapContent, jsMapContent, buildinfoFileName, buildinfoContent }: OutputFile, currentDirectory: string) { if (!jsFileName) return; let base: string; @@ -233,6 +239,10 @@ export class ProjectCompiler implements ICompiler { } this.project.output.writeDts(baseDeclarations, dtsFileName, dtsContent, dtsMapContent, file ? file.gulp.cwd : currentDirectory, file); } + if (buildinfoContent !== undefined) { + this.project.output.writeBuildInfo(base, buildinfoFileName, buildinfoContent, file ? file.gulp.cwd : currentDirectory); + } + } private removeSourceMapComment(content: string): string { diff --git a/lib/output.ts b/lib/output.ts index b3b9e6fa..abbd20ad 100644 --- a/lib/output.ts +++ b/lib/output.ts @@ -9,21 +9,24 @@ import * as reporter from './reporter'; import * as project from './project'; export class Output { - constructor(_project: project.ProjectInfo, streamFull: stream.Readable, streamJs: stream.Readable, streamDts: stream.Readable) { + constructor(_project: project.ProjectInfo, streamFull: stream.Readable, streamJs: stream.Readable, streamDts: stream.Readable, streamBuildInfo: stream.Readable) { this.project = _project; this.streamFull = streamFull; this.streamJs = streamJs; this.streamDts = streamDts; + this.streamBuildInfo = streamBuildInfo; } project: project.ProjectInfo; result: reporter.CompilationResult; - // .js and .d.ts files + // .js and .d.ts and .tsbuildinfo files streamFull: stream.Readable; // .js files streamJs: stream.Readable; // .d.ts files streamDts: stream.Readable; + // .tsbuildinfo files + streamBuildInfo: stream.Readable; // Number of pending IO operatrions private pendingIO = 0; @@ -76,6 +79,18 @@ export class Output { }); } + writeBuildInfo(base: string, fileName: string, content: string, cwd: string) { + const file = new VinylFile({ + path: fileName, + contents: Buffer.from(content), + cwd, + base + }); + + this.streamFull.push(file); + this.streamBuildInfo.push(file); + } + private async applySourceMap(sourceMapContent: string, original: input.File, output: VinylFile) { if (sourceMapContent === undefined) return undefined; diff --git a/lib/project.ts b/lib/project.ts index a9674a51..5d87b5d0 100644 --- a/lib/project.ts +++ b/lib/project.ts @@ -72,7 +72,7 @@ export function setupProject(projectDirectory: string, configFileName: string, r compiler.prepare(projectInfo, finalTransformers); const stream = new CompileStream(projectInfo); - projectInfo.output = new Output(projectInfo, stream, stream.js, stream.dts); + projectInfo.output = new Output(projectInfo, stream, stream.js, stream.dts, stream.buildInfo); projectInfo.reporter = reporter || defaultReporter(); stream.on('finish', () => { @@ -143,6 +143,7 @@ function src(this: Project) { export interface ICompileStream extends NodeJS.ReadWriteStream { js: stream.Readable; dts: stream.Readable; + buildInfo: stream.Readable; } class CompileStream extends stream.Duplex implements ICompileStream { constructor(project: ProjectInfo) { @@ -188,6 +189,7 @@ class CompileStream extends stream.Duplex implements ICompileStream { js: stream.Readable = new CompileOutputStream(); dts: stream.Readable = new CompileOutputStream(); + buildInfo: stream.Readable = new CompileOutputStream(); } class CompileOutputStream extends stream.Readable { constructor() { diff --git a/package-lock.json b/package-lock.json index 1afb96fb..6f26fdc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gulp-typescript", - "version": "5.0.0-alpha.3", + "version": "5.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -809,6 +809,12 @@ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, + "compare-versions": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", + "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "dev": true + }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -1617,7 +1623,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1638,12 +1645,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1658,17 +1667,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1785,7 +1797,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1797,6 +1810,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1811,6 +1825,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1818,12 +1833,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -1842,6 +1859,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1922,7 +1940,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1934,6 +1953,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2019,7 +2039,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2055,6 +2076,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2074,6 +2096,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2117,12 +2140,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 72702b61..b3697fb7 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "@types/through2": "2.0.33", "@types/vinyl": "2.0.2", "@types/vinyl-fs": "2.4.9", + "compare-versions": "^3.5.1", "gulp": "^4.0.0", "gulp-concat": "^2.6.1", "gulp-diff": "^1.0.0", diff --git a/test/baselines/base/3.4/errors.txt b/test/baselines/base/3.4/errors.txt new file mode 100644 index 00000000..4c350d69 --- /dev/null +++ b/test/baselines/base/3.4/errors.txt @@ -0,0 +1,18 @@ +TypeScript error: error TS2318: Cannot find global type 'Array'. +TypeScript error: error TS2318: Cannot find global type 'Boolean'. +TypeScript error: error TS2318: Cannot find global type 'Function'. +TypeScript error: error TS2318: Cannot find global type 'IArguments'. +TypeScript error: error TS2318: Cannot find global type 'Number'. +TypeScript error: error TS2318: Cannot find global type 'Object'. +TypeScript error: error TS2318: Cannot find global type 'RegExp'. +TypeScript error: error TS2318: Cannot find global type 'String'. +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 8, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/base/3.4/js/a.js b/test/baselines/base/3.4/js/a.js new file mode 100644 index 00000000..dc8896ed --- /dev/null +++ b/test/baselines/base/3.4/js/a.js @@ -0,0 +1 @@ +var x = {}; diff --git a/test/baselines/basic/3.4/dts/other-3.d.ts b/test/baselines/basic/3.4/dts/other-3.d.ts new file mode 100644 index 00000000..b3a0b19d --- /dev/null +++ b/test/baselines/basic/3.4/dts/other-3.d.ts @@ -0,0 +1,3 @@ +export declare class Hello { + value: string; +} diff --git a/test/baselines/basic/3.4/dts/test-3.d.ts b/test/baselines/basic/3.4/dts/test-3.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test/baselines/basic/3.4/dts/test-3.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/baselines/basic/3.4/errors.txt b/test/baselines/basic/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/basic/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/basic/3.4/js/other-3.js b/test/baselines/basic/3.4/js/other-3.js new file mode 100644 index 00000000..954e7bd1 --- /dev/null +++ b/test/baselines/basic/3.4/js/other-3.js @@ -0,0 +1,12 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.__esModule = true; + var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; + }()); + exports.Hello = Hello; +}); + +//# sourceMappingURL=other-3.js.map diff --git a/test/baselines/basic/3.4/js/other-3.js.map b/test/baselines/basic/3.4/js/other-3.js.map new file mode 100644 index 00000000..3f884110 --- /dev/null +++ b/test/baselines/basic/3.4/js/other-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../other-3.ts"],"names":[],"mappings":";;;IAAA;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAFA,AAEC,IAAA;IAFY,sBAAK","file":"other-3.js","sourcesContent":["export class Hello {\n\tvalue: string;\n}"],"sourceRoot":"../../../../basic/"} \ No newline at end of file diff --git a/test/baselines/basic/3.4/js/test-3.js b/test/baselines/basic/3.4/js/test-3.js new file mode 100644 index 00000000..44d147aa --- /dev/null +++ b/test/baselines/basic/3.4/js/test-3.js @@ -0,0 +1,8 @@ +define(["require", "exports", "./other-3"], function (require, exports, other) { + "use strict"; + exports.__esModule = true; + var a = new other.Hello(); + console.log(a.value); +}); + +//# sourceMappingURL=test-3.js.map diff --git a/test/baselines/basic/3.4/js/test-3.js.map b/test/baselines/basic/3.4/js/test-3.js.map new file mode 100644 index 00000000..ee89706f --- /dev/null +++ b/test/baselines/basic/3.4/js/test-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../test-3.ts"],"names":[],"mappings":";;;IAEA,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC","file":"test-3.js","sourcesContent":["import other = require('./other-3');\n\nvar a = new other.Hello();\nconsole.log(a.value);"],"sourceRoot":"../../../../basic/"} \ No newline at end of file diff --git a/test/baselines/bom/3.4/errors.txt b/test/baselines/bom/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/bom/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/bom/3.4/js/test-bom.js b/test/baselines/bom/3.4/js/test-bom.js new file mode 100644 index 00000000..526b86c7 --- /dev/null +++ b/test/baselines/bom/3.4/js/test-bom.js @@ -0,0 +1 @@ +console.log('hello world!'); diff --git a/test/baselines/customTransformers/3.4/errors.txt b/test/baselines/customTransformers/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/customTransformers/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/customTransformers/3.4/js/test-transformers.js b/test/baselines/customTransformers/3.4/js/test-transformers.js new file mode 100644 index 00000000..e69de29b diff --git a/test/baselines/errorReporting/3.4/errors.txt b/test/baselines/errorReporting/3.4/errors.txt new file mode 100644 index 00000000..2cdb0472 --- /dev/null +++ b/test/baselines/errorReporting/3.4/errors.txt @@ -0,0 +1,14 @@ +TypeScript error: test/errorReporting/test-4.ts(2,1): error TS2304: Cannot find name 'asdf'. +TypeScript error: test/errorReporting/test-4.ts(7,1): error TS2322: Type '{ y: string; }[][]' is not assignable to type '{ x: number; }[][]'. + Type '{ y: string; }[]' is not assignable to type '{ x: number; }[]'. + Property 'x' is missing in type '{ y: string; }' but required in type '{ x: number; }'. +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 2, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/errorReporting/3.4/js/test-4.js b/test/baselines/errorReporting/3.4/js/test-4.js new file mode 100644 index 00000000..9e317e1f --- /dev/null +++ b/test/baselines/errorReporting/3.4/js/test-4.js @@ -0,0 +1,8 @@ +// Simple error +asdf; +// Nested errors +var x = [[{ x: 0 }]]; +var y = [[{ y: "" }]]; +x = y; + +//# sourceMappingURL=test-4.js.map diff --git a/test/baselines/errorReporting/3.4/js/test-4.js.map b/test/baselines/errorReporting/3.4/js/test-4.js.map new file mode 100644 index 00000000..133c7b23 --- /dev/null +++ b/test/baselines/errorReporting/3.4/js/test-4.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test-4.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,IAAI,CAAC;AAEL,gBAAgB;AAChB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACrB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC,GAAG,CAAC,CAAC","file":"test-4.js","sourceRoot":"../../../../errorReporting/"} \ No newline at end of file diff --git a/test/baselines/existingSourceMaps/3.4/all.d.ts b/test/baselines/existingSourceMaps/3.4/all.d.ts new file mode 100644 index 00000000..94ff59ef --- /dev/null +++ b/test/baselines/existingSourceMaps/3.4/all.d.ts @@ -0,0 +1,4 @@ +declare class Apple { +} +declare class Banana { +} diff --git a/test/baselines/existingSourceMaps/3.4/all.d.ts.map b/test/baselines/existingSourceMaps/3.4/all.d.ts.map new file mode 100644 index 00000000..70e92c8a --- /dev/null +++ b/test/baselines/existingSourceMaps/3.4/all.d.ts.map @@ -0,0 +1 @@ +{"version":3,"sources":["apple.ts","banana.ts"],"names":[],"mappings":"AAAA,cAAA,KAAA;CAAA;ACAA,cAAA,MAAA;CAAA","file":"all.d.ts","sourcesContent":["class Apple {}","class Banana {}"]} \ No newline at end of file diff --git a/test/baselines/existingSourceMaps/3.4/all.js b/test/baselines/existingSourceMaps/3.4/all.js new file mode 100644 index 00000000..1a6f6844 --- /dev/null +++ b/test/baselines/existingSourceMaps/3.4/all.js @@ -0,0 +1,12 @@ +var Apple = /** @class */ (function () { + function Apple() { + } + return Apple; +}()); +var Banana = /** @class */ (function () { + function Banana() { + } + return Banana; +}()); + +//# sourceMappingURL=all.js.map diff --git a/test/baselines/existingSourceMaps/3.4/all.js.map b/test/baselines/existingSourceMaps/3.4/all.js.map new file mode 100644 index 00000000..70694473 --- /dev/null +++ b/test/baselines/existingSourceMaps/3.4/all.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["apple.ts","banana.ts"],"names":[],"mappings":"AAAA;IAAA;IAAA,CAAA;IAAA,YAAA;AAAA,CAAA,IAAA;ACAA;IAAA;IAAA,CAAA;IAAA,aAAA;AAAA,CAAA,IAAA","file":"all.js","sourcesContent":["class Apple {}","class Banana {}"]} \ No newline at end of file diff --git a/test/baselines/existingSourceMaps/3.4/errors.txt b/test/baselines/existingSourceMaps/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/existingSourceMaps/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/externalResolve/3.4/dts/test-2.d.ts b/test/baselines/externalResolve/3.4/dts/test-2.d.ts new file mode 100644 index 00000000..a8bf206a --- /dev/null +++ b/test/baselines/externalResolve/3.4/dts/test-2.d.ts @@ -0,0 +1,2 @@ +/// +export {}; diff --git a/test/baselines/externalResolve/3.4/errors.txt b/test/baselines/externalResolve/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/externalResolve/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/externalResolve/3.4/js/test-2.js b/test/baselines/externalResolve/3.4/js/test-2.js new file mode 100644 index 00000000..8d529f1f --- /dev/null +++ b/test/baselines/externalResolve/3.4/js/test-2.js @@ -0,0 +1,10 @@ +"use strict"; +exports.__esModule = true; +/// +var other = require("./other-2"); +var someModule = require("someModule"); +var a = new other.Hello(); +console.log(a.value); +console.log(someModule); + +//# sourceMappingURL=test-2.js.map diff --git a/test/baselines/externalResolve/3.4/js/test-2.js.map b/test/baselines/externalResolve/3.4/js/test-2.js.map new file mode 100644 index 00000000..f308550f --- /dev/null +++ b/test/baselines/externalResolve/3.4/js/test-2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test-2.ts"],"names":[],"mappings":";;AAAA,uCAAuC;AACvC,iCAAoC;AACpC,uCAA0C;AAE1C,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;AAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAErB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","file":"test-2.js","sourcesContent":["/// \nimport other = require('./other-2');\nimport someModule = require('someModule');\n\nvar a = new other.Hello();\nconsole.log(a.value);\n\nconsole.log(someModule);\n"],"sourceRoot":"../../../../externalResolve/"} \ No newline at end of file diff --git a/test/baselines/isolatedModules/3.4/errors.txt b/test/baselines/isolatedModules/3.4/errors.txt new file mode 100644 index 00000000..3d6e1f78 --- /dev/null +++ b/test/baselines/isolatedModules/3.4/errors.txt @@ -0,0 +1,11 @@ +TypeScript error: test/isolatedModules/test-3.ts(2,1): error TS1128: Declaration or statement expected. +{ + "transpileErrors": 1, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/isolatedModules/3.4/js/other-3.js b/test/baselines/isolatedModules/3.4/js/other-3.js new file mode 100644 index 00000000..69e78cd0 --- /dev/null +++ b/test/baselines/isolatedModules/3.4/js/other-3.js @@ -0,0 +1,11 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.__esModule = true; + var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; + }()); + exports.Hello = Hello; +}); +//# sourceMappingURL=other-3.js.map diff --git a/test/baselines/isolatedModules/3.4/js/other-3.js.map b/test/baselines/isolatedModules/3.4/js/other-3.js.map new file mode 100644 index 00000000..e828029d --- /dev/null +++ b/test/baselines/isolatedModules/3.4/js/other-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["other-3.ts"],"names":[],"mappings":";;;IAAA;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAFA,AAEC,IAAA;IAFY,sBAAK","file":"other-3.js","sourcesContent":["export class Hello {\n\tvalue: string;\n}"],"sourceRoot":"../../../../isolatedModules/"} \ No newline at end of file diff --git a/test/baselines/isolatedModules/3.4/js/test-3.js b/test/baselines/isolatedModules/3.4/js/test-3.js new file mode 100644 index 00000000..49f24441 --- /dev/null +++ b/test/baselines/isolatedModules/3.4/js/test-3.js @@ -0,0 +1,7 @@ +define(["require", "exports", "./other-3"], function (require, exports, other) { + "use strict"; + exports.__esModule = true; + var a = new other.Hello(); + console.log(a.value); +}); +//# sourceMappingURL=test-3.js.map diff --git a/test/baselines/isolatedModules/3.4/js/test-3.js.map b/test/baselines/isolatedModules/3.4/js/test-3.js.map new file mode 100644 index 00000000..9b8d6c59 --- /dev/null +++ b/test/baselines/isolatedModules/3.4/js/test-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test-3.ts"],"names":[],"mappings":";;;IAEA,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC","file":"test-3.js","sourcesContent":["import other = require('./other-3');\n. // Syntax error\nvar a = new other.Hello();\nconsole.log(a.value);"],"sourceRoot":"../../../../isolatedModules/"} \ No newline at end of file diff --git a/test/baselines/noEmit/3.4/errors.txt b/test/baselines/noEmit/3.4/errors.txt new file mode 100644 index 00000000..20dcec29 --- /dev/null +++ b/test/baselines/noEmit/3.4/errors.txt @@ -0,0 +1,12 @@ +TypeScript error: test/noEmit/a.ts(1,14): error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'. +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 1, + "declarationErrors": 0, + "emitErrors": 0, + "noEmit": true, + "emitSkipped": true +} \ No newline at end of file diff --git a/test/baselines/noEmitOnError/3.4/errors.txt b/test/baselines/noEmitOnError/3.4/errors.txt new file mode 100644 index 00000000..c611f224 --- /dev/null +++ b/test/baselines/noEmitOnError/3.4/errors.txt @@ -0,0 +1,19 @@ +TypeScript error: test/noEmitOnError/a.ts(1,1): error TS2304: Cannot find name 'foo'. +TypeScript error: test/noEmitOnError/a.ts(2,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +TypeScript error: test/noEmitOnError/a.ts(3,2): error TS1109: Expression expected. +TypeScript error: test/noEmitOnError/a.ts(3,3): error TS1127: Invalid character. +TypeScript error: test/noEmitOnError/a.ts(3,4): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`. +TypeScript error: test/noEmitOnError/a.ts(3,6): error TS1109: Expression expected. +TypeScript error: test/noEmitOnError/a.ts(3,7): error TS1109: Expression expected. +TypeScript error: test/noEmitOnError/a.ts(3,8): error TS1109: Expression expected. +TypeScript error: test/noEmitOnError/a.ts(3,9): error TS1109: Expression expected. +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 6, + "globalErrors": 0, + "semanticErrors": 3, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": true +} \ No newline at end of file diff --git a/test/baselines/out/3.4/dts/concat.d.ts b/test/baselines/out/3.4/dts/concat.d.ts new file mode 100644 index 00000000..e978dc48 --- /dev/null +++ b/test/baselines/out/3.4/dts/concat.d.ts @@ -0,0 +1,5 @@ +declare class Hello { + value: string; +} +declare var a: Hello; +declare var b: Symbol; diff --git a/test/baselines/out/3.4/errors.txt b/test/baselines/out/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/out/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/out/3.4/js/concat.js b/test/baselines/out/3.4/js/concat.js new file mode 100644 index 00000000..2ac2ca92 --- /dev/null +++ b/test/baselines/out/3.4/js/concat.js @@ -0,0 +1,7 @@ +class Hello { +} +var a = new Hello(); +console.log(a.value); +var b; // Target = ES6, so lib.es6.d.ts should be included. + +//# sourceMappingURL=concat.js.map diff --git a/test/baselines/out/3.4/js/concat.js.map b/test/baselines/out/3.4/js/concat.js.map new file mode 100644 index 00000000..6a83faf9 --- /dev/null +++ b/test/baselines/out/3.4/js/concat.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test/out/bar.ts","test/out/foo.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK;CAEV;ACFD,IAAI,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC;AACpB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAErB,IAAI,CAAS,CAAC,CAAC,oDAAoD","file":"concat.js","sourcesContent":["class Hello {\n\tvalue: string;\n}","var a = new Hello();\nconsole.log(a.value);\n\nvar b: Symbol; // Target = ES6, so lib.es6.d.ts should be included."],"sourceRoot":"../../../../out/"} \ No newline at end of file diff --git a/test/baselines/sourceMaps/3.4/errors.txt b/test/baselines/sourceMaps/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/sourceMaps/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/sourceMaps/3.4/js/Main/MainFile.js b/test/baselines/sourceMaps/3.4/js/Main/MainFile.js new file mode 100644 index 00000000..1e499dc7 --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/MainFile.js @@ -0,0 +1,8 @@ +"use strict"; +exports.__esModule = true; +var foo = { + bar: 42 +}; +console.log(foo.bar); + +//# sourceMappingURL=MainFile.js.map diff --git a/test/baselines/sourceMaps/3.4/js/Main/MainFile.js.map b/test/baselines/sourceMaps/3.4/js/Main/MainFile.js.map new file mode 100644 index 00000000..9f558323 --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/MainFile.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["MainFile.ts"],"names":[],"mappings":";;AAEA,IAAI,GAAG,GAAS;IACZ,GAAG,EAAE,EAAE;CACV,CAAC;AAEF,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"MainFile.js","sourcesContent":["import IFoo = require(\"../Outer/Foo\");\n\nvar foo: IFoo = {\n bar: 42\n};\n\nconsole.log(foo.bar);"]} \ No newline at end of file diff --git a/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js b/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js new file mode 100644 index 00000000..91447cfb --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js @@ -0,0 +1,8 @@ +"use strict"; +exports.__esModule = true; +var foo = { + bar: 42 +}; +console.log(foo.bar); + +//# sourceMappingURL=MainFileTsx.js.map diff --git a/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js.map b/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js.map new file mode 100644 index 00000000..304b4fae --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/MainFileTsx.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["MainFileTsx.tsx"],"names":[],"mappings":";;AAEA,IAAI,GAAG,GAAS;IACZ,GAAG,EAAE,EAAE;CACV,CAAC;AAEF,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"MainFileTsx.js","sourcesContent":["import IFoo = require(\"../Outer/Foo\");\n\nvar foo: IFoo = {\n bar: 42\n};\n\nconsole.log(foo.bar);\n"]} \ No newline at end of file diff --git a/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js b/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js new file mode 100644 index 00000000..a52d4142 --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js @@ -0,0 +1,3 @@ +var x = 1; + +//# sourceMappingURL=sub.js.map diff --git a/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js.map b/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js.map new file mode 100644 index 00000000..85325d9b --- /dev/null +++ b/test/baselines/sourceMaps/3.4/js/Main/sub/sub.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["sub/sub.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC","file":"sub.js","sourcesContent":["var x = 1;"]} \ No newline at end of file diff --git a/test/baselines/sourceMapsOutDir/3.4/errors.txt b/test/baselines/sourceMapsOutDir/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/sourceMapsOutDir/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js b/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js new file mode 100644 index 00000000..1d64cfab --- /dev/null +++ b/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js @@ -0,0 +1,3 @@ +var x = 1; + +//# sourceMappingURL=main.js.map diff --git a/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js.map b/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js.map new file mode 100644 index 00000000..63a3d17f --- /dev/null +++ b/test/baselines/sourceMapsOutDir/3.4/js/dist/main.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../app/main.ts"],"names":[],"mappings":"AAAA,IAAM,CAAC,GAAG,CAAC,CAAC","file":"main.js","sourcesContent":["const x = 1;\n"]} \ No newline at end of file diff --git a/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js b/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js new file mode 100644 index 00000000..28436a02 --- /dev/null +++ b/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js @@ -0,0 +1,3 @@ +var y = 2; + +//# sourceMappingURL=second.js.map diff --git a/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js.map b/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js.map new file mode 100644 index 00000000..66a4ef27 --- /dev/null +++ b/test/baselines/sourceMapsOutDir/3.4/js/dist/sub/second.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../app/sub/second.ts"],"names":[],"mappings":"AAAA,IAAM,CAAC,GAAG,CAAC,CAAC","file":"second.js","sourcesContent":["const y = 2;\n"]} \ No newline at end of file diff --git a/test/baselines/tsConfigIncremental/3.4/buildInfo/outFile.tsbuildinfo b/test/baselines/tsConfigIncremental/3.4/buildInfo/outFile.tsbuildinfo new file mode 100644 index 00000000..2a69bc97 --- /dev/null +++ b/test/baselines/tsConfigIncremental/3.4/buildInfo/outFile.tsbuildinfo @@ -0,0 +1,27 @@ +{ + "bundle": { + "commonSourceDirectory": "C:/Projects/github/gulp-typescript/test/tsConfigIncremental/src/", + "sourceFiles": [ + "C:/Projects/github/gulp-typescript/test/tsConfigIncremental/src/app/bar.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 94, + "kind": "text" + } + ] + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 43, + "kind": "text" + } + ] + } + }, + "version": "3.4.5" +} \ No newline at end of file diff --git a/test/baselines/tsConfigIncremental/3.4/dts/outFile.d.ts b/test/baselines/tsConfigIncremental/3.4/dts/outFile.d.ts new file mode 100644 index 00000000..7e9dfb1f --- /dev/null +++ b/test/baselines/tsConfigIncremental/3.4/dts/outFile.d.ts @@ -0,0 +1,3 @@ +declare class Hello { + value: string; +} diff --git a/test/baselines/tsConfigIncremental/3.4/errors.txt b/test/baselines/tsConfigIncremental/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsConfigIncremental/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsConfigIncremental/3.4/js/outFile.js b/test/baselines/tsConfigIncremental/3.4/js/outFile.js new file mode 100644 index 00000000..97954d12 --- /dev/null +++ b/test/baselines/tsConfigIncremental/3.4/js/outFile.js @@ -0,0 +1,5 @@ +var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; +}()); diff --git a/test/baselines/tsConfigIncremental/dev/dts/outFile.d.ts b/test/baselines/tsConfigIncremental/dev/dts/outFile.d.ts new file mode 100644 index 00000000..7e9dfb1f --- /dev/null +++ b/test/baselines/tsConfigIncremental/dev/dts/outFile.d.ts @@ -0,0 +1,3 @@ +declare class Hello { + value: string; +} diff --git a/test/baselines/tsConfigIncremental/dev/errors.txt b/test/baselines/tsConfigIncremental/dev/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsConfigIncremental/dev/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsConfigIncremental/dev/js/outFile.js b/test/baselines/tsConfigIncremental/dev/js/outFile.js new file mode 100644 index 00000000..97954d12 --- /dev/null +++ b/test/baselines/tsConfigIncremental/dev/js/outFile.js @@ -0,0 +1,5 @@ +var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; +}()); diff --git a/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts b/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts new file mode 100644 index 00000000..7e9dfb1f --- /dev/null +++ b/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts @@ -0,0 +1,3 @@ +declare class Hello { + value: string; +} diff --git a/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts.map b/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts.map new file mode 100644 index 00000000..5a6c2614 --- /dev/null +++ b/test/baselines/tsconfigDeclarationMap/3.4/dts/outFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"sources":["app/bar.ts"],"names":[],"mappings":"AAAA,cAAM,KAAK;IACV,KAAK,EAAE,MAAM,CAAC;CACd","file":"outFile.d.ts","sourcesContent":["class Hello {\n\tvalue: string;\n}"]} \ No newline at end of file diff --git a/test/baselines/tsconfigDeclarationMap/3.4/errors.txt b/test/baselines/tsconfigDeclarationMap/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsconfigDeclarationMap/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsconfigDeclarationMap/3.4/js/outFile.js b/test/baselines/tsconfigDeclarationMap/3.4/js/outFile.js new file mode 100644 index 00000000..97954d12 --- /dev/null +++ b/test/baselines/tsconfigDeclarationMap/3.4/js/outFile.js @@ -0,0 +1,5 @@ +var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; +}()); diff --git a/test/baselines/tsconfigExtends/3.4/dts/other-3.d.ts b/test/baselines/tsconfigExtends/3.4/dts/other-3.d.ts new file mode 100644 index 00000000..b3a0b19d --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/dts/other-3.d.ts @@ -0,0 +1,3 @@ +export declare class Hello { + value: string; +} diff --git a/test/baselines/tsconfigExtends/3.4/dts/test-3.d.ts b/test/baselines/tsconfigExtends/3.4/dts/test-3.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/dts/test-3.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/baselines/tsconfigExtends/3.4/errors.txt b/test/baselines/tsconfigExtends/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsconfigExtends/3.4/js/other-3.js b/test/baselines/tsconfigExtends/3.4/js/other-3.js new file mode 100644 index 00000000..954e7bd1 --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/js/other-3.js @@ -0,0 +1,12 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + exports.__esModule = true; + var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; + }()); + exports.Hello = Hello; +}); + +//# sourceMappingURL=other-3.js.map diff --git a/test/baselines/tsconfigExtends/3.4/js/other-3.js.map b/test/baselines/tsconfigExtends/3.4/js/other-3.js.map new file mode 100644 index 00000000..54f42217 --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/js/other-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["other-3.ts"],"names":[],"mappings":";;;IAAA;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAFA,AAEC,IAAA;IAFY,sBAAK","file":"other-3.js","sourcesContent":["export class Hello {\n\tvalue: string;\n}"],"sourceRoot":"../../../../basic/"} \ No newline at end of file diff --git a/test/baselines/tsconfigExtends/3.4/js/test-3.js b/test/baselines/tsconfigExtends/3.4/js/test-3.js new file mode 100644 index 00000000..44d147aa --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/js/test-3.js @@ -0,0 +1,8 @@ +define(["require", "exports", "./other-3"], function (require, exports, other) { + "use strict"; + exports.__esModule = true; + var a = new other.Hello(); + console.log(a.value); +}); + +//# sourceMappingURL=test-3.js.map diff --git a/test/baselines/tsconfigExtends/3.4/js/test-3.js.map b/test/baselines/tsconfigExtends/3.4/js/test-3.js.map new file mode 100644 index 00000000..c9c950ca --- /dev/null +++ b/test/baselines/tsconfigExtends/3.4/js/test-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test-3.ts"],"names":[],"mappings":";;;IAEA,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC","file":"test-3.js","sourcesContent":["import other = require('./other-3');\n\nvar a = new other.Hello();\nconsole.log(a.value);"],"sourceRoot":"../../../../basic/"} \ No newline at end of file diff --git a/test/baselines/tsconfigInclude/3.4/errors.txt b/test/baselines/tsconfigInclude/3.4/errors.txt new file mode 100644 index 00000000..3e2356fa --- /dev/null +++ b/test/baselines/tsconfigInclude/3.4/errors.txt @@ -0,0 +1,12 @@ +TypeScript error: test/tsconfigInclude/file.ts(1,1): error TS2552: Cannot find name 'file'. Did you mean 'File'? +TypeScript error: test/tsconfigInclude/include.ts(1,1): error TS2304: Cannot find name 'include'. +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 2, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsconfigInclude/3.4/out.js b/test/baselines/tsconfigInclude/3.4/out.js new file mode 100644 index 00000000..1ef71e5a --- /dev/null +++ b/test/baselines/tsconfigInclude/3.4/out.js @@ -0,0 +1,2 @@ +file; +include; diff --git a/test/baselines/tsconfigOutFile/3.4/errors.txt b/test/baselines/tsconfigOutFile/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsconfigOutFile/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsconfigOutFile/3.4/js/outFile.js b/test/baselines/tsconfigOutFile/3.4/js/outFile.js new file mode 100644 index 00000000..0c09577d --- /dev/null +++ b/test/baselines/tsconfigOutFile/3.4/js/outFile.js @@ -0,0 +1,7 @@ +var Hello = /** @class */ (function () { + function Hello() { + } + return Hello; +}()); + +//# sourceMappingURL=outFile.js.map diff --git a/test/baselines/tsconfigOutFile/3.4/js/outFile.js.map b/test/baselines/tsconfigOutFile/3.4/js/outFile.js.map new file mode 100644 index 00000000..558ce479 --- /dev/null +++ b/test/baselines/tsconfigOutFile/3.4/js/outFile.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["app/bar.ts"],"names":[],"mappings":"AAAA;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAFA,AAEC,IAAA","file":"outFile.js","sourcesContent":["class Hello {\n\tvalue: string;\n}"]} \ No newline at end of file diff --git a/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts b/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts new file mode 100644 index 00000000..0fcdfd96 --- /dev/null +++ b/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts @@ -0,0 +1,3 @@ +declare const a = 1; +//# sourceMappingURL=a.d.ts.map +declare const b = 1; diff --git a/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts.map b/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts.map new file mode 100644 index 00000000..b933a78a --- /dev/null +++ b/test/baselines/tsconfigProjectReferences/3.4/dts/b.d.ts.map @@ -0,0 +1 @@ +{"version":3,"sources":["../a/a.ts","b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,IAAI,CAAC;;ACAZ,QAAA,MAAM,CAAC,IAAI,CAAC","file":"b.d.ts","sourcesContent":["const a = 1;","const b = 1;"]} \ No newline at end of file diff --git a/test/baselines/tsconfigProjectReferences/3.4/errors.txt b/test/baselines/tsconfigProjectReferences/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/tsconfigProjectReferences/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/tsconfigProjectReferences/3.4/js/b.js b/test/baselines/tsconfigProjectReferences/3.4/js/b.js new file mode 100644 index 00000000..1d728228 --- /dev/null +++ b/test/baselines/tsconfigProjectReferences/3.4/js/b.js @@ -0,0 +1,6 @@ +var a = 1; + +//# sourceMappingURL=a.js.map +var b = 1; + +//# sourceMappingURL=b.js.map diff --git a/test/baselines/tsconfigProjectReferences/3.4/js/b.js.map b/test/baselines/tsconfigProjectReferences/3.4/js/b.js.map new file mode 100644 index 00000000..5825104f --- /dev/null +++ b/test/baselines/tsconfigProjectReferences/3.4/js/b.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../a/a.ts","b.ts"],"names":[],"mappings":"AAAA,IAAM,CAAC,GAAG,CAAC,CAAC;;;ACAZ,IAAM,CAAC,GAAG,CAAC,CAAC","file":"b.js","sourcesContent":["const a = 1;","const b = 1;"]} \ No newline at end of file diff --git a/test/baselines/typesResolution/3.4/dts/test-3.d.ts b/test/baselines/typesResolution/3.4/dts/test-3.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test/baselines/typesResolution/3.4/dts/test-3.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/baselines/typesResolution/3.4/errors.txt b/test/baselines/typesResolution/3.4/errors.txt new file mode 100644 index 00000000..504a3a8a --- /dev/null +++ b/test/baselines/typesResolution/3.4/errors.txt @@ -0,0 +1,10 @@ +{ + "transpileErrors": 0, + "optionsErrors": 0, + "syntaxErrors": 0, + "globalErrors": 0, + "semanticErrors": 0, + "declarationErrors": 0, + "emitErrors": 0, + "emitSkipped": false +} \ No newline at end of file diff --git a/test/baselines/typesResolution/3.4/js/test-3.js b/test/baselines/typesResolution/3.4/js/test-3.js new file mode 100644 index 00000000..44d147aa --- /dev/null +++ b/test/baselines/typesResolution/3.4/js/test-3.js @@ -0,0 +1,8 @@ +define(["require", "exports", "./other-3"], function (require, exports, other) { + "use strict"; + exports.__esModule = true; + var a = new other.Hello(); + console.log(a.value); +}); + +//# sourceMappingURL=test-3.js.map diff --git a/test/baselines/typesResolution/3.4/js/test-3.js.map b/test/baselines/typesResolution/3.4/js/test-3.js.map new file mode 100644 index 00000000..c9c950ca --- /dev/null +++ b/test/baselines/typesResolution/3.4/js/test-3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["test-3.ts"],"names":[],"mappings":";;;IAEA,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC","file":"test-3.js","sourcesContent":["import other = require('./other-3');\n\nvar a = new other.Hello();\nconsole.log(a.value);"],"sourceRoot":"../../../../basic/"} \ No newline at end of file diff --git a/test/tsConfigIncremental/gulptask.js b/test/tsConfigIncremental/gulptask.js new file mode 100644 index 00000000..88f73d32 --- /dev/null +++ b/test/tsConfigIncremental/gulptask.js @@ -0,0 +1,25 @@ +var gulp = require('gulp'); +var compareVersions = require('compare-versions'); + +module.exports = function(newTS, lib, output, reporter) { + var project = newTS.createProject('test/tsConfigIncremental/src/tsconfig.json', { + typescript: lib + }); + + var tsResult = project.src() + .pipe(project(reporter)) + .on('error', () => {}); + + tsResult.dts + .pipe(gulp.dest(output + '/dts')); + + tsResult.buildInfo + .pipe(gulp.dest(output + '/buildInfo')); + + return tsResult.js + .pipe(gulp.dest(output + "js")); +}; + +module.exports.match = function (lib) { + return /^\d+/.test(lib.version) && compareVersions.compare(lib.version, '3.4', '>='); +}; diff --git a/test/tsConfigIncremental/src/app/bar.ts b/test/tsConfigIncremental/src/app/bar.ts new file mode 100644 index 00000000..49df0eee --- /dev/null +++ b/test/tsConfigIncremental/src/app/bar.ts @@ -0,0 +1,3 @@ +class Hello { + value: string; +} \ No newline at end of file diff --git a/test/tsConfigIncremental/src/tsconfig.json b/test/tsConfigIncremental/src/tsconfig.json new file mode 100644 index 00000000..f3a45d10 --- /dev/null +++ b/test/tsConfigIncremental/src/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "outFile": "outFile.js", + "declaration": true, + "incremental": true, + "composite": true, + "types": [] + } +} diff --git a/typescript/3.4 b/typescript/3.4 new file mode 160000 index 00000000..7eda7ef3 --- /dev/null +++ b/typescript/3.4 @@ -0,0 +1 @@ +Subproject commit 7eda7ef338a52a39d31d0a4e883b5a09fff096be