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

tsickle

Package Overview
Dependencies
Maintainers
2
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.36.0 to 0.37.0

src/await_transformer.d.ts

10

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

@@ -20,6 +20,7 @@ "main": "src/tsickle.js",

"peerDependencies": {
"typescript": "~3.4.1"
"typescript": "~3.5.3"
},
"devDependencies": {
"@bazel/bazel": "^0.28.0",
"@bazel/jasmine": "^0.36.1",
"@bazel/typescript": "^0.33.1",

@@ -40,7 +41,8 @@ "@types/diff-match-patch": "^1.0.32",

"tslint": "5.11.0",
"typescript": "~3.4.1"
"typescript": "~3.5.3"
},
"scripts": {
"build": "bazel build //:npm_package",
"test": "node check_format.js && tslint -c tslint.json -p tsconfig.json && bazel test ..."
"lint": "node check_format.js && tslint -c tslint.json -p tsconfig.json",
"test": "yarn lint && bazel test ..."
},

@@ -47,0 +49,0 @@ "repository": {

4

src/annotator_host.d.ts

@@ -42,6 +42,2 @@ /**

/**
* If true, modify quotes around property accessors to match the type declaration.
*/
enableAutoQuoting?: boolean;
/**
* Whether tsickle should insert goog.provide() calls into the externs generated for `.d.ts` files

@@ -48,0 +44,0 @@ * that are external modules.

@@ -30,2 +30,2 @@ /**

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ub3RhdG9yX2hvc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYW5ub3RhdG9yX2hvc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7SUFvREg7Ozs7O09BS0c7SUFDSCxTQUFnQixzQkFB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VXNlZCByZXNvbHZpbmcgZmlsZSBuYW1lcyB0byBtb2R1bGVzLiAqL1xuICBtb2R1bGVSZXNvbHV0aW9uSG9zdDogdHMuTW9kdWxlUmVzb2x1dGlvbkhvc3Q7XG5cbiAgLyoqIFVzZWQgdG9nZXRoZXIgd2l0aCB0aGUgaG9zdCBmb3IgZmlsZSBuYW1lIC0+IG1vZHVsZSBuYW1lIHJlc29sdXRpb24uICovXG4gIG9wdGlvbnM6IHRzLkNvbXBpbGVyT3B0aW9ucztcbn1cblxuLyoqXG4gKiBSZXR1cm5zIGEgbWFuZ2xlZCB2ZXJzaW9uIG9mIHRoZSBtb2R1bGUgbmFtZSAocmVzb2x2ZWQgZmlsZSBuYW1lKSBmb3Igc291cmNlIGZpbGUuXG4gKlxuICogVGhlIG1hbmdsZWQgbmFtZSBpcyBzYWZlIHRvIHVzZSBhcyBhIEphdmFTY3JpcHQgaWRlbnRpZmllci4gSXQgaXMgdXNlZCBhcyBhIGdsb2JhbGx5IHVuaXF1ZVxuICogcHJlZml4IHRvIHNjb3BlIHN5bWJvbHMgaW4gZXh0ZXJucyBmaWxlIChzZWUgZXh0ZXJucy50cykuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBtb2R1bGVOYW1lQXNJZGVudGlmaWVyKGhvc3Q6IEFubm90YXRvckhvc3QsIGZpbGVOYW1lOiBzdHJpbmcpOiBzdHJpbmcge1xuICByZXR1cm4gaG9zdC5wYXRoVG9Nb2R1bGVOYW1lKCcnLCBmaWxlTmFtZSkucmVwbGFjZSgvXFwuL2csICckJyk7XG59XG4iXX0=

@@ -64,3 +64,3 @@ /**

*/
export declare function jsdocTransformer(host: AnnotatorHost, tsOptions: ts.CompilerOptions, typeChecker: ts.TypeChecker, diagnostics: ts.Diagnostic[]): (context: ts.TransformationContext) => ts.Transformer<ts.SourceFile>;
export declare function jsdocTransformer(host: AnnotatorHost, tsOptions: ts.CompilerOptions, typeChecker: ts.TypeChecker, diagnostics: ts.Diagnostic[], thisTypeByAsyncFunction: Map<ts.FunctionLikeDeclaration, string>): (context: ts.TransformationContext) => ts.Transformer<ts.SourceFile>;
export {};

@@ -50,2 +50,2 @@ /**

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

@@ -14,3 +14,3 @@ /**

else if (typeof define === "function" && define.amd) {
define("tsickle/src/tsickle", ["require", "exports", "typescript", "tsickle/src/cli_support", "tsickle/src/decorator_downlevel_transformer", "tsickle/src/enum_transformer", "tsickle/src/externs", "tsickle/src/fileoverview_comment_transformer", "tsickle/src/googmodule", "tsickle/src/jsdoc_transformer", "tsickle/src/modules_manifest", "tsickle/src/transformer_util", "tsickle/src/cli_support", "tsickle/src/externs", "tsickle/src/modules_manifest"], factory);
define("tsickle/src/tsickle", ["require", "exports", "typescript", "tsickle/src/await_transformer", "tsickle/src/cli_support", "tsickle/src/decorator_downlevel_transformer", "tsickle/src/enum_transformer", "tsickle/src/externs", "tsickle/src/fileoverview_comment_transformer", "tsickle/src/googmodule", "tsickle/src/jsdoc_transformer", "tsickle/src/modules_manifest", "tsickle/src/transformer_util", "tsickle/src/cli_support", "tsickle/src/externs", "tsickle/src/modules_manifest"], factory);
}

@@ -21,2 +21,3 @@ })(function (require, exports) {

const ts = require("typescript");
const await_transformer_1 = require("tsickle/src/await_transformer");
const cli_support_1 = require("tsickle/src/cli_support");

@@ -68,2 +69,4 @@ const decorator_downlevel_transformer_1 = require("tsickle/src/decorator_downlevel_transformer");

const typeChecker = program.getTypeChecker();
const tsOptions = program.getCompilerOptions();
const thisTypeByAsyncFunction = new Map();
const tsickleSourceTransformers = [];

@@ -73,3 +76,3 @@ if (host.transformTypesToClosure) {

tsickleSourceTransformers.push(fileoverview_comment_transformer_1.transformFileoverviewCommentFactory(tsickleDiagnostics));
tsickleSourceTransformers.push(jsdoc_transformer_1.jsdocTransformer(host, program.getCompilerOptions(), typeChecker, tsickleDiagnostics));
tsickleSourceTransformers.push(jsdoc_transformer_1.jsdocTransformer(host, tsOptions, typeChecker, tsickleDiagnostics, thisTypeByAsyncFunction));
tsickleSourceTransformers.push(enum_transformer_1.enumTransformer(typeChecker, tsickleDiagnostics));

@@ -100,2 +103,6 @@ tsickleSourceTransformers.push(decorator_downlevel_transformer_1.decoratorDownlevelTransformer(typeChecker, tsickleDiagnostics));

}
if (host.transformTypesToClosure && tsOptions.target &&
tsOptions.target <= ts.ScriptTarget.ES2015) {
tsTransformers.after.push(await_transformer_1.awaitTransformer(thisTypeByAsyncFunction));
}
// Wrap the writeFile callback to hook writing of the dts file.

@@ -289,2 +296,2 @@ const writeFileImpl = (fileName, content, writeByteOrderMark, onError, sourceFiles) => {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNpY2tsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2V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VzdGVkU3ltYm9scztcbiAgZHRzRmlsZUNvbnRlbnQgKz0gYFxcdH1cXG5gO1xuICBkdHNGaWxlQ29udGVudCArPSAnfVxcbic7XG5cbiAgcmV0dXJuIGR0c0ZpbGVDb250ZW50O1xufVxuXG5mdW5jdGlvbiBza2lwVHJhbnNmb3JtRm9yU291cmNlRmlsZUlmTmVlZGVkKFxuICAgIGhvc3Q6IFRzaWNrbGVIb3N0LFxuICAgIGRlbGVnYXRlRmFjdG9yeTogdHMuVHJhbnNmb3JtZXJGYWN0b3J5PHRzLlNvdXJjZUZpbGU+KTogdHMuVHJhbnNmb3JtZXJGYWN0b3J5PHRzLlNvdXJjZUZpbGU+IHtcbiAgcmV0dXJuIChjb250ZXh0OiB0cy5UcmFuc2Zvcm1hdGlvbkNvbnRleHQpID0+IHtcbiAgICBjb25zdCBkZWxlZ2F0ZSA9IGRlbGVnYXRlRmFjdG9yeShjb250ZXh0KTtcbiAgICByZXR1cm4gKHNvdXJjZUZpbGU6IHRzLlNvdXJjZUZpbGUpID0+IHtcbiAgICAgIGlmIChob3N0LnNob3VsZFNraXBUc2lja2xlUHJvY2Vzc2luZyhzb3VyY2VGaWxlLmZpbGVOYW1lKSkge1xuICAgICAgICByZXR1cm4gc291cmNlRmlsZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBkZWxlZ2F0ZShzb3VyY2VGaWxlKTtcbiAgICB9O1xuICB9O1xufVxuIl19

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