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

tsickle

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsickle - npm Package Compare versions

Comparing version 0.38.0 to 0.38.1

7

package.json
{
"name": "tsickle",
"version": "0.38.0",
"version": "0.38.1",
"description": "Transpile TypeScript code to JavaScript with Closure annotations.",

@@ -14,3 +14,3 @@ "main": "src/tsickle.js",

"peerDependencies": {
"typescript": "~3.7.2"
"typescript": "~3.8.2"
},

@@ -33,4 +33,5 @@ "devDependencies": {

"source-map-support": "^0.5.6",
"tslib": "1.11",
"tslint": "5.11.0",
"typescript": "3.7.2"
"typescript": "3.8.2"
},

@@ -37,0 +38,0 @@ "scripts": {

@@ -192,4 +192,7 @@ /**

const memberType = getEnumMemberType(typeChecker, member);
if (memberType !== 'number')
// Enum members cannot be named with a private identifier, although it
// is technically valid in the AST.
if (memberType !== 'number' || ts.isPrivateIdentifier(memberName)) {
continue;
}
// TypeScript enum members can have Identifier names or String names.

@@ -220,2 +223,2 @@ // We need to emit slightly different code to support these two syntaxes:

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bV90cmFuc2Zvcm1lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnVtX3RyYW5zZm9ybWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7O0lBRUg7Ozs7Ozs7Ozs7O09BV0c7SUFFSCxpQ0FBaUM7SUFFakMsbUVBQWlIO0lBRWpILGdHQUFnRztJQUNoRyxTQUFTLGFBQWEsQ0FBQyxJQUFhO1FBQ2xDLGdHQUFnRztRQUNoRyx1QkFBdUI7UUFDdkIsSUFBSSxNQUFNLEdBQUcsRUFBRSxD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ICAgdHMuc2V0VGV4dFJhbmdlKFxuICAgICAgICAgICAgICB0cy5jcmVhdGVWYXJpYWJsZVN0YXRlbWVudChcbiAgICAgICAgICAgICAgICAgIC8qIG1vZGlmaWVycyAqLyB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICB0cy5jcmVhdGVWYXJpYWJsZURlY2xhcmF0aW9uTGlzdChcbiAgICAgICAgICAgICAgICAgICAgICBbdmFyRGVjbF0sXG4gICAgICAgICAgICAgICAgICAgICAgLyogY3JlYXRlIGEgY29uc3QgdmFyICovIHRzLk5vZGVGbGFncy5Db25zdCkpLFxuICAgICAgICAgICAgICBub2RlKSxcbiAgICAgICAgICBub2RlKTtcbiAgICAgIGNvbnN0IGNvbW1lbnQ6IHRzLlN5bnRoZXNpemVkQ29tbWVudCA9IHtcbiAgICAgICAga2luZDogdHMuU3ludGF4S2luZC5NdWx0aUxpbmVDb21tZW50VHJpdmlhLFxuICAgICAgICB0ZXh0OiBgKiBAZW51bSB7JHtlbnVtVHlwZX19IGAsXG4gICAgICAgIGhhc1RyYWlsaW5nTmV3TGluZTogdHJ1ZSxcbiAgICAgICAgcG9zOiAtMSxcbiAgICAgICAgZW5kOiAtMVxuICAgICAgfTtcbiAgICAgIHRzLnNldFN5bnRoZXRpY0xlYWRpbmdDb21tZW50cyh2YXJEZWNsU3RtdCwgW2NvbW1lbnRdKTtcblxuICAgICAgY29uc3QgbmFtZSA9IG5vZGUubmFtZS5nZXRUZXh0KCk7XG4gICAgICBjb25zdCByZXN1bHROb2RlczogdHMuTm9kZVtdID0gW3ZhckRlY2xTdG10XTtcbiAgICAgIGlmIChpc0V4cG9ydGVkKSB7XG4gICAgICAgIC8vIENyZWF0ZSBhIHNlcGFyYXRlIGV4cG9ydCB7Li4ufSBzdGF0ZW1lbnQsIHNvIHRoYXQgdGhlIGVudW0gbmFtZSBjYW4gYmUgdXNlZCBpbiBsb2NhbFxuICAgICAgICAvLyB0eXBlIGFubm90YXRpb25zIHdpdGhpbiB0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bm90IGdldCBlbWl0dGVkIHR3aWNlLlxuICAgICAgICAgIGNvbnN0IGlkZW50ID0gdHMuY3JlYXRlSWRlbnRpZmllcihnZXRJZGVudGlmaWVyVGV4dChtZW1iZXJOYW1lKSk7XG4gICAgICAgICAgbWVtYmVyQWNjZXNzID0gdHMuY3JlYXRlUHJvcGVydHlBY2Nlc3ModHMuY3JlYXRlSWRlbnRpZmllcihuYW1lKSwgaWRlbnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIEZvb1tGb29bXCJBIEIgQ1wiXV0gPSBcIkEgQiBDXCI7IG9yIEZvb1tGb29bZXhwcmVzc2lvbl1dID0gZXhwcmVzc2lvbjtcbiAgICAgICAgICBuYW1lRXhwciA9IHRzLmlzQ29tcHV0ZWRQcm9wZXJ0eU5hbWUobWVtYmVyTmFtZSkgPyBtZW1iZXJOYW1lLmV4cHJlc3Npb24gOiBtZW1iZXJOYW1lO1xuICAgICAgICAgIG1lbWJlckFjY2VzcyA9IHRzLmNyZWF0ZUVsZW1lbnRBY2Nlc3ModHMuY3JlYXRlSWRlbnRpZmllcihuYW1lKSwgbmFtZUV4cHIpO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdE5vZGVzLnB1c2godHMuY3JlYXRlU3RhdGVtZW50KHRzLmNyZWF0ZUFzc2lnbm1lbnQoXG4gICAgICAgICAgICB0cy5jcmVhdGVFbGVtZW50QWNjZXNzKHRzLmNyZWF0ZUlkZW50aWZpZXIobmFtZSksIG1lbWJlckFjY2VzcyksIG5hbWVFeHByKSkpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdE5vZGVzO1xuICAgIH1cblxuICAgIHJldHVybiAoc2Y6IHRzLlNvdXJjZUZpbGUpID0+IHZpc2l0b3Ioc2YpIGFzIHRzLlNvdXJjZUZpbGU7XG4gIH07XG59XG4iXX0=

@@ -57,3 +57,12 @@ /**

suppressTag = { tagName: 'suppress', text: 'checked by tsc' };
tags.push(suppressTag);
// Special case the @license tag because all text following this tag is
// treated by the compiler as part of the license, so we need to place the
// new @suppress tag before @license.
const licenseTagIndex = tags.findIndex(t => t.tagName === 'license');
if (licenseTagIndex !== -1) {
tags.splice(licenseTagIndex, 0, suppressTag);
}
else {
tags.push(suppressTag);
}
suppressions = new Set();

@@ -179,2 +188,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZW92ZXJ2aWV3X2NvbW1lbnRfdHJhbnNmb3JtZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZmlsZW92ZXJ2aWV3X2NvbW1lbnRfdHJhbnNmb3JtZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7SUFFSCxpQ0FBaUM7SUFFakMsMkNBQWlDO0lBQ2pDLHlDQUErQjtJQUMvQixtRUFBOEg7SUFFOUg7OztPQUdHO0lBQ0gsTUFBTSw0QkFBNEIsR0FDOUIsSUFBSSxHQUFHLENBQUMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsYUFBYSxDQUFDLENBQUMsQ0FBQztJQUUzRTs7Ozs7O09BTUc7SUFDSCxTQUFTLDJCQUEyQixDQUNoQyxPQUEyQixFQUFFLE1BQXFCLEVBQUUsSUFBaUI7UUFDdkUsd0NBQXdDO1FBQ3hDLElBQUksWUFBWSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBTyxLQUFLLGNBQWMsQ0FBQyxDQUFDO1FBQ2hFLElBQUksQ0FBQyxZQUFZLEVBQUU7WUFDakIsWUFBWSxHQUFHLEVBQUMsT0FBTyxFQUFFLGNBQWMsRUFBRSxJQUFJLEVBQUUsa0JBQWtCLEVBQUMsQ0FBQztZQUNuRS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lLlxuICAgICAgcmV0dXJuIHNvdXJjZUZpbGU7XG4gICAgfTtcbiAgfTtcbn1cblxuZnVuY3Rpb24gYWRkTmV3RmlsZW92ZXJ2aWV3Q29tbWVudChzZjogdHMuU291cmNlRmlsZSwgY29tbWVudFRleHQ6IHN0cmluZyk6IHRzLlNvdXJjZUZpbGUge1xuICBsZXQgc3ludGhldGljRmlyc3RTdGF0ZW1lbnQgPSBjcmVhdGVOb3RFbWl0dGVkU3RhdGVtZW50KHNmKTtcbiAgc3ludGhldGljRmlyc3RTdGF0ZW1lbnQgPSB0cy5hZGRTeW50aGV0aWNUcmFpbGluZ0NvbW1lbnQoXG4gICAgICBzeW50aGV0aWNGaXJzdFN0YXRlbWVudCwgdHMuU3ludGF4S2luZC5NdWx0aUxpbmVDb21tZW50VHJpdmlhLCBjb21tZW50VGV4dCwgdHJ1ZSk7XG4gIHJldHVybiB1cGRhdGVTb3VyY2VGaWxlTm9kZShzZiwgdHMuY3JlYXRlTm9kZUFycmF5KFtzeW50aGV0aWNGaXJzdFN0YXRlbWVudCwgLi4uc2Yuc3RhdGVtZW50c10pKTtcbn1cbiJdfQ==

@@ -188,3 +188,3 @@ /**

// tslint:disable-next-line:no-any accessing TS internal API.
stringLiteral.singleQuote = true;
stringLiteral['singleQuote'] = true;
return stringLiteral;

@@ -285,2 +285,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmb3JtZXJfdXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy90cmFuc2Zvcm1lcl91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7O0lBRUgsaUNBQWlDO0lBRWpDLGdFQUFnRTtJQUNoRSxTQUFnQixlQUFlLENBQUMsV0FBMkIsRUFBRSxJQUFzQjtRQUNqRixPQUFPLENB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TtcbiAgY29uc3Qgbm9kZVRleHQgPSBub2RlLmdldEZ1bGxUZXh0KCk7XG4gIGNvbnN0IGNyID0gdHMuZ2V0TGVhZGluZ0NvbW1lbnRSYW5nZXMobm9kZVRleHQsIDApO1xuICBpZiAoY3IpIGFsbFJhbmdlcy5wdXNoKC4uLmNyLm1hcChjID0+ICh7Li4uYywgdGV4dDogbm9kZVRleHQuc3Vic3RyaW5nKGMucG9zLCBjLmVuZCl9KSkpO1xuICBjb25zdCBzeW50aGV0aWMgPSB0cy5nZXRTeW50aGV0aWNMZWFkaW5nQ29tbWVudHMobm9kZSk7XG4gIGlmIChzeW50aGV0aWMpIGFsbFJhbmdlcy5wdXNoKC4uLnN5bnRoZXRpYyk7XG4gIHJldHVybiBhbGxSYW5nZXM7XG59XG4iXX0=

@@ -212,3 +212,3 @@ /**

// tslint:disable-next-line: no-any
if (options.stripInternal && ts.isInternalDeclaration(d, origSourceFile)) {
if (options.stripInternal && ts['isInternalDeclaration'](d, origSourceFile)) {
return false;

@@ -300,2 +300,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNpY2tsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy90c2lja2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7O0lBRUgsaUNBQWlDO0lBR2pDLHlEQUE2QztJQUM3QyxpR0FBZ0Y7SUFDaEYsdURBQWlGO0lBQ2pGLG1FQUFtRDtJQUNuRCxpREFBMEM7SUFDMUMsbUdBQXVGO0lBQ3ZGLHFEQUEyQztJQUMzQyxxRUFBMkU7SUFDM0UsbUVBQW1EO0lBQ25ELG1FQUFpRDtJQUVqRCw0REFBNEQ7SUFDNUQsdURBQStDO0lBQXZDLHlDQUFBLGdCQUFnQixDQUFBO0lBQ3hCLHVDQUF1QztJQUN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4gICAgcmV0dXJuIChzb3VyY2VGaWxlOiB0cy5Tb3VyY2VGaWxlKSA9PiB7XG4gICAgICBpZiAoaG9zdC5zaG91bGRTa2lwVHNpY2tsZVByb2Nlc3Npbmcoc291cmNlRmlsZS5maWxlTmFtZSkpIHtcbiAgICAgICAgcmV0dXJuIHNvdXJjZUZpbGU7XG4gICAgICB9XG4gICAgICByZXR1cm4gZGVsZWdhdGUoc291cmNlRmlsZSk7XG4gICAgfTtcbiAgfTtcbn1cbiJdfQ==

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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