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

tsickle

Package Overview
Dependencies
Maintainers
3
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.37.0 to 0.37.1

23

package.json
{
"name": "tsickle",
"version": "0.37.0",
"version": "0.37.1",
"description": "Transpile TypeScript code to JavaScript with Closure annotations.",
"main": "src/tsickle.js",
"typings": "src/tsickle.d.ts",
"bin": "src/main.js",
"directories": {

@@ -14,19 +13,12 @@ "test": "test"

],
"dependencies": {
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"source-map": "^0.7.3"
},
"peerDependencies": {
"typescript": "~3.5.3"
"typescript": "~3.6.4"
},
"devDependencies": {
"@bazel/bazel": "^0.28.0",
"@bazel/jasmine": "^0.36.1",
"@bazel/typescript": "^0.33.1",
"@bazel/bazel": "^0.29.0",
"@bazel/jasmine": "^0.38.0",
"@bazel/typescript": "^0.38.0",
"@types/diff-match-patch": "^1.0.32",
"@types/glob": "5.0.35",
"@types/jasmine": "2.8.8",
"@types/minimist": "1.2.0",
"@types/mkdirp": "0.5.2",
"@types/node": "^10.5.6",

@@ -36,8 +28,9 @@ "clang-format": "^1.2.4",

"glob": "7.1.2",
"google-closure-compiler": "^20181125.0.1",
"google-closure-compiler": "^20190929.0.0",
"jasmine": "3.1.0",
"prettier": "1.14.0",
"source-map": "^0.7.3",
"source-map-support": "^0.5.6",
"tslint": "5.11.0",
"typescript": "~3.5.3"
"typescript": "3.6.4"
},

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

@@ -36,18 +36,17 @@ # Tsickle - TypeScript to Closure Translator [![Build Status](https://circleci.com/gh/angular/tsickle.svg?style=svg)](https://circleci.com/gh/angular/tsickle) [![Windows build](https://ci.appveyor.com/api/projects/status/puxdblmlqbofqqt1/branch/master?svg=true)](https://ci.appveyor.com/project/alexeagle/tsickle/branch/master)

### Project Setup
Tsickle is a library, designed to be used by a larger program that interacts
with TypeScript and the Closure compiler.
Tsickle works by wrapping `tsc`. To use it, you must set up your project such
that it builds correctly when you run `tsc` from the command line, by
configuring the settings in `tsconfig.json`.
Some known clients are:
If you have complicated tsc command lines and flags in a build file (like a
gulpfile etc.) Tsickle won't know about it. Another reason it's nice to put
everything in `tsconfig.json` is so your editor inherits all these settings as
well.
1. Within Google we use tsickle inside the [Bazel build
system](https://bazel.build/). That code is published as
open source as part of [Bazel's nodejs/TypeScript
build rules](https://bazelbuild.github.io/rules_nodejs/).
1. [tscc](https://github.com/theseanl/tscc) wraps tsickle and
closure compiler, and interops with rollup.
1. We publish a simple demo program in the `demo/` subdirectory.
### Invocation
## Design details
Run `tsickle --help` for the full syntax, but basically you provide any tsickle
specific options and use it as a TypeScript compiler.
### Output format

@@ -118,25 +117,30 @@

### Bazel install
### Dependencies
We use [bazel](https://bazel.build/) to build, and are pinned to an old version
of it in `package.json`. So unless you have that specific version of bazel installed,
you should run run `yarn bazel` instead of `bazel` in any of the below commands.
- nodejs. Install from your operating system's package manger, by following
instructions on https://nodejs.org/en/, or by using
[NVM](https://github.com/nvm-sh/nvm)
- yarn. Install from your operating system's package manager or by following
[instructions on yarnpkg.com](https://yarnpkg.com/en/docs/install).
- bazel. Install from your operating system's package manager or by [following
instructions here](https://docs.bazel.build/versions/master/install.html).
### One-time setup
Run `bazel run @nodejs//:yarn --script_path=yarn_install.sh && ./yarn_install.sh`
to install the dependencies.
Run `bazel run @nodejs//:yarn` to install dependencies.
> This avoids occupying the `bazel` server, so that `yarn` can call `bazel`
> again.
> Ideally we should just use `bazel-run.sh @nodejs//:yarn`, see
> https://stackoverflow.com/questions/47082298/how-can-users-get-bazel-run-sh
### Bazel install
We use [bazel](https://bazel.build/) to build, and are pinned to a specific
version of it in `package.json` for reproducible builds. The build rules check
for a compatible version of bazel, so it is generally safe to use your local
installed version. If in doubt, you can run `yarn bazel` instead of `bazel` in
any of the below commands to make sure you are using the right version.
### Test commands
- `ibazel test test:unit_test` executes the unit tests in watch mode (use `bazel test test:unit_test` for a
single run),
- `ibazel test test:unit_test` executes the unit tests in watch mode (use `bazel test test:unit_test` for a single run),
- `bazel test test:e2e_test` executes the e2e tests,
- `bazel test test:golden_test` executes the golden tests,
- `node check-format.js` checks the source code formatting using
- `node check_format.js` checks the source code formatting using
`clang-format`,

@@ -147,18 +151,22 @@ - `yarn test` runs unit tests, e2e tests and checks the source code formatting.

You can debug tests by using `bazel run` and passing `--node_options=--inspect`. For example, to
debug a specific golden test:
You can debug tests by using `bazel run` and passing `--node_options=--inspect`
or `--node_options=--inspect-brk` (to suspend execution directly after startup).
For example, to debug a specific golden test:
```shell
TEST_FILTER=my_golden_test ibazel run //test:golden_test -- --node_options=--inspect
TEST_FILTER=my_golden_test ibazel run //test:golden_test -- --node_options=--inspect-brk
```
Then open [about:inspect] in Chrome and choose "about:inspect". Chrome will launch a debugging
session on any node process that starts with a debugger listening on one of the listed ports. The
tsickle tests and Chrome both default to `localhost:9229`, so things should work out of the box.
Then open [about:inspect] in Chrome and choose "about:inspect". Chrome will
launch a debugging session on any node process that starts with a debugger
listening on one of the listed ports. The tsickle tests and Chrome both default
to `localhost:9229`, so things should work out of the box.
VS Code can also connect using the inspect protocol. It doesn't support automatically reconnecting
or any way to re-run the test suite though, so it is a less convenient. You can start the node
process passing an extra `--node_options=--debug-brk` (in addition to the parameters above) to have
Node wait before program execution, so you have time to attach VS Code.
The break in specific code locations you can add `debugger;` statements in the
source code.
Note: IDEs such as VS Code have support for the inspect protocol, but the
integration does not work due to bazel's complex directory layout.
### Updating Goldens

@@ -165,0 +173,0 @@

@@ -116,3 +116,2 @@ /**

return ts.visitEachChild(node, visitor, context);
const name = node.name.getText();
const isExported = transformer_util_1.hasModifierFlag(node, ts.ModifierFlags.Export);

@@ -130,2 +129,10 @@ const enumType = getEnumType(typeChecker, node);

}
else if (typeof enumConstValue === 'string') {
// tsickle does not care about string enum values. However TypeScript expects compile
// time constant enum values to be replaced with their constant expression, and e.g.
// doesn't emit imports for modules referenced in them. Because tsickle replaces the
// enum with an object literal, i.e. handles the enum transform, it must thus also do
// the const value substitution for strings.
enumValue = ts.createLiteral(enumConstValue);
}
else {

@@ -155,8 +162,8 @@ // Non-numeric enum value (string or an expression).

}
const memberName = member.name.getText();
values.push(ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(memberName, enumValue), member), member));
values.push(ts.setOriginalNode(ts.setTextRange(ts.createPropertyAssignment(member.name, enumValue), member), member));
}
const varDecl = ts.createVariableStatement(
/* modifiers */ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(name, undefined, ts.createObjectLiteral(ts.setTextRange(ts.createNodeArray(values, true), node.members), true))],
/* create a const var */ ts.NodeFlags.Const));
const varDecl = ts.createVariableDeclaration(node.name, /* type */ undefined, ts.createObjectLiteral(ts.setTextRange(ts.createNodeArray(values, true), node.members), true));
const varDeclStmt = ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(
/* modifiers */ undefined, ts.createVariableDeclarationList([varDecl],
/* create a const var */ ts.NodeFlags.Const)), node), node);
const comment = {

@@ -169,4 +176,5 @@ kind: ts.SyntaxKind.MultiLineCommentTrivia,

};
ts.setSyntheticLeadingComments(varDecl, [comment]);
const resultNodes = [varDecl];
ts.setSyntheticLeadingComments(varDeclStmt, [comment]);
const name = node.name.getText();
const resultNodes = [varDeclStmt];
if (isExported) {

@@ -215,2 +223,2 @@ // Create a separate export {...} statement, so that the enum name can be used in local

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

@@ -14,2 +14,2 @@ /**

*/
export declare function transformFileoverviewCommentFactory(diagnostics: ts.Diagnostic[]): () => (sourceFile: ts.SourceFile) => ts.SourceFile;
export declare function transformFileoverviewCommentFactory(options: ts.CompilerOptions, diagnostics: ts.Diagnostic[]): () => (sourceFile: ts.SourceFile) => ts.SourceFile;

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

else if (typeof define === "function" && define.amd) {
define("tsickle/src/fileoverview_comment_transformer", ["require", "exports", "typescript", "tsickle/src/jsdoc", "tsickle/src/transformer_util"], factory);
define("tsickle/src/fileoverview_comment_transformer", ["require", "exports", "typescript", "tsickle/src/jsdoc", "tsickle/src/path", "tsickle/src/transformer_util"], factory);
}

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

const jsdoc = require("tsickle/src/jsdoc");
const path = require("tsickle/src/path");
const transformer_util_1 = require("tsickle/src/transformer_util");

@@ -33,9 +34,17 @@ /**

*
* @param source Original TS source file. Its path is added in \@fileoverview.
* @param tags Comment as parsed list of tags; modified in-place.
*/
function augmentFileoverviewComments(tags) {
function augmentFileoverviewComments(options, source, tags) {
// Ensure we start with a @fileoverview.
if (!tags.find(t => t.tagName === 'fileoverview')) {
tags.splice(0, 0, { tagName: 'fileoverview', text: 'added by tsickle' });
let fileOverview = tags.find(t => t.tagName === 'fileoverview');
if (!fileOverview) {
fileOverview = { tagName: 'fileoverview', text: 'added by tsickle' };
tags.splice(0, 0, fileOverview);
}
if (options.rootDir != null) {
// This comment is read by other tools so it's important that its format
// doesn't change.
fileOverview.text += `\nGenerated from: ${path.relative(options.rootDir, source.fileName)}`;
}
// Find or create a @suppress tag.

@@ -80,3 +89,3 @@ // Closure compiler barfs if there's a duplicated @suppress tag in a file, so the tag must

*/
function transformFileoverviewCommentFactory(diagnostics) {
function transformFileoverviewCommentFactory(options, diagnostics) {
return () => {

@@ -154,3 +163,3 @@ function checkNoFileoverviewComments(context, comments, message) {

}
augmentFileoverviewComments(tags);
augmentFileoverviewComments(options, sourceFile, tags);
const commentText = jsdoc.toStringWithoutStartEnd(tags);

@@ -174,2 +183,2 @@ if (fileoverviewIdx < 0) {

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

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

*/
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 declare function jsdocTransformer(host: AnnotatorHost, tsOptions: ts.CompilerOptions, typeChecker: ts.TypeChecker, diagnostics: ts.Diagnostic[]): (context: ts.TransformationContext) => ts.Transformer<ts.SourceFile>;
export {};

@@ -335,3 +335,3 @@ /**

text.substring(cr.pos + 2, cr.end - 2);
return Object.assign({}, cr, { text: commentText, pos: -1, end: -1, originalRange: { pos: cr.pos + offset, end: cr.end + offset } });
return Object.assign(Object.assign({}, cr), { text: commentText, pos: -1, end: -1, originalRange: { pos: cr.pos + offset, end: cr.end + offset } });
});

@@ -457,2 +457,2 @@ }

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

@@ -49,2 +49,7 @@ /**

/**
* A cache for expensive symbol lookups, see TypeTranslator.symbolToString. Maps symbols to their
* Closure name in this file scope.
*/
private symbolToNameCache;
/**
* The set of module symbols requireTyped in the local namespace. This tracks which imported

@@ -51,0 +56,0 @@ * modules we've already added to additionalImports below.

@@ -276,3 +276,3 @@ /**

if (cr)
allRanges.push(...cr.map(c => (Object.assign({}, c, { text: nodeText.substring(c.pos, c.end) }))));
allRanges.push(...cr.map(c => (Object.assign(Object.assign({}, c), { text: nodeText.substring(c.pos, c.end) }))));
const synthetic = ts.getSyntheticLeadingComments(node);

@@ -285,2 +285,2 @@ if (synthetic)

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

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

else if (typeof define === "function" && define.amd) {
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);
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);
}

@@ -21,3 +21,2 @@ })(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");

@@ -70,12 +69,10 @@ const decorator_downlevel_transformer_1 = require("tsickle/src/decorator_downlevel_transformer");

const tsOptions = program.getCompilerOptions();
const thisTypeByAsyncFunction = new Map();
const tsickleSourceTransformers = [];
if (host.transformTypesToClosure) {
// Only add @suppress {checkTypes} comments when also adding type annotations.
tsickleSourceTransformers.push(fileoverview_comment_transformer_1.transformFileoverviewCommentFactory(tsickleDiagnostics));
tsickleSourceTransformers.push(jsdoc_transformer_1.jsdocTransformer(host, tsOptions, typeChecker, tsickleDiagnostics, thisTypeByAsyncFunction));
tsickleSourceTransformers.push(fileoverview_comment_transformer_1.transformFileoverviewCommentFactory(tsOptions, tsickleDiagnostics));
tsickleSourceTransformers.push(jsdoc_transformer_1.jsdocTransformer(host, tsOptions, typeChecker, tsickleDiagnostics));
tsickleSourceTransformers.push(enum_transformer_1.enumTransformer(typeChecker, tsickleDiagnostics));
tsickleSourceTransformers.push(decorator_downlevel_transformer_1.decoratorDownlevelTransformer(typeChecker, tsickleDiagnostics));
}
else if (host.transformDecorators) {
if (host.transformDecorators) {
tsickleSourceTransformers.push(decorator_downlevel_transformer_1.decoratorDownlevelTransformer(typeChecker, tsickleDiagnostics));

@@ -102,6 +99,2 @@ }

}
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.

@@ -118,3 +111,3 @@ const writeFileImpl = (fileName, content, writeByteOrderMark, onError, sourceFiles) => {

const originalSource = sourceFiles[0];
content = addClutzAliases(content, originalSource, typeChecker, host);
content = addClutzAliases(content, originalSource, typeChecker, host, tsOptions);
}

@@ -170,3 +163,3 @@ writeFile(fileName, content, writeByteOrderMark, onError, sourceFiles);

*/
function addClutzAliases(dtsFileContent, sourceFile, typeChecker, host) {
function addClutzAliases(dtsFileContent, sourceFile, typeChecker, host, options) {
const moduleSymbol = typeChecker.getSymbolAtLocation(sourceFile);

@@ -219,2 +212,9 @@ const moduleExports = moduleSymbol && typeChecker.getExportsOfModule(moduleSymbol);

}
// @internal marked APIs are not exported, so must not get aliases.
// This uses an internal TS API, assuming that accessing this will be more stable compared to
// implementing our own version.
// tslint:disable-next-line: no-any
if (options.stripInternal && ts.isInternalDeclaration(d, origSourceFile)) {
return false;
}
if (!ts.isExportSpecifier(d)) {

@@ -298,2 +298,2 @@ // we have a pure export (case 1) thus safe to emit clutz alias.

});
//# sourceM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HRzLlNvdXJjZUZpbGU+KTogdHMuVHJhbnNmb3JtZXJGYWN0b3J5PHRzLlNvdXJjZUZpbGU+IHtcbiAgcmV0dXJuIChjb250ZXh0OiB0cy5UcmFuc2Zvcm1hdGlvbkNvbnRleHQpID0+IHtcbiAgICBjb25zdCBkZWxlZ2F0ZSA9IGRlbGVnYXRlRmFjdG9yeShjb250ZXh0KTtcbiAgICByZXR1cm4gKHNvdXJjZUZpbGU6IHRzLlNvdXJjZUZpbGUpID0+IHtcbiAgICAgIGlmIChob3N0LnNob3VsZFNraXBUc2lja2xlUHJvY2Vzc2luZyhzb3VyY2VGaWxlLmZpbGVOYW1lKSkge1xuICAgICAgICByZXR1cm4gc291cmNlRmlsZTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBkZWxlZ2F0ZShzb3VyY2VGaWxlKTtcbiAgICB9O1xuICB9O1xufVxuIl19

@@ -30,5 +30,12 @@ /**

export declare function isBuiltinLibDTS(fileName: string): boolean;
/**
* Returns true if the symbol is defined in a Clutz-generated d.ts file.
*/
export declare function isClutzType(symbol: ts.Symbol): boolean;
export declare function typeToDebugString(type: ts.Type): string;
export declare function symbolToDebugString(sym: ts.Symbol): string;
/** TypeTranslator translates TypeScript types to Closure types. */
/**
* TypeTranslator translates TypeScript types to Closure types. It keeps state per type, so each
* translation operation has to create a new instance.
*/
export declare class TypeTranslator {

@@ -38,4 +45,5 @@ private readonly host;

private readonly node;
private readonly pathBlackList?;
private readonly pathBlackList;
private readonly symbolsToAliasedNames;
private readonly symbolToNameCache;
private readonly ensureSymbolDeclared;

@@ -62,3 +70,3 @@ /**

*/
constructor(host: AnnotatorHost, typeChecker: ts.TypeChecker, node: ts.Node, pathBlackList?: Set<string> | undefined, symbolsToAliasedNames?: Map<ts.Symbol, string>, ensureSymbolDeclared?: (sym: ts.Symbol) => void);
constructor(host: AnnotatorHost, typeChecker: ts.TypeChecker, node: ts.Node, pathBlackList: Set<string>, symbolsToAliasedNames: Map<ts.Symbol, string>, symbolToNameCache: Map<ts.Symbol, string>, ensureSymbolDeclared?: (sym: ts.Symbol) => void);
/**

@@ -65,0 +73,0 @@ * Converts a ts.Symbol to a string, applying aliases and ensuring symbols are imported.

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