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

@angular/tsc-wrapped

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/tsc-wrapped - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

2

package.json
{
"name": "@angular/tsc-wrapped",
"version": "4.0.2",
"version": "4.0.3",
"description": "Wraps the tsc CLI, allowing extensions.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/angular/angular/tree/master/tools/tsc-wrapped",

@@ -14,6 +14,3 @@ "use strict";

// The character set used to produce private names.
var PRIVATE_NAME_CHARS = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
];
var PRIVATE_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz';
var MetadataBundler = (function () {

@@ -137,3 +134,2 @@ function MetadataBundler(root, importAs, host) {

this.exported = new Set(exportedSymbols);
;
symbols.forEach(this.canonicalizeSymbol, this);

@@ -352,13 +348,10 @@ };

// References to imported symbols are separated into two, references to bundled modules and
// references to modules
// external to the bundle. If the module reference is relative it is assuemd to be in the
// bundle. If it is Global
// it is assumed to be outside the bundle. References to symbols outside the bundle are left
// unmodified. Refernces
// to symbol inside the bundle need to be converted to a bundle import reference reachable
// from the bundle index.
// references to modules external to the bundle. If the module reference is relative it is
// assumed to be in the bundle. If it is Global it is assumed to be outside the bundle.
// References to symbols outside the bundle are left unmodified. References to symbol inside
// the bundle need to be converted to a bundle import reference reachable from the bundle
// index.
if (value.module.startsWith('.')) {
// Reference is to a symbol defined inside the module. Convert the reference to a reference
// to the canonical
// symbol.
// to the canonical symbol.
var referencedModule = resolveModule(value.module, moduleName);

@@ -371,3 +364,3 @@ var referencedName = value.name;

// If a reference has arguments the arguments need to be converted.
var result = {
return {
__symbolic: 'reference',

@@ -451,5 +444,2 @@ name: value.name,

}
function isMetadataArray(o) {
return Array.isArray(o);
}
function getRootExport(symbol) {

@@ -456,0 +446,0 @@ return symbol.reexportedAs ? getRootExport(symbol.reexportedAs) : symbol;

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

if (functionDeclaration.parameters.some(function (p) { return p.initializer != null; })) {
var defaults = [];
func.defaults = functionDeclaration.parameters.map(function (p) { return p.initializer && evaluator.evaluateNode(p.initializer); });

@@ -321,3 +320,2 @@ }

if (classDeclaration.name) {
var className = classDeclaration.name.text;
if (isExported(classDeclaration)) {

@@ -324,0 +322,0 @@ if (!metadata)

@@ -77,4 +77,3 @@ /**

// TODO: remove this early return after https://github.com/Microsoft/TypeScript/pull/8412
// is
// released
// is released
return;

@@ -81,0 +80,0 @@ }

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

}
;
}

@@ -133,3 +132,4 @@ if (!result) {

// We can fold a <array>.concat(<v>).
if (isMethodCallOf(callExpression, 'concat') && callExpression.arguments.length === 1) {
if (isMethodCallOf(callExpression, 'concat') &&
arrayOrEmpty(callExpression.arguments).length === 1) {
var arrayNode = callExpression.expression.expression;

@@ -146,3 +146,4 @@ if (this.isFoldableWorker(arrayNode, folding) &&

// We can fold a call to CONST_EXPR
if (isCallOf(callExpression, 'CONST_EXPR') && callExpression.arguments.length === 1)
if (isCallOf(callExpression, 'CONST_EXPR') &&
arrayOrEmpty(callExpression.arguments).length === 1)
return this.isFoldableWorker(callExpression.arguments[0], folding);

@@ -273,3 +274,4 @@ return false;

var callExpression = node;
if (isCallOf(callExpression, 'forwardRef') && callExpression.arguments.length === 1) {
if (isCallOf(callExpression, 'forwardRef') &&
arrayOrEmpty(callExpression.arguments).length === 1) {
var firstArgument = callExpression.arguments[0];

@@ -281,3 +283,3 @@ if (firstArgument.kind == ts.SyntaxKind.ArrowFunction) {

}
var args_1 = callExpression.arguments.map(function (arg) { return _this.evaluateNode(arg); });
var args_1 = arrayOrEmpty(callExpression.arguments).map(function (arg) { return _this.evaluateNode(arg); });
if (!this.options.verboseInvalidExpression && args_1.some(schema_1.isMetadataError)) {

@@ -295,3 +297,4 @@ return args_1.find(schema_1.isMetadataError);

// Always fold a CONST_EXPR even if the argument is not foldable.
if (isCallOf(callExpression, 'CONST_EXPR') && callExpression.arguments.length === 1) {
if (isCallOf(callExpression, 'CONST_EXPR') &&
arrayOrEmpty(callExpression.arguments).length === 1) {
return recordEntry(args_1[0], node);

@@ -310,3 +313,3 @@ }

var newExpression = node;
var newArgs = newExpression.arguments.map(function (arg) { return _this.evaluateNode(arg); });
var newArgs = arrayOrEmpty(newExpression.arguments).map(function (arg) { return _this.evaluateNode(arg); });
if (!this.options.verboseInvalidExpression && newArgs.some(schema_1.isMetadataError)) {

@@ -550,2 +553,6 @@ return recordEntry(newArgs.find(schema_1.isMetadataError), node);

}
var empty = [];
function arrayOrEmpty(v) {
return v || empty;
}
//# sourceMappingURL=evaluator.js.map

@@ -45,3 +45,3 @@ /**

var host_1 = ts.createCompilerHost(parsed_1.options, true);
// If the comilation is a flat module index then produce the flat module index
// If the compilation is a flat module index then produce the flat module index
// metadata and the synthetic flat module index.

@@ -150,3 +150,3 @@ if (ngOptions_1.flatModuleOutFile && !ngOptions_1.skipMetadataEmit) {

var args_1 = process.argv.slice(2);
var _a = ts.parseCommandLine(args_1), options = _a.options, fileNames = _a.fileNames, errors = _a.errors;
var _a = ts.parseCommandLine(args_1), options = _a.options, errors = _a.errors;
tsc_1.check(errors);

@@ -153,0 +153,0 @@ var project = options.project || '.';

"use strict";
;
function isVinylFile(obj) {

@@ -7,3 +6,2 @@ return (typeof obj === 'object') && ('path' in obj) && ('contents' in obj);

exports.isVinylFile = isVinylFile;
;
//# sourceMappingURL=vinyl_file.js.map

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

});
it('should be able to handle a new expression with no arguments', function () {
var source = sourceFileOf("\n export var a = new f;\n ");
var expr = typescript_mocks_1.findVar(source, 'a');
expect(evaluator.evaluateNode(expr.initializer))
.toEqual({ __symbolic: 'new', expression: { __symbolic: 'reference', name: 'f' } });
});
});
function sourceFileOf(text) {
return ts.createSourceFile('test.ts', text, ts.ScriptTarget.Latest, true);
}
var FILES = {

@@ -200,0 +209,0 @@ 'directives.ts': "\n export function Pipe(options: { name?: string, pure?: boolean}) {\n return function(fn: Function) { }\n }\n ",

@@ -42,2 +42,3 @@ import * as ts from 'typescript';

getLastToken(sourceFile?: ts.SourceFile): ts.Node;
forEachChild<T>(cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T): T;
}

@@ -44,0 +45,0 @@ export declare class MockIdentifier extends MockNode implements ts.Identifier {

@@ -95,2 +95,5 @@ "use strict";

MockNode.prototype.getLastToken = function (sourceFile) { return null; };
MockNode.prototype.forEachChild = function (cbNode, cbNodeArray) {
return null;
};
return MockNode;

@@ -97,0 +100,0 @@ }());

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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