Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update to use latest version of typescript #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 __tests__/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('zip', () => {
it('can zip to create immutable collections', () => {
expect(
I.Seq.of(1,2,3).zipWith(
() => I.List(arguments),
function () { return I.List(arguments); },
I.Seq.of(4,5,6),
I.Seq.of(7,8,9)
).toJS()
Expand Down
2 changes: 1 addition & 1 deletion 2 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"rollup": "0.24.0",
"run-sequence": "1.1.5",
"through2": "2.0.0",
"typescript": "~1.4.1",
"typescript": "1.7.5",
"uglify-js": "2.6.1",
"vinyl-buffer": "1.0.0",
"vinyl-source-stream": "1.1.0"
Expand Down
37 changes: 23 additions & 14 deletions 37 resources/jestPreprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,31 @@ function compileTypeScript(filePath) {

var host = typescript.createCompilerHost(options);
var program = typescript.createProgram([filePath], options, host);
var checker = typescript.createTypeChecker(program, /*fullTypeCheck*/ true);
var result = checker.emitFiles();

program.getDiagnostics()
.concat(checker.getDiagnostics())
.concat(result.diagnostics)
.forEach(function(diagnostic) {
var lineChar = diagnostic.file.getLineAndCharacterFromPosition(diagnostic.start);
console.error('%s %d:%d %s', diagnostic.file.filename, lineChar.line, lineChar.character, diagnostic.messageText);
});

if (result.emitResultStatus !== typescript.EmitReturnStatus.Succeeded) {
throw new Error('Compiling ' + filePath + ' failed');

var diagnostics = program.getSyntacticDiagnostics();

if (diagnostics.length === 0) {
diagnostics = program.getGlobalDiagnostics();
}

if (diagnostics.length === 0) {
diagnostics = program.getSemanticDiagnostics();
}

if (diagnostics.length === 0) {
var emitOutput = program.emit();
diagnostics = emitOutput.diagnostics;
}

if (diagnostics.length === 0) {
return fs.readFileSync(outputPath, {encoding: 'utf8'});
}

return fs.readFileSync(outputPath, {encoding: 'utf8'});
diagnostics.forEach(function(diagnostic) {
var loc = typescript.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
console.error('%s %d:%d %s', diagnostic.file.fileName, loc.line, loc.character, diagnostic.messageText);
});
throw new Error('Compiling ' + filePath + ' failed');
}

function withLocalImmutable(filePath, jsSrc) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.