Comparing version 0.30.0 to 0.31.0
{ | ||
"name": "tsickle", | ||
"version": "0.30.0", | ||
"version": "0.31.0", | ||
"description": "Transpile TypeScript code to JavaScript with Closure annotations.", | ||
@@ -5,0 +5,0 @@ "main": "src/tsickle.js", |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/cli_support" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/decorator_downlevel_transformer" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/decorators" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/enum_transformer" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/fileoverview_comment_transformer" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -59,2 +59,39 @@ /** | ||
/** | ||
* Given a parsed @fileoverview comment, ensures it has all the attributes we need. | ||
* This function can be called to modify an existing comment or to make a new one. | ||
* | ||
* @param tags Comment as parsed list of tags; modified in-place. | ||
*/ | ||
function augmentFileoverviewComments(tags) { | ||
// Ensure we start with a @fileoverview. | ||
if (!tags.find(function (t) { return t.tagName === 'fileoverview'; })) { | ||
tags.splice(0, 0, { tagName: 'fileoverview', text: 'added by tsickle' }); | ||
} | ||
// Find or create a @suppress tag. | ||
// Closure compiler barfs if there's a duplicated @suppress tag in a file, so the tag must | ||
// only appear once and be merged. | ||
var suppressTag = tags.find(function (t) { return t.tagName === 'suppress'; }); | ||
var suppressions; | ||
if (suppressTag) { | ||
suppressions = new Set((suppressTag.type || '').split(',').map(function (s) { return s.trim(); })); | ||
} | ||
else { | ||
suppressTag = { tagName: 'suppress', text: 'checked by tsc' }; | ||
tags.push(suppressTag); | ||
suppressions = new Set(); | ||
} | ||
// Ensure our suppressions are included in the @suppress tag: | ||
// 1) Suppress checkTypes. We believe the code has already been type-checked by TypeScript, | ||
// and we cannot model all the TypeScript type decisions in Closure syntax. | ||
suppressions.add('checkTypes'); | ||
// 2) Suppress extraRequire. We remove extra requires at the TypeScript level, so any require | ||
// that gets to the JS level is a load-bearing require. | ||
suppressions.add('extraRequire'); | ||
// 3) Suppress uselessCode. We emit an "if (false)" around type declarations, | ||
// which is flagged as unused code unless we suppress it. | ||
suppressions.add('uselessCode'); | ||
suppressTag.type = Array.from(suppressions.values()).sort().join(','); | ||
return tags; | ||
} | ||
/** | ||
* A transformer that ensures the emitted JS file has an \@fileoverview comment that contains an | ||
@@ -70,47 +107,22 @@ * \@suppress {checkTypes} annotation by either adding or updating an existing comment. | ||
} | ||
// Closure Compiler considers the *last* comment with @fileoverview (or @externs or @nocompile) | ||
// that has not been attached to some other tree node to be the file overview comment, and | ||
// only applies @suppress tags from it. | ||
// AJD considers *any* comment mentioning @fileoverview. | ||
var fileoverviewIdx = -1; | ||
var parsed = null; | ||
var tags = []; | ||
for (var i = comments.length - 1; i >= 0; i--) { | ||
var current = jsdoc.parseContents(comments[i].text); | ||
if (current !== null && current.tags.some(function (t) { return FILEOVERVIEW_COMMENT_MARKERS.has(t.tagName); })) { | ||
var parse = jsdoc.parseContents(comments[i].text); | ||
if (parse !== null && parse.tags.some(function (t) { return FILEOVERVIEW_COMMENT_MARKERS.has(t.tagName); })) { | ||
fileoverviewIdx = i; | ||
parsed = current; | ||
tags = parse.tags; | ||
break; | ||
} | ||
} | ||
// Add a @suppress {checkTypes} tag to each source file's JSDoc comment, | ||
// being careful to retain existing comments and their @suppress'ions. | ||
// Closure Compiler considers the *last* comment with @fileoverview (or @externs or @nocompile) | ||
// that has not been attached to some other tree node to be the file overview comment, and | ||
// only applies @suppress tags from it. | ||
// AJD considers *any* comment mentioning @fileoverview. | ||
if (!parsed) { | ||
augmentFileoverviewComments(tags); | ||
var commentText = jsdoc.toStringWithoutStartEnd(tags); | ||
if (fileoverviewIdx < 0) { | ||
// No existing comment to merge with, just emit a new one. | ||
return addNewFileoverviewComment(sf); | ||
return addNewFileoverviewComment(sf, commentText); | ||
} | ||
// Add @suppress {checkTypes}, or add to the list in an existing @suppress tag. | ||
// Closure compiler barfs if there's a duplicated @suppress tag in a file, so the tag must | ||
// only appear once and be merged. | ||
var tags = parsed.tags; | ||
var suppressTag = tags.find(function (t) { return t.tagName === 'suppress'; }); | ||
if (suppressTag) { | ||
var suppressions = suppressTag.type || ''; | ||
var suppressionsList = suppressions.split(',').map(function (s) { return s.trim(); }); | ||
if (suppressionsList.indexOf('checkTypes') === -1) { | ||
suppressionsList.push('checkTypes'); | ||
} | ||
suppressTag.type = suppressionsList.join(','); | ||
} | ||
else { | ||
tags.push({ | ||
tagName: 'suppress', | ||
type: 'checkTypes,extraRequire', | ||
text: 'checked by tsc', | ||
}); | ||
} | ||
// Closure compiler fails if a tag at the start of the file has @suppress but no @fileoverview. | ||
if (!tags.find(function (t) { return t.tagName === 'fileoverview'; })) { | ||
tags.push({ tagName: 'fileoverview' }); | ||
} | ||
var commentText = jsdoc.toStringWithoutStartEnd(tags); | ||
comments[fileoverviewIdx].text = commentText; | ||
@@ -122,7 +134,3 @@ // sf does not need to be updated, synthesized comments are mutable. | ||
exports.transformFileoverviewComment = transformFileoverviewComment; | ||
function addNewFileoverviewComment(sf) { | ||
var commentText = jsdoc.toStringWithoutStartEnd([ | ||
{ tagName: 'fileoverview', text: 'added by tsickle' }, | ||
{ tagName: 'suppress', type: 'checkTypes', text: 'checked by tsc' }, | ||
]); | ||
function addNewFileoverviewComment(sf, commentText) { | ||
var syntheticFirstStatement = transformer_util_1.createNotEmittedStatement(sf); | ||
@@ -133,2 +141,2 @@ syntheticFirstStatement = ts.addSyntheticTrailingComment(syntheticFirstStatement, ts.SyntaxKind.MultiLineCommentTrivia, commentText, true); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZW92Z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lTm90RW1pdHRlZFN0YXRlbWVudChzZik7XG4gIHN5bnRoZXRpY0ZpcnN0U3RhdGVtZW50ID0gdHMuYWRkU3ludGhldGljVHJhaWxpbmdDb21tZW50KFxuICAgICAgc3ludGhldGljRmlyc3RTdGF0ZW1lbnQsIHRzLlN5bnRheEtpbmQuTXVsdGlMaW5lQ29tbWVudFRyaXZpYSwgY29tbWVudFRleHQsIHRydWUpO1xuICByZXR1cm4gdXBkYXRlU291cmNlRmlsZU5vZGUoc2YsIHRzLmNyZWF0ZU5vZGVBcnJheShbc3ludGhldGljRmlyc3RTdGF0ZW1lbnQsIC4uLnNmLnN0YXRlbWVudHNdKSk7XG59XG4iXX0= |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/googmodule" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/jsdoc" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/main" /> | ||
#!/usr/bin/env node | ||
@@ -3,0 +2,0 @@ /// <amd-module name="tsickle/src/main" /> |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/modules_manifest" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/rewriter" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/source_map_utils" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/transformer_sourcemap" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/transformer_util" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/tsickle" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/type-translator" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/typescript" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="tsickle/src/util" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1236206
12291